小编Yas*_*ple的帖子

将 NotificationManager 用于 android 服务

我有一个在后台运行的服务,如果有新数据,我想通知用户,我使用了一个通知管理器,通知出现了,但是当点击它时它什么也不做(它应该显示我是 android 新手的一项活动,这是我的代码

NotificationManager notificationmanager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Notification notification = newNotification(R.drawable.shoppingcarticon, "Nouvelle notification de ShopAlert", System.currentTimeMillis());
notification.defaults |= Notification.DEFAULT_VIBRATE;
notification.flags |= Notification.FLAG_AUTO_CANCEL;

Intent intent = new Intent(this,GooglemapActivity.class);
PendingIntent activity = PendingIntent.getService(this, 0, intent, 0);

notification.setLatestEventInfo(this, "This is the title", "This is the text", activity);
notification.number += 1;
notificationmanager.notify(0, notification);
Run Code Online (Sandbox Code Playgroud)

您的帮助将不胜感激。

service android notificationmanager

2
推荐指数
1
解决办法
8343
查看次数

从ASP.NET webservice中的cellid,lac,MCC,MNC获取经度和纬度

我有一个.asmx网络服务,获取cellid,MCC,MNC和LAC,我想使用opencellid从这些信息中获取经纬度,我没有在互联网上找到资源,所以我不知道在哪里去开始.如果你可以帮助我找到如何做到这一点,或者给我一个替代解决方案,从这些信息中找到纬度和经度,那将是很好的.谢谢

asp.net location cellid

1
推荐指数
1
解决办法
1万
查看次数

Android:仅通过WIFI发送数据

我有一个在后台运行并将数据发送到服务器的服务,我想只通过wifi发送这些数据而不是另一种方式(gprs或其他)可能吗?如果是的话,我怎么能实现呢?如果你有样本代码或链接会很棒.谢谢.

service android wifi

0
推荐指数
1
解决办法
2332
查看次数