Skip to content
Try cards for free0% on first 3 deposits + free cards We charge % on top-ups only·10+ US & HK BINs·Facebook, TikTok, Unity, AI toolsSign up

How to Create DIY Webview App?

A WebView app means that there is a website inside an app. Publishers use it for gambling, dating, cryptocurrency, commodity, and other verticals. Let’s create a simple WebView app for traffic arbitrage.

How to install and set up Android Studio?

Download the official Android Studio Desktop App from developer.android.com/studio. Install the app on your PC. Leave all settings by default.

Once you have installed it, launch Android Studio. The app will suggest Android SDK installation. At this step, choose the English language.

If you choose Russian, the app will return an error.

Choose the language and click ‘Next’. Then ‘Finish’. The installation of the Android SDK will start immediately.

After installation of the Android SDK is complete, click ‘Configure’ on the welcome page. Select ‘SDK Manager’.

Then go to the ‘Android SDK’ tab (‘Appearance & Behavior’ → ‘System Settings’).

Uncheck ‘Android 11.0 (R)’. Check ‘Android 10.0 (Q)’. Go to the ‘SDK Tools’ tab.

Check the following items: Android Emulator, Android SDK Platform-Tools, Intel x86 Emulator Accelerator (HAXM installer). Click ‘Apply’.

Click ‘Ok’ and accept the user agreement for each package.

During the download, a window may pop up where you’ll have to set the maximum amount of RAM to use emulator instances.

Specify the RAM amount and click ‘Next’.

Now let’s set the environment variable on your PC and in Android Studio. To do this, right-click on ‘My Computer’. Select ‘Properties’.

Click on ‘Advanced System Settings’ and select ‘Environment Variables’.

Click ‘New’ in the ‘User environment variables’ field.

Specify the variable’s name ANDROID_SDK_ROOT and the variable’s value (for example, D:\your folder\AndroidStudioSDK). Click ‘OK’.

Let’s create another variable. Specify the variable’s name ANDROID_SDK_HOME and the variable’s value (for example, D:\your folder\AndroidStudioProjects).

Go back to Android Studio. Press ‘Configure’ and open ‘Settings’.

Go to the ‘Path Variables’ tab.

Create environment variables by clicking on the ‘plus’.

Specify the variable’s name ANDROID_SDK_ROOT and the variable’s value (for example, D:\your folder\AndroidStudioSDK). Click ‘OK’.

Let’s create another variable. Specify the variable’s name ANDROID_SDK_HOME and the variable’s value (for example, D:\your folder\AndroidStudioProjects).

Click ‘Apply’ and ‘OK’.

Now let’s create a VOM. To do this, click on ‘Configure’ and open the ‘AVD Manager’.

Click ‘Create Virtual Device’.

Choose a device definition and download it to your computer.

The app is ready. Let’s move on to creating your first WebView app.

How to create a WebView app?

Open the app’s welcome page. Let’s create a new project. To do this, click on ‘Create New Project’.

Select the standard ‘Empty Activity’ template.

Click ‘Next’.

Type in the project name. Select the ‘Java’ APL and the Minimum SDK (the minimum Android OS supported).

Click ‘Finish’.

Go to the ‘manifest’ folder and open the ‘AndroidManifest.xml’ file.

Specify Internet access permissions.

Before the ‘application’, insert:

 <uses-permission android:name="android.permission.INTERNET"/>

Go to ‘res’ → ‘layout’. Open the ‘activity_main.xml’ file.

If you don’t see a code, click ‘Split’ in the upper right.

Delete the standard code text.

Insert the following code instead:

<WebView
    
android:id=”@+id/webView”
    
android:layout_width=”match_parent”
    
android:layout_height=”match_parent”
    
/>

Find the ‘MainActivity’ file in the java folder.

Inside the ‘@Override’ method brackets, insert the code:

webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("https://cpa.rip/");

WebViewClient webViewClient = new WebViewClient() {
    @SuppressWarnings("deprecation") @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }

    @TargetApi(Build.VERSION_CODES.N) @Override
    public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
        view.loadUrl(request.getUrl().toString());
        return true;
    }

};
webView.setWebViewClient(webViewClient);

In the ‘webView.loadUrl’ variable, insert the URL that will open in the app. For example, webView.loadUrl("https://cpa.rip/");.

Open the ‘AndroidManifest.xml’ file. After the application tag, add the following code:

android:configChanges="orientation|keyboardHidden|screenSize"

You need it so that the app does not update when you rotate the screen.

If automatic classes import is disabled, do everything manually. Find red code snippets, move the cursor over and click on ‘Import class’ in the pop-up table.

All new apps have icons by default. To change an icon, right-click on the ‘Res’ folder, select ‘New’ and go to ‘Image Asset’.

Click on the folder icon in the ‘Path’ column. Find the file you’d like to set as the app icon.

Click ‘Next’ and ‘Finish’.

Now let’s see if the app works. Run the emulator.

If it’s all good, the app works just fine.

A simple WebView app is ready. Now let’s create an APK file.

In the menu, click ‘Build’ and select ‘Generate Signed Bundle/APK…’

Select ‘APK’ and click ‘Next’.

Since you are creating an app for the first time, you need to create a keystore file for an app signature as well. To do this, select ‘Create new’ in the ‘Key store path’ field.

In the menu that opens, click on the right folder in the ‘Key store path’ field. Type in the name. Next, type in passwords.

Fill in the Name, Surname, company/organization name, city, region, country code in XX format.

Click ‘OK’ and ‘Next’.

Specify the path to save the APK file in the ‘Destination Folder’ field.  Select ‘release’ below and check both boxes at the bottom.

Click ‘Finish’.

Wait a few minutes. The app will display a notification that the APK file is ready.

Your simple WebView app is all set now.

Our Telegram channel

Affiliate news, case studies and promo codes — subscribe!

@cparip

Comments · 13

  1. Ihor

    I did everything according to the manual. I’m a complete 0 in development. The WebView parameters are highlighted in red in MainActivity. I can’t fix it, changing it in the engine itself doesn’t help, and in the end the app opens and crashes.

    1. Около Арбитраж author

      Most likely, that’s the problem: “If automatic class import is disabled, we do everything manually. Find the code fragments highlighted in red, hover the cursor over them, and click Import class in the pop-up box.”

      1. Ihor

        In my case, it helped to write this code exactly as shown in the image:
        WebView webView = findViewById(R.id.webView);
        It didn’t suggest this code automatically, but typing it manually worked 🙂
        Anyway, thanks a lot for the guide.

      2. Nikolay

        We’re waiting for a guide on uploading to Google Play 🙂

  2. Konstantin Moroz

    Could you tell me what to do next to use the app on Google Play?

  3. Vasilii

    Awesome! I’m waiting for the second part about setting up the tracker, configuring the FB SDK, and cloaking

  4. @iINGVAR

    Hi. Google has new publishing rules now. It doesn’t accept APK files, only ABB. Is it possible to compile into ABB format, do you know? Thanks in advance for your reply.

    1. Era

      ABB compiles without any problems

  5. segowa3783

    How do I remove the TestApp text at the top of the app and the background color it is written on?

  6. Dante007

    Good afternoon!
    I made an app following your instructions, but I didn’t understand how to prevent the app from closing after pressing the back button on a smartphone? It would be more logical if the Back button worked as it should 🙂 Could you please tell me how to implement this?

  7. taylory

    Not all scripts and slides work, and for some reason the site did not get a mobile version like in the browser.

Affiliate programs

All programs →All →
VavadaPart Direct advertiser · Brands: Vavada Casino
0.0Website
Brands: Vavada Casino Website
NOVA PARTNERS Direct advertiser · Brands: ПАНДА, LEEBET, BANDA, KUSH, EVA, APEX
0.0Website
Brands: ПАНДА, LEEBET, BANDA, KUSH, EVA, APEX Website
EPS Partners Direct advertiser · Brands: EpicStar
0.0Website
Brands: EpicStar Website
Royal Partners Direct advertiser · Brands: FLAGMAN, IRWIN, GIZBO, LEX, MONRO, 1GO, STARDA, IZZI, DRIP, LEGZO, VOLNA, JET, FRESH, SOL, ROX, FUGU, IRIS
0.0Website
Brands: FLAGMAN, IRWIN, GIZBO, LEX, MONRO, 1GO, STARDA, IZZI, DRIP, LEGZO, VOLNA, JET, FRESH, SOL, ROX, FUGU, IRIS Website
Traffic Cake Direct advertiser · Brands: Twindor, Winnita, VOX
0.0Website
Brands: Twindor, Winnita, VOX Website
V.Partners Direct advertiser · Brands: Vegas, ICE Casino, VERDE Casino, FS Casino, Fiery Play, Slotoro, Hit’N’Spin
0.0Website
Brands: Vegas, ICE Casino, VERDE Casino, FS Casino, Fiery Play, Slotoro, Hit’N’Spin Website

Offers.help offer catalog

All offers →