A simplest Application access "Content Provider"

by Dianne Hackborn » Thu, 06 May 2010 05:40:43 GMT


Sponsored Links
 Please don't spam questions across every android group in the world.




> website: 



A simplest Application access "Content Provider"

by linlone9 » Thu, 06 May 2010 10:51:57 GMT


 orry,

I've corrected it.
If you have any idea about this issue, please help check it.

Thanks.


2010/5/5 Mateusz Kozak <mateuszkozak...@gmail.com>


--


Sponsored Links


A simplest Application access "Content Provider"

by grace » Thu, 06 May 2010 13:51:05 GMT


 i,


getcontentResolver() is the method of Context class which is the super
class of activity,

so any non activity class cannot get access to the content resolver
object..
one work around(even though its not good practice to do..)pass the
content resolver object as parameter to the function you want to use
it from another class which is a activity,
but in your case i don't think you have that option of passing content
resolver object from another class as you have only one class that is
calling main in your program.


On May 6, 7:51am, linlo...@gmail.com wrote:
>



Other Threads

1. ADB over TCP IP on OMAP Board.

Hi Nimit,

  Have you tried adb with ur OMAP Board.If yes can you update me.
I am using a tcp ip connection using a windows host and OMAP 3430 SDP.

Waiting for ur reply...

Regards,
Divya


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Please Help Urgent: Get active context dynamically of an application

>> I posted this questions twice. I will really appreciate your help. Am I

I cannot speak for anyone else, but I saw and skipped your previous
messages because you insist upon cross-posting to multiple lists, and I
get tired of it. Please only post to one list at a time.

You also reposted this twice within the past few hours. If you want that
fast of a response, please hire a consultant.


Bear in mind that there may not be a "current Context". The user might
have exited your activity, for example. I am not aware of a 100% reliable
way to raise a dialog triggered asynchronously, such as in
onPostExecute().

One approximate answer is to have the activity register a listener object
with the service (e.g., in onCreate()) and unregister itself later (e.g.,
in onDestroy()). The service would call a method on the listener object
(if it is not null) to have the listener/activity raise the dialog.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~---------~--~----~------------~-------~--~----~

3. Android Eclair feature list

4. Game Development sample code

5. Google Maps Exception? : cross-loader access from pre-verified class

6. Problem in using remote service from other App

7. Please Help Urgent: Get active context dynamically of an application