无法使用 IONIC + MFP App 在 IBM Mobile First 控制台中获取设备信息

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

我首先将 IBM Mobile 与我的 Ionic 应用程序集成。在那里我添加了对 IBM 服务器连接的调用。

在那里我可以将我的应用程序连接到他们的服务器。在我的控制台中,我可以看到服务器已连接。

我的问题是, 在移动优先操作控制台中,我无法获得有关我的应用程序的任何信息。 (即)设备信息。

编辑: 我从 GitHub 获取了您的应用并执行了以下操作:

  1. 从项目的根文件夹,运行命令:cordova plugin add cordova-plugin-mfp
  2. 在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. 运行 命令:ionic build android

  4. 运行 命令:ionic emulate android

然后我可以在“设备”视图中看到该应用程序 ("TestIBM"):

原回答:
如果您的应用程序真正成功连接到服务器(即它已正确注册并获得了令牌),您将在操作控制台的设备视图中或分析控制台的应用程序视图中看到它。

例如: