• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Force an app to close when no internet connection is available

Engaged ,
Aug 02, 2017 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.

TOPICS
Development

Views

448

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
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 03, 2017 Aug 03, 2017

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

...

Votes

Translate

Translate
LEGEND ,
Aug 03, 2017 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.

Votes

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
community guidelines
Engaged ,
Aug 03, 2017 Aug 03, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines