【发布时间】:2013-09-04 08:58:37
【问题描述】:
我有一个错误报告,对于一些 2.3.X 版本的 android 设备:
android.app.RemoteServiceException:startForeground 的错误通知:java.lang.IllegalArgumentException
这是我的方法...
final static int myID = 6785674;
public void putServiceToForeground() {
if (notif == null) {
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(MyApp.getAppContext())
.setContentTitle("");
notif = mBuilder.build();
notif.icon = R.drawable.pixel;
}
startForeground(myID, notif);
}
【问题讨论】:
标签: android service android-notifications foreground