Error using APK

Hi All,

After 4 years away from App Inventor, I'm back using it. So I'm facing old problems that I don't remember how to solve.

I created an APK in order to run with no internet connection (no WIFI, no Mobile) and to run for the first time, I save login data into a SQLite database (with internet connect), and after this I discinnect internet to make login again, but using login data from SQLite database. But when I do this test without internet, I receive the message below:

Where am I wrong?

Recent Android versions are paranoid.

Reassure your Android O/S in its Settings app that your app has permission to do what you need.

If you are developing for others, there are blocks in Screen1 to have your app ask for permissions.

If you are using the Companion, be sure it is up to date.

Thanks for replying @ABG. Using the Companion, it works fine. Of course I cannot test without internet, because of it I am generating APK to test the app without internet.

Thanks, noted.

Just FYI, I am using a Samsung with Android 8.0

@Kleyber_Derick "Using the Companion, it works fine."

Companion declares ACCESS_WIFI_STATE but the compiled app (APK) does not.

1 Like

Kodular does.

Good to see you again @Anke. If you remember, I was one of Moderators in Kodular forum (it was some years ago).

Thank you!

1 Like

Of course, I have a pretty good memory - at least for important things. :wink:

1 Like

:rofl: :rofl: :rofl: :rofl: That's very good.

Well I'm back but now with App Inventor and of course I don't have a memory like yours... because of it I am facing this kind of problem.

Declare this permission
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
after decompiling it in the Manifest, recompiled it and the APK should work.

1 Like

Great, @Anke . Just a question: If I make any change in my project and generate APK again, the manifest file will not be changed too?

You need to do this at the end (after all changes have been made).

1 Like

Ahhh ok. Noted. Thank you!!!

Try this
WifiState.aix (3.7 KB)

It declares this permission in the Manifest.

1 Like

Great, @Anke . I'll test it right now and tell you my results.

Thanks again,

@Anke, do you have an example about how to use it?

You just have to drag the extension into the screen.
Did you get the same error?

So I don't have to use any of the blocks?


1 Like

Fantastic!!! Thank you!!! I will test the APK right now and tell you my results.

Oh, I just see that there is an event. (My mistake, but that doesn't matter. I was a little careless.)

1 Like