App on Android not Access to Internet

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

App on Android not Access to Internet

Post by chetino » Fri Aug 12, 2016 2:56 am

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

Klaus
Posts: 9613
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: App on Android not Access to Internet

Post by Klaus » Fri Aug 12, 2016 10:17 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3977
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: App on Android not Access to Internet

Post by jacque » Fri Aug 12, 2016 7:58 pm

Also make sure that "Internet" is checked in the Android pane in standalone settings. That sets the permissions for the app.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

Re: App on Android not Access to Internet

Post by chetino » Fri Aug 12, 2016 8:24 pm

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!
Attachments
captura3.jpg
Standalone Application Settings 2
Captura de pantalla 2016-08-12 a las 2.09.27 p.m..png
Standalone Application Setting 3
Captura de pantalla 2016-08-12 a las 2.09.10 p.m..png
Standalone Application Setting 1

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3977
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: App on Android not Access to Internet

Post by jacque » Fri Aug 12, 2016 8:33 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

Re: App on Android not Access to Internet

Post by chetino » Fri Aug 12, 2016 10:08 pm

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?
Attachments
Screenshot_20160812-160446.png
When I install the app on android

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3977
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: App on Android not Access to Internet

Post by jacque » Fri Aug 12, 2016 10:31 pm

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.)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

Re: App on Android not Access to Internet

Post by chetino » Fri Aug 12, 2016 10:47 pm

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.
Attachments
captura4.jpg

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3977
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: App on Android not Access to Internet

Post by jacque » Fri Aug 12, 2016 10:50 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

Re: App on Android not Access to Internet

Post by chetino » Fri Aug 12, 2016 10:55 pm

I decompile the apk to see the manifest file: I see the Internet Permission is declared.
Attachments
CAPTURA5.jpg

chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

Re: App on Android not Access to Internet

Post by chetino » Fri Aug 12, 2016 11:37 pm

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

chetino
Posts: 7
Joined: Sat Sep 26, 2015 12:23 am

Re: App on Android not Access to Internet

Post by chetino » Sat Aug 13, 2016 2:21 am

It's working right now! :D

The code shows the webpage.

Regards

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3977
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: App on Android not Access to Internet

Post by jacque » Sat Aug 13, 2016 4:09 am

Great! What was wrong?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Internet”