How to implement Airpush in android?


Step 1 :- Sign up from :- http://www.airpush.com/

Step 2 :- Add Application and get app id and api key.

For Example 

Api key :- 1373299048154373136

App id  :- 180263

Step 3 :- Open manifest.xml file and add this code.

  <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


on application tag

<meta-data android:name="com.fppdjoucoh.zkfgshfqzp154373.APPID" android:value="180263" />
<meta-data android:name="com.fppdjoucoh.zkfgshfqzp154373.APIKEY" android:value="android*1373299048154373136"/>


For Smartwall

<activity android:exported="false" android:name="com.fppdjoucoh.zkfgshfqzp154373.SmartWallActivity"
     android:configChanges="orientation|screenSize"
android:theme="@android:style/Theme.Translucent" />


For Video and Browser 

<activity android:name="com.fppdjoucoh.zkfgshfqzp154373.BrowserActivity"
android:configChanges="orientation|screenSize" />
<activity android:name="com.fppdjoucoh.zkfgshfqzp154373.VideoAdActivity"
            android:configChanges="orientation|screenSize" android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >


Step 4 :- For Banner Ads Add this code in main.xml file.

<com.fppdjoucoh.zkfgshfqzp154373.AdView
xmlns:ap="http://schemas.android.com/apk/res-auto"
android:id="@+id/myAdView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ap:animation="fade"
ap:banner_type="inappad"
ap:placementType="interstitial"
ap:test_mode="false"
ap:canShowMR="false"
android:layout_alignParentBottom="true"
/>


Step 5 :- Open main.java file and add this code.


private AirPlay airPlay; //Declare AirPlay here


Below Oncreate


 airPlay=new AirPlay(MainActivity.this, null, false);
       
         AdView adView=(AdView)findViewById(R.id.myAdView);
         adView.setAdListener(adlistener);


For Smart wall ads :-      airPlay.startSmartWallAd(); 

For AppWall ads :-       airPlay.startAppWall();

For LandingPage ads :-     airPlay.startLandingPageAd(); 

For Overlay ads :-      airPlay.startOverlayAd();

For RichMedia ads :-       airPlay.showRichMediaInterstitialAd();

Be Careful Used All Ads different Activities.Don't Used in one activity.


Step6 :- Run Project.

Out/Put : -








Download Link :- https://dl.dropboxusercontent.com/u/109954727/Airpush.zip
 



9 comments:

  1. What is the Post Date of this Post?? is this based on AirSDK 1.0?? IS this new or old??? is it even COMPLETE?? where is the .jar FILE in your tutorial????

    ReplyDelete
  2. please download document file from the air push site and sdk.

    ReplyDelete
  3. I am not able to download source code from the link. can you please send me mail or provide other link. Thanks

    ReplyDelete
  4. your download link for source code is not working.

    ReplyDelete
  5. how to remove AirPush from please help me

    ReplyDelete
  6. Link is not working. Please provide a new link.

    ReplyDelete
  7. add tag for airpush is not working........

    please explain in new version .... SDK X ...

    ReplyDelete
  8. Please help me on how to intergrate the airpush adds in the nee version SDK X

    ReplyDelete