Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter update mechanism to avoid REQUEST_INSTALL_PACKAGES #664

Merged
merged 9 commits into from
Jul 29, 2023

Conversation

bellerbrock
Copy link
Collaborator

Description

Provide a summary of your changes including motivation and context.
If these changes fix a bug or resolves a feature request, be sure to link to that issue.

Removes REQUEST_INSTALL_PACKAGES permission and sends user to directory with downloaded apk file to manually install updates.

Closes #655

Type of change

What type of changes does your code introduce? Put an x in boxes that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated relevant documentation

Changelog entry

Please add a one-line changelog entry below. This will be copied to the changelog file during the release process.

<bugfix>Fixed issue with in-app updates</bugfix>

@github-actions
Copy link

github-actions bot commented Jul 11, 2023

🤖 Pull request artifacts

file commit
pr664-6-github-release-updates-Field-Book.apk 46dd32c

github-actions bot added a commit that referenced this pull request Jul 11, 2023
github-actions bot added a commit that referenced this pull request Jul 20, 2023
github-actions bot added a commit that referenced this pull request Jul 24, 2023
@trife
Copy link
Member

trife commented Jul 25, 2023

It's really frustrating that we can't use the request_install_packages since your first iteration worked so well. The current implementation unfortunately doesn't prompt for the install after selected the apk- likely due to the missing permission. Unless I'm doing something wrong, we probably need to go to a simpler approach.

The easiest will probably be 1) detect an updated version and then 2) open the link to the newest version in the device browser since it inherently the ability to install packages. When "About" is opened, you can run the version checker in the background and change the title to "Update available" or "Running latest version".

@bellerbrock
Copy link
Collaborator Author

Yeah, it is a bummer. The functionality you're seeing is what's expected so far, it took a lot of trial and error to get the updates directory opened correctly but even then the apk files within it have not been installable from that view.

In my testing so far the intent types have been ACTION_VIEW, ACTION_CONTENT_VIEW, ACTION_OPEN_DOCUMENT_TREE, along with various permission grants. None have worked, and unfortunately the only alternative I'm seeing, ACTION_INSTALL_PACKAGE, requires the REQUEST_INSTALL_PACKAGES permission in the manifest (at least in modern android versions).

I like the plan B of running the version checker in the background when About is opened, then providing an 'Update Available' link to the newest version or a 'Running latest version' message. I'll work on that

github-actions bot added a commit that referenced this pull request Jul 25, 2023
github-actions bot added a commit that referenced this pull request Jul 25, 2023
github-actions bot added a commit that referenced this pull request Jul 25, 2023
github-actions bot added a commit that referenced this pull request Jul 26, 2023
@bellerbrock
Copy link
Collaborator Author

@trife ok, the plan b approach is implemented now if you want to test it.

@trife trife merged commit 241c24c into main Jul 29, 2023
1 check passed
@trife trife deleted the github-release-updates branch July 29, 2023 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove REQUEST_INSTALL_PACKAGES permission and modify self updater
2 participants