0

I am following the instructions in the online Knowledge Center for MQA to instrument a MobileFirst Platform (v7) application with the native Android java library at v2.7.1.I can't determine if it's a product issue, or if it's something I've missed in the project setup. This fails on both an AVD as well as a real Nexus 5 running Android 5.1.

Any thoughts of what else I should be looking at?

I've attached the stack trace here

04-22 07:47:24.400: D/AndroidRuntime(25228): Shutting down VM
04-22 07:47:24.400: E/ApplauseUncaughtExceptionHandler(25228): Applause intercepted uncaught exception: android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@352481e -- the specified window type is not valid
04-22 07:47:24.400: W/System.err(25228): android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@352481e -- the specified window type is not valid
04-22 07:47:24.400: W/System.err(25228):    at android.view.ViewRootImpl.setView(ViewRootImpl.java:594)
04-22 07:47:24.400: W/System.err(25228):    at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
04-22 07:47:24.400: W/System.err(25228):    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.dialog.ApplauseDialog.attach(ApplauseDialog.java:167)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.dialog.ApplauseDialog.show(ApplauseDialog.java:152)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.dialog.LoginDialog.show(LoginDialog.java:53)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.dialog.QuickLoginDialog.show(QuickLoginDialog.java:77)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.dialog.LoginDialogWrapper.show(LoginDialogWrapper.java:18)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.logic.IdentifyFinishedListener.displayLoginActivity(IdentifyFinishedListener.java:41)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.logic.IdentifyFinishedListener.onIdentifyFinished(IdentifyFinishedListener.java:27)
04-22 07:47:24.400: W/System.err(25228):    at com.applause.android.logic.QaIdentifyHandler$1.run(QaIdentifyHandler.java:56)
04-22 07:47:24.400: W/System.err(25228):    at android.os.Handler.handleCallback(Handler.java:739)
04-22 07:47:24.401: W/System.err(25228):    at android.os.Handler.dispatchMessage(Handler.java:95)
04-22 07:47:24.401: W/System.err(25228):    at android.os.Looper.loop(Looper.java:135)
04-22 07:47:24.401: W/System.err(25228):    at android.app.ActivityThread.main(ActivityThread.java:5254)
04-22 07:47:24.401: W/System.err(25228):    at java.lang.reflect.Method.invoke(Native Method)
04-22 07:47:24.401: W/System.err(25228):    at java.lang.reflect.Method.invoke(Method.java:372)
04-22 07:47:24.401: W/System.err(25228):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
04-22 07:47:24.401: W/System.err(25228):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
04-22 07:47:24.403: I/Client(25228): Reporting crash to Applause.
Idan Adar
  • 44,156
  • 13
  • 50
  • 89

2 Answers2

1

This is a bug caused by a change in Android 5.1. A fix is being investigated that might require an update to MQA SDK. In the mean time use an emulator or device with Android 5.0

prem911
  • 266
  • 3
  • 16
0

Note that if you want to still enable an application to run on Android 5.1, you can wrap the code that launches MQA in a check for the SDK level:

if (android.os.Build.VERSION.SDK_INT <= 21){
    Configuration configuration = new Configuration.Builder(this)
        .withAPIKey(APP_KEY) //Provides the quality assurance application APP_KEY
        .withMode(Mode.QA) //Selects the quality assurance application mode
        .withReportOnShakeEnabled(true) //Enables shake report trigger
        .build();       
    MQA.startNewSession(this, configuration);                   
}

You will of course need to update your app to remove this code when the new MQA library becomes available that supports Android 5.1.

curt-miles
  • 21
  • 2