Advertisement:

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

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #60 on: July 19, 2015, 07:38:23 pm »
File i was trying to upload was too big, 10MP camera *firstworldproblems* :)

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #61 on: July 19, 2015, 07:42:46 pm »
Still it doesnt work from the app. When i installed Mobile View plugin (forgot its name) it worked. Is it because of the theme i'm using (Next Revo)?

ephraim

  • Jr. Member
  • **
  • Posts: 80
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #62 on: July 19, 2015, 09:06:36 pm »
Lol, how I like to have the the *firstworldproblems*, file size can be set on php.ini configuration. Actually the original suggestion was to use the mobile plugin if you read the thread from the start, so it might be the theme.

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #63 on: July 19, 2015, 10:11:28 pm »
But mobile plugin is so ugly. Isnt there a way to fix this, mb copy code from said plugin and just replace it for mobile wersion of the theme? Its just i'm totally noob in php and programming in general.

ephraim

  • Jr. Member
  • **
  • Posts: 80
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #64 on: July 19, 2015, 10:24:10 pm »
For sure it can be, but you have to learn css responsive design for you to benefit on that, otherwise the easier solution should be to change your theme, but its not a guarantee that it would work 100%, I just tested it in 2 browsers firefox and the default android browser it worked for those. On the app itself it's detecting chrome as my default browser unfortunately in Chrome uploading doesn't work.

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #65 on: July 19, 2015, 10:25:56 pm »
Ah, so trouble is with chrome, is there any way to force created app to run other kind of browser?
« Last Edit: July 19, 2015, 11:06:48 pm by Billy »

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #66 on: July 20, 2015, 01:11:02 am »
Is there a way to make andriods "back" button go to previous page instead of quitting this application and mb add "To top of the page" button on the right bottom?

FAd

  • Newbie
  • *
  • Posts: 8
  • FAD
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #67 on: July 21, 2015, 05:57:04 am »
Thanks so much for your responses, I really appreciate you!
But can you help me with the Andriod Studio setup (software)?

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #68 on: July 21, 2015, 02:48:58 pm »
What i did is install Andriod studio, Andriod SDK manager (dont remember if it was seperate or came in with the studio). Then downloaded everything in SDK (cuz i didnt know what i needed) and in the end it all worked out :)

FAd

  • Newbie
  • *
  • Posts: 8
  • FAD
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #69 on: July 23, 2015, 01:26:43 pm »
Pls, am I going to install this android studio on my Personal computer or on my site?

Billy

  • Jr. Member
  • **
  • Posts: 58
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #70 on: July 23, 2015, 02:56:45 pm »
PC ofcourse

FAd

  • Newbie
  • *
  • Posts: 8
  • FAD
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #71 on: July 26, 2015, 05:34:36 am »
Thanks Billy!
I will try that.

jimzubemo

  • Newbie
  • *
  • Posts: 29
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #72 on: September 29, 2016, 01:06:42 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!


Great...But does the image upload works with the Android App?
In my case it doesn't.

jimzubemo

  • Newbie
  • *
  • Posts: 29
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #73 on: September 29, 2016, 01:08:14 pm »
Default phone browser is working though on mine @ android 4.3, app upload looks broken must be related to file permission as only full network function is allowed on the code above.

Same issue here.
I created an Android WebView App for an OSCLASS website with responsive design. So the app opens the website and it looks good. I can even post ads from the app BUT WITHOUT PHOTOS. The Image upload button is not responding. The image upload works on Android browsers - both default android browser and Google Chrome.

Does any one know how to resolve it?

I have also checked this with another Android WebView app for a Drupal website and it also does not work. So this may not be a OSCLASS issue but an Android WebView issue. Nevertheless, if anyone has solved this image upload issue from android webview app, please share.

Loriby87

  • Newbie
  • *
  • Posts: 11
Re: [Tutorial] How to create android mobile app for your Osclass website!
« Reply #74 on: October 27, 2016, 10:30:22 pm »
Drag and drop button is not working and when i can`t go back to previous page.anyone can help me?