jni - Blogs - diydrones2024-03-28T21:57:43Zhttps://diydrones.com/profiles/blogs/feed/tag/jniMAVLink UDP Android Examplehttps://diydrones.com/profiles/blogs/mavlink-udp-android-example2020-04-13T14:30:00.000Z2020-04-13T14:30:00.000ZMarek Sumahttps://diydrones.com/members/MarekSuma<div><p><a href="{{#staticFileLink}}8892011871,original{{/staticFileLink}}"><img class="align-center" src="{{#staticFileLink}}8892011871,RESIZE_710x{{/staticFileLink}}" alt="MAVLink UDP Android Example" width="710" /></a></p><p>This app makes your Android phone behave like MAVLink vehicle. You can connect to it using <a href="http://qgroundcontrol.com/" target="_blank">QGroundControl</a> over UDP. The device must be either connected to the same local network, have a Wi-Fi hotspot running or a public IP address. You can also try connecting to it while using VPN or <a href="https://en.wikipedia.org/wiki/Dynamic_DNS" target="_blank">DDNS</a>. Once connected, the Android device starts emitting heartbeat and information about its attitude, location and battery. It also receives and displays <a href="https://mavlink.io/en/messages/common.html#MANUAL_CONTROL" target="_blank">manual control</a> messages if the ground station has hardware or <a href="https://docs.qgroundcontrol.com/master/en/SettingsView/VirtualJoystick.html" target="_blank">on-screen joystick</a> enabled. This example utilizes <a href="https://en.wikipedia.org/wiki/Java_Native_Interface" target="_blank">Java Native Interface</a>. Keep in mind that generating Java libraries using mavgen or dronefleet is the recommended method of creating Android apps compatible with MAVLink. See <a href="https://mavlink.io/en/" target="_blank">MAVLink Developer Guide</a>.</p><p><a href="https://github.com/mareksuma1985/mavlink" target="_blank">MAVLink UDP Android Example</a></p></div>