Android : Using Intents / Intent Filters And Mime Types?
Feb 22, 2009
I've been grappling with an issue all day.
I am trying to create a program to deal with .torrent files that are clicked on and/or downloaded by the browser. Currently the downloader reports "Cannot download. the content being downloaded is not supported on the phone"
Im fairly sure this is doable as i recently encountered the same issue with pdf files untill i installed a pdf reader.
View 4 Replies
Sep 28, 2010
Is there any way (and preferably a pre-existing tool) to view the external features of an app, in particular the MIME types an activity supports?
View 5 Replies
View Related
Feb 12, 2009
I can't seem to find out how a MIME type is found. For instance, say I want my application to bring up Contacts. Where can I find the MIME type for that task? I currently have the following:
Intent intent = new Intent(); intent.setAction(Intent.ACTION_GET_CONTENT); intent.setType("*/*");
Intent newIntent = Intent.createChooser(intent, null); startActivityForResult( newIntent , SHOW_VERIFY_ACTIVITY );
And the wildcards work. But I would like to be more explicit. Like the following:
intent.setType("vnd.android.cursor.item/contacts");
...but is not valid.
View 2 Replies
View Related
Nov 8, 2009
Is there a way to use setType() and supply multiple broad types (like images and video)?
I'm using an ACTION_GET_CONTENT. It seems to be working with just comma-separated types.
View 2 Replies
View Related
Jul 3, 2010
I've read lots of articles about intent filters and I really can't understand exactly what they do? so please if anybody can explain to me with a clear example what is the role of intent filters exactly ?
View 4 Replies
View Related
Jul 23, 2010
In my android app, I wanted to start an activity 'B' from initial activity 'A'. I have created classes for both of these. However when using following code to start B, I get runtime error as application has stopped unexpectedly, try again.
CODE:..........
When I added a new entry in AndroidManifest.xml/manifest/application/activity/intent-filers for activity B then the application worked.
I have two questions:
When there are multiple activities entries in AndroidManifest.xml, how does android know which activity to start first?
I could not understand intent-filters.
Here is my partial AndroidManifest.xml
CODE:...................
View 1 Replies
View Related
Oct 31, 2010
I'm writing a client application for an Italian social network (Meemi) and I'd like to give the possibility to users to share their calendar events via my client. I noticed on my device (HTC Desire) that is possible to access to a "share chooser" from the Calendar event list: in fact I can share via email, sms, and bluetooth. I'd like to add my client to the this sharing list: but I'm not able to found the right intent filter to use.
View 2 Replies
View Related
Nov 4, 2010
I have search Android docs and for some insane reason I am not able to find the list of all available intent filters.
I am finding an intent filter, which would do something like , notifying me through Broadcast Receiver that a particular Activity (example browser, or email ) has been started or in foreground. Can anyone help me with that .
View 1 Replies
View Related
Aug 1, 2010
Is there a way to know which Intent Filter is responsible for launching an Activity which has two Intent Filters defined in AndroidManifest.xml? I want a slightly different set of logic, but not enough that should require a whole new Activity.
View 1 Replies
View Related
Jun 10, 2010
I am interested in activating another application's activity. I know from reading the Android SDK that it's probably better to do this with an implicit intent. However, this activity doesn't reside in an application I own, so I don't know the action and category and data flags on the intent-filter.
How can I examine an Android applications metadata like the activity classes and the intent-filters for those activities (if declared in the manifest)?
View 2 Replies
View Related
Apr 15, 2010
I'm currently exploring Broadcast Receivers and Broadcast Intent. There are some aspects of the tutorials which are ambiguous to me. To my knowledge this is how the process works. I can broadcast an intent from my application and any receiver on the phone can act on that intent as long as the actions match. I can register a broadcaster receiver on anything that extends Context and when I do so I must provide a filter which will allow the receiver to act on one or more intent actions.The part which confuses me is defining a receiver via the manifest. Must the name of said receiver match a class name? Why should I ever define an intent filter with an action in the project manifest if I always have to provide another intent filter when I register my receiver in code?
View 1 Replies
View Related
Feb 16, 2010
I added an intent filter to one of my activities, so that when a user clicks a URL like "www.mysite.com", and if my app is installed, my registered activity can be launched. It works well.
I see that this creates a new instance of my registered activity though, every time a link is clicked. Is there any way to prevent multiple instances from being created - just recycle an existing instance if one already exists?
View 6 Replies
View Related
Apr 30, 2010
I have one WidgetProvider but expect the user to have multiple instances of the widget on the home screen. When the user clicks on the widget, an intent is fired to start an activity A passing a String extra (which is specific to that instance of the app widget). Everything works fine unless the activity is already running, in which case the activity is shown in its previous state (and so the intent extra data is ignored). I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK) but they don't seem to help.
View 4 Replies
View Related
Aug 27, 2010
I have an intent filter to intercept urls from the browser on my domain. This will give the user the the choice of using the native application or the browser. I have setup the following intent filter as so.
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="myDomain" android:pathPrefix="/custom/" android:scheme="http" />
</intent-filter>
Now, it's not my intention to trap the user in the native application as there is much benefit from using the browser. So I would like to give the user some ability to go back to the browser within the application. I have created a button with an onClick that simply creates an intent for View and the url that would represent it. This will present the user with the choice dialog again. The catch to this is that a user is also allowed to select a checkbox to always use the native application. While that is well and good, sometimes absolutes are wrong.
So if I am reading a blog post that mentions a specific url and a specific part of that document, intercepting the url is not what the user intended but will send them to the native application. Also then upon selecting the button with the intent, they will immediately be sucked back into the application. How can you structure a ACTION_VIEW intent for the system browser or at least detect that the user has selected always use the native app so that you can use the ACTION_WEB_SEARCH (it has a different UI behavior with the history stack, which is why I wouldn't opt to use this action all the time).
View 1 Replies
View Related
May 11, 2010
I need to create a list view that display same functionality as Contact App. I need to have a scroller through which i can traverse the list alphabetically. To achieve this i am following an example from API demos "com.example.android.apis.view.List1.java". It is using a textfilter. When i implement this functionality on a static list view => it is working fine. But when i try this on a dynamic listview=> it is not working.
View 2 Replies
View Related
Nov 7, 2009
I have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...
View 3 Replies
View Related
Feb 26, 2009
I would like to run my app when a file extention is selected (from web browser, file browser, mail, ... : from everywhere in Android)
So : can I have a clear example of Manifest/xml and Java code to handle, let's say "*.doc" ?
What should be done in my Manifest.xml How to get the filename and read it from the Java code (from an Activity)
View 5 Replies
View Related
Jan 21, 2009
Is anyone aware of options for S/MIME email support on Android? My company uses S/MIME for email encryption and it does not appear to be supported in the default mail client.
View 6 Replies
View Related
May 2, 2009
I would like to a mimetype to Android Web browser, to allow opening my application when a certain mime type file is downloaded by the web browser. Apparently, only media file's mime type can be supported by the web browser. Is it right? How can I do it?
View 5 Replies
View Related
Sep 19, 2010
My app has two private file formats with distinctive extensions. How to I register their MIME types and associate them with file extensions? My understanding that then my app can be launched to handle a file. How is this done and how to extract the file path my app is launched to handle?
View 4 Replies
View Related
Jun 15, 2010
I would like to get the mime type of my local media file (3gpp , mp4, ...etc) if it is of video then i want to allocate a SurfaceView for it additionally otherwise i just use MediaPlayer to play it i have found opencore has provided some interface for that and used by mediascanner.cpp but it seems in android media framework it isnt so can i achieve this by using android media framework?
View 4 Replies
View Related
Feb 12, 2009
I kept my .apk file in my "apache" webserver at "Document root" path. This is the only file at Document Root . I had removed index.html file at this location. If I keep the index.html file then other files where not displayed if I open the URL i.e http://<ip_address> using a web browser Now from my Google phone browser I'm able to download the apk file and and install it in Google phone. Note 1: I had not done any settings to add the MIME type "application/ vnd.android.package-archive" in apache web server. Note 2: I was connecting to my webserver through WiFi. But the same apk file I was not able to download from my Gmail (as attachment) and I got "unknown file type" error in this case. After reading few related topics, I came to know about the MIME type support required in webserver for android applications. Now I'm wondering how come file gets installed sucessfully from my apache webserver even without adding the MIME type "application/ vnd.android.package-archive". Any clues what's happening here?
View 4 Replies
View Related
Aug 14, 2010
Trying to figure what's wrong with my codings. I followed a blog post from here. I managed to get the codes to actually upload the file to a PHP web service. However, for some reason although I've set explicitly the MIME type for the file, PHP shows that the MIME is just a blank string and therefore rejected.
View 2 Replies
View Related
Jan 28, 2010
I want to register my application for files of a certain popular and well-documented MIME-type. The problem is that Android does not seem to recognize this MIME-type. The following sample code demonstrates this:
package com.example.helloandroid;
import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView;
public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); String extn = android.webkit.MimeTypeMap.getFileExtensionFromUrl("/data/a.xyz"); String xyzMimeType = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension (extn); Log.d ("HelloAndroid", "extn: " + extn + " | xyzMimeType: " + xyzMimeType); }
}
View 6 Replies
View Related
Feb 14, 2010
I'm using the Eclipse plugin to view log output using LogCat. I want to use a filter all messages with the tag. But it doesn't work, how can I do this?
View 2 Replies
View Related
Jun 18, 2010
As the world cup is the main sport event and the Vuvuzelas are the most annoying sound in the world, I had an idea to remove them definitively by reading this new ( http://www.popsci.com/diy/article/2010-06/simple-software-can-filter-out-vuvuzela-whine) that told us that the sound has some frequencies at 233Hz + 466,932,1864Hz.
I have already made a lot of Android application by myself but never touching the signal analysis and filtering part, so here are a few questions, I do not ask for precise answer but maybe links and tutorial to find something to work on. I guess that a new Android phone has the CPU and power to make real-time filtering.
1) How can I intercept the sound coming from the Jack microphone - Line-IN plug- ( I plan to link my TV to my phone with Jack to Jack plug). My question is totally software and coding, I have all the wires and adapters to plug a jack into my android phone Line IN.
2) Are there some Fourier analysis librairies, may I have a look to Java libraries on the web and import them to my Android project?
View 2 Replies
View Related
Nov 18, 2010
I want to set in project properties build target 2.2 (api level 8) In the manifest.xml <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/> is declared. Did anybody tried, if any user (with min. Android 1.5) see application in the market? Could some other problems occur because of different SDK for building and in manifest?!
View 2 Replies
View Related
May 4, 2010
I need to create a list view that display same functionality as Contact App. I need to have a scroller through which i can traverse the list alphabetically. To achieve this i am following an example from API demos "com.example.android.apis.view.List1.java". When i implement this functionality on a static list view => it is working fine. But when i try this on a dynamic listview=> it is not working.
View 1 Replies
View Related
Jun 18, 2010
Anything out there that can help keep app browsing secure and safe?Also anything that can be added to the standard browser to put browsing restrictions on without having to turn it on and off with every reboot?
View 2 Replies
View Related
Apr 3, 2010
Have been wondering whether there is an app out on the market that blocks phone calls at certain periods of time throughout the day! Such as at night time, I get obnoxious calls that wake me up! Or while I'm in class... Is there such an app that blocks phone calls from like 12AM to 7AM. I've been googling like crazy and I can only find apps that block certain phone numbers.
View 5 Replies
View Related