kAm*_*mol 4 android push-notification android-notifications android-intentservice
我不确定它有什么不对!我在这里读到Intentservice本身就是它的子类Context.
public class GCMNotificationIntentService extends IntentService {
private NotificationManager mNotificationManager;
NotificationCompat.Builder builder;
Context mainContext;
WriteFile writeFile;
public GCMNotificationIntentService() {
super("GcmIntentService");
mainContext = getApplicationContext();
writeFile = new WriteFile(mainContext);
}
// My rest of the code
}
Run Code Online (Sandbox Code Playgroud)
但是我的价值是空的mainContext.任何建议都是最受欢迎的.
| 归档时间: |
|
| 查看次数: |
2836 次 |
| 最近记录: |