Push notification Mobilefirst Push Notiffication包装WLAuthorizationManager.AcquitainAccessToken(';Push.mobileclient';)

Push notification Mobilefirst Push Notiffication包装WLAuthorizationManager.AcquitainAccessToken(';Push.mobileclient';),push-notification,ibm-mobilefirst,android-push-notification,Push Notification,Ibm Mobilefirst,Android Push Notification,我们在应用程序中使用脱机登录。 我们使用下面的代码在注销应用程序时从MFP服务器取消注册设备 function unregisterDevice() { const deferred = $q.defer(); WLAuthorizationManager.obtainAccessToken('push.mobileclient').then(token => MFPPush.unregisterDevice((successRespons

我们在应用程序中使用脱机登录。 我们使用下面的代码在注销应用程序时从MFP服务器取消注册设备

function unregisterDevice() {
            const deferred = $q.defer();

            WLAuthorizationManager.obtainAccessToken('push.mobileclient').then(token => MFPPush.unregisterDevice((successResponse) => {
                deferred.resolve(successResponse);
            }, (failureResponse) => {
                pelLogger.warn('Failed to unregister from push notifications', failureResponse);
                deferred.resolve(failureResponse);
            }), (error) => {
                deferred.resolve(error);
            });

                return deferred.promise;
}
上面的代码WLAuthorizationManager.AcquinaAccessToken('push.mobileclient')在某个时间点不会返回任何东西,不会导致应用程序看起来非常理想。2018年2月,有人说这段代码是因为

/* *注意:在下面的代码中,MFPPush API调用用“WLAuthorizationManager.AcquitainAccessToken(“push.mobileclient”)”包装。 *这是由于产品当前版本中存在缺陷所致。 */


我们还需要这样做吗?即使在经过一年的更新之后。

在所有MFPPush API调用之前调用
WLAuthorizationManager.AcquinaAccessToken('push.mobileclient')
也不是强制性的

如果您试图在设备脱机时调用注销API,请注意,这将不起作用