0

The article accessing-native-apis-with-javascript tells us how to use naive-Apis with js code. It is good.

But, I don't know where is the native-Apis because I never come into Android. Is it a necessary to know basic of Android knowledges for all Nativescript learner?

So I turned to Android developer site to find the list, and I falled in an other rabbit hole. It is so complicate to me.

Can you give us a usable-native-Apis-list to access the native-Apis easily?

For example, I want to use device's contacts in my App, so I turn to Android-developer-guide site to find which API is the right one. I get a lot of APIs named "contact****", which one is the target? It's painful to seek the answer for a learner of Nativescript.

"The beauty of Nativescript is .....", I turn to Nativescript just because of these words.
But, if I should learn about all the native APIs to see the beauty in the end?

vinS
  • 1,417
  • 5
  • 24
  • 37
9527
  • 15
  • 5

1 Answers1

2

when you need to use native api , you can search for that , and you will find java code for that for example https://stackoverflow.com/a/12562234/4146943

In this answer you need getContentResolver then you search in android docs to get the package name of getContentResolver https://developer.android.com/reference/android/content/Context.html#getContentResolver()

In the begin of page you see android.content.Context so you can use android.content.Context.getContentResolver

Note : knowing java and a little android develope with java wold really help.

Note2 : checking other plugins to see how others use native api really helps.

Community
  • 1
  • 1
Habib Kazemi
  • 2,172
  • 1
  • 24
  • 30