Java Xtify在Worklight/Dojo中的集成
我有一个在Worklight 6.2中开发的应用程序,使用DoJo框架,我想将其与Xtify集成。 通过阅读集成教程,我在第7步中发现了一个问题: 步骤7: 1.执行以下步骤编辑主活动类:添加com.ibm.mobilepush.cordova.mobilepushcordova活动的导入 2.使您的主要活动覆盖MobilePushCordovaActivity,而不是 科尔多瓦活动 3.如果覆盖onSaveInstanceState方法或 onNewIntent,确保调用超级类方法 但是,由于我使用的是DoJo应用程序,我的主要活动类已经扩展了另一个类:Java Xtify在Worklight/Dojo中的集成,java,android,dojo,ibm-mobilefirst,xtify,Java,Android,Dojo,Ibm Mobilefirst,Xtify,我有一个在Worklight 6.2中开发的应用程序,使用DoJo框架,我想将其与Xtify集成。 通过阅读集成教程,我在第7步中发现了一个问题: 步骤7: 1.执行以下步骤编辑主活动类:添加com.ibm.mobilepush.cordova.mobilepushcordova活动的导入 2.使您的主要活动覆盖MobilePushCordovaActivity,而不是 科尔多瓦活动 3.如果覆盖onSaveInstanceState方法或 onNewIntent,确保调用超级类方法 但是,由于
import com.worklight.androidgap.WLDroidGap;
public class DojoApp extends WLDroidGap {
private static WebView webViewOverlay;
public static Activity thisapp;
private static final String TAG = "DojoApp";
private static ProgressDialog progressBar;
...
我如何进行此集成?我在想也许我可以扩展两个不同的类,但这似乎是不可能的。看看这篇文章: 您可能需要添加
public static final String XTIFY_APP_KEY = "xxxxxxxx-xxxxx-xxxx-xxxxx-xxxxxxxxx";
public static final String PROJECT_NUM = "xxxxxxxxxxxx"; // This is the Google Project Number
并将此行附加到onStart()方法:
我还要补充这两种方法:
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
MobilePushCordovaPluginUtils.onSaveInstanceState(this, outState);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
MobilePushCordovaPluginUtils.onNewIntent(this, intent);
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
MobilePushCordovaPluginUtils.onSaveInstanceState(this, outState);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
MobilePushCordovaPluginUtils.onNewIntent(this, intent);
}