//Create the filter with the action
IntentFilter filter = new IntentFilter( "android.intent.action.View" );

//Set the categories
filter.addCategory( "android.intent.category.DEFAULT" );
filter.addCategory( "android.intent.category.BROWSABLE" );

//Set the data info ("host" is dataAuthority in Java)
filter.addDataAuthority("path" );
filter.addDataScheme( "myapp" );






________________________________
 From: ntt broken <[email protected]>
To: [email protected] 
Sent: Wednesday, February 20, 2013 4:47 AM
Subject: [android-developers] Re: Creating new intent with "<data 
android:scheme..>".
 

is there anybody out there?


On Thu, Feb 14, 2013 at 7:21 PM, ntt broken <[email protected]> wrote:

can someone share more info on this one? thank you!
>
>
>
>On Mon, Jan 28, 2013 at 9:56 AM, ntt broken <[email protected]> wrote:
>
>Hi,
>>
>>
>>How can i create an intent (Java code) that will be compatible with intent 
>>filter declared? 
>>
>>
>>for example, if this is the intent filter declared in the AndroidManifest.xml:
>>
>>
>><activityandroid:name=".MyUriActivity"><intent-filter><actionandroid:name="android.intent.action.VIEW"/><categoryandroid:name="android.intent.category.DEFAULT"/><categoryandroid:name="android.intent.category.BROWSABLE"/><dataandroid:scheme="myapp"android:host="path"/></intent-filter></activity>
>>
>>
>>
>>
>>How can i create a new intent that can be used to work with that intent 
>>filter?
>>
>>
>>Intent myIntent = new Intent( ... ) ...
>>
>>
>>the main gap is how to declare intent in java code with the '<data 
>>android:scheme="myapp" android:host="path" />' part.
>>i mean, how to set the data of the scheme,host etc to a new intent.
>>
>>
>>thanks!
>>
>>
>>
>>
>>
>>
>>
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to