android - My app closes device low memory -
i developing app android 4.0 uses services. app works fine , not crash. however, when start heavy app on galaxy s3 app closes, example. when use candy crash app crashes no reason.
is because device on low memory , app doesn't close correctly? or maybe because use getapplicationcontext() inside service?
my service activated on specific time.
thanks help. can see problem downloading https://play.google.com/store/apps/details?id=com.digicode.keepintouch
this code of service: public void startremindersservice(context context) { intent myintent = new intent(context, myalarmservice.class);
myintent.putextra(constants.contact_id, "-1"); int id = 2; pendingintent pendingintent = pendingintent.getservice(context, id, myintent, pendingintent.flag_update_current); calendar calendar = calendar.getinstance(); calendar.set(calendar.hour_of_day, 8); calendar.set(calendar.minute, 55); calendar.set(calendar.second, 0); calendar.set(calendar.day_of_year, 1); alarmmanager alarmmanager = (alarmmanager) context .getsystemservice(context.alarm_service); alarmmanager.cancel(pendingintent); alarmmanager.setrepeating(alarmmanager.rtc_wakeup, calendar.gettimeinmillis(), alarmmanager.interval_day, pendingintent);
}
Comments
Post a Comment