/**
* Automatically generated file. DO NOT MODIFY
*/
package xxxxxxxxxxxxxxxxxxx;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "xxxxxxxxxxxxxxxxxxxxxxxxx";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 3;
public static final String VERSION_NAME = "1.0.3";
}
<?xml version="1.0" encoding="utf-8"?>
xmlns:app="schemas.android.com/apk/res-auto"
xmlns:ads="schemas.android.com/apk/res-auto"
xmlns:tools="schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="686dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="0dp"
android:clickable="true"
android:scrollbars="none">
android:id="@+id/banner_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_id">
<?xml version="1.0" encoding="utf-8"?>
ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxxx1
ca-app-pub-xxxxxxxxxxxxxx/xxxxxxxxxxxxx4
package xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
import java.io.IOException;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
//import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import java.io.IOException;
import android.app.Activity;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
public class MainActivity extends AppCompatActivity {
protected WebView myWeb;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/* Находим наш браузер */
myWeb= (WebView) findViewById(R.id.webView);
/* Настраиваем наш браузер */
myWeb.getSettings().setUseWideViewPort(true);
myWeb.setInitialScale(1);
myWeb.getSettings().setJavaScriptEnabled(true);
/* Загружаем страничку */
myWeb.loadUrl("file:///android_asset/www/index.html");
myWeb.loadUrl("javascript:increment()");
//This the the enabling of the zoom controls
myWeb.getSettings().setBuiltInZoomControls(true);
//This will zoom out the WebView
myWeb.getSettings().setUseWideViewPort(true);
myWeb.getSettings().setLoadWithOverviewMode(true);
myWeb.setInitialScale(1);
MobileAds.initialize(this, new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus initializationStatus) {
}
});
}
}