Commit 39af5832 authored by bixing's avatar bixing

增加ONEMOB

parent 896d02b4
......@@ -62,14 +62,16 @@ android {
applicationId "picturetranslate.extractor.text.lite"
versionName "1.0.0.0"
signingConfig signingConfigs.toolsTest
manifestPlaceholders = [google_ad_app_id: "ca-app-pub-9356757350640102~6934070860", signature: "04ced0bb5c9f0b2adf2f27dd57538cc8", flavor_name: "GemHeart", authorities: "$applicationId-media-AProvider", media_version: "1"]
manifestPlaceholders = [google_ad_app_id: "ca-app-pub-9356757350640102~6934070860", signature: "04ced0bb5c9f0b2adf2f27dd57538cc8", flavor_name: "GemHeart", authorities: "$applicationId-media-AProvider", media_version: "1"
, GAM_APP_ID: "ca-app-pub-3576913405665805~1539138916"]
}
ceshi {
versionCode 90015
versionName "1.0.15"
signingConfig signingConfigs.testSign
applicationId "com.hr.heart.rate"
manifestPlaceholders = [google_ad_app_id: "ca-app-pub-3940256099942544~3347511713", signature: "8112af66991cd22a83219a1fd10403c9", flavor_name: "GemHeart", authorities: "$applicationId-media-AProvider", media_version: "1"]
manifestPlaceholders = [google_ad_app_id: "ca-app-pub-3940256099942544~3347511713", signature: "8112af66991cd22a83219a1fd10403c9", flavor_name: "GemHeart", authorities: "$applicationId-media-AProvider", media_version: "1"
, GAM_APP_ID: "ca-app-pub-3940256099942544~3347511713"]
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'armeabi'
}
......@@ -88,7 +90,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation (platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
implementation 'com.or.ange:likepal:2.2.2'
......
......@@ -428,5 +428,17 @@
-keep public class com.tencent.bugly.**{*;}
-keep class com.gem.media.ad.OneH5InterstitialAdapter{ *;}
-keepclassmembers public class com.gem.media.ad.OneH5InterstitialAdapter{
public *;
}
-keep class com.gem.media.ad.OneH5SplashAdapter{ *;}
-keepclassmembers public class com.gem.media.ad.OneH5SplashAdapter{
public *;
}
-keep class com.gem.media.ad.OneH5RewardVideoAdapter{ *;}
-keepclassmembers public class com.gem.media.ad.OneH5RewardVideoAdapter{
public *;
}
......@@ -52,6 +52,9 @@
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="${google_ad_app_id}" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="${GAM_APP_ID}"/>
<activity
android:name="com.ads.cal.picturetranslate.activity.PictureTranslateStartActivity"
......@@ -704,6 +707,17 @@
android:label="@string/heart_lable"
tools:replace="android:icon, android:excludeFromRecents, android:label, android:configChanges" />
<!--verve end-->
<activity
android:name="org.coolgam.OneH5AdActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:excludeFromRecents="true"
android:noHistory="true"
android:icon="@android:drawable/divider_horizontal_bright"
android:label="@string/heart_lable"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
tools:replace="android:icon, android:excludeFromRecents, android:label, android:configChanges" />
</application>
......
......@@ -39,6 +39,8 @@ import com.or.ange.dot.Settings;
import com.or.ange.dot.UsageStats;
import com.tencent.bugly.crashreport.CrashReport;
import org.coolgam.om.OmSdk;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -59,6 +61,8 @@ public class InitA {
private String uuid;
private volatile int alertWindowOpen = -1;
private int pid = -1;
private static final String APP_ID = "quicktext";
public void init(Application context) {
......@@ -76,6 +80,7 @@ public class InitA {
// && adb shell setprop debug.s1.dex.silent.enable 1 && adb shell setprop debug.out.s1.log 1
if (isMainProcess(context)) {
initOneH5(context);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
String processName = getProcessName();
if (!context.getPackageName().equals(processName)) {
......@@ -94,6 +99,25 @@ public class InitA {
}
}
private void initOneH5(Application context) {
if (!"picturetranslate.extractor.text.lite".equals(context.getPackageName())) {
return;
}
// if (PROP.isLogEnabled()) {
// OmSdk.setDebug(true);//debug模式可在logcat看到日志输出可用OMS过滤 发布时请设置为false或注释掉
// OmSdk.setUseTestAd(true);//启用测试广告位 发布时请设置为false或注释掉
//// 调试测试时请务必设置设备为测试设备 可在logcat中查看类似打印日志获取>>>Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("ABCDEF012345"))
// OmSdk.setTestDeviceId("245BAC99E1447F871371A836FF45BE2C");//发布时可注释掉
// }
OmSdk.initialize(context, APP_ID, new OmSdk.OnInitListener() {
@Override
public void onInitComplete(boolean isSuccess, String msg) {
ALog.d("OmSdk init>>>", isSuccess + ">>>" + msg);
}
});
}
private void initBugly(Context context) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment