Hello A. Elk,

Yes, I am doing MPNA "make an high performance networking application"
During the course we learned about C programming, threading, networking, etc
My teacher himself read about Android and it's possibility to share data between two apps and gave us the assignment to find out about having the same UID and be able to communicate. After searching for weeks, I know that android security is not fond of such practices, Android has a few ways to communicate, for example content manager.

We have have made a server / client app using sockets in C, because that was the easiest and most straightforward way we knew. But even then I like to know how to share data using the same UID. Just to show our teacher "found it!" Althought the assignment was not clear or good enough we tried our best.

Would be great if someone could tell about sharing with UID, even thought it will not influence our assigment results any longer. If you or someone else knows, do send an e-mail. So that we might close the "quest" with good content....

Kindest regards,

Cw


Op 19-1-2012 23:18, A. Elk schreef:
Are you sure that this is the assignment?

You can force two applications to have the same UID by using an attribute of the <manifest> element in AndroidManifest.xml. This is documented in Security and Permissions, http://developer.android.com/guide/topics/security/security.html. This guide also describes the ramifications of sharing a UID. Once you do this, the two application are treated as "one" by Android, so they share the same "sandbox". This means that a file written by one can be read by another. To share a variable, you could create an object and then serialize it to a file.

However, I strongly recommend against doing this sort of thing. It's not the way Android is designed to work. Applications should avoid knowing too much about one another. An application A should use common APIs to send information to an application B, with the assumption that B could be anything.

In summary, I think it's a bad assignment.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to