android-context
Accessing sharedpreferences within onLocationChanged forces close of application
In my app, I have a service that gets the location of the device and passes this info through to a thread. I also need to pass a sharedpreferences value through to the thread. When I do this, the appl[详细]
2023-02-01 07:42 分类:问答Having trouble creating a subclass of application to share data with multiple Activities
I just finished a couple of activities in my game and now I was going to start to wire them both up to use real game data, instead of the test data I was using just to make sure each piece worked. Sin[详细]
2023-02-01 03:58 分类:问答What context should I use AlertDialog.builder on event of a button ?
I am using this code... please rectify it btnLogin.setOnClickListener(new OnClickListener() { @Override[详细]
2023-01-31 18:29 分类:问答Using the right context inside a method to get an sqlite db
I am basically trying to get information from an sqlite db in another class. I\'ve done this without any problems inside the onCreate method, but when I try to use it inside an onClickListener which i[详细]
2023-01-30 00:27 分类:问答Android ContentObserver onChange() only returns false
I\'m trying to implement a ContentObserver for CallLog.Calls content provider. I mean, If I make a call, or receive a call, etc, the observer must notify me that the CallLog.Calls content provider has[详细]
2023-01-29 23:23 分类:问答Geocoder Context in Subclass
My Main Activity is AddressFinder, here I start a AddressController: AddressController ac = new AddressController();[详细]
2023-01-29 18:41 分类:问答Android restart my activity
How can I do that? on button click: mycontext.finish(); and 开发者_如何学JAVAthen: start again?You could try either this:[详细]
2023-01-27 09:15 分类:问答Context and Calendar
I am using a method to add an event to an internal calendar on the phone.Context has always confused me and this time is no different.The method contract wants the application context.The method call[详细]
2023-01-27 03:34 分类:问答Android SQLite ContextWrapper.openOrCreateDatabase() nullpointer?
I have created a program, with a service - the service is \"START_STICKY\". So when I close the开发者_Go百科 program (I am using Advanced Task Killer, to kill programs) the service is restarted automa[详细]
2023-01-26 07:44 分类:问答getString Outside of a Context or Activity
I\'ve found the R.string pretty awesome for keeping hardcoded strings out of my code, and I\'d like to keep using it in a utility class that works with models in my application to generate output. For[详细]
2023-01-26 05:15 分类:问答