Hey Taifun,
I think I may have figured out my issue
I was not properly checking if the app already had notification permission before requesting it...
my mistake
-ispankzombiez
Hey Taifun,
I think I may have figured out my issue
I was not properly checking if the app already had notification permission before requesting it...
my mistake
-ispankzombiez
so contrary to my previous comment, that did not actually solve my problem
i've tracked the source of the error to this block.
which results in a screen that looks like this.
and the app will just sort of stuck right there indefinitly, even if i close the app and restart.
i have to force close it to get it to show the visuals again. But the foreground process (background whatchamacalit) will still be updating and pinging off the notifications correctly.
but i do have to close the app in tasker once (or sometimes more) to accomplish this error.
I'm sorry that my explanations are not great. but i'll post some follow up screenshots shortly.
login / landing page (screen1)
slightly better screenshots of the "next page" ("home" / where the process is launched)
i hope this helps im kind of at a loss for what is causing this tbh...
im very new to this. so im not even really sure what to look for.
Edit:
As long as i dont swipe away this notification, it seems to work fine. But if i swipe it away, the app instant does the white screen of death.
Use logcat to find out more
Taifun
so brought up the log cat.
but it doesn't mean much to me
hopefully this means something to you?
i really truly cannot put into words the amount of appreciation i have for you friend
04-13 18:58:05.756 1707 1801 D RenderEngine: [SEC_GC_CMN_SF_EFFECTS] drawLayersInternal,1279, Rendering layer Splash Screen appinventor.ai_caleb_bren1.SFL_Notifi$_4070#443457 at index 1
04-13 18:58:10.049 2352 3857 D MdnieScenarioControlService: packageName : appinventor.ai_caleb_bren1.SFL_Notifi className : appinventor.ai_caleb_bren1.SFL_Notifi.Screen1
04-13 18:58:11.735 2352 8395 D SGM:GameManager: identifyGamePackage. appinventor.ai_caleb_bren1.SFL_Notifi, mCurrentUserId: 0, callerUserId: 0, callingMethodInfo: com.samsung.android.game.IGameManagerService$Stub.onTransact(IGameManagerService.java:233)
04-13 18:58:11.735 2352 8395 D SGM:PkgDataHelper: getGamePkgData(). appinventor.ai_caleb_bren1.SFL_Notifi
04-13 18:58:11.819 2352 5054 D SGM:GameManager: identifyForegroundApp. appinventor.ai_caleb_bren1.SFL_Notifi, mCurrentUserId: 0, callerUserId: 0
04-13 18:58:11.820 2352 5054 D SGM:PkgDataHelper: getGamePkgData(). appinventor.ai_caleb_bren1.SFL_Notifi
04-13 18:58:13.237 2352 3857 D MdnieScenarioControlService: packageName : appinventor.ai_caleb_bren1.SFL_Notifi className : appinventor.ai_caleb_bren1.SFL_Notifi.Screen1
04-13 18:58:13.253 9389 9401 W gle.android.gms: ApkAssets: Deleting an ApkAssets object ' and /data/app/~~xwvLL8gZyCeYbkW74kFrDg==/appinventor.ai_caleb_bren1.SFL_Notifi-M4C7MhOMOpBD41RhUIahmw==/base.apk' with 1 weak references
04-13 18:58:13.696 4486 22756 I SearchEngine: isComponentInApps() packageName : appinventor.ai_caleb_bren1.SFL_Notifi / className : appinventor.ai_caleb_bren1.SFL_Notifi.Screen1 / userId : 0 / enable true / enabledSetting 0
04-13 18:58:13.696 4486 22756 I SearchEngine: isComponentInApps() packageName : appinventor.ai_caleb_bren1.SFL_Notifi / className : appinventor.ai_caleb_bren1.SFL_Notifi.Screen1 / userId : 0 / enable true / enabledSetting 0
this last one just repeats after the screen gets stuck on the white opening screen.
if this doesn't show what you need, a point in the right direction as far as how else i should filter it would be awesome
im currently filtering it like this.
adb logcat | findstr appinventor.ai_caleb_bren1.SFL_Notifi
Your blocks are still of low quality and cannot be read. Please download relevant block individually by right click then Download blocks.
Thanks for the projects. I have been checking them to better understand Itoo extension. However, I am doing something wrong. The screenshot shows the relevant blocks where Im using Itoo. I am using the Notify1 item as a checkpoint to check if things are working. The CreateProcess block, that creates "bleBackground" seems to be working correctly, it shows the Notify1, and the BLE device is succesfuly connected. However, none of the RegisterEvent block are working, it just gets "stuck" in the process bleBackground. Any idea what could be going wrong?
Thanks in advance.
Hi @fraisquet, your blocks seem alright but you are doing one mistake.
In background, there is NO UI functionality. That means, you cannot "touch" any of the UI related blocks such as LabelsStatus
, buttons and layouts.
Doing so will result in a background crash.
Read the Usage and Design Solutions section in the first post to know how to communicate with the user interface.
Im trying to use the Broadcasting feature, but I guess I am doing something wrong. The UI remains intact when the BLE device connects.
What are you trying to do? Also you are missing an "x" argument to bleBackground
procedure.
I have a device that is connected via BLE to an Arduino. I am making an app to interact with the device.
I want that the smartphone is connected 24/7 to the BLE module, that's why I need the app to work in background. When connected the UI should have some buttons, and should be different than when it is disconnected. I tested the app before adding itoo, and the connection with arduino, processing data etc works well. But I need Itoo to auomatically reconnect the device if I walk away from its range with my smartphone, or if for any reason connection is lost.
I just added the argument.
No
Your logcat result is incomplete... did you filter it?
Please provide the complete log and upload it as textfile into this thread
Start logcat- elicit the error - stop logcat - upload the result as textfile
Taifun
I just remembered I can't use global variables. I made a simplified version to tes the BLE connection with Itoo without globals and it works. I will get back if I have more issues. Thanks for your work!
I'm glad that it works. Here's a secret trick, whenever you want to access UI components from the background, you simply create a new procedure starting witht the name ui_
and when you call it normally from the background, it'll get redirected to UI.
But note that you cannot directly use this block from the RegisterEvent. Let's say you want to update the UI on a certain event, then you create a proper procedure event for that, then you call another procedure starting with ui_
with required arguments, that has the User Interface blocks in it.
Im not sure I get it. I am precisely stuck on changing the UI, I thought I should do it using the Broadcast and RegisterBroadcast blocks. Im only showing the relevant blocks. The RegisterEvent blocks from bleBackground and bleConnected are working. I just added the last RegisterEvent which calls the procedure ui_connected. Is that what you mean? My "proper procedure" would be bleConnected, called from the "main background procedure bleBackground".
Normally cal the procedure
Nope, your blocks look alright. Try them out and let us know.
They work only in foreground, so when I have the app on the screen and I can interact with it. When the app is open but the android screen is locked, the UI doesn't change. It does for example reconnect to the BLE module. After reconnecting, sometimes I can still interact with the BLE (i.e receive or send strings), and sometimes it seems like the rest of the Background services don't work, and I can't interact. Maybe I should add logcat?