Hi all, hoping someone has had experience using the Invoke event to add their app as a “share” target on Android.
The Air app I’m building receives text from other apps on the android device via the “share” functionality. It works from some apps, but in others it will only work if there’s not currently an open instance running. In this case, it seems to invoke my Air app and brings it to focus but it displays a blank screen in it’s default colour (that is, not the stage colour, but the default colour set in the android specification of the app).
I’m using Air 33.1 (currently the latest):
<manifest android:installLocation="auto"> <uses-sdk android:minSdkVersion="8"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/> <application> <activity> <intent-filter android:launchMode="singleInstance"> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter android:launchMode="singleInstance"> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/plain" /> </intent-filter> </activity> </application> </manifest>
I’ve tried variations of the android:launchMode attribute, and none of them seem to make a difference. I did read that the “invoking” app can override this setting, which is why I think it’s working from some apps and not others (the ones where it doesn’t work perhaps have a launchMode setting that is taking precedence). It’s just a hunch.
I’m also wondering if it’s something to do with the Harman splash screen that’s blocking the app-proper from loading in this particular scenario.
I’ve tried this with a stripped down app that has nothing in it, I’m merely setting the stage.color value in the document class constructor. When the app loads standalone, or when invoked without any other running instances I see the stage colour change. In the situations where it’s not loading properly, the stage colour does not change. This is a much simplified functionality to what my actual app does and the behaviour is that same.
Has anyone else come across this issue? Am I missing something obvious?