markzhai / markzhai/AndroidPerformanceMonitor

TargetAPI 23 will cause failure of saving log.

Open
#105 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.