Importing files into rhizome from an external application

17 views
Skip to first unread message

riaz hemmat

unread,
Jul 22, 2012, 2:23:45 PM7/22/12
to serval-proje...@googlegroups.com
Is there any way to import a file into Rhizome from an external application, using a library of some sort? Or would it be feasible to create the files that come along with the import externally? What would be the best way to do this? 

Thanks,

riaz hemmat

unread,
Jul 22, 2012, 4:49:37 PM7/22/12
to serval-proje...@googlegroups.com
I am trying to use the code from the MeshSampler, 

and using this doesnt generate any errors, but there is no result either:
"
Intent mIntent = new Intent("org.servalproject.rhizome.ADD_FILE");
mIntent.putExtra("path", archivo);//archivo is the name of the file.
mIntent.putExtra("version", mVersion);
mIntent.putExtra("author", "test");
startService(mIntent);
"

But i dont see any resulting file added to Rhizome though Serval, and I cannot see any files added to the folders where the file should be. 

Jeremy Lakeman

unread,
Jul 22, 2012, 6:46:40 PM7/22/12
to serval-proje...@googlegroups.com
That might depend on the build of serval mesh you are using.

Can you run adb logcat and check for any errors?
> --
> You received this message because you are subscribed to the Google Groups
> "Serval Project Developers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/serval-project-developers/-/bv01frIZ2TMJ.
>
> To post to this group, send email to
> serval-proje...@googlegroups.com.
> To unsubscribe from this group, send email to
> serval-project-dev...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/serval-project-developers?hl=en.

riaz hemmat

unread,
Jul 22, 2012, 8:49:45 PM7/22/12
to serval-proje...@googlegroups.com
Jeremy, 

Thank you. I hadn´t used adb, (I'm very new to android). When I ran it, i got this:

W/Bundle  (14892): Key version expected Long but value was a java.lang.String.
The default value -1 was returned.
W/Bundle  (14892): Attempt to cast generated internal exception:
W/Bundle  (14892): java.lang.ClassCastException: java.lang.String
W/Bundle  (14892):      at android.os.Bundle.getLong(Bundle.java:951)
W/Bundle  (14892):      at org.servalproject.rhizome.RhizomeIntentService.onHand
leIntent(RhizomeIntentService.java:94)
W/Bundle  (14892):      at android.app.IntentService$ServiceHandler.handleMessag
e(IntentService.java:59)
W/Bundle  (14892):      at android.os.Handler.dispatchMessage(Handler.java:99)
W/Bundle  (14892):      at android.os.Looper.loop(Looper.java:130)
W/Bundle  (14892):      at android.os.HandlerThread.run(HandlerThread.java:60)
E/RhizomeIntentService(14892): service called without the version extra


Clearly, I was passing a string instead of a long for the version parameter. I'm pretty sure the guide on the wiki uses a  string, maybe this has changed on serval 0.08

Thanks for your help! 

Riaz
> To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages