Android Question How to share app from app

Alansari

Member
Licensed User
Longtime User
Hi all
How to share my app from app to social media ?

I used same this code but the app stop :
B4X:
Dim ShareIt As Intent
    ShareIt.Initialize (ShareIt.ACTION_SEND,"")
    ShareIt.SetType ("text/plain")
    ShareIt.PutExtra ("android.intent.extra.TEXT","Download at Google Play: https://play.google.com/store/apps/details?id=YOUR_PACKAGE")
    ShareIt.PutExtra ("android.intent.extra.SUBJECT","YOUR SUBJECT")
    ShareIt.WrapAsIntentChooser("Share Application Via...")
StartActivity (ShareIt)
 

Almora

Well-Known Member
Licensed User
Longtime User

whatsapp

B4X:
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_SEND ,"")
Intent1.SetType("text/plain")
Intent1.SetComponent("com.whatsapp/.ContactPicker")
Intent1.PutExtra("android.intent.extra.TEXT", "test" )
StartActivity(Intent1)
 
Upvote 0

Alansari

Member
Licensed User
Longtime User
whatsapp
B4X:
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_SEND ,"")
Intent1.SetType("text/plain")
Intent1.SetComponent("com.whatsapp/.ContactPicker")
Intent1.PutExtra("android.intent.extra.TEXT", "test" )
StartActivity(Intent1)

Thanks
 
Upvote 0
Top