Advertisement:

Author Topic: [Tutorial] How to create android mobile app for your Osclass website!  (Read 30602 times)

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #15 on: November 02, 2014, 03:55:45 pm »
@Hello
If you don't know how to open eclipse, then this tutorial is not for you, sorry

Hello

  • Full Member
  • ***
  • Posts: 174
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #16 on: November 02, 2014, 10:24:06 pm »
i mean there is not a applcation icon

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #17 on: November 02, 2014, 10:28:41 pm »
See enclosed, if its not there, then you havent got it downloaded, and installed properly

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #18 on: November 02, 2014, 10:29:35 pm »
PS, got this working fine now.! Many mins of patience!!

qaximor

  • Newbie
  • *
  • Posts: 15
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #19 on: November 04, 2014, 09:02:27 pm »
It's really easy and you don't need any prior Java or Android development knowledge.

What you need is:
Eclipse
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: [Select]
<?xml version="1.0" encoding="utf-8"?>
<WebView  xmlns:android="http://schemas.android.com/apk/res/android"
          android:theme="@android:style/Theme.NoTitleBar"
          android:id="@+id/webview"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:scrollbars="none"/>

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: [Select]
package YOUR_PACKAGE_NAME_HERE;

import android.app.Activity;
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) {
    super.onCreate(savedInstanceState);
    //Remove title bar as we already have it in the web app
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    //Point to the content view defined in XML
    setContentView(R.layout.activity_main);
    //Configure the webview setup in the xml layout
    WebView myWebView = (WebView) findViewById(R.id.webview);
    WebSettings webSettings = myWebView.getSettings();
    //Yes, we want javascript, pls.
    webSettings.setJavaScriptEnabled(true);
    //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("http://YOURWEBSITEURLHERE.com");    }}
NOTE: change http://YOURWEBSITEURLHERE.com to your website URL.

Third code you need to paste in AndroidManifest.xml is
Code: [Select]
  <uses-permission android:name="android.permission.INTERNET"></uses-permission>Paste it right before </manifest>

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

Yep, didn't work, loads of errors come up when loading this into the ADT, ah well, worth a shot, i think its because it loads a blank template with all the imports already inlcuding package name, i think i just need to play with myview.load url part

What errors are you getting? Make sure you change the package name to whatever is yours.. and check if the name of your MainActivity.java file is MainActivity or MyActivity (Android Studio calls it MyActivity by default) so check for the changes that you have to make.

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #20 on: November 04, 2014, 09:22:48 pm »
 ;)
see reply#19
all good, i had set up a new app with multiple actions, when i needed a blank action to start off with!

bengalliboy

  • Full Member
  • ***
  • Posts: 204
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #21 on: November 05, 2014, 01:00:42 pm »
@aide2001
How does your UI looks? Can you share some pic of your apps look and flow chart?
Also is it available to download and try? If so how and where?
Are you directly getting the data from server via the webservice or are you saving to a local db and then displaying to user?
Thanks

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #22 on: November 05, 2014, 01:35:33 pm »
@bengalliboy
Yes you can download it directly from playstore
its a little more difficult for blackberry, and near impossible for itunes, especially as apple want $99 before you even begin!
I was going to do an app for the Windows phone, but that's a nightmare too!.
So google play is the only one so far search for bikersbay and you will see.

At the moment it's direct from the webserver, but intime, i'll be uploading to the data locally every night. So you dont have to be online.


bengalliboy

  • Full Member
  • ***
  • Posts: 204
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #23 on: November 05, 2014, 01:40:29 pm »
aide2001
I don't see on google play. What is the link? Can you make it downloadable from US? Or is it restricted for your country only. If so can you share some screen shots please

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #24 on: November 06, 2014, 10:56:33 pm »
I've put it into the USA market, but they say it may take several hours to take effect

pixellegolas

  • Full Member
  • ***
  • Posts: 224
  • zwappa.se
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #25 on: November 10, 2014, 12:26:18 pm »
"bikersbay does not need any special permission"...I like that :) Compared to other apps that want to take over my whole phone :)

Seems to work pretty good. Well done

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #26 on: November 11, 2014, 06:02:33 pm »
Cheers. Why take over your phone, its just an app !!
Thanks for trying it.
Spread the word.... ;)

Zacdaniel

  • Full Member
  • ***
  • Posts: 115
  • Why, Yes I'm a white african haha...
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #27 on: November 12, 2014, 03:24:28 pm »
This is epic will give it a go and see

aide2001

  • Guest
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #28 on: November 13, 2014, 06:16:25 pm »
I found the other day that on the net you can change your app from apk (android) to bar files (blackberry)
pretty cool, so you can get your app to work on android and blackberry using the same files !!
Just apple to bash through

creat15

  • Full Member
  • ***
  • Posts: 218
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #29 on: November 14, 2014, 06:20:16 pm »
hi :)

i want to ask, how to show icon android if user post listing from app android (example : my user created listing from my app android, and , in the post listing show icon android)

and how to not show icon android if user posting from computer, laptop, or any device. (example : my user created listing from computer, laptop or any device other than "android", in the post listing icon android not show)

(maybe this script for website theme, not script android?, example for item.php to show this icon).

i search on google nothing, and what keyword for this?

this my icon android

and this link for example this

thanks before