Android :: Way To Get A Certain Activity / Service Based On A Given Intent?
Jan 31, 2010
Suppose that I installed app A and app B, app A has a main activity, and app B wants to show that activity by sending a intent. My question is that how android knows I have installed app A and is able to map the intent to its activity? Is there any windows-registry-like store saving such information?
View 1 Replies
Aug 2, 2010
In the Activity I write Intent i=new Intent("IntentServiceTest"); Bundle bundle = new Bundle(); bundle.putString("abc", "def"); i.putExtra("wer", bundle); IntentTest.this.startService(i); Start Service into Service OnCreate method,but I don't know how to do get this Intent in this method.
View 11 Replies
View Related
Jul 20, 2010
How do I get data within an Android Service that was passed from an invoking Activity?
View 1 Replies
View Related
Aug 20, 2009
I am getting following message when i try to launch service.Also is there any specific path on file system where we need to place the .apk file which contains my serivce component only.
View 2 Replies
View Related
Oct 17, 2010
My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.
As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).
Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?
View 1 Replies
View Related
Jul 26, 2010
Under what circumstances would using AIDL to define a service interface be the correct decision (rather than just creating an extension to the service class)?
View 2 Replies
View Related
Nov 22, 2010
We going to develop commercial application that will run on Android platform and now I'm thinking about distribution model.
Application itself will be of no use to regular Android user and will be installed only by people who know why they need it. Application will authenticate with server prior to launch.
We as a company will charge application users monthly fee and will track usage, etc via our servers.
So, I was wondering if there "locked" portion of market for this kind of stuff? Or, do I release app as a free one and if random people download it - they just won't be able to use it?
What is the best way to do that? Can I install application by giving users our URL?
I'm trying to make it as easy as possible.
View 2 Replies
View Related
May 6, 2010
I'm trying to write an app that consists of an activity that manages a background service. However, I want to implement a user setting for automatically starting the service up at boot time. I have user settings implemented with SharedPreferences and I have the services starting up at boot by using a BroadcastReceiver and listening for BOOT_COMPLETED. However, I can't figure out a good way to implement a setting so that the service is only started at boot if said setting is enabled. I can think of a few cheap ways to do this (such as messing with onCreate() in the service, or creating/checking for a file on SD card) but I want to follow good practice. There must be a good way to do this because there's tons of apps out there that do it, I just can't find anything online about how to do it.
View 3 Replies
View Related
Oct 28, 2010
I have a Service which tracks the location of the user. Currently, the Service boots when the application starts and stops when the application terminates. Unfortunately, if users keep the application in the background, the Service never stops and drains battery.
I would like the Service to stop when my application is not in the foreground. I was hoping the Application class would let me Override onPause and onResume handlers, but it does not have them.
View 1 Replies
View Related
May 11, 2010
I have Activity based tabs i.e i have used TabActivity,tabhost etc Now when we switch between the tabs, for the 1st time the oncreate is called and then after the onResume methode is called I want to know what event/function, of the activity, is called when i click on the the tab which is already selected. 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 android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 2 Replies
View Related
Aug 3, 2010
I want startActivity in the service.first I new Intent(),but I don't know how to new Intent().Because Activity and Service don't together project.I don't know Intent how to find this Activity.
View 2 Replies
View Related
Aug 2, 2010
Whenever the memory needs to be reclaimed, the process is being killed by Activity Manager Service in killPidsForProcess. I have a back button in my activity window on right corner of the title bar.
I want to kill the activity completely on clicking the close button. Can I reuse the same function and will it have any major effect? Please help me out in this.
View 3 Replies
View Related
Apr 3, 2010
I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?
View 1 Replies
View Related
Sep 14, 2010
I'm launching an IntentService using startActivity from inside the onClickListener of a button. startActivity returns immediately. No blocking there. But the button stays "pressed" until the IntentService finishes its work. In addition, the screen does not respond to rotation while the IntentService thread is running. I can see that it's a separate thread in the debugger but the UI seems to be coupled to it. As soon as the IntentService thread finishes, the UI is unblocked. Any idea how I can prevent this and let the UI continue?
View 2 Replies
View Related
Dec 27, 2009
I'm starting a service with an intent where I put extra information. How can I get the intent in the code of my service? There isn't a function like getIntent().getExtras() in service like in activity.
View 1 Replies
View Related
Sep 10, 2010
I need to made an activity (without layout) that on start check if a service is running. if it is true it starts Activity2, if it false it starts Activity1.
I tried with this code:
CODE:............
Enter code here
But when I check, in the onCreate method, if serviceConnect!=null I receive sometime a NullPointerExcption.
I tried also to insert the operation in the method onCreate in an Async Task:
CODE:............
View 2 Replies
View Related
Sep 16, 2010
My IntentService is blocking my UI thread and I wanted to find out why. So I turned on profiling in the onStartCommand method of the IntentService and turned it off at the end of the onStartMethod. The working being done in between is web access with the Apache HTTP client.According to the profiler, the onStartCommand method of the IntentService is running on the main thread, not in a worker thread. Any idea what could cause this behavior?
View 3 Replies
View Related
Aug 11, 2010
I've found a problem that may random FCs on some certain phones.
Here's the code snapshot:
CODE:.............
View 9 Replies
View Related
Apr 6, 2010
Sorry for the newbie question, but does anyone know how I can check whether an IntentService is already running? I'm starting an IntentService from onCreate within a normal Activity, and that means that if the user minimises and maximises the application, it gets called twice. I'm wondering if I need to use something like the solution here http://bit.ly/du3VW5 or whether there's a simpler way.
View 3 Replies
View Related
Nov 4, 2010
Should I create a Listener within a BaseAdapter or should I pass it in? I have 4 classes that inherit from a base class. I pass the Adapter a list objects.
The Adapter is eventually used with a ListActivity I want to create a View based on the derived class and I want them to launch an Activity based on the type of a View. Currently I create the intent and Listener in the BaseAdapter. Is what I'm doing a good pratice?
View 1 Replies
View Related
May 15, 2010
I wanted to know what is the difference between Context.startService(intent) and startService(intent) and does it matter which one is used?
View 1 Replies
View Related
Apr 26, 2010
I want to receive Intent "android.intent.action.SEND" in a Service. Is it possilbe to register for this Intent via registerReceiver() and get the Intent in Broadcast receiver in the Service?
Or is there any restrictions that "android.intent.action.SEND" can only be registered via Manifest.xml of an Activity and not in a Service?
View 2 Replies
View Related
May 3, 2010
Is there a significant difference in time needed for sending data over a service or by using an intent?
Are there general advices when to use service and when to use intents?
View 4 Replies
View Related
Aug 8, 2009
Having trouble with permissions. The error I get is this: Not allowed to start service Intent { comp= {com.commonsware.android.service/ com.commonsware.android.service.WeatherPlusService} } without permission private to package I installed the WeatherPlus app from Mark Murphy's dev book. I'm trying to call his weather service from a different app. I think I have an issue with permissions, not really sure how they work. I thought that you could just make your own, and then check against it. With that in mind, listed below is the client manifest, followed by the service manifest. I called my permission "mypermission". Code...
View 3 Replies
View Related
Feb 12, 2010
Is is possible to send an object to an Android Service through an Intent without actually binding to the service? Or maybe another way for the Service to access Objects...
View 2 Replies
View Related
Aug 30, 2009
I've implemented an onSaveInstanceState function in the main activity of my TabHost-based application. I need to save the state of various objects I am keeping in memory that I have all marked as serializable, as well as some basic int and string values. I have stepped through my application and watched it call the onSaveInstanceState function and presumably save everything without any manner of exception or problem. The issue is that my onCreate function is being called with a null Bundle value every time after I start the application again. I'm really at a loss and unsure why it would call the save but not pass anything into the create.
View 1 Replies
View Related
May 8, 2009
I'm posting this to share the lessons I learned while working with IntentService. IntentService has a single constructor that takes a string argument "name". The documentation has no description of what name is used for. In looking at the sources, I found that its only use is in naming the worker thread for the IntentService. This thread is named IntentService [name].
I initially implemented the constructor of the derived class to also take a String argument and passed it along to the derived class. This is wrong. This will cause the startService() call to generated a java.lang.InstantiationException in the application containing the service i.e. you don't get the exception in the application calling startService(). A clue to the actual problem is a little further up in the logs:"newInstance failed: no <init>()"
The derived class must have a Default constructor and that constructor must call super() passing a string for the name component of the worker thread name.
public class MyIntentService extends IntentService {
public MyIntentService() { super("MyIntentService");
} @Override
protected void onHandleIntent(Intent intent) {
// Handle events on worker thread here }
View 2 Replies
View Related
Sep 13, 2010
I have a Service defined in the manifest with an intent filter that refuses to match when specified as a String resource but works when the literal action is entered in the manifest. Is there any reason I should not be able to use a String resource with an action in an intent filter?
View 3 Replies
View Related
Feb 17, 2010
I want to send an intent to my service everytime the state of Wifi connectivity changes. So when I currently use a broadcast receiver to listen for the state changes in Wifi, so when this recieves an intent I want to be able to send this info on to my service. Is this possible and if so the correct way to do it?
View 2 Replies
View Related
Nov 2, 2010
Is it possible to get the Activity from an Intent?
View 2 Replies
View Related