Highlighted

Force an app to close when no internet connection is available

Engaged ,
Aug 02, 2017

Copy link to clipboard

Copied

Hi,

I use Adobe Animate CC to build my apps and I use the Milkmangames ANE to insert Admob banners and interstitials on my free apps.

This goes on the manifest:

uses-permission android:name="android.permission.INTERNET"

uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"

but I have realized that users can use my apps without an internet connection.

So my question is:

- Is there a way to force an app to close when no internet connection is available?

Best Regards.

Adobe Community Professional
Correct answer by Colin Holgate | Adobe Community Professional

Part of the problem is about how much you're willing to upset your users. There are plenty of discussions about that, and how to find a compromise (for example show your own ads if they are offline). See discussions like this one:

http://forums.makingmoneywithandroid.com/marketing-methods/7629-how-show-ads-when-user-offline.html

The first part of the problem is knowing if you're really offline. There are ANEs like this one that can help:

GitHub - freshplanet/ANE-Network-Info: Air Native Extension (iOS and Android) for getting Network Information

Or you could simply have your own text file on your server, and your app tries to read that. If it succeeds you let them play. You could check that file every time an ad is due to play, so that someone who goes offline after starting to play will also see the message that they need to be online to play. If you do tie the check to when ads should appear, you should be fairly sure that you won't cause them to lose a life.

If your own server URL was to a PHP you could even know how many times users have played the app each day.

Hate reviews would reduce your ad revenue more than the amount that people going offline would.

TOPICS
Development

Views

380

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Force an app to close when no internet connection is available

Engaged ,
Aug 02, 2017

Copy link to clipboard

Copied

Hi,

I use Adobe Animate CC to build my apps and I use the Milkmangames ANE to insert Admob banners and interstitials on my free apps.

This goes on the manifest:

uses-permission android:name="android.permission.INTERNET"

uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"

but I have realized that users can use my apps without an internet connection.

So my question is:

- Is there a way to force an app to close when no internet connection is available?

Best Regards.

Adobe Community Professional
Correct answer by Colin Holgate | Adobe Community Professional

Part of the problem is about how much you're willing to upset your users. There are plenty of discussions about that, and how to find a compromise (for example show your own ads if they are offline). See discussions like this one:

http://forums.makingmoneywithandroid.com/marketing-methods/7629-how-show-ads-when-user-offline.html

The first part of the problem is knowing if you're really offline. There are ANEs like this one that can help:

GitHub - freshplanet/ANE-Network-Info: Air Native Extension (iOS and Android) for getting Network Information

Or you could simply have your own text file on your server, and your app tries to read that. If it succeeds you let them play. You could check that file every time an ad is due to play, so that someone who goes offline after starting to play will also see the message that they need to be online to play. If you do tie the check to when ads should appear, you should be fairly sure that you won't cause them to lose a life.

If your own server URL was to a PHP you could even know how many times users have played the app each day.

Hate reviews would reduce your ad revenue more than the amount that people going offline would.

TOPICS
Development

Views

381

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 02, 2017 0
Adobe Community Professional ,
Aug 03, 2017

Copy link to clipboard

Copied

Part of the problem is about how much you're willing to upset your users. There are plenty of discussions about that, and how to find a compromise (for example show your own ads if they are offline). See discussions like this one:

http://forums.makingmoneywithandroid.com/marketing-methods/7629-how-show-ads-when-user-offline.html

The first part of the problem is knowing if you're really offline. There are ANEs like this one that can help:

GitHub - freshplanet/ANE-Network-Info: Air Native Extension (iOS and Android) for getting Network In...

Or you could simply have your own text file on your server, and your app tries to read that. If it succeeds you let them play. You could check that file every time an ad is due to play, so that someone who goes offline after starting to play will also see the message that they need to be online to play. If you do tie the check to when ads should appear, you should be fairly sure that you won't cause them to lose a life.

If your own server URL was to a PHP you could even know how many times users have played the app each day.

Hate reviews would reduce your ad revenue more than the amount that people going offline would.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 03, 2017 0
Engaged ,
Aug 03, 2017

Copy link to clipboard

Copied

Hi Colin,

Thank you for your advices. They are very valuable to me. The point about "Hate reviews" says all I need to know what to do.

Bestr Regards.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 03, 2017 0