

Alisson
Members-
Content Count
21 -
Joined
-
Last visited
Community Reputation
0 Neutral-
How to get the result of Activity.startActivityForResult in android
Alisson replied to iken's topic in Cross-platform
I have updates, actually it's not a problem with the way I call the intent. The problem is that when my app goes into the background it is closed by android. I found this out through logcat. It seems that I need to leave a service running in the foreground so that my app is not closed by Android. But this service needs to be in Java and be integrated with my app as a .jar -
How to get the result of Activity.startActivityForResult in android
Alisson replied to iken's topic in Cross-platform
This is my logcat : 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2067) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1727) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at android.app.ContextImpl.startActivity(ContextImpl.java:1023) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at android.app.ContextImpl.startActivity(ContextImpl.java:994) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at android.content.ContextWrapper.startActivity(ContextWrapper.java:403) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at br.com.stone.posandroid.acquirerapp.commons.deeplink.intent.payment.IntentDataSourcePaymentImpl.sendTransactionDeepLink(IntentDataSourcePaymentImpl.kt:117) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at br.com.stone.posandroid.acquirerapp.commons.deeplink.repository.DeepLinkRepositoryImpl$sendTransactionDeepLinkPayment$2.invokeSuspend(DeepLinkRepositoryImpl.kt:34) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 04-29 14:45:07.231 2206 3500 E b.c.s.p.a.c.d.i.p.IntentDataSourcePaymentImpl: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 04-29 14:45:07.337 955 1515 E POS_AT : [SP_0] AT< 02000448330000037C 04-29 14:45:07.398 964 1522 E ActivityManager: Sending non-protected broadcast br.com.positivo.printer.onRealLength from system 2387:com.xcheng.printerservice/1000 pkg com.xcheng.printerservice 04-29 14:45:07.398 964 1522 E ActivityManager: java.lang.Throwable 04-29 14:45:07.398 964 1522 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:16160) 04-29 14:45:07.398 964 1522 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:16856) 04-29 14:45:07.398 964 1522 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:16177) 04-29 14:45:07.398 964 1522 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentWithFeature(ActivityManagerService.java:17024) 04-29 14:45:07.398 964 1522 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2294) 04-29 14:45:07.398 964 1522 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2993) 04-29 14:45:07.398 964 1522 E ActivityManager: at android.os.Binder.execTransactInternal(Binder.java:1154) 04-29 14:45:07.398 964 1522 E ActivityManager: at android.os.Binder.execTransact(Binder.java:1123) 04-29 14:45:07.515 390 426 E UxUtility: notifyAppState error = NULL 04-29 14:45:08.188 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:45:08.192 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:45:08.731 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:11.134 964 1592 E TaskPersister: File error accessing recents directory (directory doesn't exist?). 04-29 14:45:11.744 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:14.762 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:20.801 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:23.821 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:29.860 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:32.878 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:35.898 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:38.917 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:41.934 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:44.951 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:50.987 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:54.006 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:45:57.025 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:46:00.048 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:46:03.068 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:46:06.087 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:46:09.108 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:46:11.967 390 426 E UxUtility: notifyAppState error = NULL 04-29 14:46:12.130 964 1067 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 04-29 14:46:12.298 288 288 E lowmemorykiller: Fail to connect to socket duraSpeedMem. return code: -1 04-29 14:46:12.298 288 288 E lowmemorykiller: trigger duraSpeed: duraspeed_fd is lower than 0 04-29 14:46:13.128 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.129 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.212 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.213 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.403 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.404 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.492 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.492 2206 2206 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.532 2206 3757 E oid.acquirerap: Invalid ID 0x00000000. 04-29 14:46:13.533 2206 3757 E oid.acquirerap: Invalid ID 0x00000000. logcat: Unexpected EOF! This means that either the device shut down, logd crashed, or this instance of logcat was unable to read log messages as quickly as they were being produced. If you have enabled significant logging, look into using the -G option to increase log buffer sizes. And this is link for integration: https://sdkandroid.stone.com.br/reference/pagamento-deeplink -
How to get the result of Activity.startActivityForResult in android
Alisson replied to iken's topic in Cross-platform
the "date" tag was a translation error. The correct one is: <D A T A I used startActivityForResult() but without success -
How to get the result of Activity.startActivityForResult in android
Alisson replied to iken's topic in Cross-platform
I have an application A that calls an application B with intent implicitly: MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW); TMessageManager.DefaultManager.SubscribeToMessage(TMessageReceivedNotification, HandleActivityMessage); AIntent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_VIEW); AIntent.addFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); AIntent.setData(TJNet_Uri.JavaClass.parse(StringToJString(TIdURI.URLEncode(AURI)))); TAndroidHelper.Activity.startActivity(AIntent); my Android manifest is configured as follows: <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:exported="true" android:label="%activityLabel%" android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|uiMode" android:launchMode="singleTop"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="%libNameValue%" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <date android:host="pay-response" android:scheme="retornopagamento/return_scheme" /> </intent-filter> </activity> when I execute what I need in app B and close it. It should go back to app A. But sometimes it restarts app A, instead of going back to where it left off. I have a return string from App B that I collect in app A as follows: procedure TfrmPagamentos.HandleActivityMessage(const Sender: TObject; const _AMensagem: TMessage); begin if _AMensagem is TMessageReceivedNotification then begin if HandleIntentAction(TMessageReceivedNotification(_AMensagem).Value) then Bill; end else if (_AMensagem is TMessageResultNotification) then begin if HandleIntentAction(TMessageReceivedNotification(_AMensagem).Value) then Bill; // from the sequence end; end; -
How to get the result of Activity.startActivityForResult in android
Alisson replied to iken's topic in Cross-platform
I managed to make it work, but at some points my app restarts. The process is: MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW); TMessageManager.DefaultManager.SubscribeToMessage(TMessageReceivedNotification, HandleActivityMessage); AIntent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_VIEW); AIntent.addFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); AIntent.setData(TJNet_Uri.JavaClass.parse(StringToJString(TIdURI.URLEncode(AURI)))); TAndroidHelper.Activity.startActivity(AIntent); So far the second app opens correctly. But after I save it and return to my first app before entering the 'HandleActivityMessage' the app restarts. Any tips? This doesn't happen all the time, but when it does I lose the intent return data. -
Sim, utilizo. vou tentar remover.
- 2 replies
-
- android
- delphi 12.2
-
(and 1 more)
Tagged with:
-
iOS: XCode 15: MADDA - Make Delphi Debugging again - after 01.May 2024
Alisson replied to Rollo62's topic in Cross-platform
I found an alternative: debugging in IOS ARM SImulator for IOS version 18.3. with simulator in mac. -
Tenho um aplicativo em delphi para android. na versão do delphi 12.1 o app funciona normalmente mas ao compilar e gerar apk no delphi 12.2 em release (em debug funciona normalmente) ele abre o app e fecha. me deixando sem saber o que fazer.
- 2 replies
-
- android
- delphi 12.2
-
(and 1 more)
Tagged with:
-
Error Building Android 64 bit App, Delphi 12.2, Update2, Patch 2
Alisson replied to Shano's topic in Cross-platform
No dproj do seu app apague tudo entre as tags 'Android64'">AndroidSDK35.0.2_64bit.sdk</PlatformSDK>'. Deve ficar assim : 'Android64'"></PlatformSDK>' pois seu app está vinculado a um sdk que não existe mais na sua nova instalação do delphi 12.2. -
iOS: XCode 15: MADDA - Make Delphi Debugging again - after 01.May 2024
Alisson replied to Rollo62's topic in Cross-platform
Algum retorno dessa situação? -
Delphi 12 - ListView - Search Box - Android: Not Working
Alisson replied to Jean_D's topic in Cross-platform
Is there any way without having to recreate the app? My app is huge, there's no way to do it from scratch. -
When compiling delphi fmx app using xcode 15.3 and 15.4 (beta) with IOS 17.4. The Delphi IDE returns the following error "Debbuging the application on device running IOS 17 or later is currently not supported." I urgently need to debug my app but I can't even use the IOS simulator. I'm using Delphi 12 but I've already tried it in Delphi 11.3
-
TShareItems e TBarcodeReader I tested by removing kastri and the app ran normally. Does anyone have a tip on how I can use the kastri components even using an arm64 simulator?
-
[DCC Error] E2597 ld: building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 Desconfio que seja algo relacionado as bibliotecas Kastri master. Tenho outro app que não possui a biblioteca e funciona normalmente no IOS Simulator ARM 64 bits
-
Estou utilizando delphi 11.3 com um macbook air 2022 m1 e continua ocorrendo a situação. Alguem sabe o que pode ser?