Hello, I have searched for sample code related to this and tried what
I found, but so far nothing is working. I am new to Android
Development and the Eclipse environment, which is giving me some
trouble since I don't know all of the correct terminology to search.
I have an Intent Filter in my manifest that looks like this:
<activity android:name=".usebrowserlink"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category
android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
</activity>
(I've also tried the text/plain mime type)
In my onCreate event, I attempt to get the data from the application
that created the intent (this one occurs when the user selects "Share
Page" in the browser and I'm trying to get the URL):
Intent intent = this.getIntent();
String intentData = intent.getDataString();
I have tried several variations, but the intentData string is always
null when I use it later in the code.
The intent filter and action are both working (my app shows up in the
list when the user clicks to sharea a page from the browser, and the
code in my file runs when it is selected), but I can't seem to
retrieve the URL or any other data from the browser page that is being
"Shared".
Any help is appreciated!
Thanks!
Renee
--
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