search

Home  >  Q&A  >  body text

关于在BaseApplication中初始化的代码需要权限问题(Android 6.0下)

RT,使用了一些例如崩溃跟踪之类的第三方类库,初始化时在BaseApplication中,权限按照老的权限系统写在清单文件中,但是由于需要一些要主动申请的权限,初始化总是会失败。
目前是在启动页检查权限,如果没有的话写入权限,但是这样第一次启动APP,初始化还是失败的(Application在启动页前面加载的时候还没有被赋予权限)。
请问该怎么处理呢?
(我知道该targetSDKVersion的方法,但是显然适配6.0才是比较好的解决方案)

阿神阿神2773 days ago707

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-17 17:20:57

    If the third party creates the file during initialization, it can only prevent it from being initialized in the Application and change it to other interfaces. Otherwise, it can only wait for the third party to realize this problem and make modifications.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:20:57

    When using third-party packages, generally official documents have instructions. You can inherit the Application you need and then inherit it in multiple layers.

    reply
    0
  • Cancelreply