My app has 2 activities. One is the normal main activity that is opened from the launcher by clicking it's icon. The second is the share activity which basically adds my app to the Android "Share" menu. And this works fine as well as I get the data passed from the Share menu, correctly in my share activity.
Now the issue is with the intent chooser. Check the following code:
This is a simple code that should show the Android share menu. The above code works fine when given inside the Activity_Create of the main activity. But when I put it inside the Activity_Create of my share activity, nothing happens.
In other words, when I call my app from the Android web browser using share menu, the above code doesn't show the chooser window. Is this some limitation of the Android system?
Now the issue is with the intent chooser. Check the following code:
B4X:
Dim i As Intent
i.Initialize(i.ACTION_SEND, "")
i.SetType("text/*")
i.PutExtra("android.intent.extra.TEXT", "this is the message")
i.WrapAsIntentChooser("Choose")
StartActivity(i)
This is a simple code that should show the Android share menu. The above code works fine when given inside the Activity_Create of the main activity. But when I put it inside the Activity_Create of my share activity, nothing happens.
In other words, when I call my app from the Android web browser using share menu, the above code doesn't show the chooser window. Is this some limitation of the Android system?