I have two apps that both log in to the same system but they have separate functions and may not both be installed at the same time. I can sign the two apps with the same signature no problem, even make them run in the same process.
How can I store the login cookie (among other things) in such a way that it is shared by both apps and still be secured from unknown apps?
Shared user ID should get you access to each other's private storage, you would just need to figure out if the other was already installed, figure out the absolute path to its private storage and then look and see if it had the cookie. Hopefully you won't starve at the table of philosophers.
Here's a good solution:
What's the best way to do "application settings" in Android?
Since you want to share this between two applications, regardless of the way you want to implement it, don't forget that this will be visible to all applications. You may want to encrypt your password or session ID. Here's an example:
http://android.voxisland.com/code_examples/How_to_encrypt_and_decrypt_strings.rhtml
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With