passing a class from one process to another

by DevilMayCry » Mon, 13 Apr 2009 12:12:42 GMT

Sponsored Links
 Hi guys i am looking for an example that allows me to pass a custom
class to a remote process. So far in the doc remote service example
only an integer is passed i would like to pass a class on my own. I
have implemented the parcelable protocol but i am really not  sure how
to pass that class. Any help please?


passing a class from one process to another

by Ralf » Mon, 13 Apr 2009 12:54:40 GMT

 You might want to read the section on the developer guide on AIDL and IPC: 

It explains how you can send a Parceleable data via an IPC.


Sponsored Links

Other Threads

1. Access assets from within ParcelFileDescriptor / ContentProvider

Hi together,

Since a few days we are struggling with accessing asset files. Pretty
early I found out that accessing assets is not directly possible with
the "file:///" Uri.
Now my colleague wrote a ContentProvider class.

Within the ParcelFileDescriptor from the ContentProvider we use the
openFile method to directly access a css file when the pfd is called
from within HTML with the content:// scheme.
Unfortunately, the css had no effect on the HTML and I found out with
File.exists() that this file does not exist under "file:///
android_asset/ + filename", although the file is obviously under
assets/Resources in my package exlplorer.

My presentiment is that it's all just a minor misuse of URI paths.

Thanks in Advance for any help.




2. SharedPreferences: editor.commit() always false even though it commits

Hi everyone,

Almost everything is in the title. I am trying to save username and
password into the sharedpreferences file. I used the little function
below to do so:
Everything works (The data are written correctly, I can read them
afterward) but the editor.commit() always returns false even though
the commit works(). Is that a bug?

        private void saveCredential(String username, String password)
                // Restore or Create preferences if it doesn't exist
                SharedPreferences settings = 
                // We need an Editor object to make changes in the preferences 
                SharedPreferences.Editor editor = settings.edit();
                // Then we add the login and the password
                // We don't forget to commit our edits
                if (editor.commit())
                         Log.v(DEBUG_TAG, "(Username: " + username + ") ;
(password : " + password + ") correctly added into file " +
                       // not good

If anyone has a solution, an answer, anything, that would be great ;)

Also in term of security, is that fine? Should I store the credential
into a database or anything else?

Thanks a lot.


3. Application installing with default pre-made database file

4. location is always latitude 0 longitude 0 altitude 10 in v0.9

5. Task Manager, or something to close apps.

6. An Android wishlist from a soon-to-be-user

7. Possible to tie Alarm Clock to Calendar?