Page 1 of 1

App on Android not Access to Internet

Posted: Fri Aug 12, 2016 2:56 am
by chetino
I created an app that access to internet with the mobilecontrolcreate "browser".
I set in the application permissions: Internet
but when I install the App on android it says me that the app not need special permissions, and the app not access to internet.
May you help me please?
Livecode 8.0.2 Indy
Development machine: Mac OS - El capitan
Java JDK 1.6

May you help me please?

Regards

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 10:17 am
by Klaus
Hi chetino,

1. welcome to the forum! :D
2. Did you check the "browser widget" on the "Copy files" tab of the "standalone application bullder" settings?
Right now we need to do this manually in LC 8.x.


Best

Klaus

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 7:58 pm
by jacque
Also make sure that "Internet" is checked in the Android pane in standalone settings. That sets the permissions for the app.

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 8:24 pm
by chetino
Hi,

I checked the "Internet" on the Standalone Application Settings and add the widget browser. But when I install the app on the Samsung Galaxy S6 the App does not ask me to give the internet permission, and the result is that the app does not navigate.

What do you think? Ideas?

Thank you a lot!

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 8:33 pm
by jacque
Choose "select inclusions" in the General pane, not "search for inclusions." In the Script Libraries list, choose Internet. If you are using any other libraries you need to select those too.

If you are not using a browser widget you don't need to select that in Copy Files, but it won't hurt if you leave it there.

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 10:08 pm
by chetino
I set Internet, Browser & Internet in "Select inclusions..."

In the Application Permissions: "Internet"

but the app doesn't work.

When I install the app, it only ask me for location permissions.... but no for internet access.

Any other idea?

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 10:31 pm
by jacque
Delete all copies of the app on your Android device, then install the new one.

If you do not change the build number in Android standalone settings, the new app will not install. It appears to install but does not really do it, and the old one remains active. There are two ways to fix this:

1. Delete all old copies from the device before installing a new app
2. Increase the build number and the new app will overwrite the old one. (This is how you release updates.)

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 10:47 pm
by chetino
I put a new code version, delete the app on the android, restart the android, but it is the same.

I don't know what is going on.

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 10:50 pm
by jacque
It should work now, I don't know why it doesn't. Did you try accessing the internet? The app may not be telling you about permissions but will work anyway.

Try setting the minimum version to Honeycomb.

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 10:55 pm
by chetino
I decompile the apk to see the manifest file: I see the Internet Permission is declared.

Re: App on Android not Access to Internet

Posted: Fri Aug 12, 2016 11:37 pm
by chetino
The code:

local lBrowserID

on preOpenCard

//Set the fullscreen mode
set the fullscreenmode of me to "exactFit"

lock messages
mobileControlCreate "browser"
put the result into lBrowserID
mobileControlSet lBrowserID, "rect", the rect of group "Browser"
mobileControlSet lBrowserID, "visible", "true"
mobileControlSet lBrowserID, "url", "https://multientrega.smartsolutions.com.pa/"
unlock messages

//allow orientation
put "portrait,portrait upside down,landscape left,landscape right" into theallowed
mobileSetAllowedOrientations theallowed
resizeStack
end preOpenCard

on closeCard

if the environment is not "mobile" then
exit closeCard
end if

# destroy the browser we created
mobileControlDelete lBrowserID

end closeCard

Re: App on Android not Access to Internet

Posted: Sat Aug 13, 2016 2:21 am
by chetino
It's working right now! :D

The code shows the webpage.

Regards

Re: App on Android not Access to Internet

Posted: Sat Aug 13, 2016 4:09 am
by jacque
Great! What was wrong?