Android Question recieve intent as string

trepdas

Active Member
Licensed User
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
    sc2.jpg
    48 KB · Views: 92

trepdas

Active Member
Licensed User
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:
Upvote 0

trepdas

Active Member
Licensed User
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
    sc3.jpg
    144.1 KB · Views: 90
Last edited:
Upvote 0
Top