trepdas Active Member Licensed User Longtime User Feb 27, 2021 #1 Helooo smart people, How would I extract the example ("television series") from this incoming intent ? B4X: Dim in As JavaObject = Activity.GetStartingIntent Dim t As String = in.RunMethod("getType", Null) If t.Contains("text") Then Dim str As String str=in.RunMethod("getParcelableExtra", Array("android.intent.extra.TEXT")) End If str returns empty TIA Attachments sc2.jpg 48 KB · Views: 419
Helooo smart people, How would I extract the example ("television series") from this incoming intent ? B4X: Dim in As JavaObject = Activity.GetStartingIntent Dim t As String = in.RunMethod("getType", Null) If t.Contains("text") Then Dim str As String str=in.RunMethod("getParcelableExtra", Array("android.intent.extra.TEXT")) End If str returns empty TIA
Erel B4X founder Staff member Licensed User Longtime User Feb 28, 2021 #2 What is the output of: Code: Log(in) Log(in.ExtrasToString) ? Upvote 0
trepdas Active Member Licensed User Longtime User Feb 28, 2021 #3 Yes. Log(in) resulted as B4X: (Intent) Intent { act=android.intent.action.SEND typ=text/plain flg=0x1b080001 cmp=itag.b4x/.main clip={text/plain T:finish line or to receive maximum} (has extras) } from a reason I don't realy understand , B4X: log (in.ExtrasToString) resulted an error but B4X: Activity.GetStartingIntent.ExtrasToString resulted well B4X: Bundle[{theme=2, android.intent.extra.TEXT=finish line or to receive maximum, WEBPAGE=true}] Simple as that. over worked...needed to sleep. Thxxxx Last edited: Feb 28, 2021 Upvote 0
Yes. Log(in) resulted as B4X: (Intent) Intent { act=android.intent.action.SEND typ=text/plain flg=0x1b080001 cmp=itag.b4x/.main clip={text/plain T:finish line or to receive maximum} (has extras) } from a reason I don't realy understand , B4X: log (in.ExtrasToString) resulted an error but B4X: Activity.GetStartingIntent.ExtrasToString resulted well B4X: Bundle[{theme=2, android.intent.extra.TEXT=finish line or to receive maximum, WEBPAGE=true}] Simple as that. over worked...needed to sleep. Thxxxx
Erel B4X founder Staff member Licensed User Longtime User Feb 28, 2021 #4 trepdas said: resulted an error but Click to expand... Strange. Post the full error. What is the output of: Code: Log(In.GetExtra("android.intent.extra.TEXT")) Upvote 0
trepdas said: resulted an error but Click to expand... Strange. Post the full error. What is the output of: Code: Log(In.GetExtra("android.intent.extra.TEXT"))
trepdas Active Member Licensed User Longtime User Feb 28, 2021 #5 B4X: B4A Version: 10.60 Parsing code. (0.09s) Java Version: 11 Building folders structure. (0.12s) Running custom action. (0.04s) Compiling code. Error Error compiling program. Error description: Unknown member: getextra Error occurred on line: 55 Log(in.GetExtra("android.intent.extra.TEXT")) Word: getextra "GetExtra" is not in the list of parameters (attached screenshot) Attachments sc3.jpg 144.1 KB · Views: 477 Last edited: Feb 28, 2021 Upvote 0
B4X: B4A Version: 10.60 Parsing code. (0.09s) Java Version: 11 Building folders structure. (0.12s) Running custom action. (0.04s) Compiling code. Error Error compiling program. Error description: Unknown member: getextra Error occurred on line: 55 Log(in.GetExtra("android.intent.extra.TEXT")) Word: getextra "GetExtra" is not in the list of parameters (attached screenshot)
Erel B4X founder Staff member Licensed User Longtime User Mar 1, 2021 #6 In should be an Intent. Upvote 0