Android :: Call A Service Hosted In A Windows Service From Android
Jun 3, 2010
I hosted my service WCF (.net) using a windows service,i can access to the service from any browser but when i tried to call it from android it doesn't respond. it works fine before the hosting procedure (i used host client by default on Visual Studio).The url that i try to attempt is from android emulator, and installed my webservice in the same local machine(endpoints address http://localhost.).
I'm developing a GPS tracking software on android. I need IPC to control the service from different activities. So I decide to develop a remote service with AIDL.This wasn't a big problem but now it's always running into the methods of the interface and not into those of my service class. Maybe someone could help me?If i now try to call a method from an activity for example start(trackId) nothing happens. The binding is OK. When debugging it always runs into the startTracking() in the generated ITrackingServiceRemote.java file and not into my TrackingService class. Where is the problem? I can't find anything wrong.
I have a service running in the background.I have a background thread that gets a reference to the service from the application's main activity. But when the background thread calls a method in the service to display a toast, I get the "Looper not initialized exception".Why,if I have a valid, bound reference to a Service, does this still happen?
My service works exactly the way i want as long as i use start and stop and communicate using intents. However my activity needs to change the state of my service as well as retrieving state information.So i thought it would be nice to broadcast some kind of state_changed event from my service and use a binder interface to pull information from the service or change the services state based on user input.This works fine too. The only problem is that my service gets killed when i unbind it just as the documentation says.Is there any way to keep the service alive but still get an interface to control it directly. My activity offers the user a way to stop the service and the service kills itself anyway after it's work is done but i don't want the service to stop every time the activity is destroyed.
I have a Service which is typically bound to, but sometimes needs to go into a mode where it should be active even if nobody is bound to it. Therefore, startService() must be called so it can be explicitly started & stopped. In my case, when exactly this should happen is best determined by the service itself, depending on its state (after being bound to). Can the Service (at the appropriate time) just call startService() from it's own Context?
I am new to andriod and facing a problem to a web service in andriod i have web service given below http://finservice.sigmatec.com.pk/server.php?wsdl i have seen many sample but they dont seems to be working..can any one guide me how can i call its function and get the data on andriod screen??? i am using ecslipse with ADT ..
I am working on an Android service. I need to call RecognizerIntent from a service in order to use in the service the recognized text. I have no startActivityForResult() method in Service class so I have problem understanding how to achieve this task. Is it possible?
I have an Activity (A) and a Service (S) which gets started by A like this: Intent i = new Intent(); i.putExtra("updateInterval", 10); i.setClassName("com.blah", "com.blah.S"); startService(i); A have a function like this one in A: public void someInfoArrived(Info i) Now I want to call A.someInfoArrived(i) from within S. Intent.putExtra has no version where I could pass an Object reference etc.
Is it possible to call methods of a Activity from service. I am running a thread from a service and i listening to some external event from that thread. I am not able to call methods from that thread. Is there any way to call methods from a thread.
I've read some of the earlier posts on this subject, but I've found them confusing.I'm trying to create a Client Application using Android 1.5 that can call a .NET Web Service using SOAP.I understand that the kSOAP2 library can help here and I've imported that into my Project.I need assistance in correctly using the kSOAP2 library to develop the application.
I'm getting a Java Socket Exception "Operation timed out" when trying to call a .NET web service method. I've followed the many examples out there on the web to get my android to call a .net web service.
I'm running the web service using VS2010 in debug mode. The web method I'm calling is very simple -> "string GetVersion()"
I've read some posts that eclipse needs to be configured to access the internet by modifying the Proxy preferences "Preferences -> General -> Network Connections" from the Window menu item. I haven't been able to figure out exactly what I need to configure in the Proxy to get things to work if that is the problem.
I've also tried to access the .net web service root page (service.asmx) from my android with no success. I can access the asmx page with no problems using IE on the local machine. I've turned off the firewall and that didn't solve anything either. This is the first time I've tried to access a web service from a remote computer when it was running using VS2010 in debug mode.
I don't know if I have a configuration issue on the eclipse side or on the VS2010 side.
I have a back ground service running.I have a client which interacts with service.
When the client requests for some operation, the service performs it and it should send the result back to the activity(client).
I know how to invoke the service methods in activity and using call backs we can achive wat I wan to do. But I am not able to understa the call back mechanism and code example provided in Api demos(remoteservice).
I made two applications. One for an activity receiving user input, the other for a background service. In the service package, I create two files (startSensorBroadReceiver.java, remoteService.java). StartSensorBroadReceiver will receiver an intent from activity application and call method inside of the service. There is no erron in the codes but I can not excute what is want. I meet a message like this "The application ServiceExample has stopped unexpectedly. Please try again." could you let me know. what is wrong? and how I can call service methods from broadcastReceiver?
I'm rather new to Android, so please bear with me. I'm developing an application running a service in the background. The service is ONLY supposed to run when requested somewhere in the UI. The service must be able to be stopped through the UI as well. At the same time, while running, the service must be able to pick up intents such as "intent.action.DATA_SMS_RECEIVED" and "intent.action.NEW_OUTGOING_CALL".
I'm confused about whether I need to run my service in a separate process. What are the advantages / disadvantages of each?For reference I'm trying to create an App that uses a service to play [streaming] audio in the background. So which one is better for my use case?
what I'm trying to do here is implement something like a peer-to-peer client. Being that, it will start a client thread and a server thread.I know Services themselves run in the main GUI thread, so I'll have to start a couple of independent threads (or Asynctasks?) for each server and client. The only thing I'm not so sure about is if I'll better have 1 Service starting 2 threads, or maybe 2 services, each one of them starting their own thread.