markzhai / markzhai/AndroidPerformanceMonitor
TargetAPI 23 will cause failure of saving log.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 6.7k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
TargetAPI 23 will cause failure of saving log because of SD card permission issue.
My device is Google Pixel running Android 7.1.2.
A temporarily fix is to change the path in BlockCanaryContext.java pointing to our own application sandbox:
public String providePath() {
String cacheDirFolderPath = DemoApplication.getAppContext().getCacheDir().toString();
String dataFolder = Environment.getDataDirectory().getAbsolutePath();
String path = cacheDirFolderPath.substring(dataFolder.length());
return path;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in BlockCanaryContext.java and inspect how providePath() determines the log storage location for TargetAPI 23. Reproduce or review the saving-log behavior on Android 7.1.2, then verify that logs save successfully without relying on inaccessible SD-card storage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100