0

My MFP Cordova Ionic Hybrid Andriod App Breaks, when MQA Session starts. (Using MQA Bluemix)

Who has the same behavior?

I do not use the doDeviceReady function, because is not needed for the app. I tried it first but is not fired in my app, so the mfp Cordova integration like written in Installing the Mobile Quality Assurance plug-in for Apache Cordova not needed.

I use my Android Nexus 9 for running the hybrid application. Android 5.0.1 Kernel-Version 3.10.40-ga3846f1

Difference:

a) I changed the MQA session code a bit and I used the MQA Session Start in wlCommonInit() in index.js. I tried to run it on a real anroid device.

MQA.startNewSession(
{ // Options
      mode: "QA", // or mode: "MARKET" for production mode.
      android: {
                 appKey: "XXX" ,
                 notificationsEnabled: false
                },
      ios:     {
                 appKey: "XXX" ,
                 screenShotsFromGallery: false,
               },
      //serverURL: "https://devops.quality4mobile.com" , // The default value is the IBM Bluemix server.
      //defaultUser: "email_address", // The mail address of the tester so it does not have to be repepeatedly entered.
      machExceptionEnabled: false, // Ensure debugging mode is not on when this
                                   //  value is set to true.
      reportOnShakeEnabled: true  // Enable problem reporting with a shake.
 }, successMQA, errorMQA);

 function successMQA() {
 console.log("MQA Session Started successfully");
 }

 function errorMQA(error) {
  console.log("MQA Session error" + error);
 }

I do not have the ability to provide additional debugging or log because it breaks directly, before the "chrome inspect device" can show any interaction.

I followed mostly the instruction here:

MQA Cordova Integration: Installing the Mobile Quality Assurance plug-in for Apache Cordova

Verified information here: MFP Integration with Cordova: Integrating IBM MobileFirst Platform Foundation SDK in Cordova applications

Dave Cariello
  • 505
  • 6
  • 12
  • Are you running Marshmallow on your Android device? – Rob Puryear Dec 09 '15 at 14:56
  • Try using this code just to see if it works: – Rob Puryear Dec 11 '15 at 19:32
  • MQA.startNewSession({ mode: "QA", android: { appKey: "your app key here" , notificationsEnabled: true }, ios: { appKey: "your app key here" , screenShotsFromGallery: true, } }, { success: function () {console.log("Session Started successfully");}, error: function (string) { console.log("Session error" + string);} }); – Rob Puryear Dec 11 '15 at 19:36
  • Hello Rob, thanks for your Feedback. This code is the code from the help, I tried first. I know it is better to switch of the Photo Library. The Answer is this code is already tested. I already put the links to the Help and Guide in Question. – Thomas Suedbroecker Dec 14 '15 at 07:57
  • Does the code I provide work? I'm just trying to narrow down where the problem may be. Thanks – Rob Puryear Dec 14 '15 at 14:06
  • No, the code does not work. :-( – Thomas Suedbroecker Dec 14 '15 at 14:35

1 Answers1

1

I was able to get the MFP project working by including the MQA.startNewSession in the wlCommonInit function.

Rob Puryear
  • 411
  • 1
  • 3
  • 10
  • Yes, thanks is works :-). Download the latest cordova sdk : http://www-01.ibm.com/support/docview.wss?uid=swg27044490 – Thomas Suedbroecker Feb 19 '16 at 22:21
  • If you want to check the sample code by yourself just take look here: https://github.com/thomassuedbroecker/TempTracker_IoTBluemixMFPSample#4211-optional-add-mqa-to-bluemix-application-and-configure-mobileapp – Thomas Suedbroecker Mar 11 '16 at 17:36