1

I have an app developed in Worklight 6.2, using DoJo framework, and I want to integrate it with Xtify. By reading the integration tutorial, I found a problem in the 7th step:

Step 7:

1.Perform the following steps to edit your main activity class: Add an import for com.ibm.mobilepush.cordova.MobilePushCordovaActivity.

2.Make your main activity override MobilePushCordovaActivity instead of CordovaActivity.

3.If you override the onSaveInstanceState method or the onNewIntent, make sure you call the super class method.

However, since I am working with a DoJo application, my Main Activity class already extends anoter class:

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;
    ...

How can I proceed with this integration? I was thinking that maybe I could extend two different classes, but that doens't seem to be possible.

1 Answers1

2

Take a look into this post: Xtify + Worklight 6.1 integration in android environment

You probably need to add

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

and append this line to your onStart() method:

XtifySDK.start(getApplicationContext(), XTIFY_APP_KEY, PROJECT_NUM);

I would also add these two methods:

@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);
} 
Community
  • 1
  • 1
André Perazzi
  • 1,039
  • 2
  • 11
  • 27