Skip to content

Commit

Permalink
Crafts a new notification icon so that Lollipop++ does not show a whi…
Browse files Browse the repository at this point in the history
…te block. What a moronic design imposition by Google. Resolves https://github.com/pliablepixels/zmNinja/issues/50
  • Loading branch information
pliablepixels committed Oct 26, 2015
1 parent fc59379 commit 9d0c08b
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 6 deletions.
24 changes: 19 additions & 5 deletions hooks/before_prepare/01_pp_hacks.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/bin/sh

exe() { echo "\$ $@" ; "$@" ; }

# Custom stuff I need to do for zmNinja
echo ----------------------------------------------------
echo Pliable Pixels build pre-preprocessing
echo ----------------------------------------------------
echo Curr Dir: `pwd`
echo "Copying Modified GCMIntentService for custom sound"
cp www/external/GCMIntentService.java plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/
cp www/external/GCMIntentService.java platforms/android/src/com/adobe/phonegap/push
exe cp www/external/GCMIntentService.java plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/
exe cp www/external/GCMIntentService.java platforms/android/src/com/adobe/phonegap/push

echo "Copying custom sound"
mkdir -p platforms/android/res/raw/
cp www/sounds/blop.mp3 platforms/android/res/raw/
echo "---------------------"
exe mkdir -p platforms/android/res/raw/
exe cp www/sounds/blop.mp3 platforms/android/res/raw/
exe cp www/sounds/blop.caf platforms/ios/zmNinja/Resources

echo "Copying plist hack for iOS for non SSL connections"
echo "--------------------------------------------------"
exe cp www/external/zmNinja-Info.plist.IOS9nonSSLPatch platforms/ios/zmNinja/zmNinja-Info.plist

cp www/sounds/blop.caf platforms/ios/zmNinja/Resources
echo "Copying Android notification icons to resource dir"
echo "--------------------------------------------------"
exe cp -R www/external/android-notification-icons/ platforms/android/res/


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 27 additions & 1 deletion www/js/EventServerSettingsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,27 @@ angular.module('zmApp.controllers').controller('zmApp.EventServerSettingsCtrl',
ZMDataModel.displayBanner('info', ['settings saved']);
}


//----------------------------------------------------------------
// returns domain name in string -
// http://stackoverflow.com/questions/8498592/extract-root-domain-name-from-string
//----------------------------------------------------------------
function extractDomain(url) {
var domain;
//find & remove protocol (http, ftp, etc.) and get domain
if (url.indexOf("://") > -1) {
domain = url.split('/')[2];
}
else {
domain = url.split('/')[0];
}

//find & remove port number
domain = domain.split(':')[0];

return domain;
}


//----------------------------------------------------------------
// returns reporting interval for monitor ID
//----------------------------------------------------------------
Expand Down Expand Up @@ -157,6 +177,12 @@ angular.module('zmApp.controllers').controller('zmApp.EventServerSettingsCtrl',
$scope.monitors = message;

$scope.loginData = ZMDataModel.getLogin();

if ($scope.loginData.eventServer == "")
{
$scope.loginData.eventServer = "wss://"+extractDomain($scope.loginData.url)+":9000";
}


$scope.check = {
isUseEventServer: ""
Expand Down

0 comments on commit 9d0c08b

Please sign in to comment.