#1 Android Stuido - Convert Website to App Tutorial (Hindi) - Technical Next - Hindi & English

Technical Next - Hindi & English

Tech News | Review | Tips & Tricks | More.. In Hindi & English

Ads

PayOffers.in

Latest Update

LATEST UPDATES
» Asus ZenFone V» Nokia 9 Leaked» Panasonic Eluga Ray 500» How to Enable Multiple User Accounts on Any Android Device» 5 Best Chrome Extensions (Part 2)» 5 Best Chrome Extensions (Part 1)

Thursday, August 31, 2017

#1 Android Stuido - Convert Website to App Tutorial (Hindi)

Hello Friend, I am Akhilendra Sahu

Lets Start ,"Web View"App

Jaisa ki aap sab jante hai app banana koi badi baat nhi hai app apni website ko app me aasani se convert kar sakte hai ,to chaliye shuru karte hai.....

Convert website to application
Convert Website to application


Aap Android app to buhut sari online website se bhi bana sakte hai jaise (Appgeyser);(Appie)etc
But me aapko aaj official app banana sikaunga Android studio se to Sabse Pehle appko apne computer\laptop me android studio download karna hoga ,.

download ho jane ke baad aap use install kare ..

1.Fir Create New Project par click kare 
2.empty activity select Kare .
3.Finish button par click kare.

Ab Aap Sabse pehle "Android Menifest"

me jakar ye code paste kar de--
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.men.wear.shop" >
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application android:allowBackup="true" android:icon="@drawable/option" android:label="Technical Next" android:theme="@style/AppTheme" >
<activity android:name="com.men.wear.shop.MainActivity" android:label="Technical Next" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Ab isme aap apne app ka naam change kar le..


Ab chalte hai "MAIN ACTIVITY"

ye code copy paste kar de.....
package com.men.wear.shop;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends ActionBarActivity {
private WebView myWebView;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myWebView = (WebView)findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.loadUrl("http://www.technicalnext.com");
myWebView.setWebViewClient(new WebViewClient());
}
@Override public void onBackPressed() {
if(myWebView.canGoBack()) {
myWebView.goBack();
} else {
super.onBackPressed();
}
}
@Override public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId();
//noinspection SimplifiableIfStatement if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}


main activity aap apni website paste karde jaha meri website hai..
Aur ha ,Package name bhi change kar le..


Ab chalte layout >activity main >
paste this code ,.....


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">
<WebView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/webView" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" />
</RelativeLayout>


is code me appko koi bhi change nhi karna hai ..

Bas ho gyi aapki application tyar ...

Agar spelling me koi mistake ho to sorry guys,
Keep suporting, If You have any problem Comment,...

Thank
Akhilendra sahu

No comments:

Post a Comment

Ads

PayOffers.in

Subscribe SMD News-Jara Hatke