green-android / certification

Android 绿色应用认证计划
85 stars 1 forks source link

[认证申请] 那样记账 #59

Open Bakumon opened 5 years ago

Bakumon commented 5 years ago
Bakumon commented 5 years ago

发现有些手机可能删减了 SAF 框架,导致问题:

Fatal Exception: android.content.ActivityNotFoundException
No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE }

如:

  1. Honor Play, Android 8.1.0
  2. P20, Android 9
oasisfeng commented 5 years ago

发现有些手机可能删减了 SAF 框架,导致问题:

Fatal Exception: android.content.ActivityNotFoundException
No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE }

如:

  1. Honor Play, Android 8.1.0
  2. P20, Android 9

公约允许(且建议)在不兼容 SAF 的设备上(比如 catch ActivityNotFoundException 后),降级为使用存储权限。但必须确保在正常兼容的设备上使用 SAF 而非存储权限。

PS,设备兼容性问题,建议反馈至 https://github.com/android-in-china/Compatibility/issues 我们会将其同步给 Google,以敦促 OEM 进行修正。

Bakumon commented 5 years ago

@oasisfeng 因为我是在 fabric 看到的异常信息,手上暂时没有这两台设备,我需要用真机测试一下,排除用户修改系统的可能性。 如果被证实确实不兼容 SAF api,我会反馈到 android-in-chna,并且会在以后版本按照建议对不兼容 SAF 的设备使用 存储空间权限。

Bakumon commented 5 years ago

发现有些手机可能删减了 SAF 框架,导致问题:

Fatal Exception: android.content.ActivityNotFoundException
No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE }

如:

  1. Honor Play, Android 8.1.0
  2. P20, Android 9

公约允许(且建议)在不兼容 SAF 的设备上(比如 catch ActivityNotFoundException 后),降级为使用存储权限。但必须确保在正常兼容的设备上使用 SAF 而非存储权限。

PS,设备兼容性问题,建议反馈至 https://github.com/android-in-china/Compatibility/issues 我们会将其同步给 Google,以敦促 OEM 进行修正。

已使用 华为云测试 验证了以上两部手机,均兼容 SAF。我在 酷安 那样记账应用下进行了不支持 SAF 设备的统计,没有发现用户手机有不兼容的情况,由此可认为,5.0 以上手机上均兼容 SAF,故不再考虑存储权限。

oasisfeng commented 5 years ago

通过认证的版本:3.18.1(68,Google Play)

lz233 commented 3 years ago

对此存疑。后台看到有运行基于 Android 9 的 MIUI 的 MI6 设备同样无 SAF。


AppNamespace: com.lz233.onetext

AppVersion: 1.71-た

AppBuild: 20200827

OemName: Xiaomi

Model: MI 6

OsName: Android

OsVersion: 9

OsApiLevel: 28

OsBuild: PKQ1.190118.001

SdkVersion: 3.2.2

Locale: zh_CN

ScreenSize: 1080x1920

ThreadName: main

StackTrace:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE (has extras) }
 at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2016)
 at android.app.Instrumentation.execStartActivity(Instrumentation.java:1677)
 at android.app.Activity.startActivityForResult(Activity.java:4651)
 at 喵喵喵.a.喵.喵喵喵喵喵.startActivityForResult(Unknown Source:10)
 at android.app.Activity.startActivityForResult(Activity.java:4609)
Bakumon commented 3 years ago

对此存疑。后台看到有运行基于 Android 9 的 MIUI 的 MI6 设备同样无 SAF。

AppNamespace: com.lz233.onetext

AppVersion: 1.71-た

AppBuild: 20200827

OemName: Xiaomi

Model: MI 6

OsName: Android

OsVersion: 9

OsApiLevel: 28

OsBuild: PKQ1.190118.001

SdkVersion: 3.2.2

Locale: zh_CN

ScreenSize: 1080x1920

ThreadName: main

StackTrace:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE (has extras) }
 at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2016)
 at android.app.Instrumentation.execStartActivity(Instrumentation.java:1677)
 at android.app.Activity.startActivityForResult(Activity.java:4651)
 at 喵喵喵.a.喵.喵喵喵喵喵.startActivityForResult(Unknown Source:10)
 at android.app.Activity.startActivityForResult(Activity.java:4609)
Bakumon commented 3 years ago

@lz233 MIUI 11 以上不能正常用了,其他品牌好像没问题