Not able to get the Device information in IBM Mobile first console with IONIC + MFP App

可紊 提交于 2019-12-25 18:48:51

问题


I am working with integrating IBM Mobile first with my Ionic App. In there i have added a call for a IBM server connectivity.

In there i can able to Connect my App with their server. In my console i can able see like, the sever was get connected.

My issue is, In mobile first Operation console, i am not able to get any information regarding to my App. (i.e) Device information.


回答1:


Edit: I took your app from GitHub and did the following:

  1. from the root folder of the project, ran the command: cordova plugin add cordova-plugin-mfp
  2. Added the following code inside app.js -> window.MFPClientDefer.promise.then(function wlCommonInit(){:

    WLAuthorizationManager.obtainAccessToken().then(
        function () {       
            alert ("successfully obtained a token from the server");
        },
        function(response) {
                    alert("Unable to obtain a token from the server: " + JSON.stringify(response));
        }
    );
    
  3. Ran the command: ionic build android

  4. Ran the command: ionic emulate android

I could then see the app in the Devices view ("TestIBM"):

Original answer:
If your application truly successfully connected to the server (that is, it is correctly registered and has obtained a token), you will see it in the Devices view in the Operations Console, or in the Apps view in the Analytics Console.

For example:



来源:https://stackoverflow.com/questions/37139441/not-able-to-get-the-device-information-in-ibm-mobile-first-console-with-ionic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!