Suggestion to solve a error in extension

Hello, Everyone

I am trying to make extension but i am getting an error.

This is my code below:

But is giving errors screenshot below:

For reference I am try to implement this link Screen Timeout

Can anyone please help to fix this.

Thank You.

You must use the context object since the contentresolver is a part of its methods.


I tried that but the error is still there.
@Mika can you please provide a screenshot with the correct code??

Thank You.

He has provided 100% correct code.
You should check your code.

Actually I am new to java therefore i am having little problem but here is my full sreenshot of whole code:

Now can say its correct or not??

Thank You.

Absolutely wrong.
Where have you declared and initialized ‘context’?

Its going out of my head I rather stop.

I know i will never create extension.

Anyway, @vknow360 thank you for your help…

The first step of programming is to never give up.

Look at open source extensions to learn how to use context in extension.

1 Like

Check this (1.2 KB)

Thank You so much for you help @avmcreators02
:pray: :pray: :pray:

1 Like

Glad to help :heart:

A new trend on community:
The guy who really helps you by giving best solution and precious advice receives :-1:
The guy who wants to make you a copy-cat receives :+1:

Marked Mika’s post as solution.


First see this

ic, so to prevent misunderstanding, you should first post this.

What does screenshot prove?

Which misunderstanding?
I am fully confused :confused:

You misunderstanding of @avmcreators02 just giving an aia and your speech of

There are two major differences between StackoverFlow and AI2 distributions’ communities:
1.Question Author gives as much as possible details and if he/she does not then he can’t expect to get a single answer.
2.They don’t give solutions directly.They teach/show that how to do a particular thing.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.