Code example for SparseArray

Methods: get

    public void onReceive(Context context, Intent intent) {
        int id = (int) ContentUris.parseId(intent.getData());
        Alarm alarm = mAlarms.get(id);
        if (alarm == null) {
        sExecutor.execute(new Worker(alarm));
    private class Worker implements Runnable {
        private final Alarm mAlarm;
        public Worker(Alarm alarm) {
            mAlarm = alarm;
        public void run() { 
Connect your IDE to all the code out there  Get Codota for Java