Skip to content

Commit 14c8411

Browse files
committed
dev
1 parent bd7587f commit 14c8411

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1081
-1
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# ADAPTER android platform source
1+
# ADAPTER android platform source code
22
This is a source code which is used in ADAPTER android platform
3+
4+
License: Apache 2.0

adap_logo.png

321 KB
Loading

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 30
5+
buildToolsVersion "30.0.3"
6+
defaultConfig {
7+
applicationId "com.purain.adapterapp"
8+
minSdkVersion 21
9+
targetSdkVersion 30
10+
versionCode 1
11+
versionName "1.0"
12+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled true
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
compileOptions {
21+
sourceCompatibility JavaVersion.VERSION_1_8
22+
targetCompatibility JavaVersion.VERSION_1_8
23+
}
24+
}
25+
26+
27+
dependencies {
28+
testImplementation 'org.codehaus.groovy:groovy-all:2.4.15'
29+
implementation fileTree(dir: "libs", include: ["*.jar"])
30+
implementation 'androidx.appcompat:appcompat:1.2.0'
31+
implementation 'com.google.android.material:material:1.2.0'
32+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
33+
implementation 'androidx.navigation:navigation-fragment:2.3.0'
34+
implementation 'androidx.navigation:navigation-ui:2.3.0'
35+
testImplementation 'junit:junit:4.12'
36+
implementation "androidx.viewpager2:viewpager2:1.0.0"
37+
implementation 'com.github.bumptech.glide:glide:4.8.0'
38+
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
39+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
40+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
41+
implementation 'androidx.webkit:webkit:1.3.0'
42+
implementation 'com.google.android.gms:play-services-ads:20.2.0'
43+
implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]'
44+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.purain.adapterapp;
2+
3+
import android.content.Context;
4+
5+
import androidx.test.platform.app.InstrumentationRegistry;
6+
import androidx.test.ext.junit.runners.AndroidJUnit4;
7+
8+
import org.junit.Test;
9+
import org.junit.runner.RunWith;
10+
11+
import static org.junit.Assert.*;
12+
13+
/**
14+
* Instrumented test, which will execute on an Android device.
15+
*
16+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
17+
*/
18+
@RunWith(AndroidJUnit4.class)
19+
public class ExampleInstrumentedTest {
20+
@Test
21+
public void useAppContext() {
22+
// Context of the app under test.
23+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24+
assertEquals("com.mirnasvazi.game", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.purain.adapterapp">
4+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
<application
7+
android:allowBackup="true"
8+
android:icon="@mipmap/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@mipmap/ic_launcher_round"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme"
13+
android:usesCleartextTraffic="true">
14+
<meta-data
15+
android:name="com.google.android.gms.ads.APPLICATION_ID"
16+
android:value="@string/admob_APPLICATION_ID"/>
17+
<activity
18+
android:name="com.purain.adapterapp.FullscreenActivity"
19+
android:configChanges="orientation|keyboardHidden|screenSize"
20+
android:label="@string/app_name"
21+
android:screenOrientation="landscape"
22+
android:theme="@style/FullscreenTheme">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN" />
25+
26+
<category android:name="android.intent.category.LAUNCHER" />
27+
</intent-filter>
28+
</activity>
29+
</application>
30+
31+
</manifest>

app/src/main/assets/www/index.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<link rel="preconnect" href="https://fonts.googleapis.com">
5+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
6+
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
7+
<style>body { -ms-user-select: none; user-select: none; margin: 0; padding: 0; font-family: 'Montserrat', sans-serif;}
8+
</style>
9+
</head>
10+
<body>
11+
<br>
12+
<br>
13+
<br>
14+
<br>
15+
<br>
16+
<img style="height: 300px" src="loading.gif">
17+
<h1>ADAPTER demo example</h1>
18+
<p>Screen</p>
19+
<button onclick="ADAPTER.setFullscreenOff()">Exit fullscreen</button>
20+
<button onclick="ADAPTER.setFullscreenOn()">Enter fullscreen</button>
21+
<br>
22+
<button onclick="ADAPTER.setOrientation('landscape')">landscape</button>
23+
<button onclick="ADAPTER.setOrientation('portrait')">portrait</button>
24+
<button onclick="ADAPTER.setOrientation('unspecified')">unspecified</button>
25+
<br>
26+
<p>Admob Banner</p>
27+
<button onclick="ADAPTER.admobBannerInit('ca-app-pub-3940256099942544/6300978111', 'banner')">init banner</button>
28+
<button onclick="ADAPTER.admobBannerLoad()">load banner</button>
29+
<br>
30+
<p>Admob interestial</p>
31+
<button onclick="ADAPTER.admobInterestialLoad('ca-app-pub-3940256099942544/1033173712')">load interestial</button>
32+
<br>
33+
<p>Admob Rewarded</p>
34+
<button onclick="ADAPTER.admobRewardedLoad('ca-app-pub-3940256099942544/5224354917')">load rewarded</button>
35+
<br>
36+
<p>Statusbar</p>
37+
<button onclick="ADAPTER.setStatusbarColor('#7F0AB6')">change color</button>
38+
<script>
39+
function c2_callFunction(test) {
40+
if (test == 'onAdmobInterestialLoaded') {
41+
ADAPTER.admobInterestialShow();
42+
} else if (test == "onAdmobRewardedLoaded") {
43+
ADAPTER.admobRewardedShow();
44+
} else if (test == "onAdmobRewarded") {
45+
console.log('you earned reward');
46+
}
47+
}
48+
</script>
49+
</body>
50+
</html>

app/src/main/assets/www/loading.gif

3.45 MB
Loading
64.7 KB
Loading

0 commit comments

Comments
 (0)