开发者

How to install the new Urban Airship Push Library for Android in a Phonegap Project

I'm building an app using Phonegap and I'm using Urban Airship for iOS and Android.

For Android I was using it with AirMail, but now they are planning the deprecate AirMail and have published a new library (http://urbanairship.com/docs/android-client-overview.html).

I'm trying to make it work but I can't initialize it:

public c开发者_开发知识库lass MainApp extends DroidGap { 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 
        super.loadUrl("file:///android_asset/www/index.html"); 
        UAirship.takeOff(this);
    } 
} 

The UAirship.takeOff() method is suppose to take an "Application" as the argument, but because PhoneGap apps extend DroidGap instead of Application it doesn't work.

I know almost nothing about Android development, so I'm not sure how to go around this.

Has anybody successfully installed the new UAirship library on a phonegap project?


Somebody already replied to my question on Phonegap's mailing list providing this blog post which was written today:

http://minimoesfuerzo.org/2011/06/6/urban-airship-10-integration-android-phonegap-app/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜