Support forums > Tips, tricks, and tutorials

[Tutorial] How to create android mobile app for your Osclass website!

(1/17) > >>

It's really easy and you don't need any prior Java or Android development knowledge.

What you need is:
Java SDK
Android SDK
(I won't be getting into how to download and install them, please look for a tutorial on the internet there is a lot of them trust me!)
Mobile Plugin from the Plug in market to force mobile devices to go to the mobile version and if your theme already has mobile version supported then you don't need to install it.

So what you need is 3 codes to copy and paste, THAT'S IT.

First code you need to past in your activity_main.xml

--- Code: ---<?xml version="1.0" encoding="utf-8"?>
<WebView  xmlns:android=""
--- End code ---

Second code you need to paste in your MainActicity class (Don't forget to edit your package name above! If you are not sure just copy paste as it is and then ALT+ENTER and eclipse will edit and write your package name.

--- Code: ---package YOUR_PACKAGE_NAME_HERE;

import android.os.Bundle;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.example.esouqbh.esouq.R;

public class MainActivity extends Activity
{@Override public void onCreate(Bundle savedInstanceState) {
    //Remove title bar as we already have it in the web app
    //Point to the content view defined in XML
    //Configure the webview setup in the xml layout
    WebView myWebView = (WebView) findViewById(;
    WebSettings webSettings = myWebView.getSettings();
    //Yes, we want javascript, pls.
    //Make sure links in the webview is handled by the webview and not sent to a full browser
    myWebView.setWebViewClient(new WebViewClient());
    //And let the fun begin
    myWebView.loadUrl("");    }}

--- End code ---
NOTE: change to your website URL.

Third code you need to paste in AndroidManifest.xml is

--- Code: ---  <uses-permission android:name="android.permission.INTERNET"></uses-permission>
--- End code ---
Paste it right before </manifest>

Guess what? That's it! You just made your Osclass website into an android app!

That's great!

Would this also work with Android Studio?

Yes of course!

What about a native apk for android? Going to mysql directly??

Hi :)

nice tutorial :)

i want to ask, I've tried the tutorial of your work but on the uploaded image to the new ads can not, how to be able to upload an image from android?

then how to keep uploading images of android can choose an image from the camera or gallery


[0] Message Index

[#] Next page

Go to full version