Ask Your Question
0

How to use services in Android Studio?

asked 2019-03-01 07:06:57 -0500

Hello,

I want to build an Android app for visualization and configuration of my node running on a PC or robot. The idea is to set rosparams on the Android device and notify the running node on the PC via a service call to go through the parameters and check for updates. To be sure that the service call gets processed I want to use a service and check the response on the Android device. Until now I had success in creating an App using rosjava and android_core in Android Studio.

In the tutorial http://wiki.ros.org/rosjava_build_tools/Tutorials/indigo/UsingServices there is only a description how to use services using catkin_style. My question is: Is there a way to include custom services using rosjava in Android Studio without rebuilding rosjava?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-06 11:12:05 -0500

jubeira gravatar image

updated 2019-03-06 11:12:15 -0500

Hi @PASulz,

You may try calling genjava directly, but I'd recommend you to do the following:

  • Create a separate package with your message / service definitions as in the tutorial.
  • Source rosjava_build_tools (from binaries or from source), and build the package with catkin.
  • Source the resulting develspace with the built artifacts for your custom message / service
  • From the same terminal, launch Android Studio.

By doing the steps above you should be able to develop your applications with your custom Java artifacts (messages / services).

My question is: Is there a way to include custom services using rosjava in Android Studio without rebuilding rosjava?

Note that you don't need to rebuild the whole rosjava from source, just the package with the custom message / service definitions.

Hope it helps!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-01 07:06:57 -0500

Seen: 74 times

Last updated: Mar 06