J
J
justdani2019-08-28 12:03:07
Android
justdani, 2019-08-28 12:03:07

What is RequestCode in ActivityCompat.requestPermissions?

I read the documentation but did not understand what kind of RequestCode it is and why it is needed. I write absolutely any numbers and everything works. As I understand it, it should be initialized somewhere in the app (no matter where), but I still haven’t figured out what function it performs. Please help me to explain it in the simplest possible way.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-08-28
@justdani

When requesting permishins, the activity can be killed. RequestCode is returned to you in the appropriate callback, and you can use it to determine what your application should do next.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question