Android M onRequestPermissionsResult in non-Activity

前端 未结 6 859
无人及你
无人及你 2020-12-29 03:52

I have an application which needs to find the user location, and location is fetched in various classes, so i have written a separate class(Not an Activity

6条回答
  •  [愿得一人]
    2020-12-29 04:21

    probably you can create a class that extends Activity (AppCompactActivity is better), implement all needed location code and extends with this class all activities where you need to use it.

提交回复
热议问题