androidsim-toolkit

com.android.internal.telephony.cat.Duration not found in android


I am a new android developer. I want to develop an app which can access SIM Tool Kit in android mobile. But I haven't found the exact solution online. I found 2 examples:

when I import com.android.internal.telephony.cat.Duration class in ADT, it does not find it.

I also found this class here:

But I am not able use it.


Solution

  • If you were to google a little bit, you'd find out that this is impossible.

    1. com.android.internal.telephony.cat.Duration has an @hide annotation that means it's not accesible through the SDK
    2. The whole internal package is meant to be internal, i.e. used by android not by developers.
    3. STK itself is not accessible to external apps

    However there's also reflection which may be used to access hidden methods. Though I didn't bother to try, this might help.