Android :: In Process Communication

Mar 30, 2010

I have a design problem with my Android components.

My activity is starting a service which is doing the work in the background. What I want is that the service informs the activity about state changes. How can I do this?

Normally I would add an observer but the activity has no reference to the service. Then I was thinking to take AIDL but this is more for inter-process communication.

How is it possible that the service informs the activity about state changes? Both are running in the same process. What can you recommend?

Android :: In process communication


Android :: Inter Process Communication

Mar 19, 2009

Just say I have two applications, each with one activity running on separate processes and I want to send a simple string between them. For the purposes of this example, let us say I have a button that sends whatever is typed into an EditText view to the other application where it is then displayed. Do I have to expose a remote interface via a service that co-resides between the two applications? Or can I do something simpler (is there a way to pass data between processes without defining your interface using AIDL)? Thanks for clearing this up for me, as I seem to be struggling with performing IPC at the moment. I'm pretty sure I have to use the Android IPC path and generate a remote interface using AIDL. I'm just not sure about the binding to service part.

View 7 Replies View Related

Android :: Inter-process Communication With A Service And Notifications

Dec 13, 2009

I'm having an issue with inter-process communication with a Service and Notifications

The structure of my application is as follow: - ListActivity (TunnelDroid), once the user presses a listitem it will start a Service. The ListActivity is binded to the service for intra-process communication

- Service (TunnelManagerService): running in the background. This service will add a (permanent) Notification in the statusbar. Using a Handler I sometimes need to communicate with the ListActivity (to show GUI Dialogs)

- Notification: Once this notification is clicked it should open the ListActivity.

To add the action when the user touches the notification I use the following code: notificationIntent.setClassName("net.sourceforge.tunneldroid","net.sourcefo­rge.tunneldroid.TunnelDroid"); Then I use the intent to create the notification.

Unfortunately a new Intent is opened. When I press the back button the original ListActivity is shown. So I have two instances of my same class/list.

How could I make sure the original ListActivity is opened when the user touches the Notification?

It's OK for me if the original ListActivity was previously destroyed, but I cannot have two instances. The problem is that the Handler in the Service has a reference to the ListActivity (PARENT_ACTIVITY), so if another instance is created I have invalid references. I could overwrite the PARENT_ACTIVITY, but then when the user presses the back button I have an instance with no correct link to my Service resulting in a crash/nullpointer.

The complete source can be found here: http://tunneldroid.svn.sourceforge.net/viewvc/tunneldroid/tunneldroid. Attached you can find a drawing of (most of the) inter-process communication. Could someone point me in the right direction?

View 3 Replies View Related

Android :: How To Establish A Two-way Communication Between Activity And Service In Different Process

Mar 19, 2010

I'm working on establishing a two-way communication between an Activity and a Service which runs in a different process.

Querying the process from the Activity is no big deal. But I want the process to notify the Activity on events. The idea behind it is this: the service runs independently from the actual app. It queries a webserver periodically. If a new task is found on the webserver the process should notify the activity.

I found this thread over at AndDev.org but it doesn't seem to work for me. I've been messing around with BroadcastReceiver. I've implemented an interface which should notify the Activity but the problem is that the listener is always null since the Broadcast from the process is done via Intent, hence the class that extends BroadcastReceiver will be newly instantiated.

How can I establish a 2-way communication? This has to be possible.

View 3 Replies View Related

Android :: DDMS Not Listing Process - Via Command Line To Attach Process To Debug

May 21, 2010

Sometimes the DDMS in the Eclipse not listing the process.

To do the debug in this condition,

1) Is their any way force the DDMS to list the process?

2) Any command to attach the process from the command line?

View 2 Replies View Related

Android :: Remote Service Process Persists - I.e. Won't Disappear From Process Table

Feb 21, 2009

At a certain point in my program, when I'm completely done with my service, my activity executes unbindService() and stopService() -- yet the process persists. I can tell that it persists because I run "ps" in "adb -e shell":

CODE:.............

"adb logcat", I can show you the sequence of events:

ACTIVITY: context.unbindService(serviceConnection);

SERVICE: onUnbind();

ACTIVITY: stopService(serviceIntent); & returns true!

SERVICE: onDestroy();

First, my activity calls unbindService(serviceConnection). According to the documentation, unbindService() will "Disconnect from an application service. You will no longer receive calls as the service is restarted, and the service is now allowed to stop at any time." So that is fine, and it is happening.

Appropriately, we see the onUnbind() call happen on the service side. According to the documentation, onUnbind() is called when "all clients have disconnected from a particular interface published by the service." So this confirms the correct service connection is being passed, and that the service is responding accordingly.

Next, my activity calls stopService(serviceIntent), and returns true. According to the documentation, stopService() does the following: "If there is a service matching the given Intent that is already running, then it is stopped and true is returned; else false is returned." Again, this is happening and returning true.

In response, the service's onDestroy() method is called. According to the documentation, onDestroy() is "Called by the system to notify a Service that it is no longer used and is being removed. The service should clean up any resources it holds (threads, registered receivers, etc) at this point. Upon return, there will be no more calls in to this Service object and it is effectively dead."

At this point I expect the process to disappear from the process table. Yet it remains indefinitely. But why?

Also, the process is so persistent that I can bind to it again, and I see that it is the same exact process responding because the PID (process ID) is the same!

View 4 Replies View Related

LG Ally :: Process' Won't Open - Pop-up - The Process Com.android Phone Has Stopped Unexpectedly

Nov 24, 2010

So, I decided to give Tridents ROM a try about 10-minutes ago.

I used ROM Manager, backed-up my old ROM, then downloaded Velocity 0.2.

Now, my phone will do nothing, it turns on and shows the red Droid eye, then when it's time to go to the home screen I get pop-up after pop-up saying that "The process com.android.phone has stopped unexpectedly. Please try again."

I have no way of getting on my phone at all, what can I do?

View 11 Replies View Related

Motorola Droid :: Update App - Message Process Android Media Process Stopped Unexpectedly

Nov 12, 2010

I Just installed a new theme (Live Wire) for my Lithium Mod Rom. Don't know if there is a connection, but when I need to update an app, I get the message something like "process android media process stopped unexpectedly" and it will not allow the update. Everything else works well. I have turned it off for awhile, and have done a battery pull.

View 1 Replies View Related

HTC Droid Eris :: Error Pops Up Sorry The Process Android.process.acore Has Stopped Unexpectdly

May 11, 2010

Every 5 minutes this error pops up "Sorry! the process android.process.acore has stopped unexpectdly. please try again." It doesnt actually close anything. It pops up even when im not in an app. So it's more annoying than anything.

View 3 Replies View Related

Sony Ericsson Xperia X10 : Phonebook Not Working - Message Appears The Process Android.process.acore Has Stopped Unepectedly

Jul 30, 2010

I'm using Xperia x10 mini. Whenever I try to add a contact to my phonebook, before clicking save this message appears: "The process android.process.acore has stopped unepectedly. Please try again." And I have no other choice but to click "force close"... Another thing is, even though my contacts' names appears in the messages in my inbox, when I click on the phonebook icon, the phonebook is empty...

View 4 Replies View Related

Android :: Process Synchronization - How To Conclude Process Executed?

Feb 1, 2010

Are the processes in android asynchronous? If they are asynchronous then how can we conclude when the activity or process is finished or completed its execution.

View 2 Replies View Related

Samsung Fascinate :: Random Process Com.google.process.gapps Has Stopped Unexpectedly

Sep 11, 2010

So since I got the phone on Thursday, at random, I'll get these popup crash messages, that say "The process com.google.process.gapps has stopped unexpectedly" it has a "Force Close" button, which doesn't seem to change anything other than to acknowlege the message.It will happen at random, sometimes while I'm on the home screen, or sending a text message, but more recently, as I was trying to manage & link contacts. When I searched for this message it seemed to be related to people using Gmail, but I always get this message when I'm doing other things and not even touching my Gmail account.

View 1 Replies View Related

Samsung I7500 :: Process Com.google.process.gaps Has Stopped Unexpectedly - Please Try Again

Sep 19, 2009

I bought a new phone, but I can not run it.

I get the following information: "Sorry! The process com.google.process.gaps has stopped unexpectedly. Please try again".

View 1 Replies View Related

Samsung Moment :: Getting Process Com.google.process.gapps Stoped Unexpectedly

Apr 17, 2010

I've searched around the forums (here and SDX forums) and although it seems the few people that had this issue were able to solve it, my case seems a bit different.

It's different because of the people I've read solving the issue, it was a problem with something they changed / removed with gmail / gmail storage or talk / talk storage. And when they cleared the cache or re-installed the problem went away. Also, it seemed that the same people had a problem with downloading from the market...

Neither of the above apply to me, but yet I'm still getting this FC error all the time!

I was helping a friend with their CL14 Moment out of the box...and went from stock 1.5 CL14 to 2.1 DD03 w/Joey recovery to EclairDD10 and v5 root. I then did the streaming media fix, and then the private app (build.prop) fix (all previously done with my phone no problems). I did all of these update right in a row, and after my last re-boot the FC error (process com.google.process.gapps has stoped unexpectedly) started showing up and won't go away.

The only .apk / odex files I removed were the preloaded Sprint apps

Does anybody have any other ideas on how I can get this FC error to stop? I've tried clearing the cache / data for all the mail / talk apps, rebooted, cleared dalvik cache...

View 6 Replies View Related

Samsung Fascinate :: Process Com.google.process.gapps Stooped Working

Sep 17, 2010

Keep getting this message "The process com.google.process.gapps has stooped working unexpectedly. Any thoughts on what this is and how to resolve?

View 3 Replies View Related

Android :: Craft A Daemon Process As To Make It "unlistable" To A Process Viewer?

Aug 25, 2010

Is there a way to craft a daemon process as to make it "unlistable" to a process viewer?

OR

is there a way to dynamically change a process name?

I'd like to design a security application without having to modify the firmware, if possible (yes I know about "security through obscurity"...).

View 1 Replies View Related

Android USB Communication

Dec 17, 2012

I am new to android programming and I am trying to set a connection with the android as a host. I have included the following imports:

import android.content.Context;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbDeviceConnection;
import android.content.Context;

My problem is when I use this code :m_usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);The eclipse editor shows a message saying that getSystemService(String) is undefined for the type CPrinterCommands(The class that I am using). Quick fix gives as a solution to create a method called getSystemService, however I can't find why I would need to create a method, all the examples I found, none of them had a method getSystemService.

View 1 Replies View Related

Android :: Communication With PC Client?

Dec 10, 2009

I wrote a TCP socket client, an android application. On my emulator, it can successfully connect to a TCP sever running in my PC. But, when I deployed the the apk into my real phone, HTC g4, it dosen't work. An exception was raised said "java.net.SocketException: Network unreachable". The situation is, my handset was connected to my PC via USB, and no other connections were available. How can my android application connect to a PC server in the case. I don't know if we can use socket over usb connection. If yes, then why my application doesn't work. If no, then how?

View 2 Replies View Related

Android :: How To Establish A Serial Communication?

Oct 18, 2010

I am a beginner in Android and i want to establish a serial port communication(UART RS232) library in Android Framework Layer. My applications want to use that libary to send messages to some serial port devices. here we wan to use android as a embedded device and not a mobile device. can you suggest me how to establish a seria communication and to add that library on android framework layer.

View 3 Replies View Related

Android :: Multiplayer Game Communication

Sep 6, 2010

I have to develop a multiplayer game. The game will be supported between different platforms: 1) Two android clients. 2) Android client and a web application (something like facebook and android client for Texas- Holdem game).

I want to handle the communication between the platforms through a service.

I have asp.net (C#) background so I thought to implement the communication using WCF service but I am not sure this is the best choice?! Can you please tell me if my choice is good or should I choose other approach to implement the communication?

View 2 Replies View Related

Android :: How To Do Client Server Communication?

Jul 3, 2009

I want to send and receive information between Emulators in Android.i am using two systems and i have installed android in both the systems and i have to consider one emulator as server and another as client.Now i want to send data from one to another.Anyone knows regrading this please help me with some sample code.

View 2 Replies View Related

Android :: Xmpp Group Communication

Aug 25, 2010

i implemented the xmpp client in android.its working fine.the next task i focused on group communication from android. java code which related to group communication from xmpp.

View 2 Replies View Related

Android :: Communication Between Droid Devices Over 3G?

Aug 25, 2009

I'm not *entirely* sure this one is supposed to go here, but anyway :)

Assuming I have two Android-powered devices, connected both to the same 3G network; does the current API of Android allow to have a Service running on one of them being contacted by an Application running on the other one over this 3G network or do I have to go for a more traditional network (e.g. WiFi AP, Bluetooth) ? If so, how do I do it ?

I saw the usual Socket part in the API but it is not clear to me whether this is the way to use the 3G. I also found another discussion related to communication between a laptop and a dev phone ("Sending data to android dev phone using 3G connection") so it seems to be possible.

Does anyone have some details about how to do this?

View 4 Replies View Related

Android :: Implement Communication With Oracle?

Sep 14, 2010

How to implement communication with oracle.

View 3 Replies View Related

Android :: Way To Allow Communication Between Program On PC And App On Droid Through USB

Oct 6, 2010

Is there any way to allow communication between a program on a PC and an app on the Android through USB? I've notied some apps can sync through USB so I figure there must be a way.

View 2 Replies View Related

Android :: How To Perform Socket Communication

Jan 22, 2010

I have done socket communication in a single application it is working fine.

But my requirement is i have opened two emulators and i am able to send sms between those two.

Now i want to run server in one emulator(myavd-5554) and client on another emulator(myavd1-5556)

I have used the following code on Serverside public class TCPServerActivity extends Activity

CODE:............................

View 2 Replies View Related

Android :: Serial Port Communication Support

May 26, 2009

I have just started to develop android application. My question is: Can I communacate with serial port by using android application? If yes, how can I start,need help.

View 3 Replies View Related

Android :: Communication Between Java Client / Php Server App?

Feb 13, 2010

I have a simple Java client application (Android app). I have to write a PHP server application which receives a request from the Java client application to write some data to a MySQL database or read some data from the MySQL database. It should respond with a status message (Write failed/success) or the data requested respectively. How would I get the Java client send a request and receive the reply from the PHP program and how would the PHP program receive the request and send the reply? I have googled about SOAP and REST architectures, but looking for a simple tutorial which will allow me to implement this simple program.

View 2 Replies View Related

Android :: Multiplayer Game Handle Communication

Sep 7, 2010

I want to develop a multiplayer game. The game will provide communication between different platforms:

1) Two android clients (client applications that communicates through a service).

2) Android client and a web application (internet application) which is something like facebook (web) and android client for some kind of game. I want to handle the communication between the platforms ((1) android to android and (2) android to web) through a service.

I have asp.net (C#) background so I thought to implement the communication using WCF service, but I am not sure this is a good choice. Can I handle the communication using WCF or should I use other approach? Can you please recommend me a good approach to implement the communication?

View 4 Replies View Related

Android :: Options For Client Server Communication

Nov 6, 2009

I'm currently in the research phase of my dissertation project.My project is a ticket booking system for a mobile device and I have chosen to target Android.I anticipate the need for a client/server architecture with a central server, and so am currently looking at how Android could communicate with such a server. The server would grant the client access to ticketing information, and the client would send information about ticket bookings to the server. I'm looking at Java EE for the server as Java is the language I'm most experienced with.I'm aware that Android comes with java.nio and java.net, as well as some org.apache packages, but am also looking for libraries/technologies that would be possible to use with Android.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved