开发者

Access GPS through NDK applications

开发者 https://www.devze.com 2023-01-25 10:11 出处:网络
I am currently building a simple applica开发者_运维知识库tion for Android using the NDK and needs to get

I am currently building a simple applica开发者_运维知识库tion for Android using the NDK and needs to get the coordinates from the GPS. I've searched the web, but have come up empty handed. Is there some API or such for NDK-programs to access the GPS?


No, the NDK only supports a limited number of libraries. It is designed to be used for things that are really processor intensive, and thus would actually benefit from being written in a native language. From the docs, only supported areas:

  • libc (C library) headers
  • libm (math library) headers
  • JNI interface headers
  • libz (Zlib compression) headers
  • liblog (Android logging) header
  • OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers
  • libjnigraphics (Pixel buffer access) header (for Android 2.2 and above)
  • Minimal set of headers for C++ support


Your should use JNI wrapper to get GPS coordinates. NDK does not provide this feature.

0

精彩评论

暂无评论...
验证码 换一张
取 消