Google Map retains the reference to the context of the enclosing activity?

by Katsiaryna » Fri, 22 Jan 2010 00:08:00 GMT

Sponsored Links
 Still no luck. Seems I should report it as a bug...

> Katsiaryna

Other Threads

1. AlarmManager and the PendingIntent that failed

In order to learn how to use the AlarmManager I created an activity
that consists of a single button. When the button is pressed the
activity creates an Intent of itself and loads it into the
AlarmManager 3 seconds in the future before finishing.

So activity opens, user pushes button, activity closes, 3 seconds
later activity opens, repeat.

Problem is instead of opening the activity 3 seconds later I get an
error: "The application [myappname] has stopped unexpectedly. Please
again." however I was able to open a Toast from the Receiver just

Here's the code for the button:
thanksButton.setOnClickListener(new View.OnClickListener() {
               public void onClick(View view) {

               Intent intent = new Intent(myappname.this,
               PendingIntent appIntent = PendingIntent.getBroadcast
(myappname.this, 0, intent, 0);
               Calendar calendar = Calendar.getInstance();
               calendar.add(Calendar.SECOND, 3);
               AlarmManager am = (AlarmManager)getSystemService
               am.set(AlarmManager.RTC, calendar.getTimeInMillis(),



Here's the broadcast receiver:
package com.myappname;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class myappnameBroadcastReceiver extends BroadcastReceiver {
       public void onReceive(Context context, Intent intent) {
                       context.startActivity(new Intent(context,

and here's the lines from the manifest.xml


2. Looking for some reading on the Android Framework

<>Best I've found. Join the forum, the author
responds quite often. Good material, well written, and continually being
updated. He's working on 2.1 additions right now.


3. Macro Recording

4. Android Emulator Problems on Win2K

5. Regarding Multimedia

6. Android 2.0 SDK is here!

7. Installing app