android-context
Null Pointer exception starting IntentService
I\'ve got an IntentService that I\'m trying to start. When I do, it spits out this: java.lang.RuntimeException: Unable to start service com.pec.testapp.service.NewsService@406bd940 with Intent { cmp=[详细]
2023-03-30 08:13 分类:问答Is it possible to get application's context in an Android Library Project?
I would like to get the context of application which has reference/hosted my library at run-time inside one class of my library project. Is it possible? If yes, how?[详细]
2023-03-30 04:29 分类:问答getsharedpreferences from custom edittext context
I have a custom edittext class I have made that I\'d like to retrieve some sharedpref values from a prefs xml. I am currently getting the context passed on the constructor and running getsharedprefere[详细]
2023-03-29 19:16 分类:问答Share activity context among intents
I have 3 screens in my app, each of which are in their own classes. When the app launches, my Driver class sets up some GUI elements, and then launches the first Intent.[详细]
2023-03-28 17:05 分类:问答Context and Activity's reference
I\'ve some proble开发者_如何学Cm with the design of my app, especially opening assets from a class, different from the main Activity.[详细]
2023-03-27 12:32 分类:问答Copy theme from another application
I have an application that contains a custom theme and I wish to share it with other applications. The idea is that this application provides themes to other applications.[详细]
2023-03-27 09:28 分类:问答How to use Android's getString() without violating basic OOD principles?
I need to use getString() from most o开发者_运维知识库f the modules in my application. But for some strange reason, it is tied to Application or Context, so that means I need to pass to each and ever[详细]
2023-03-27 07:50 分类:问答Getting the context in a Thread called by a Service
I have the following piece of code: public class DumpLocationLog extends Thread { LocationManager lm; LocationHelper loc;[详细]
2023-03-26 14:12 分类:问答context for onReceive function is not working properly when the app is not running
I am developing an application that will show the push notification messages. When I am trying to display the messages using Toast message, then it is working properly at any situations. But I want to[详细]
2023-03-26 09:28 分类:问答Button btn = new Button(this); what is the use of "this" in this context....?
Button btn = new Button(this); btn.setText(“This is a Button”); btn.setLayoutParams(params); What will happen if we don\'t pass \"this\" as context reference to the Button..开发者_如何学C..??Conte[详细]
2023-03-24 15:45 分类:问答