I think that title said everything. I want only create shortcut on home screen beacause, I see more and more apps placing their shortcuts on the home screen after they got installed. I tried some codes but dont work. There are my activity and manifest file :
My Activity :
import com.files.getquote.R;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class GetQuoteActivity extends Activity {
WebView myBrowser;
;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myBrowser = (WebView)findViewById(R.id.mybrowser);
myBrowser.loadUrl("file:///android_asset/index.html");
myBrowser.getSettings().setDatabasePath("/data/data/" + myBrowser.getContext().getPackageName() + "/databases/");
myBrowser.getSettings().setDomStorageEnabled(true);
myBrowser.getSettings().setJavaScriptEnabled(true);
myBrowser.getSettings().setDatabaseEnabled(true);
}
}
AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.files.getquote"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name">
<activity android:name=".GetQuoteActivity" android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>