9a232aa4fc8f052d35304ce8e425bcbf.jpg

Any Website into Android App

Discussion in 'WordPress' started by TopTipsTricks, Oct 2, 2016.

  1. Free Image Hosting Powered by
    TopTipsTricks Visit Here
Hi Guests Users, Thanks For Visiting our Site, Please Register and Signin to View Content in Our Threads.
  1. TopTipsTricks

    TopTipsTricks Admin Staff Member

    Joined:
    Sep 25, 2016
    Messages:
    156
    Likes Received:
    599
    Gender:
    Male
    How to Convert Website into Android App using Android Studio

    This is the Quick Tutorial to Convert Your Website into Android App using Android Studio, you dont need any command on Programming to do this Task
    Just Follow the Steps mentioned below

    1. Install the Android Studio App, if You Dont Know how to install and configure you can refer Youtube.
    2. Now open the Android Studio App , make Sure that You have 2gb of Ram Free to use android Studio.
    3. Click on Start New Android Studio Project
    4. Fill the Android Name That You Want and Give the Domain(website) name.
    5. Select the Android Version that you want to Select ( i Recommend you to select the 4.0.1)

    Watch The Video for Detail Instructions



    MainActivity.java


    Code (Text):
    import android.os.Bundle;
    import android.support.design.widget.FloatingActionButton;
    import android.support.design.widget.Snackbar;
    import android.support.v7.app.AppCompatActivity;
    import android.support.v7.widget.Toolbar;
    import android.view.View;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.webkit.WebSettings;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;

    public class MainActivity extends AppCompatActivity {
        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.toptipstricks.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);
        }
    }

    AndroidManifest.xml

    Code (Text):
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
     
    TitanX likes this.
  2. Kitidet Sriboon

    Kitidet Sriboon New Member

    Joined:
    Oct 9, 2016
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    upload_2016-10-9_11-48-21.png

    I have problem Help me please..Thanks
     
  3. TopTipsTricks

    TopTipsTricks Admin Staff Member

    Joined:
    Sep 25, 2016
    Messages:
    156
    Likes Received:
    599
    Gender:
    Male

    Type that Error Line by Hands and Try
     
  4. aga-xyz

    aga-xyz New Member

    Joined:
    Oct 30, 2016
    Messages:
    2
    Likes Received:
    1
    Gender:
    Male
    change the id of webview to " webView "
     
    TopTipsTricks likes this.
  5. sri

    sri New Member

    Joined:
    Nov 4, 2016
    Messages:
    1
    Likes Received:
    2
    Gender:
    Male
    I m trying to do as shown in the video but it gets 4 errors.
     
    aga-xyz and TopTipsTricks like this.
  6. aga-xyz

    aga-xyz New Member

    Joined:
    Oct 30, 2016
    Messages:
    2
    Likes Received:
    1
    Gender:
    Male
    what are these errors?
     
  7. Jonathan

    Jonathan New Member

    Joined:
    Nov 19, 2016
    Messages:
    3
    Likes Received:
    2
    Gender:
    Male
    I have same error. can anyone help?
     
    TopTipsTricks likes this.
  8. TopTipsTricks

    TopTipsTricks Admin Staff Member

    Joined:
    Sep 25, 2016
    Messages:
    156
    Likes Received:
    599
    Gender:
    Male
    Yes Whats That Error ?
     
    Jonathan likes this.
  9. Jonathan

    Jonathan New Member

    Joined:
    Nov 19, 2016
    Messages:
    3
    Likes Received:
    2
    Gender:
    Male
    Hello there. I fixed somehow. But I need your help if you are able to help me. I need webview app for my site. I will upload activity_main.xml, MainActivity.java and AndroidManifest.xml. All works fine from android 4.2.2. I will need few things more:

    1. Swipe to reload option
    2. Menu on left side (pull) with:
    - Reload button
    - Contact info (here I wanna add main site link with email and phone number)
    - About option (here I wanna add some short description about company)
    3. Remove header (need to be full screen)
    4. I need cache to work for login
    5. I need cookies to work also cause live chat fro site do not work, when I open window its say: "For help, please enable the cookies in your browser and refresh this page".

    If you can help I will be thankful. Thank you in advance
     

    Attached Files:

    TopTipsTricks likes this.
  10. Jonathan

    Jonathan New Member

    Joined:
    Nov 19, 2016
    Messages:
    3
    Likes Received:
    2
    Gender:
    Male
    I found some solution. But I still need this:

    1. Swipe to reload option
    2. Menu on left side (pull) with: done
    - Reload button - if swipe to reload then no need for this
    - Contact info (here I wanna add main site link with email and phone number) done
    - About option (here I wanna add some short description about company) done
    3. Remove header (need to be full screen) no need to remove, it can go with this, if its too much work to remove.
    4. I need cache to work for login
    5. I need cookies to work also cause live chat fro site do not work, when I open window its say: "For help, please enable the cookies in your browser and refresh this page".
    6. When I login on website I do not see admin menu like on website or chrome on phone. I guess this is issue with reload after login or cache/cookies. Not sure.

    I can put files somewhere and you can take a look if you want. Thank you
     
  11. Stephen Oware-Dweteh

    Stephen Oware-Dweteh New Member

    Joined:
    Nov 25, 2016
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    its still not working
     
  12. fastgringo2

    fastgringo2 New Member

    Joined:
    Nov 29, 2016
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    Hello my problems is that on startup the application is crashing can someone help me?
     
  13. mangal moirangthem

    mangal moirangthem New Member

    Joined:
    Dec 2, 2016
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
    C:\Users\user\Desktop\android project\CrimeHack2\app\src\main\java\com\example\user\crimehack\MainActivity.java
    Error:(4, 37) error: package android.support.design.widget does not exist
    Error:(5, 37) error: package android.support.design.widget does not exist
    Error:(42, 36) error: cannot find symbol variable menu
    Error:(54, 23) error: cannot find symbol variable action_settings
    Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.
    Information:BUILD FAILED
    Information:Total time: 39.347 secs
    Information:5 errors
    Information:0 warnings
    Information:See complete output in console


    please help any know this error
     
  14. Gorg

    Gorg New Member

    Joined:
    Jan 4, 2017
    Messages:
    8
    Likes Received:
    1
    Gender:
    Male
    Hi, its works for me !!! Great tutorial Bro !!!

    Can you post tutorial how to build an Android App. for Wordpress blog post list (with conection to blog RSS feed !)
    I hope you understand what I think... :)

    Thanks in afvance Bro !!!
     
    TopTipsTricks likes this.
  15. Gorg

    Gorg New Member

    Joined:
    Jan 4, 2017
    Messages:
    8
    Likes Received:
    1
    Gender:
    Male
    Any help about this please !
     

Share This Page

Share