Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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"):

enter image description here

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:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...