hi guys,

i have Activity A and Activity B

i want to access a method in Activity A from Activity B

this is my method
Activity A extends activity{

   public void save(){

   }
}

this is what i have done from activity B

Activity B extends activity{

   public void access{

                AcitvityA noti = (AcitvityA) getApplicationContext();
                noti.save();

   }

}

and i'm getting a runtime exception saying

java.lang.ClassCastException: android.app.Application


how can i access this method from another activity??

regards,
Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to