Step 1 :- Open Tapcontext account with signup this link :- https://www.tapcontext.com/register/?r=7m6whhw42x
Step 2 :- Download TapContext Files.
1. Download: TapContext Java Library File, Required Resources v3.0
Step 2 :- Download TapContext Files.
1. Download: TapContext Java Library File, Required Resources v3.0
2: Add the TapContext Files to Your Android Project
Required Permissions
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.INTERNET" />
Strongly Recommended Permissions
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Required Metadata
<meta-data android:name="com.tapcontext.DEVELOPERKEY" android:value="h3vhs253n3" />
Required Manifest Additions
<activity android:name="com.tapcontext.TapContextActivity" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.Translucent" android:exported="false" /> <service android:name="com.tapcontext.TapContextService"/> <receiver android:name="com.tapcontext.TapContextReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="android.intent.category.HOME" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.PACKAGE_ADDED" /> <action android:name="android.intent.action.PACKAGE_REPLACED" /> <action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> <data android:scheme="package" /> </intent-filter> </receiver>
Step 2 :- Open your java file add this code.
new TapContextSDK(getApplicationContext()).initialize();
new TapContextSDK(getApplicationContext()).showAd();
a) Add a Custom Splash Ad
SplashAd splash = new SplashAd(this); splash.show();
splash.setImageResource(R.drawable.ic_launcher_web);
b) Add an Exit Ad
@Override public void onBackPressed() { // No need to call super.onBackPressed() // The ExitAd will handle the exit of the App ExitAd exit = new ExitAd(this); exit.show(); }
c) For Banners to your App
<com.tapcontext.AdView
android:layout_width="wrap_content"
android:layout_height="50dp" />
Step 3 :- Run your code.
Out/put
Download project :- https://dl.dropboxusercontent.com/u/109954727/tapcontext.zip
This is a fantastic website, could you be interested in going through an interview concerning just how you made it? You can visit my site. Exit intent
ReplyDelete