Android : What Is An Intent-filter Show An App When Sharing A Url?
Nov 5, 2010
I have looked at the intent-filter documentation and I can't figure out this specific intent-filter. I'm looking to use ACTION_SEND because I only want the app to show up in "Share" menus in other apps. I only want to show up in the share menu if the text of the intent is a url. For example, what is shared from the Android Browser's share menu. I don't want the app to appear in the share menu if it's just text and not a url.
View 1 Replies
Jun 25, 2010
Perhaps I'm misunderstanding how Intents and intent-filters work, but it seems to me that this should be a strait-forward case. However it's not working. Here is the Intent I'm sending:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setType("vnd.android.cursor.item/vnd.connectsy.event");
startActivity(i);
And here is the intent-filter:
<activity android:name=".events.EventView">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="vnd.android.cursor.item/vnd.connectsy.event" />
</intent-filter>
</activity>
And finally, the error I'm receiving:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=vnd.android.cursor.item/vnd.connectsy.event }
View 1 Replies
View Related
Sep 14, 2010
I built an Android application that requires OAuth. All was working well using a custom scheme call back which is intercepted by Android. It seems that Yahoo have changed the goal posts and now the custom scheme is not accepted by Yahoo.I am now looking at possible alternate approaches. My first attempt is to use a normal http scheme and modify my intent filter to intercept the new URL. I have the following in my AndroidManifest.xml :
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.test.com" android:scheme="http"></data>
</intent-filter>
Where www.test.com will be substituted with a domain that I own. It seems :
* This filter is triggered when I click on a link on a page.
* It is not triggered on the redirect by Yahoo, the browser opens the website at www.test.com
* It is not triggered when I enter the domain name directly in the browser.
So can anybody help me with
* When exactly this intent-filter will be triggered?
* Any changes to the intent-filter or permissions that will widen the filter to apply to redirect requests?
* Any other approaches I could use?
View 1 Replies
View Related
Oct 12, 2010
are there any docs covering the filtering of the protocol specifier? Something like the market application does with "market://", i'd like to make with my application.
View 3 Replies
View Related
Jul 2, 2010
How to send a message from one activity to another using intent and intent filters?
View 1 Replies
View Related
Oct 27, 2010
I'm looking for an intent filter for when you are at the contact list and you long press a contact so a the menu comes up
View 1 Replies
View Related
Aug 14, 2010
I'm trying to figure out how to launch an activity in my app from a custom URI such as myapp://myuriactivity I've read a lot about the intent and intent filters in the android references and also read several examples, but for some reason I can't get my simple test to work. Below is my manifest file, can anyone tell me what I'm doing wrong? With the below file, if I open the browser and try to navigate to http://org.test.launchtest it just says the page doesn't exist. Shouldn't this work?
View 1 Replies
View Related
Jul 20, 2010
When creating an intent with action send to send some data, is there a way to filter the results that are included in the activity chooser that is created using Intent.createChooser? I have not seen a way to do this other than setting the mime type, but it is not flexible enough.
For example, there is a situation when I want e-mail apps to be the only results in the activity chooser dialog. Setting the type to "text/ html" successfully filters this down to email apps, except when bluetooth is enabled. Bluetooth appears in the list as well, but this is not desirable. Surely there is a way to have a little more control over the results?
View 3 Replies
View Related
Jul 6, 2010
I am new to android platform.please help me out how the Broadcast Receiver and Intent Filter behaves in android.please explain in simple line or with example.
View 1 Replies
View Related
Oct 5, 2010
I realise one has to use an intent filter to associate a file format with an application, but once this is done how does the app 'receive' the path to the file that was chosen? Is there a special method it calls on the Activity?
View 2 Replies
View Related
Jan 11, 2010
I'm trying to catch an action like ACTION_HEADSET_PLUG. But I think it might be too much to set this action on the manifest file.
How could I register a listener for this action? I only need to care about it when my application is running not all the time as I think it would happen when registering it under the manifest file...
View 4 Replies
View Related
Feb 6, 2010
I'm registering an intent-filter on an activity to listen for url clicks from a certain domain:
CODE:.............
This works, but is there a way to filter out certain urls from my domain? For example, my app can only do something useful for the user if it gets a url like: www.mywebsite.com/orange
But if the user clicks on a link like: www.mywebsite.com/blue
I can't do anything useful for them, so I'd like to just let them continue using the browser to open that url. Is there a way I get a chance to see the URL before android pops up the chooser dialog and presents my app as a possible handler for the url? Is there some method in Activity which allows me to filter?
View 3 Replies
View Related
Feb 6, 2010
I'm using an intent-filter on URLs for my activity:
CODE:...............
the launchMode attribute is set to "singleTop", but it looks like a new activity is created every time I click a matching url. I thought that if the activity is already alive somewhere, it would simply be brought to the front of my activity stack?
I tried this on the emulator/device, same behavior, a new activity instance is always created.
View 2 Replies
View Related
Jul 6, 2010
Trying to grok intents and actions in android and looking through the documentation. But one thing I keep seeing is an intent filter with multiple actions defined.
Like this, from the above link:
CODE:...........
But, if you call that activity, how does it choose which action is chosen?
For that matter, that linked to example has multiple activities that all contain the same actions, "android.intent.action.VIEW" for example. When calling this with something like content://com.google.provider.NotePad/notes how does it even know which activity to use?
View 1 Replies
View Related
Apr 19, 2010
I am building an Android application that requires OAuth. I have all the OAuth functionality working except for handling the callback from Yahoo.
I have the following in my AndroidManifest.xml:
CODE:..............
Where www.test.com will be substituted with a domain that I own.
It seems :
This filter is triggered when I click on a link on a page. It is not triggered on the redirect by Yahoo, the browser opens the website at www.test.com It is not triggered when I enter the domain name directly in the browser.
When exactly this intent-filter will be triggered? Any changes to the intent-filter or permissions that will widen the filter to apply to redirect requests?
View 3 Replies
View Related
May 16, 2010
In an Android manifest, how can I use a negative match in the android:pathPattern? I'd like to use a pathPattern that matches on all URLs except for a specific hostname, if it's possible.
View 1 Replies
View Related
Apr 4, 2010
I'm trying to get a BroadcastReceiver invoked when the screen is turned on. In my AndroidManifest.xml I have specified:
<receiver android:name="IntentReceiver">
<intent-filter>
<action android:name="android.intent.action.SCREEN_ON">
</action>
</intent-filter>
</receiver>
However it seems the receiver is never invoked (breakpoints don't fire, log statements ignored). I've swapped out SCREEN_ON for BOOT_COMPLETED for a test, and this does get invoked. This is in a 1.6 (SDK level 4) project. A Google Code Search revealed this, I downloaded the project and synced it, converted it to work with latest tools, but it too is not able to intercept that event.
http://www.google.com/codesearch/p?hl=en#_8L9bayv7qE/trunk/phxandroid-intent-query/AndroidManifest.xml&q=android.intent.action.SCREEN_ON
Is this perhaps no longer supported? Previously I have been able to intercept this event successfully with a call to Context.registerReceiver() like so:
registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
// ... }
}, new IntentFilter(Intent.ACTION_SCREEN_ON));
However this was performed by a long-living Service. Following sage advice from CommonsWare I have elected to try to remove the long-living Service and use different techniques. But I still need to detect the screen off and on events.
View 1 Replies
View Related
Feb 3, 2010
I want to set up a BroadcastReceiver to handle PACKAGE_REPLACED, but I only want to be notified when my package is replaced. It works fine if I specify a data tag with scheme="package" but then I get notified when any application is reinstalled or upgraded. I can't figure out how I'm supposed to specify the package name which is in the scheme specific part -- that is, when my BroadcastReceiver gets the intent in onRecieve(), if I do intent.getData().getSchemeSpecificPart(), that's the package name, but is there any way I can filter for only that in my intent-filter?
View 1 Replies
View Related
Sep 13, 2010
I have a Service defined in the manifest with an intent filter that refuses to match when specified as a String resource but works when the literal action is entered in the manifest. Is there any reason I should not be able to use a String resource with an action in an intent filter?
View 3 Replies
View Related
Nov 10, 2010
This question has been asked [numerous times] before, but I have not seen any definitive answers, or examples of code that actually works. I would like to associate an Activity with a particular file type. For discussion, assume that I want my Activity to be associated with PDFs. Here is what I currently have. I have experimented with many different values and combinations of values in the intent-filter, but I have yet to get my Activity to start when a PDF is selected.
<activity name="com.mycompany.MyActivity">
<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:scheme="file" />
<data android:mimeType="application/pdf" />
<data android:pathPattern="*.pdf" />
<data android:host="*" />
</intent-filter> </activity>
View 1 Replies
View Related
Jun 12, 2010
I have a Cursor that returns rows I use with a SimpleCursorAdapter to populate a ListView. I would like to filter some of the rows so they don't get displayed in my ListView. I use the data from the rows elsewhere in my Activity so I don't want to change my SQL to filter them with a WHERE clause. What is the best way to keep a row from being displaying in my ListView? Ideally I would check a column in my row and then only add rows to the ListView that satisfy a condition.
View 2 Replies
View Related
Sep 3, 2010
I'm adding an intent filter to my android application and I want it to catch requests that go http://www.somedomain.com/[numericValue].I only want to catch it if the path is numeric, but if it has text, I don't care about it.I tried the pathPattern of [0123456789]*, but that didn't work. Is this possible to do?
View 1 Replies
View Related
Aug 24, 2010
I tried using the following data in my intent filter:<data android:scheme="http" android:host="an.example.i.p" android:pathPrefix="t" />.
View 1 Replies
View Related
Apr 3, 2010
I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?
View 1 Replies
View Related
Apr 10, 2009
In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error.
Here are the classes:
CODE:...........
The second class that should show when the button is clicked, but never does:
CODE:........
How do I create a button that will show the second activity?
View 3 Replies
View Related
Jul 6, 2010
I have found this erroneous behaviour on my phone, please let me know if you have any idea how to resolve it. However, when I open this intent, the gps on the device starts and google maps first displays my location instead of the location in the URI. This happens only the first time you open google maps. If I go back to my app and make the same selection, then the correct position on the map appears.I tried using something like this: geo:0,0?q=*business+near+city, however this doesnt centers the map on a position, but in the nearest address.
View 2 Replies
View Related
Jul 2, 2010
Having had the Nexus one with glorious Stock Android I'm struggling with some of the Samsung 'improvements'. The primary issue for me right now is that I've got the nasty Sammy Contacts app (with it's non-maintained-aspect-ration contact pics, i HATE that) sync to Google Contacts, but it shows them all! On the N1 I could filter so that I could only view 'My Contacts' from Google, a nice limited Group I could readily maintain. I can see no option to do this on the SGS. Anyone found it? Can't wait for a stock android ROM for this beast, it is awesome but as of yet I can't see how Samsung added any value with their SW meddling.
View 6 Replies
View Related
Jan 16, 2010
Is it possible to show a list of applications (with intent.createChooser) that only show me my twitter apps on my phone (so htc peep (htc hero) or twitdroid). I have tried it with intent.settype("application/twitter") but it doesnt find any apps for twitter and only shows my mail apps.
View 3 Replies
View Related
Sep 19, 2012
I have my Google account also setup on my wife's phone so we can share purchased apps. However, everything else is shared too. For example, even though I have sync for everything on my account turned off, my calendar still showed up on my wife's phone until I disabled it in the calendar app. Also, I can't remove my Google Talk account from her phone so my messages show up on her phone.
This is on a pair of stock Samsung Galaxy S3 phones.
View 2 Replies
View Related
Sep 22, 2010
Does anyone know of an app that will filter internet or block it.
View 2 Replies
View Related