Re: [android-developers] Service app without activities

2016-10-18 Thread Petar Petrovic
Thank you for your answer, it makes sense. This is very helpful, and I will reorganized my app. уторак, 18. октобар 2016. 17.20.45 UTC+2, Steve Gabrilowitz је написао/ла: > > it's not a Studio thing, it's an Android thing. You can not start a > service until the user explicitly starts an activi

Re: [android-developers] Service app without activities

2016-10-18 Thread Steve Gabrilowitz
it's not a Studio thing, it's an Android thing. You can not start a service until the user explicitly starts an activity first, this is to prevent a malicious app from covertly starting a service that does nasty things without the user ever knowing about it! You likely want to give the user some

Re: [android-developers] Service dies when no internet connectivity

2015-04-14 Thread TreKing
On Mon, Apr 13, 2015 at 5:53 PM, NewToAndroid wrote: > But when I was driving thru some remote hilly area, where there is no > internet connectivity, the service stopped playing music. When I checked > later, the service has stopped. What is the concept behind this ? > > What can be the best/esta

Re: [android-developers] Service launch issues

2012-07-13 Thread Justin Anderson
> > Why is it that when I run this it starts the app then promptly crashes it > about 30 seconds later also why is the app not going to the background > instead of staying up front? > What does Logcat say? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On

Re: [android-developers] Service launch issues

2012-07-13 Thread Kostya Vasilyev
In your manifest, the matching action="path.to.file.MainActivity" belongs to the service, and your code uses startActivity with this action. So first off, there is a mismatch in the component type. I'd guess this is the reason for the crash, but do check the logcat. Secondly, what is the purpose

Re: [android-developers] Service failing after first boot from flash

2012-04-26 Thread Justin Anderson
This should be asked on a different forum... I believe there are android porting and android firmware forums where you will get more help. This forum is for developing applications with the Android SDK. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On M

Re: [android-developers] Service not available

2012-02-21 Thread Mychandus Msb
I got this error many times, this is not because of the code, this is because of device not able to get proper satellite signals. if you can get the device into open sky you may get the required inforamtion. On Tue, Feb 21, 2012 at 7:57 PM, ajay talreja wrote: > I want to retrieve the address of

Re: [android-developers] Service

2011-12-13 Thread Michael Leung
Are you talking about notification service? This is the tutorial about that. http://developer.android.com/guide/topics/ui/notifiers/notifications.html On Tue, Dec 13, 2011 at 11:00 PM, jaggu wrote: > Hi > > i need to use service alerts how can we get using android can any one > briefly about t

Re: [android-developers] Service to Activity communication with Broadcast Reciever every 1 sec . Is this right approach?

2011-10-11 Thread TreKing
On Tue, Oct 11, 2011 at 1:58 PM, NikolaMKD wrote: > 3. Is there any rather better approach than this one? Point me some... > http://developer.android.com/reference/android/app/Service.html#LocalServiceSample

Re: [android-developers] service

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 9:43 AM, jaggu wrote: > how to start service and how to stop the service in my mediaplayer > activity Read the Service documentation. - TreKing

Re: [android-developers] Service priority

2011-09-15 Thread Mark Murphy
On Thu, Sep 15, 2011 at 7:53 PM, Darshana wrote: > Context: We have a foreground Activity X and 3 services: Service 1, > Service 2 and Service 3. Why? Why not one service? > Service 2 is started with onStartService and is set as a foreground > service (startForeground()), it then binds to servic

Re: [android-developers] Service callback references "ghost" instance of my activity

2011-09-04 Thread Dianne Hackborn
When you say you receive callbacks from the service, there must be some call you are making on to it to register to receive the callback. You need to unregister this callback in onDestroy, through whatever mechanism the service provides. On Sat, Aug 27, 2011 at 9:56 AM, Jason wrote: > Hello all

Re: [android-developers] Service callback references "ghost" instance of my activity

2011-09-03 Thread Nick Risaro
On Sat, Aug 27, 2011 at 1:56 PM, Jason wrote: > 1) Is it possible for instance A to be referenced even after > onDestroy() is called on it? > Yes, because the instance is still loaded and the service holds a reference to it. > 2) Is there a way to immediately invoke the garbage collector to c

Re: [android-developers] Service Discovery is not happening when screen is off

2011-08-12 Thread Irfan Sheriff
If it is related to multicast packets getting dropped, try creating a multicast lock If needed, use the WIFI_MODE_FULL_HIGH_PERF mode with care to avoid driver optimizations at screen off. Thanks On Fri, Aug 1

Re: [android-developers] Service or Thread for accelerometer monitoring?

2011-08-01 Thread Fred Niggle
Thank you for your reply, It appeared to be a decision because I was without the facts. Now I am informed I can now continue. Best Regards, Fred On 01/08/2011, Dianne Hackborn wrote: > Thread or service is not generally a decision -- they are two different > things, for different purposes. A t

Re: [android-developers] Service or Thread for accelerometer monitoring?

2011-08-01 Thread Dianne Hackborn
Thread or service is not generally a decision -- they are two different things, for different purposes. A thread lets you do work off of the main UI thread. A service lets you tell the system to try to keep your process around instead of killing it in the background. On Mon, Aug 1, 2011 at 2:08

Re: [android-developers] Service to Activity Messanger? or Another way to show dialogs from service

2011-07-26 Thread TreKing
On Tue, Jul 26, 2011 at 2:43 PM, Boozel wrote: > i want to send a message from my service to my activity to show a popup > dialog (Or even a progress dialog if it is fetching data that the activity > should wait for). How can i do this Look at the LocalService example in the Service class docum

Re: [android-developers] service icon

2011-07-10 Thread Marcin Orlowski
On 10 July 2011 13:59, kamiseq wrote: > I added an icon to my service but is not visible or at least I cannot > find it :/ can someone give my example where I could use it > I believe it shall appear at system settings -> applications -> running services. But I'd suggest to leave this attribute

Re: [android-developers] service and Intent

2011-06-12 Thread Mark Murphy
On Sun, Jun 12, 2011 at 6:09 PM, dashman wrote: > My app has an service that does a background job. > > On completion, I post a notification...when the user > taps on the notification...it shoots an Intent to my > main UI activity and loads it w/ data from the service > (passed as Intent extras).

Re: [android-developers] Service is not started automatically at app startup

2011-05-09 Thread Marcin Orlowski
Use activity, setup your service in onCreate() and finish() your activity there. No need to pop up any UI. Regards, Marcin Orlowski *Tray Agenda * - keep you daily schedule handy... *Date In Tray* - current date at glance... WebnetMobile on

Re: [android-developers] service status

2011-04-22 Thread Marcin Orlowski
1. RTFM 2. there's nothing like service visibility Regards, Marcin Orlowski *Tray Agenda * - keep you daily schedule handy... *Date In Tray* - current date at glance... WebnetMobile on *Facebook * and *Twitter

Re: [android-developers] service status

2011-04-22 Thread rakshith raj
How to set service status like status:visible background... please help me how to do it -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group,

Re: [android-developers] service notification in case device sleeps

2011-03-31 Thread Mark Murphy
On Thu, Mar 31, 2011 at 10:04 AM, Amit wrote: > Does OS calls any method on service to notify device is going to sleep > or abruptly it causes CPU to shutdown. It abruptly causes the CPU to shut down. > If any service is running at > that time, is it guarnteed to be up and running at the same st

Re: [android-developers] service send information to Activity

2011-03-15 Thread Mark Murphy
On Mon, Mar 14, 2011 at 5:51 PM, maggy mtac wrote: > I want to known How send information for example String from service > to Activity? Send a broadcast Intent. Or, have the activity supply a Messenger to the service via an Intent extra, and the service sends a message to the activity via that

Re: [android-developers] service process priority: startService() vs bindService()

2011-03-05 Thread Mark Murphy
On Tue, Mar 1, 2011 at 2:06 PM, pedro242 wrote: > When the Service is started, the Android doc is quite clear saying: > "If the service has been started, then its hosting process is > considered to be less important than any processes that are currently > visible to the user on-screen, but more im

Re: [android-developers] Service Lifecycle

2011-02-23 Thread Mark Murphy
On Wed, Feb 23, 2011 at 9:15 AM, Jake Colman wrote: > Is it possible for a service's > onCreate() method to be called after it was already created (which would > screw up my booleans) even though the service is already running? No. > Actually, maybe a better question is whether Android might be

Re: [android-developers] Service Process Vs background process

2011-02-17 Thread Marcin Orlowski
On 17 February 2011 14:11, Sivaprakash wrote: > there are two things Service Process and Background Process, how they differ > each other? Background process is not a system element/feature you can use (as Service is). It's a *state* of process (same as "foreground process" or "visible process")

Re: [android-developers] Service Process Vs background process

2011-02-17 Thread Sivaprakash
OK if you go through the following link http://developer.android.com/guide/topics/fundamentals.html Processes and lifecycles sectionthere are two things Service Process and Background Process, how they differ each other? - Siva On Thu, Feb 17, 2011 at 4:46 PM, A N K ! T wrote: > i think it is

Re: [android-developers] Service Process Vs background process

2011-02-17 Thread A N K ! T
i think it is same as in android background processes is know as service... may be i couldn't get ur question... On Thu, Feb 17, 2011 at 4:40 PM, Marcin Orlowski wrote: > On 17 February 2011 12:08, Sivaprakash > wrote: > > Can some one tell how exactly service process and background process > Se

Re: [android-developers] Service Process Vs background process

2011-02-17 Thread Marcin Orlowski
On 17 February 2011 12:08, Sivaprakash wrote: > Can some one tell how exactly service process and background process Service > differs - Process Life Cycle Stand point? Because both of them are the to > serve same purpose? What exactly you mean by "background process" if you mean something differ

Re: [android-developers] Service reference to System Managers

2011-01-31 Thread Dianne Hackborn
Generally it should be a member variable because these are retrieved and associated with the Service's context. On Mon, Jan 31, 2011 at 8:06 PM, AndroidDevTime wrote: > Is it a good practice for a Service to maintain static reference to > System Manager? like Activity Manager, Power Manager? etc?

Re: [android-developers] Service or no service

2010-12-16 Thread TreKing
On Thu, Dec 16, 2010 at 6:21 AM, Hans-Erik wrote: > I want to ask about creating an Android app that need to run always! > The app is an ftp server listening for my PC client to send pictures. > The sending can occur anytime so the Android server "MUST" run > http://code.google.com/android/c2dm/

Re: [android-developers] service intent-filter

2010-11-09 Thread Mark Murphy
On Tue, Nov 9, 2010 at 7:51 PM, Henrik Lindqvist wrote: > I've got a IntentService started by an alarm. I also want it to start > on other intents, like ACTION_TIME_CHANGED. Do I have to create an > BroadcastReceiver that start the service when it receivers the > TIME_SET intent, can't the service

Re: [android-developers] Service onCreate is asynchronous

2010-11-02 Thread Frank Weiss
GUI Programming 101 All GUIs I've seen use an event queue. This is one of the biggest prardigm shifts to overcome for someone who is used to sequential, non-GUI applications. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this

Re: [android-developers] Service onCreate is asynchronous

2010-11-02 Thread Mark Murphy
On Tue, Nov 2, 2010 at 2:54 PM, jotobjects wrote: > I have tried both startService() and bindService().  Both methods > return before Service.onCreate() is called.  So work I was expecting > to complete in Service.onCreate() is not done. It is not done by the time startService() or bindService()

Re: [android-developers] service question

2010-10-26 Thread TreKing
On Tue, Oct 26, 2010 at 2:48 PM, dashman wrote: > what happens to the lifespan of the service when the user moves away from > the app (e.g. goes to the home screen and other apps). > > i.e. is the service still running. > > can the app be closed while the service is still active. > Did you read

Re: [android-developers] Service provider / client

2010-10-25 Thread Miguel Morales
Sounds like your variable 'binding' is undeclared. Simply declare it on your class like binding = this or simply use this. On Sun, Oct 24, 2010 at 6:32 AM, Beowulf wrote: > Greetings >   I am creating a service client and the following lines give me > error.  I was wondering how to fix these...

Re: [android-developers] service that log all events

2010-10-21 Thread Mark Murphy
On Tue, Oct 19, 2010 at 12:41 PM, J. Siedentopp wrote: > I need to make a service that capture all events, not in a specific > view or when an specific activity is open. > I want to make a App for Usability-Testing. Therefor i need to log > every Event the User does. I tried to do this with an App

Re: [android-developers] Service gets instantiated multiple times

2010-09-27 Thread Olivier Guilyardi
I need to call both, because the service may also continue when unbound (audio rec/playback). Plus, this is legal: http://developer.android.com/intl/fr/reference/android/app/Service.html "A service can be both started and have connections bound to it. In such a case, the system will keep the servi

Re: [android-developers] Service gets instantiated multiple times

2010-09-27 Thread Agus
Calling bindService will start the service if it has not been started, so you dont have to call both methods. On Mon, Sep 27, 2010 at 6:15 AM, Olivier Guilyardi wrote: > Hi, > > IIUC, there should only be one instance of a given service, it is a singleton. > > However, my (audio engine) service g

Re: [android-developers] Service: both onStart() and onStartCommand() called

2010-09-22 Thread TreKing
On Wed, Sep 22, 2010 at 4:16 AM, Christoffer Davidsson < christof...@chlirre.com> wrote: > However, running 2.1 in the Emulator, both methods are called when I start > my Service. > I don't suppose you're calling super.onStartCommand, are you?

Re: [android-developers] Service, AsyncTask, or both?

2010-09-21 Thread TreKing
On Tue, Sep 21, 2010 at 11:37 AM, john brown wrote: > Or am I missing something useful offered by Service that would benifit this > situation? > Well, Service is useful for running background tasks that don't require a UI, which sounds like what you need. Look at IntentService. -

Re: [android-developers] Service and application got crash

2010-09-17 Thread TreKing
On Thu, Sep 16, 2010 at 5:27 AM, nimi wrote: > Plz take a look at it and help me.. Sorry, but posting hundreds of lines of poorly formatted output is not a good way to get help. Please try to explain your problem in more detail. Explain the steps you're taking that lead you to your problem and

Re: [android-developers] Service Intent Filter Action String Resource

2010-09-13 Thread Dianne Hackborn
Don't do that. The string must be in the manifest. (It would make things much more complicated if these strings could change due to locale changes, screen orientation changes, etc.) On Mon, Sep 13, 2010 at 4:06 PM, Dan wrote: > I have a Service defined in the manifest with an intent filter tha

Re: [android-developers] Service start intent problem

2010-08-11 Thread Alex Xin
Hi, Frank I can give it a try. Above code snapshot works perfect and on my Android 1.6 based phone, but random FC on Nexus One. Alex On Thu, Aug 12, 2010 at 9:26 AM, Frank Weiss wrote: > Does it FC when you use getIntent() instead of the parameter to onStart? > > -- > You received this messag

Re: [android-developers] Service start intent problem

2010-08-11 Thread Frank Weiss
Does it FC when you use getIntent() instead of the parameter to onStart? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

RE: [android-developers] Service getting Killed

2010-06-29 Thread Tommy
s.com Subject: Re: [android-developers] Service getting Killed > I have a service in my app the creates an alarm and runs a check ever > X minutes. I am new to android and I was wondering is there a way to > prevent another app such as ATK (advanced task killer) from kill my > service

Re: [android-developers] Service getting Killed

2010-06-29 Thread Mark Murphy
> I have a service in my app the creates an alarm and runs a check ever > X minutes. I am new to android and I was wondering is there a way to > prevent another app such as ATK (advanced task killer) from kill my > service/alarms? No, but Android 2.2 fixes the problem of task killers clearing out

Re: [android-developers] Service unable to call Java Class Methods

2010-06-22 Thread Gyan
Can you paste the logcat trace? Some hints 1. Have u imported the class(logger) 2. Debugging the service - sysouts 3. Creating ur own - not advisable(might hamper responsiveness) - use the existing Logger - just in case! Gyan -- You received this message because you are subscribed to the Google

Re: [android-developers] Service Vs Thread

2010-06-14 Thread Kostya Vasilyev
Yes, this is exactly what services are for. Services are a way to tell Android that certain code in your application is important to the user, and Android should make an effort to keep it running even when it doesn't have active activities. For user notifications, take a look at NotificationM

Re: [android-developers] Service Vs Thread

2010-06-14 Thread tarek attia
Thank you so much for such help Again all my application requires the following :- 1. The application should be able to run in the background when other applications are running in the foreground. 2. When the application is on the foreground, it should shows certain stuff to the

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/14/2010 12:00 AM, Olivier Guilyardi wrote: > On 06/13/2010 06:49 PM, tarek attia wrote: >> Thanks you so much for this clarification ,,exactly I want to make an >> application that keeps running while the user may went of the main >> application ,,and I guess Service will be the best candidat

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 06:49 PM, tarek attia wrote: > Thanks you so much for this clarification ,,exactly I want to make an > application that keeps running while the user may went of the main > application ,,and I guess Service will be the best candidate for doing > that ,,, > > But what if the appli

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Frank Weiss
The problem appears to mainly be the formulation of the question. In Android, an application doesn't run - it's just a collection of resources. Of those resources, Activities and Services can run, but their runtimes are relatively brief. Please try to explain what your application needs to do when

Re: [android-developers] Service Vs Thread

2010-06-13 Thread tarek attia
Thanks you so much for this clarification ,,exactly I want to make an application that keeps running while the user may went of the main application ,,and I guess Service will be the best candidate for doing that ,,, But what if the application will take much time ,,so should I make a thread

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 06:23 PM, Olivier Guilyardi wrote: > On 06/13/2010 03:46 PM, tarek.attia wrote: >> I have a question what to Use ,Service Or Thread,as both run in the >> background > > There is confusion here, because you are referring to two different meanings > of > the word "background". > > A

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 03:46 PM, tarek.attia wrote: > > I have a question what to Use ,Service Or Thread,as both run in the > background There is confusion here, because you are referring to two different meanings of the word "background". A thread, in Java but also in many other languages, allows for pa

Re: [android-developers] Service gets killed (due to activity ?)

2010-06-10 Thread Mark Murphy
Tejas wrote: > I have a service running in the background. It starts on device boot. Boo! http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/ > My question is, now, if the android platform kills this activity, will > it kill my service too ? When your ac

Re: [android-developers] Service vs Singleton

2010-04-09 Thread Mark Murphy
ailinykh wrote: > 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 bene

Re: [android-developers] Service that can report my location all the time

2010-03-26 Thread Ning Shi
On Tue, Mar 23, 2010 at 6:11 PM, Kateling wrote: > Hi, there > I want to create a service that runs on Android which can collect all > of my location information. Either write the information to a file or > send to a server using 3G/wiki network. > I was thinking about using a service that runs f

Re: [android-developers] Service that can report my location all the time

2010-03-24 Thread Mark Murphy
Kateling wrote: > Hi, there > I want to create a service that runs on Android which can collect all > of my location information. Either write the information to a file or > send to a server using 3G/wiki network. > I was thinking about using a service that runs forever as a daemon. > After reading

Re: [android-developers] Service restarting for no reason?

2010-03-11 Thread Mark Murphy
DCheeseman wrote: > While debugging one of my apps (one that sits in the background and > logs accelerometer data), I noticed that it would randomly and without > any prompt reset itself. It would be running it's normal timer task > and suddenly it would stop, the create function would be called a

Re: [android-developers] Service - Need Info

2010-02-01 Thread android beginner
Hi Mark, I observed that after calling bindService in onCreate we should not call the interface methods as ServiceConnection() runs after onCreate(maybe bindService puts serviceConnection in queue). Hence after calling interface method inside onServiceConnected its working fine. Thanks On Mon

Re: [android-developers] Service - Need Info

2010-02-01 Thread Mark Murphy
> Hi, > > I created remote service and wanted to get the data from MyActivity's > onCreate(). > > Below bindService returns "true" but ServiceConnection() is not called. > Hence testService remains "null" and I couldn't get the data I want from > onCreate. > > Any Suggestion? Most likely, there i

Re: [android-developers] Service callback to Activity

2010-01-13 Thread Mark Murphy
Biosopher wrote: > Our application will expose a Service that can be called by Activities > in other people's applications. Great! > In many cases, the parent > applications calling Activity may be paused before our Service > completes. It's unclear why that matters. > (2) Create a PendingInte

Re: [android-developers] Service operation

2010-01-12 Thread Mark Murphy
Bill Michaelson wrote: > I do a ((Context)thingy).bindService(...) from within the onCreate > callback of an Activity. I've observed that the onServiceConnected() > callback of my associated ServiceConnection does not execute > immediately, but rather, is delayed until after the Activity resumes,

Re: [android-developers] Service thread priority

2009-12-16 Thread Dianne Hackborn
You should be nice. As of 1.6, processes running in the background have their threads forced into a background scheduling class so they can't disrupt the foreground UI. On Wed, Dec 16, 2009 at 3:05 PM, Christine wrote: > I have two apps that use a service to upload and download files and > data.

Re: [android-developers] service dies without calling onDestroy()

2009-12-15 Thread Dianne Hackborn
Services can't run 24 hours a day. At some point the system will very likely need to kill your process to have memory for elsewhere, and you will go away without a call to onDestroy(). Later the system will restart the process and service. You just need to deal with this. As far as not restarti

Re: [android-developers] Service runnning while PowerManager decides to sleep ?

2009-11-20 Thread Dianne Hackborn
If you don't hold a wake lock, you can't count on the CPU running. On Fri, Nov 20, 2009 at 12:01 PM, Derek wrote: > Hi all, > > Our application is running a service periodically through AlarmManager > and PendingIntent. Each time the service runs, it sets a new > PendingItent for next run. I wor