Skip to content

Commit

Permalink
feat: update the library to 1.0.3 and change bundle ID
Browse files Browse the repository at this point in the history
  • Loading branch information
dbi1463 committed Sep 7, 2024
1 parent 3e8cde0 commit 08caa04
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ In this way, you need to download the new AAR file if the SDK is updated.

### SDK Configuration

Open your app's manifest file (`AndroidManifest.xml`) and add `tenmax-publisher-id` and `tenmax-bundle-id` as the application's metadata. The publisher ID is provided by TenMax and the bundle ID must be the same as the value you registered in the [Prerequisites](#prerequisites) section.
Open your app's manifest file (`AndroidManifest.xml`) and add `tenmax-publisher-id` as the application's metadata. The publisher ID is provided by TenMax. Note that the SDK would get the bundle ID for you, but you must ensure that is the same as the value you registered in the [Prerequisites](#prerequisites) section.

```xml
<manifest>
<application>
<meta-data android:name="tenmax-publisher-id" android:value="{tenmax-publisher-id}" />
<meta-data android:name="tenmax-bundle-id" android:value="{app-bundle-id}" />
</application>
</manifest>
```
Expand Down
2 changes: 1 addition & 1 deletion sdkdemo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
compileSdk = 34

defaultConfig {
applicationId = "io.tenmax.sdkdemo"
applicationId = "com.tenmax.sdkdemo.public"
minSdk = 21
targetSdk = 34
versionCode = 1
Expand Down
Binary file modified sdkdemo/libs/adkit.aar
Binary file not shown.
5 changes: 1 addition & 4 deletions sdkdemo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -19,8 +18,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="tenmax-publisher-id" android:value="8cdae3de30" />
<meta-data android:name="tenmax-bundle-id" android:value="io.tenmax.sdkdemo" />
<meta-data android:name="tenmax-publisher-id" android:value="0fe5b5e7c1" />
</application>

</manifest>
9 changes: 9 additions & 0 deletions sdkdemo/src/main/java/io/tenmax/sdkdemo/SupportedSpaces.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.tenmax.sdkdemo;

public interface SupportedSpaces {

String interstitialId = "3644ec9ebb0d4ed4";
String topBannerId = "590bab0f1b6a482f";
String bottomBannerId = "843e0771ab4c4d9f";
String inlineId = "fcc96b4975ff4357";
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import androidx.lifecycle.ViewModelProvider;

import io.tenmax.mobilesdk.TenMaxAd;
import io.tenmax.mobilesdk.TenMaxMobileSDK;
import io.tenmax.sdkdemo.SupportedSpaces;
import io.tenmax.sdkdemo.databinding.FragmentDashboardBinding;
import io.tenmax.sdkdemo.ui.SimpleAdSessionListener;
import io.tenmax.sdkdemo.ui.SimpleInitiationCallback;
Expand All @@ -30,7 +30,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
View root = binding.getRoot();
SimpleAdSessionListener listener = new SimpleAdSessionListener(this.getContext());
SimpleInitiationCallback callback = new SimpleInitiationCallback(this.getContext());
this.inlineAd = inlineAd("f95fc92d4a824a41", this.getActivity(), this.binding.inlineAd, listener, callback);
this.inlineAd = inlineAd(SupportedSpaces.inlineId, this.getActivity(), this.binding.inlineAd, listener, callback);
return root;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import androidx.lifecycle.ViewModelProvider;

import io.tenmax.mobilesdk.TenMaxAd;
import io.tenmax.sdkdemo.SupportedSpaces;
import io.tenmax.sdkdemo.databinding.FragmentHomeBinding;
import io.tenmax.sdkdemo.ui.SimpleAdSessionListener;
import io.tenmax.sdkdemo.ui.SimpleInitiationCallback;
Expand All @@ -33,7 +34,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
homeViewModel.getText().observe(getViewLifecycleOwner(), textView::setText);
SimpleAdSessionListener listener = new SimpleAdSessionListener(this.getContext());
SimpleInitiationCallback callback = new SimpleInitiationCallback(this.getContext());
this.fullscreenAd = interstitialAd("d1061fb7cebc43d3", this.getActivity(), listener, callback);
this.fullscreenAd = interstitialAd(SupportedSpaces.interstitialId, this.getActivity(), listener, callback);
return root;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import androidx.lifecycle.ViewModelProvider;

import io.tenmax.mobilesdk.TenMaxAd;
import io.tenmax.sdkdemo.SupportedSpaces;
import io.tenmax.sdkdemo.databinding.FragmentNotificationsBinding;
import io.tenmax.sdkdemo.ui.SimpleAdSessionListener;
import io.tenmax.sdkdemo.ui.SimpleInitiationCallback;
Expand All @@ -33,8 +34,8 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
View root = binding.getRoot();
SimpleAdSessionListener listener = new SimpleAdSessionListener(this.getContext());
SimpleInitiationCallback callback = new SimpleInitiationCallback(this.getContext());
this.topBannerAd = bannerAd("d2721bd68b344b1b", this.getActivity(), this.binding.topBanner1, top, listener, callback);
this.bottomBannerAd = bannerAd("05a60ba0ed4849a8", this.getActivity(), this.binding.bottomBanner1, bottom, listener, callback);
this.topBannerAd = bannerAd(SupportedSpaces.topBannerId, this.getActivity(), this.binding.topBanner1, top, listener, callback);
this.bottomBannerAd = bannerAd(SupportedSpaces.bottomBannerId, this.getActivity(), this.binding.bottomBanner1, bottom, listener, callback);
return root;
}

Expand Down

0 comments on commit 08caa04

Please sign in to comment.