[Android 7.0+] Support playing music in split screen mode

This commit is contained in:
Egor 2016-12-31 13:05:06 -08:00
parent cdca4dcb89
commit 7a98ee6092
3 changed files with 19 additions and 2 deletions

View file

@ -17,6 +17,23 @@ storePassword=...
keytool -genkey -v -keystore huegasm.keystore -alias huegasm -keyalg RSA -keysize 2048 -validity 10000 keytool -genkey -v -keystore huegasm.keystore -alias huegasm -keyalg RSA -keysize 2048 -validity 10000
## LE MONKEY PATCHES
- webView.setVerticalScrollBarEnabled(true);
- @Override
public void handleStop() {
if (!isInitialized()) {
return;
}
sendJavascriptEvent("stop");
pluginManager.onStop();
}
- channel.onStop = cordova.addDocumentEventHandler('stop');
- case 'stop':
Just search for 'pause' and add the same type of event stuff for 'stop'. This is needed for properly split screening Huegasm with other apps.
## POSSIBLE FUTURE FEATURES ## POSSIBLE FUTURE FEATURES
- decode the hue color better - decode the hue color better
- better visualizations - better visualizations

View file

@ -216,7 +216,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
this.set('oldPlayQueueLength', this.get('playQueue.length')); this.set('oldPlayQueueLength', this.get('playQueue.length'));
document.addEventListener('pause', () => { document.addEventListener('stop', () => {
if(this.get('playing')){ if(this.get('playing')){
this.send('play'); this.send('play');
} }

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.hoboman313.huegasm" version="1.1.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.hoboman313.huegasm" version="1.1.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Huegasm</name> <name>Huegasm</name>
<content src="index.html" /> <content src="index.html" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.6.1" /> <plugin name="cordova-plugin-inappbrowser" spec="~1.6.1" />