[Android Apps and Games] UltraTheHedgeToaster:
Huh. I didn't realize there were any new posts here since February. I don't recall getting an email notification.

Ah well.

Something really interesting happened today - or quite possibly a few days ago but I hadn't noticed until now: Mortplayer suddenly and inexplicably stopped crashing. :victory:

I suddenly could select files again and it would work - even could do a search and click on the search results. I was ecstatic! Mayhaps whatever obscure change on Android 8.0.0 that had broken the app in December had been fixed!

And it all worked fine - until I restarted my phone. Then Mortplayer was back to crashing again. Hmm. :(

Same exception as back in December, I'm afraid.

No idea through what kind of fluke made it randomly start working again - and then immediately stop after a restart. I'd guess it must've been something in Android itself. It'd be great if I could find some way to reproduce that, but I have no clue what could possibly have caused it. And even if I did find out, who knows if it'd work for everyone? :(

______________________________________________________________________________________________________________________________________________________

For the sake of completion, for those who haven't decompiled the project, this is where the error arises:

public void onResume() {
String orientation;
Log.d(APP_NAME, "Resume main activity");
super.onResume();
this.restarted = true;
SharedPreferences prefs = MainPreferences.getSharedPreferences(this);
if (getResources().getConfiguration().orientation == 2) {
orientation = "_landscape";
} else {
orientation = "_portrait";
}
this.currentDockState = getDockState();
String newLayout = prefs.getString("layout" + this.currentDockState + orientation, "");
if (newLayout.equals("")) {
newLayout = prefs.getString("layout" + orientation, "default");
}
if (!this.currentTheme.equals(prefs.getString("theme", "transbev"))) {
initTheme();
initLayout();
loadBackgroundImage();
}else if (!this.currentLayout.equals(newLayout) || this.hideAreaBackground != prefs.getBoolean("hideAreaBackground", false) || this.hideStatusBar != prefs.getBoolean("hideStatusBar", false) || !this.currentButtonImages.equals(prefs.getString("buttonImages", "white"))) {
initLayout();
loadBackgroundImage();
} else if (!(this.clockText == null && this.dateText == null)) {
updateTime();
if (this.timeChangeReceiver == null) {
this.timeChangeReceiver = new TimeChangeReceiver();
IntentFilter filter = new IntentFilter();
filter.addAction("android.intent.action.TIME_TICK");
filter.addAction("android.intent.action.TIME_SET");
filter.addAction("android.intent.action.TIMEZONE_CHANGED");
filter.addAction("android.intent.action.DOCK_EVENT");
registerReceiver(this.timeChangeReceiver, filter);
[COLOR="Red"]this.handler.postDelayed(this.timeChangeRunnable, 5000); // This is MainPlayer.java:1434, the point of failure.[/COLOR]
}
}
setAllButtonsClickable(false);
this.oldTrack = null;
setDefaultCover();
if (this.iPlayback != null) {
Log.d(APP_NAME, "service already bound, initialize");
this.handler.post(this.initializeRunnable);
}
setVolumeControlStream(3);
}

It's too bad we can't get it to go down one of the other "if"-paths leading up to the troublesome code. Those are just checking "is the UI-theme different than before" and similar settings. (Configuration > preferences > main screen appearance > theme) Doesn't look like that's anything that could be modified from the outside. :(

______________________________________________________________________________________________________________________________________________________

As for not being able to recompile the project; I unfortunately still haven't found the time to look into it myself... (For reference - I bought a brand-new computer in January. I still haven't had the time to set it all up and move over to it since then. That's how busy I've been.)

Evidently, the decompiled project looks nothing like a standard Android project. The question is - are there files flat out missing, or can everything be re-arranged into a functional project? :confused:

This would be my strategy:

1) Take one of my existing android projects (preferably one using some libraries) and compile to apk.

2) Decompile the apk of the familiar project

3) Compare decompiled files with original source

4) Attempt to fumble this more familiar project and its libraries from their decompiled state back into something that can be compiled, and hopefully learn something valuable about re-compiling decompiled apk files. ^_^;;

5) Try to figure out how to recompile Mortplayer using insights gained.

I hope that helps someone; or perhaps I will eventually get around to take my own shot at it... in a few months or so.... :eek: