【问题标题】:how to implement urban airship in android如何在android中实现城市飞艇
【发布时间】:2011-06-07 14:10:52
【问题描述】:

如何在android中实现城市飞艇?我从下载样本 here。我运行我得到安装选项的应用程序。安装后我什么也没得到。实际上我不知道如何用android设置城市飞艇。我只是注册了一个应用名称 xxxx。我没有创建我的 xxxx 应用程序。但我对城市空中船的实施感到困惑。我需要在我的 xxxx 应用程序中触摸按钮,我必须列出我在城市飞艇上发布的视频。请帮帮我。

在上面的站点中,我得到了两个文件 MainActivity 和 sampleApplication.我不知道我在哪里使用我的 xxxx 应用程序中的代码。请帮我。

【问题讨论】:

  • optimized.blogspot.com/2012/03/android-push-notifications-using-urban.html>

标签: android urbanairship.com


【解决方案1】:

在你的 AndroidManifest-

<receiver android:name="com.urbanairship.CoreReceiver">
            <intent-filter>
              <action android:name="android.intent.action.BOOT_COMPLETED" />
              <action android:name="android.intent.action.ACTION_SHUTDOWN" />
            </intent-filter>
        </receiver>

        <receiver android:name="com.urbanairship.push.c2dm.C2DMPushReceiver"
                android:permission="com.google.android.c2dm.permission.SEND">

          <intent-filter>
              <action android:name="com.google.android.c2dm.intent.RECEIVE" />
              <category android:name="com.your.app.here" />
          </intent-filter>

          <intent-filter>
              <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
              <category android:name="com.your.app.here" />
          </intent-filter>
        </receiver>

        <service android:name="com.urbanairship.push.PushService" />

一定要-

import com.urbanairship.AirshipConfigOptions;
import com.urbanairship.UAirship;
import com.urbanairship.push.PushManager;

在您的活动或课程文件中 -

AirshipConfigOptions options = AirshipConfigOptions.loadDefaultOptions(this);
            options.developmentAppKey = "YOURAPPKEY";
            options.developmentAppSecret = "YOURAPPSECRET";
            options.productionAppKey = "";
            options.iapEnabled = false;
            options.inProduction = false; //determines which app key to use

            UAirship.takeOff(this.getApplication(), options);  
            PushManager.enablePush(); 

希望这会有所帮助:)

【讨论】:

    【解决方案2】:

    您可以通过This 浏览。它详细描述了如何为android实现urbanairship。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多