[Android-development] E Qt JAVA : Surface 1 not found!

ekke ekke at ekkes-corner.org
Thu Apr 26 11:18:16 CEST 2018


Am 26.04.18 um 10:42 schrieb Jason H:
>> Not all Android Apps are goot citizens. There are some Apps out there
>> not using the public void onNewIntent(Intent intent) if my App already
>> was running. They come in via public void onCreate(...) and now Qt comes
>> in trouble because the Activity already was created and started. I’m
>> getting a white screen, App freezes and this Error was logged:
> I'm interested in this too, I remember having it, or something like it. 
>
> Who do you assume the other app is using onNewIntent? It seems like that should be up to the OS to determine which one to call? AFAICR Android is responsible for calling onCreate in response to your activity not existing. Remember your app is more than an activity. It may have zero or many activities. 
that was also my understanding, that Android OS is responsible to know
if onCreate or onNewIntent should be called for these config in Android
Manifest:

android:launchMode="singleInstance" android:taskAffinity=""

taskAffinity is important to be used. see this great blog:
https://inthecheesefactory.com/blog/understand-android-activity-launchmode/en


'singleInstance' works as expected per ex. from Fotos App, Download App,
MS Word, ... if my App is launched, onNewIntent was used
have no idea why some very specific apps always call onCreate() to send
Files via action.SEND or action.VIEW

(will do some more tests with 'singleTask')
>
> What I do remember is working in QtActivity and QtApplication to provide Android support. I think my issue was with Alarm manager or push notifications...
>




More information about the Android-development mailing list