appfrom.site

This is a playground for testing the JavaScript API provided by appfrom.site.


Trying to use the functionality on this page in desktop browser will simply not work as it is intended to work if only opened inside an app created with appfrom.site.

Life-cycle

Below actions manage application lifecycle.

Information

Below helpers give version information about app.

Messages

Below actions let you show text messages either as Toast or Snackbar.

Sharing

Below action allow you share text or URL using native Android chooser.

Advertising

Below actions toggle whether ads to be shown in the app or not.

Ratings

You can also request the user to rate your app.

Keeping screen-on

Below helper buttons allow you to manage screen wake if needed (e.g., when showing realtime updates).

Opening URLs

You can also have some URLs e.g., a video link to be handled natively.

This is optional but help Android offer only relevant apps.

Preferences

In addition to the above handy utilities, you can also retrieve, set and removes values from/to in shared preferences (as persistent storage). It can be used for e.g, storing settings or UI parameters related to your web app.

You can make use of below available JavaScript functions on the AFS object:

var value = AFS.getBooleanPreference('some_key');
var value = AFS.getFloatPreference('some_key');
var value = AFS.getIntPreference('some_key');
var value = AFS.getLongPreference('some_key');
var value = AFS.getStringPreference('some_key');

AFS.putBooleanPreference('some_key', true | false);
AFS.putFloatPreference('some_key', 0.1);
AFS.putIntPreference('some_key', 60600);
AFS.putLongPreference('some_key', 6060060600);
AFS.putStringPreference('some_key', 'some_value');

AFS.removePreference('some_key');