Context

Put your problem here if it does not fit any of the other categories.

Context

Postby kartik_trivedi » Wed Jan 21, 2009 11:51 am

I am using AlaramManager to invoke my application after particular time intarval. For that i need to create the object of PendingIntent. I want to ask some question for that.

1) I want that after particular time interval the same class start in execution so can i put current class name to Intent's setClass() paramiter ?

2)getActivity(Context context, int requestCode, Intent intent, int flags)

-Can any one tell me how we can pass context or its value ? I do not know any thing about context. ?
- What is the purpose of requestCOde and flags ?

To use AlramRegister will i have to do any change in manifiest file ?


Sorry if i am asking basic question but i am just newbie so please do not mind.
Sun Certified Java Developer
Forum Nokia Champion
kartik_trivedi
Developer
Developer
 
Posts: 28
Joined: Tue Jan 20, 2009 7:19 am

Top

Postby MrSnowflake » Wed Jan 21, 2009 12:51 pm

Activity is a Context...
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

PendingIntent

Postby kartik_trivedi » Wed Jan 21, 2009 1:19 pm

MrSnowflake wrote:Activity is a Context...



Then why the following thing is not working ?

Pending Inten getActivity(Context, int, Intent, int),

The syntax of method is as above. Now i am calling it in following way.

PendingIntent PI = (PendingIntent)getActivity(this,1,intent,1);


Now my current class in whch i am working extedns Activity then why it is not working. Its giving syntax error. I hope some one will reply as early as possible.
Sun Certified Java Developer
Forum Nokia Champion
kartik_trivedi
Developer
Developer
 
Posts: 28
Joined: Tue Jan 20, 2009 7:19 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 17 guests