Android :: Service Intent Filter Action String Resource

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?

Android :: Service Intent Filter Action String Resource


Android :: Creating Intent With Action / Any Way To Filter Results

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

Android :: Catching An Action Without Setting An Intent Filter?

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

Android :: Register .intent.action.SEND In Service

Apr 26, 2010

I want to receive Intent "android.intent.action.SEND" in a Service. Is it possilbe to register for this Intent via registerReceiver() and get the Intent in Broadcast receiver in the Service?

Or is there any restrictions that "android.intent.action.SEND" can only be registered via Manifest.xml of an Activity and not in a Service?

View 2 Replies View Related

Android :: Supplying Action / Data Where Filter Had Only Action

Oct 31, 2010

I thought that Action was preeminent during intent resolution and if the intent had the same action as the intent filter, it would be considered a match regardless of data, if the filter did not specify anything. So I was very surprised to find that supplying action+data where filter had only action, causes it to fail. In the code below, if you comment out line 47 so that data is *not* sent, only then it resolves correctly. To get it to work with the data (an id that is simply a String), what mime type should I specify in the intent filter?

View 11 Replies View Related

Android :: Catch.intent.action.ACTION UMS CONNECTED Event

Nov 3, 2010

I want to show some notification when android phone is connected to system. I implemented BroadcastReceiver for listening to event android.intent.action.ACTION_UMS_CONNECTED in my application But it is not working. Is it possible to capture this event.

View 3 Replies View Related

Android :: Reference String In String Array Resource With Xml

Nov 12, 2010

I have preferences where you can enable/disable what items will show up on the menu. There are 17 items. I made a string array in values/arrays.xml with titles for each of these 17 items.

I have preferences.xml which has the layout for my preferences file, and I would like to reference a single item from the string array to use as the title.

In the Android developer reference, I see how I can reference a single string with XML, but now how I can reference a string from an array resource in XML.

View 3 Replies View Related

Android :: Intent Object Not Triggering Filter

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

Android :: Intent Filter For Http Scheme

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

Android :: Intent Filter By Protocol Specifier

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

Android :: How To Send Message Through Intent Filter

Jul 2, 2010

How to send a message from one activity to another using intent and intent filters?

View 1 Replies View Related

Android :: Intent Filter For When At Contact List?

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

Android : Can't Get Intent Filter To Launch Activity From A Uri

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

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 View Related

Android :: HTML In String Resource?

Apr 19, 2010

I know I can put escaped HTML tags in string resources. However, looking at the source code for the Contacts application I can see that they have a way of not having to encode the HTML.Unfortunately, when I try something similar (like Hello, <b>World</b>!), getString() returns the string without the tags (I can see that in logcat). Why is that? How can I get the original string, with tags and everything? How is the Contacts application doing it?

View 1 Replies View Related

Android :: How Broadcast Receiver And Intent Filter Behaves?

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

Android :: Retrieving File Path When Using Intent Filter

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

Android :: Filtering Urls Within An Activity's Intent-filter?

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

Android :: New Activity Instance Created For Every Intent-filter?

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

Android :: Default When Using Multiple Actions In Intent-Filter

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

Android :: Handle OAuth Callback Using Intent-filter

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

Android :: How To Perform A Negative Match In Intent Filter?

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

Android :: Open Resource From Drawable String

Feb 28, 2010

I have:
String uri = "@drawable/myresource.png";
How can I load that in ImageView? this.setImageDrawable?

View 2 Replies View Related

Android :: How To Access String Resource From Another Application?

Oct 8, 2010

I have a application 'A' and application 'B'. Say, I have a string resource in the application 'A'.

<string name="abc">ABCDEF</string>
How do I access the value of abc from the Activity in 'B'.
I tried the following method.
try { PackageManager pm = getPackageManager();
ComponentName component = new ComponentName( "com.android.myhome", "com.android.myhome.WebPortalActivity");
ActivityInfo activityInfo = pm.getActivityInfo(component, 0);
Resources res = pm.getResourcesForApplication(activityInfo.applicationInfo);
int resId = res.getIdentifier("abc", "string", null);
} catch(NameNotFoundException e){ }

Always resId is returned 0 always. Can anyone please let me know if I could access string abc from the application 'B'.

View 1 Replies View Related

Android :: How To Determine Resource String Is Existing Or Not?

May 18, 2009

I want to determine a resource string is existing or not. Because other programs in my system will build this string, I need to check the string building is success or not. If fail, I would replace this string as other string. is it possible to check R.build.buildid is existing or not?

View 4 Replies View Related

Android :: Internal String Resource References

Nov 5, 2010

I wonder if it's possible to reference a XML string value in another XML String resource.But in case of an concated resource string, I found no solution yet,I would like to keep the string references in the string.xml file itself.

View 1 Replies View Related

Android :: How To Change String Resource Xml Values?

Jan 15, 2010

Is there any possibility to Edit String.xml values in Android? Please suggest me the possible ways.I want to provide Enable/Disable option for my App. To accomplish this I can use SQLite database. But I doesn't like to Use DB for a single variable value.

View 1 Replies View Related

Android :: 1.6 SDK Level 4 Project / Receiver Intent Filter Never Invoked

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

Android :: Specify Scheme Specific Part In Data Tag For An Intent-filter?

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

Android :: String-array - Resource Into A String Array

Mar 31, 2009

I just want to read <string-array> resource elements into a String array. I don't want to make a view or anything and mess with adapters - just want to transfer the elements. Is there a built in class for this? Or do I need to treat the resource file as a regular file?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved