0

我想编写一个在发生日历提醒时触发的应用程序。我还查看了 android developer site 并没有找到任何关于它的信息

我想创建这样的东西(但是它对我不起作用)。我该怎么做?

public class SchedulerSetupReceiver extends BroadcastReceiver {
    private static final String APP_TAG = "com.hascode.android";

    private static final int EXEC_INTERVAL = 20 * 1000;

    @Override
    public void onReceive(final Context ctx, final Intent intent) {
        Log.d(APP_TAG, "SchedulerSetupReceiver.onReceive() called");
        AlarmManager alarmManager = (AlarmManager) ctx
                .getSystemService(Context.ALARM_SERVICE);

        Calendar now = Calendar.getInstance();

    }

}
4

0 回答 0