Android refactor to handle activities not named "Main"
I had a specific need where the Activity running the icon change was not the one that launched the app. This change tries to allow LaunchActivity to be the Launcher and MainActivity to be the one running the show.
Part of the trick is to use the code below to find the current launch activity:
Intent intent = packageManager.getLaunchIntentForPackage(packageName);
_currentLaunchClassName = intent.resolveActivity(packageManager).getClassName();
I played a lot with the code, renamed some variables to add clarification, and tried to make it more flexible.
My goal was to avoid killing the app when changing the icon, but I'm still tweaking this part.
It seems that there were some changes in the code after the latest release, so extra caution is needed reviewing that.
@skb1129 @haydncomley I'll try to spend some time reducing the difference from my code to main this week
I'm running this PR branch on my app and it works, seems to fix #74 and #106
@skb1129 anything I can do to help with this review?