Issue a summary memo implementation process

1. alarm reminder function implementation issues.

We need to define a variable:

private AlarmManager alarm manager = null;

Get wake-up service through the following statement:

alarmManager=(AlarmManager)getSystemService(Context.ALARM_SERVICE);

Intent intent = new Intent (AddBwlActivity.this, AlarmReceiver.class); // Create the Intent object, AlarmReceiver class receives the broadcast and processes.

Examples of PendingIntent object storage operation when the wake-up alarm and process information.

PendingIntent pi = PendingIntent.getBroadcast(AddBwlActivity.this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); 

Here, broadcast data can not be updated, all presented for the first time data.

The investigation, can pass different action to solve this problem:

intent.setAction("ALARM_ACTION"+calendar.getTimeInMillis());

2. listView automatically updated question:

When you delete, by adapter.changeCursor (cursor); it can be.

When you return to the page where listView, rewrite onResume,

Also call adapter.changeCursor (cursor); to



Reproduced in: https: //my.oschina.net/u/2552902/blog/543966

Guess you like

Origin blog.csdn.net/weixin_33953384/article/details/92326766