본문 바로가기
  • Home

The Method to use Native Code(C/C++) in Android OS and Its Applications

  • Journal of Knowledge Information Technology and Systems
  • Abbr : JKITS
  • 2015, 10(3), pp.355-365
  • Publisher : Korea Knowledge Information Technology Society
  • Research Area : Interdisciplinary Studies > Interdisciplinary Research
  • Published : June 30, 2015

Sangmin Ahn 1 이건용 1 정운형 1 Nakju Lett Doh 1

1고려대학교

Accredited

ABSTRACT

In general an Android application based on Java operates on DALVIK virtual machine. It is safe that an application operates on a virtual machine which means it is platform-independent. However, to be operated on a virtual machine, it takes some time for the program codes to be converted. This is slower than an operation of native codes like C because the codes are translated to machine language, which means it is platform-dependent. Also, it is restricted to access a hardware directly on a virtual machine. Many programs have been developed based on C/C++. We might save time and cost for development if we can reuse these programs without re-developing for other programming languages. On this paper, we explain how to operate a code based on C/C++ using JNI (Java Native Interface). Starting with how to call C/C++ native functions from Java classes, we introduce how codes developed with two different programming languages communicate each other. Also, we introduce a specific case using native codes on Android as an example.

Citation status

* References for papers published after 2023 are currently being built.