Using a service gives you:
1. Less chance of garbage collection problems from failing to null out
the singleton.
This one I don't understand. What do you mean?
Andrey
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this
On Apr 9, 8:11 am, Mark Murphy mmur...@commonsware.com wrote:
Donal Rafferty wrote:
The singleton wont be killed by the system automatically like a service
which could lead to GC problems
Correct. Objects held in static data members, or referenced from a
static data member, will not be
On Apr 9, 11:07 am, Mark Murphy mmur...@commonsware.com wrote:
ailinykh wrote:
On Apr 9, 8:11 am, Mark Murphy mmur...@commonsware.com wrote:
Donal Rafferty wrote:
The singleton wont be killed by the system automatically like a service
which could lead to GC problems
Correct. Objects
Thank you,
Mark!
First at all singleton could be a member of the application. Then it
will garbage collected with application.
Then it is not a singleton. It is a data member of Application.
Sorry, I wasn't precise.
As far as I
understand one process runs one application.
At a
Hello, everybody!
Android has such concept as a Service. It makes sense for interprocess
communication.
But if I need this service from Activities running in the same process
regular singleton seems to be more convenient.
No need to register, to bind. Are there any benefits to use service
in the
Hello, everybody!
I would like to catch horizontal scrolling in ListView. I don't wont
to scroll ListView content, I need an event only. I use
GestureDetector, and in onScroll() method I can figure out when user
scrolls in horizontal direction.
This part works. But my problem is ListView fires
Hello, everybody!
I have two activities, one per orientation - PortraitActivity and
LandscapeActivity. They are pretty much different, I can't use one
Activity with different layouts.
If user changed orientation I have to shutdown one of them and start
another.
What is the best way to manage them?
athttp://developer.android.com/guide/topics/resources/resources-i18n.ht
On Mar 11, 11:02 pm, ailinykh ailin...@gmail.com wrote:
Hello, everybody!
I have two activities, one per orientation - PortraitActivity and
LandscapeActivity. They are pretty much different, I can't use one
. Thus
to get a result, you need to be starting from an activity. If you want to
inform the user of something going on from the background, you should use
the notification manager.
On Tue, Mar 9, 2010 at 9:20 PM, ailinykh ailin...@gmail.com wrote:
Hello, everybody!
I'm doing some
Hello, everybody!
I'm doing some network job in AsyncTask. Sometimes it requires
communication with user. (connection is dropped, session is expired
and so on). I want to pop up a dialog or launch an Activity, and then,
depending on user's input, stop the job or redo it.
I can launch any Activity
Thank you, Mark!
I tried to do it. It works... Almost.
I created simple html file:
html
body
a href=http://myhost/mypath?var1=val1;My Link http/a
p
p
a href=myapp://myhost/mypath?var1=val1My Link myapp/a
/body
/html
If I open this file in browser and click on second link my Activity
pops up.
In my application onCreate method reads some files, creates a bunch of
objects (Model) and then
creates visual layout. When an orientation gets changed it reads files
again. But they are the same.
There is no need to read them again. Only visual layout needs to be
recalculated.
Is there a way to
12 matches
Mail list logo