Hello,
I successfully added following intent-filter to my app's manifest file to cause my B4A application shows up in the Share Via drop-down menu when only one image is selected but NOT when multiple images are selected.
I noticed that about half of the apps that appear for single image selections disappear like my app when multiple images are selected; so, they have a problem similar to mine. I am guessing that an additional intent-filter needs to be added, but I have been unable to find any other thread that specifically addresses this issue. Can someone suggest what any additional intent-filter or modification to intent-filter below is required to cause my app to be listed in Share Via menus for multiple image selections?
Thanks,
Gregg
A note to newbies, like myself, though I must eventually write B4A app code to handle when my app is invoked from a Share Via menu; it is interesting to realize that only the intent-filter (see below) needed to be added to the manifest file to cause my app to be listed in the Share Via drop-down menu. This subtle fact is never really definitely stated in other threads that address Share Via issues. BTW, I added helpful debugging code that I hope will, in part, help me develop the necessary app code when app is invoked from a Share Via menu.
The intent-filter I added to manifest file to get my B4A app listed in the Share Via menu when selecting a single (but NOT multiple) image follows:
Manifest File containing additional intent-filter to cause Share Via to list my B4A app follows:
Helpful debugging code to help develop code for when app is invoke from a Share Via menu:
I successfully added following intent-filter to my app's manifest file to cause my B4A application shows up in the Share Via drop-down menu when only one image is selected but NOT when multiple images are selected.
I noticed that about half of the apps that appear for single image selections disappear like my app when multiple images are selected; so, they have a problem similar to mine. I am guessing that an additional intent-filter needs to be added, but I have been unable to find any other thread that specifically addresses this issue. Can someone suggest what any additional intent-filter or modification to intent-filter below is required to cause my app to be listed in Share Via menus for multiple image selections?
Thanks,
Gregg
A note to newbies, like myself, though I must eventually write B4A app code to handle when my app is invoked from a Share Via menu; it is interesting to realize that only the intent-filter (see below) needed to be added to the manifest file to cause my app to be listed in the Share Via drop-down menu. This subtle fact is never really definitely stated in other threads that address Share Via issues. BTW, I added helpful debugging code that I hope will, in part, help me develop the necessary app code when app is invoked from a Share Via menu.
The intent-filter I added to manifest file to get my B4A app listed in the Share Via menu when selecting a single (but NOT multiple) image follows:
B4X:
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>)
Manifest File containing additional intent-filter to cause Share Via to list my B4A app follows:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" />
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
'GGH 01-04-14, Intent to get included in Share Via menus
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
Helpful debugging code to help develop code for when app is invoke from a Share Via menu:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim Intent1 As Intent
Intent1 = Activity.GetStartingIntent
If Intent1.Action = "android.intent.action.SEND" Then
Log("Invoked by Share Via")
Else If Intent1.Action = "android.intent.action.MAIN" Then
Log("Invoked by Clicking on App")
Else
Log("Should not happen")
End If
Log("Action :"&Intent1.Action)
Log("GetExtra :"&Intent1.GetExtra("android.intent.extra.TEXT"))
Log("Extras :"&Intent1.ExtrasToString)
Log("GetData :"&Intent1.GetData)
Log("GetExtra:"&Intent1.GetExtra("android.intent.extra.TEXT"))
Log(Intent1.HasExtra("EXTRA_TEXT"))
End Sub