Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Added app shortcut to instantly launch game #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rozPierog
Copy link

Hi @xyzz great work on android version of OpenMW. I've wanted to help and resolve #21
It goes without saying that its more of a POC and not a final implementation, would love some pointers from you about, naming, code and shortcut appearance.

@licaon-kter
Copy link
Contributor

Are those "imports" useless and needed to be removed?

@rozPierog
Copy link
Author

@licaon-kter Yeah, Android Studio removed them automatically, so I guess that they are not needed anymore.

@xyzz
Copy link
Owner

xyzz commented Oct 6, 2019

Is there a reason this is a dynamic shortcut instead of a static one? It seems the same functionality could be implemented with a static shortcut, as in https://developer.android.com/guide/topics/ui/shortcuts/creating-shortcuts#static

@rozPierog
Copy link
Author

I totally forgot about static shortcuts. I'll rewrite this later today. Thanks

@rozPierog
Copy link
Author

@xyzz I've changed it to static.
Sadly I couldn't find reliable method of getting application_id inside .xml file so I decided to make shortcut release type only, because of different application_id in debug mode. I can bypass it by creating alternate shortcut for debug mode or adding application id to strings.xml let me know which way you prefer.

@xyzz
Copy link
Owner

xyzz commented Oct 12, 2019

The shortcut working in debug would be nice to have but not overly important. However, the current implementation won't work for is.xyz.omw_nightly, which is a separate build flavor. Should probably do it similar to https://stackoverflow.com/a/51518675

@rozPierog
Copy link
Author

@xyzz While adding shortcuts to nightly I've decided to add them to debug as well. Sorry for a long delay on this PR 😉

@xyzz
Copy link
Owner

xyzz commented Nov 2, 2019

Hmm, I've tried it out again, and a problem it introduces is that if you run the game, then minimize and run again through the shortcut, it is restarted instead of resumed. I suspect this shouldn't be how it's supposed to work, can you confirm?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct shortcut to game
3 participants