How to create a shortcut on the mobile desktop of a Web App?

-1

I have a web app ready and published.

Is it possible to create a web app icon on the Desktop for iOS and Android Systems automatically, or at least through a confirmation question?

I hope it was clear, because this question neither Google understood ...

Only one addendum: Creating a simple app with only a text box and a button, where I type a URL and the button triggers an event to create the shortcut would solve my problem!

    
asked by anonymous 23.04.2014 / 14:19

3 answers

1

You can use the following tags

<link rel="apple-touch-icon" sizes="57x57" href="http://arpadesign.com.br/img/logo_touch_57x57.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="http://arpadesign.com.br/img/logo_touch_72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="http://arpadesign.com.br/img/logo_touch_114x114.png"/>

<link rel="apple-touch-icon-precomposed" sizes="57x57" href="http://arpadesign.com.br/img/logo_touch_57x57.png"/>
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://arpadesign.com.br/img/logo_touch_72x72.png"/>
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://arpadesign.com.br/img/logo_touch_114x114.png"/>

<link rel="apple-touch-startup-image" href="http://arpadesign.com.br/img/logo_touch.png">

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
    
16.05.2014 / 15:51
1

1-Create function to call attempt of shortcut:

private void criarAtalho() {
    Intent shortcutIntent = new Intent(getApplicationContext(), 
        SplashScreen.class);
    shortcutIntent.setAction(Intent.ACTION_MAIN);
    Intent addIntent = new Intent();
    addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
    addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "nomeDaApp");
    addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, 
        Intent.ShortcutIconResource.fromContext(getApplicationContext(), 
            R.mipmap.ic_launcher));

    addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
    addIntent.putExtra("duplicate", false);  //may it's already there so don't duplicate
    getApplicationContext().sendBroadcast(addIntent);
}

2-write on OnCreat the call of function:

if(!getSharedPreferences("APP_PREFERENCE", Activity.MODE_PRIVATE).
    getBoolean("IS_ICON_CREATED", false)){

    criarAtalho();
    getSharedPreferences("APP_PREFERENCE", Activity.MODE_PRIVATE).
        edit().putBoolean("IS_ICON_CREATED", true).commit();
}

3-set the permissions on manifest:

<uses-permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
    
05.04.2017 / 21:05
0

You must have the apps published in the App Store and GooglePlay!

As you already have the application ready on the Web, one option would be to develop the applications for IOS and Android with the sole function of loading the web page.

And on your page check if the user is on a mobile device and suggest downloading the app!

But you need to check if Google and Apple are accepting this!

That's because creating a direct shortcut is not yet possible.

    
14.05.2014 / 23:41