Android Question How to send parameters from App_A to App_B2?

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
I've studied SD_TreeList as App_A and SDShopListView as App_B in the examples. I would like to use intent library and send the left sub in App1 to be the filter parameter.
How do I code when I click the left sub ?
 

Attachments

  • App_A.zip
    9.7 KB · Views: 184
  • App_B.zip
    8.6 KB · Views: 159

JohnC

Expert
Licensed User
Longtime User
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
In this example ,I get understand something(I get understand 60%) ,but I don't know parameter of the filter in ShopListView .
I'm not good at coding ,I must see code from the experts ,I will get understand coding. Please understand me.
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Also read this:
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Also read this:
from example2 I have coded my App_A like this,it's correct ,or not,Sir? I'm sorry for English,if you don't understand. I would like to send LeftName to App_B,after I clicked the left node.

Private Sub B4XTree1_Click (IDLeaf As String, LeafName As String)
'ToastMessageShow($"ID Leaf:${IDLeaf} LeafName:${LeafName}"$,True)
Dim in As Intent
in = Activity.GetStartingIntent
If in <> Null Then
If in.HasExtra("GetSettings") Then
in.Initialize(in.ACTION_MAIN,"")
in.SetPackage("b4a.requester") ' sent parameter to b4a.requester app (ShopListview app)
in.SetType("text/plain")
in.PutExtra("android.intent.extra.TEXT",LeafName)
in.Action=in.ACTION_SEND
StartActivity(in)
Activity.Finish
End If
End If

End Sub
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Incorrect: GetStartingIntent must be inside the receiver app.

I modified your examples above as sd_treelist example send intent to shoplistview example.
check in these examples:-
1- manifest file of shoplistview (receiving intent)
2- check the shoplistview packagename is changed to be the same that sd_treelist example want to send intent to it.

check attachments (note in shoplistview example i comment 0.jpg,.... etc because i don't have)
 

Attachments

  • shoplistview.zip
    8.9 KB · Views: 160
  • sd_treelist.zip
    9.9 KB · Views: 185
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Your strategy is differ to thedesolatesoul's . It's help me learning code more. I would like to apply with GPS and Google Map.
Perhaps,I will ask for you again. Thank you very much.

Best Regards,Sir
Theera
 
Upvote 0
Top