当前位置: 首页 > 工具软件 > Tizen > 使用案例 >

tizen android模拟器,Tizen在模拟器中推送通知

鄂慈
2023-12-01

我目前正在模拟器中开发一个小型Tizen Web应用程序,因为我没有开发人员设备.

我添加了以下权限和访问来源,如指南中所述:

之后,我添加了以下代码,该代码也取自同一指南:

// Defines the data to be used when this process is launched by notification service.

var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");

tizen.push.registerService(service, registerSuccessCallback, errorCallback);

function registerSuccessCallback(id)

{

console.log("Registration succeeded with id: " + id);

}

function errorCallback(response)

{

console.log( 'The following error occurred: ' + response.name);

}

但是,当我运行该代码时,我得到一个UnknownError.

我开始认为这可能是因为我正在使用模拟器.我确实看到有一个用于模拟器的推送服务器,我是否需要请求访问该服务器而不是EU服务器才能在模拟器中工作?

我的问题是:我错过了什么?为什么我一直在Tizen应用程序中得到UnknownError?

 类似资料: