kconger / android-serial-gps-driver

Android Serial GPS Driver
19 stars 15 forks source link

How to use it #5

Closed sobrinho closed 5 years ago

sobrinho commented 5 years ago

Hi there!

I can see there are instructions on README but I'm a complete noob with Android building tools (I'm a ruby developer).

I do have the Android source code and I can compile it using a tutorial that I got from Tinker Board UK but how to compile that driver and use it?

Martin-Kolaci commented 5 years ago

I don't know if it is simplest way, but I built this driver on Windows as follows:

1) Download NDK from https://developer.android.com/ndk/downloads/ 2) Set environmental variable NDK_ROOT to your downloaded NDK, e.g. C:\Sources\android-ndk-r18b 3) Download and unzip attached project 4) Run build.bat located in project directory

After it, built driver should be located in \libs\armeabi-v7a directory.

android-serial-gps-driver-master.zip

sobrinho commented 5 years ago

Thanks!

sobrinho commented 5 years ago

@Martin-Kolaci can you clarify what is this zip you attached compared to what is on github?

Martin-Kolaci commented 5 years ago

Yes, gps.c file is the same as in this master. If you wish, you can download and use it.

sobrinho commented 5 years ago

There are a lot more files in your zip.

Do they matter to compile?

Martin-Kolaci commented 5 years ago

Yes

pepelillo commented 5 years ago

Hi all. How can compile in linux for x86? can anybody help? or even better if anybody has this library compiled for x86 it would be great, as default serial library in android-x86 project does not work for my ublox-7 usb device.

Martin-Kolaci commented 5 years ago

Look at file Application.mk in zip above and set variable APP_ABI to x86 (see https://developer.android.com/ndk/guides/application_mk).

sobrinho commented 5 years ago

Closing since I'm no longer using Tinker Board. Thanks! <3