Gov*_*vas 1 integration notifications operating-system blackberry
我正在开发一个Blackberry应用程序,我需要从手机中获取配置文件列表(用于声音设置).
有没有办法获取个人资料信息?
无法查询选定的配置文件,但您可以集成到配置文件中,以便用户可以在每个配置文件中从应用程序中选择所需的通知.有关示例,请参阅BlackBerry JDE附带的notificationsdemo.
Mark Sohm
BlackBerry Development Advisor
www.BlackBerryDeveloper.com
BlackBerry支持社区论坛:Java开发:API中的Profiles支持
据我所知,你可以通过应用程序使用个人资料做两件事
// NotificationEvent converted to long
public static final long ID = 0x3965ce1e5d258a10L;
public static final Object event = new Object() {
public String toString() {
return "Notification Event";
}
};
private void registerNotificationSource() {
NotificationsManager.registerSource(ID, event,
NotificationsConstants.CASUAL);
}
private void deregisterNotificationSource() {
NotificationsManager.deregisterSource(ID);
}
Run Code Online (Sandbox Code Playgroud)
private void openProfiles() {
int handle = CodeModuleManager
.getModuleHandle("net_rim_bb_profiles_app");
ApplicationDescriptor[] appDescr = CodeModuleManager
.getApplicationDescriptors(handle);
if (appDescr.length > 0) {
try {
ApplicationManager.getApplicationManager().runApplication(
appDescr[0]);
} catch (ApplicationManagerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud)