This is a migrated thread and some comments may be shown as answers.

App can't run with Network error on Android

3 Answers 521 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin
Top achievements
Rank 1
Kevin asked on 09 Jun 2013, 06:37 AM
Just want to figure out if I have missed anything, or it's really a bug.

1. I opened a totally new Blank Project from Icenium Mist.

2. Nothing added or edited with the default project. Just directly changed Properties for Android like the image below:
http://i.imgur.com/GtMvA1b.png

3. Run and build for Android, scan QR Code and install on Nexus 4, then nothing show up except this:
http://i.imgur.com/KXr6GWc.png

If I skip Step 2, the App will run successfully.
If in Step 2 add "AccessNetworkState" permission, the app will works occasionally, but sometimes still have the same problem in Step 3 when rebuild.

So I'm just wondering if these setting will crash or anything I did wrong.


UPDATE:
OK After many tests, the "Internet", "AccessNetworkState" & "WriteExternalStorage" permissions must be included to avoid crash. My assumption is Icenium needs access to SDCard to put project files and perform instant update via Internet, so these 3 permissions can't be put away. Don't know if this is the case when I publish the apps.

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 Jun 2013, 10:40 AM
Hi Kevin,

Your observation is correct and those three permissions are required when deploying on the device with LiveSync enabled (i.e. Build settings: Debug). We should probably consider disallowing users to remove required permissions from the list, thanks for bringing this to our attention.

You do not need "WriteExternalStorage" if you build the app in Release mode (i.e. for publish).

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Robert
Top achievements
Rank 1
answered on 28 Aug 2013, 08:58 PM
Hello.

I am having this issue.

If I remove "AccessNetworkState" and/or "Internet" permissions from the apps Android Properties Permissions List, my app will crash too.

I changed the build settings to "Release" by right clicking on 'Workspace <app name here>' in the "Project Navigator" in Graphite and I still get a crash. Doesn't matter if I "Publish" and download the .apk (and install it on my device manually), or I use Build & Deploy (which installs it automatically on my device).

How can I publish/create an app without requiring internet permissions when it isn't needed?

Thanks.
0
Steve
Telerik team
answered on 30 Aug 2013, 11:33 AM
Hi Robert,

Cordova is basically an implementation over the Android WebView, so some permissions are always required. To be on the safe side that your app would always function correctly, you should have at least

<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

There are various topics in Phonegap groups and StackOverFlow that elaborate on these and why they are required.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
Report a bug
Asked by
Kevin
Top achievements
Rank 1
Answers by
Steve
Telerik team
Robert
Top achievements
Rank 1
Share this question
or