Web to Android APK Creaton Links

1. First Download & setup Android Studio


2. AndroidManifest.xml in 3rd line

<uses-permission  android:name="android.permission.INTERNET"></uses-permission>

3. Activity_main.xml:- Delete text view code


4. Activity_main.xml:- Remove last line before Layout & add Relative


5. styles.xml:- remove Drak in 1st line & write No


6. Activity_main.xml in 9th line after   <WebView
android:id="@+id/webview"


7. MainActivity.java click in 3 dots &paste after Bundle

import android.webkit.WebSettings;
import android.webkit.WebView; 
import android.webkit.WebViewClient; 


8. paste it after AppCompatActivity


private WebView mywebView;


9. Paste it after activity_main


mywebView=(WebView) findViewById(R.id.webview);
 mywebView.setWebViewClient(new WebViewClient());
 mywebView.loadUrl("https://coupon.technovedant.com/");
 WebSettings webSettings=mywebView.getSettings();
 webSettings.setJavaScriptEnabled(true);


10. Paste it under 2nd last line


public class mywebClient extends WebViewClient{
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon){
            super.onPageStarted(view,url,favicon);
        }
        @Override
        public boolean shouldOverrideUrlLoading(WebView view,String url){
            view.loadUrl(url);
            return true;
        }
    }
@Override
    public void onBackPressed(){
        if(mywebView.canGoBack()) {
            mywebView.goBack();
        }
    else{
        super.onBackPressed();
            }
}


11. Generate Signed Bundle/APK


12. RES > Drawable > New > Image Assest > set Logo





Your Android APK is completely Ready.

Post a Comment

0 Comments