Marcos Alves Well-Known Member Licensed User Longtime User Jun 26, 2018 #1 Hello, I'm receiving an intent from a URL shared by chrome to my app. This is a sample: (Intent) Intent { act=android.intent.action.SEND typ=text/plain flg=0x1b080001 cmp=com.comten.nexphone/.chats clip={text/uri-list U:content://com.android.chrome.FileProvider/BlockedFile_140796656339917} (has extras) } How can I recover the URL address?
Hello, I'm receiving an intent from a URL shared by chrome to my app. This is a sample: (Intent) Intent { act=android.intent.action.SEND typ=text/plain flg=0x1b080001 cmp=com.comten.nexphone/.chats clip={text/uri-list U:content://com.android.chrome.FileProvider/BlockedFile_140796656339917} (has extras) } How can I recover the URL address?
MarkusR Well-Known Member Licensed User Longtime User Jun 26, 2018 #2 is your sample original? it looks like json but its not correct syntax. Upvote 0
Marcos Alves Well-Known Member Licensed User Longtime User Jun 26, 2018 #3 MarkusR said: is your sample original? it looks like json but its not correct syntax. Click to expand... Yes, the app received this intent from a Browser (chrome) Share... The code is: Code: Copy If IsRelevantIntent(Activity.GetStartingIntent) Then Dim in As Intent = Activity.GetStartingIntent Dim lin As String = in ToastMessageShow(lin,True) end if Upvote 0
MarkusR said: is your sample original? it looks like json but its not correct syntax. Click to expand... Yes, the app received this intent from a Browser (chrome) Share... The code is: Code: Copy If IsRelevantIntent(Activity.GetStartingIntent) Then Dim in As Intent = Activity.GetStartingIntent Dim lin As String = in ToastMessageShow(lin,True) end if
Jeffrey Cameron Well-Known Member Licensed User Longtime User Jun 26, 2018 #4 The "has extras" indicates that there are additional parameters available, see the ".GetExtra("extraName")" method on the intent. You might find some additional insight from this post: https://www.b4x.com/android/forum/threads/receiving-shared-images-from-other-apps.81041/#content Upvote 0
The "has extras" indicates that there are additional parameters available, see the ".GetExtra("extraName")" method on the intent. You might find some additional insight from this post: https://www.b4x.com/android/forum/threads/receiving-shared-images-from-other-apps.81041/#content
Marcos Alves Well-Known Member Licensed User Longtime User Jun 26, 2018 #5 Jeffrey Cameron said: The "has extras" indicates that there are additional parameters available, see the ".GetExtra("extraName")" method on the intent. You might find some additional insight from this post: https://www.b4x.com/android/forum/threads/receiving-shared-images-from-other-apps.81041/#content Click to expand... Thanks!!! I'll do some research and post the results here. Upvote 0
Jeffrey Cameron said: The "has extras" indicates that there are additional parameters available, see the ".GetExtra("extraName")" method on the intent. You might find some additional insight from this post: https://www.b4x.com/android/forum/threads/receiving-shared-images-from-other-apps.81041/#content Click to expand... Thanks!!! I'll do some research and post the results here.
Jeffrey Cameron Well-Known Member Licensed User Longtime User Jun 26, 2018 #6 Sorry, I posted the incorrect link above, I meant to copy-and-paste this one https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content Upvote 0
Sorry, I posted the incorrect link above, I meant to copy-and-paste this one https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content
Marcos Alves Well-Known Member Licensed User Longtime User Jun 26, 2018 #7 Thanks everybody, specially @Jeffrey Cameron . This worked: Code: Copy Dim in As Intent = Activity.GetStartingIntent Dim Url1 As String = in.GetExtra("android.intent.extra.TEXT") A very interesting tip. Pausing the code and checking the value of the intent (mouse over), or using the method getdata, will give the keys from a specific intent extras... This will save #A LOT# of time researching in Android Developers forum... Upvote 0
Thanks everybody, specially @Jeffrey Cameron . This worked: Code: Copy Dim in As Intent = Activity.GetStartingIntent Dim Url1 As String = in.GetExtra("android.intent.extra.TEXT") A very interesting tip. Pausing the code and checking the value of the intent (mouse over), or using the method getdata, will give the keys from a specific intent extras... This will save #A LOT# of time researching in Android Developers forum...