Can't open app on phone

Thank you. This is the aia file:

BT_Arduino.aia (41.4 KB)

I have added one block based on the list ChrisWard gave me. A screen initialization block.

Thank you for your reply. I'm working on the list. So far I have added the screen initialization. Still not working.

Thank you for the tutorial. I uploaded the file.

Did you set an icon for your app?

If you did not, the default icon would be an MIT App Inventor honeybee.

I tested your aia, compiled it as apk and it was installed in my prone (Xiaomi Mi A1, android 9) with no problem.

Checked your aia and the only thing I noticed was that app's icon was jpg. I attached an aia with app's icon in png format to test it . On my phone installs with no problem

BT_Arduino_1.aia (57.6 KB)

1 Like

That's on my check list. Not all manufacturers accept the jpg format, a single png is expected, or a family of icons auto-created by App Inventor from a master image.

2 Likes

It doesn't matter whether the launcher_icon format (uploaded in Media / assets) is a JPG or PNG. AI2 basically generates PNGs from it:

So your launch icon was the culprit, as I suspected. The Screen Initialization Block you have added cannot request Bluetooth in that way unfortunately. We can however use Activity Starter. We also need to ensure that Locate is switched on.

The Screen Initialization Block can be used to set-up your clock timers and check if Bluetooth is Enabled. I attach an example Basic Project that many people have used as the base for their own App. It will at least give you some tips on how to ensure success. Gets even more tricky when you want to receive data :grin:

BT_Basic_Setup_Send.aia (8.5 KB)

ImportProjectFromComputer

No, but the size (dimension) could / should be adjusted.

...but that has apparently not produced acceptable icons for the devices Sjoerd has tested, given that Dora's png icon does work.

The ideal would be to ensure App Inventor's code (to produce the icon family) is served with a png image for downscaling. I agree that once the icons have been created, the master should be removed. Hopefully that correction will be in the next release.

We can't tell just by looking at the file names in the APK whether or not the files are 100% good.

Anyway, let's see how Sjoerd gets on.

Thank you Chris. Your aia was uploaded to my phone and there were no problems at all. I see the app icon on my screen and I can open and use the app. I will use it as basis for my hobby project.

I thank you all for your replies and the time you took to look into my problem. The aia file Chris sent me works fine and gives no problems after uploading at all. It also taught me that there is bit more to BlueTooth communication than I thought.
When I change the icon on my original project to the default one I still have the problem but it is now certain that it is caused by something inside the project and not in my setup or my phones. That is good to know. Again, thank you all.

1 Like

But @ChrisWard's aia does not contain a specific launcher icon and therefore uses the AI2 default icon. Have you tried @dora_paz's aia?

Btw, your aia works on all of my test devices (the app with the launcher icon appears on all of them).

But what could be the reason that we cannot reproduce this issue with your aia?
So I'm curious about what should go wrong on your device.

Have you tried @dora_paz's aia?

No, I overlooked that. I am sorry @dora_paz. I just tried it and it works fine. So the problem was the icon after all. What I still do not understand why it doesn't work with the default setting (no icon) but I am glad that the problem is solved.

1 Like

Yeah, me neither, that doesn't make any sense at all.

Try to

  1. uninstall and reinstall the app
  2. rename your project (e.g. to → BT_Arduino2.aia), build the APK and try again.

I uninstalled the app and removed all the apk files from the phone. I renamed it and uploaded it again. Some result, doesn't work.
When I do the same with @dora_paz her app it does work.

You can try to delete your project and import it all over again.