2012-09-19 57 views
5

我想在我的android應用程序中添加AirPush廣告。我曾閱讀從http://www.airpush.com/publishers/publishers/downloadsdk/的完整的文檔和此PDF文件download pdf for airpush sdk我如何在我的android應用程序中集成AirPush廣告?

現在我有兩個疑問:

  1. 我們必須讓應用程序的URL或者Android Market或其他一些時候,我們創造的使用airpush sdk的新應用程序。那麼我們如何才能像第一次上傳應用程序那樣不需要進行airpush集成,然後獲取應用程序的url,然後再通過airpush集成進行上傳。

  2. 第二件事是我們必須在清單中給出該應用程序ID,應用程序密鑰和軟件包名稱並將該jar文件添加到lib中。並休息一些代碼,我在下面顯示的那個活動中我們想要展示這些廣告。我是否願意?

    公共類AirTestActivity擴展活動Airpush airpush;

    /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.main); 
        // create Airpush constructor. 
        airpush = new Airpush(this); 
        airpush.startSmartWallAd(); //launch smart wall on App start 
    
        // start Dialog Ad 
        // airpush.startDialogAd(); 
        // start AppWall ad 
        // airpush.startAppWall(); 
        // start Landing Page 
        // airpush.startLandingPageAd();   
    
    
        airpush.startPushNotification(true); 
        // start icon ad. 
        airpush.startIconAd();  
    } 
    
    @Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) { 
        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {   
         //use smart wall on app exit. 
        // airpush.startSmartWallAd(); 
        } 
        return super.onKeyDown(keyCode, event); 
    } 
    

    }

  3. 是否有必要與TextView的和圖像視圖中添加的佈局在佈局像下面

    <ImageView 
        android:id="@+id/imageView" 
        android:layout_width="fill_parent" 
        android:layout_height="35dp" 
        android:layout_centerHorizontal="true" > 
    </ImageView> 
    
    
    
    <TextView 
        android:id="@+id/textView" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_below="@+id/imageView" 
        android:layout_centerHorizontal="true" 
        android:layout_marginTop="10dp" 
        android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent" 
        android:textSize="11dp" /> 
    

還有什麼我們必須爲此做的。請指導我

+3

請記住,用戶討厭這些,我一個人會週期性地在我發現使用它們的每個應用程序上留下1星評價。 – Wug

+3

@Wug我會做一個我們來自英國的客戶請求我這樣做:( –

+2

客戶永遠是對的,做你正在付費的事情 – Wug

回答

3

關於#1:您只需要讓應用程序的包名稱構建市場url。例如com.myapp.pack。所以你的應用的市場url將如下所示:

https://play.google.com/store/apps/details?id=com.myapp.pack

如果您更改了應用的軟件包名稱,則可以隨時在Airpush的編輯應用程序部分對其進行編輯。

關於#2:是的,這是初始化Airpush的正確方法。

關於#3:BannerPush廣告需要airpush_notify.xml。

最後,你的包名稱的罐子是正確的實施。 Airpush360.jar是Airtest應用程序提供的示例jar。如有任何疑問或混淆,請通過下載SDK頁面上提供的實施文檔或發送電子郵件至[email protected]

相關問題