0

Is there a possibility to receive SIM card insertion & removal notification in native C++ code (i.e. without using SDK). Please help!!

Thanks in advance.

1 Answers1

0

not possibly. you must use Android SDK.

Jiang YD
  • 3,205
  • 1
  • 14
  • 20
  • I have to try to do this in C++. Could you please clarify. The SDK somehow communicates with the appropriate drivers. May be, there is a possibility to see the corresponding SDK code, isn,t there? Regards, Sveta. – Svetlana Krupalnik Apr 24 '14 at 10:31
  • Android have Java SDK and Native SDK. Mainly Java SDK is used to do most Android related jobs(like GUI/SMS/Phone Call), and Native SDK is used to compile 3rd components which wrote in c/c++ (like OpenGL games). With the help of JNI, Java can call c/c++ function and vice-versa. So it is not a problem of using c/c++ or Java. The problem is you need time to learn new things. By Java code and SDK, you can add a SIM card state listener to TelephonyManager [link](http://developer.android.com/reference/android/telephony/TelephonyManager.html) – Jiang YD Apr 24 '14 at 11:24
  • reference to [link](http://stackoverflow.com/questions/4933791/android-telephone-manager-to-detect-sim) – Jiang YD Apr 24 '14 at 11:30
  • Thanks a lot for your answer. I did not describe myself well. I'm sorry. I can not use Java SDK because of the project constraints. I'm not afraid to study new things and I'll try to do this as fast as possible. I need only a direction. I can use Native SDK. Is there any possibility to get the SIM Card insertion & removal notifications from the Native SDK? – Svetlana Krupalnik Apr 24 '14 at 12:12
  • yes of cause you can use Native SDK to do this. Because in the Native SDK you can use the JNI interface to call any method of any class in Java SDK. I have found a sample for you [link](https://groups.google.com/forum/#!topic/android-ndk/SHCXgUCE7t4) – Jiang YD Apr 24 '14 at 13:18