Skip to content

Commit

Permalink
Fix #194: Switch to cordova-plugin-zeroconf.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Apr 24, 2016
1 parent 312944a commit 2706890
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 45 deletions.
80 changes: 40 additions & 40 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="34" id="at.co.kemmer.mopidy_mobile" version="1.7.0">
<name>Mopidy Mobile</name>
<description>
Expand All @@ -9,47 +9,47 @@
<author email="tkemmer@computer.org">
Thomas Kemmer
</author>
<content src="index.html"/>
<access origin="*"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="FadeSplashScreen" value="false"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
<preference name="SplashShowOnlyFirstTime" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="android-manifest/@android:installLocation" value="auto"/>
<preference name="android-minSdkVersion" value="19"/>
<preference name="cordova-custom-config-autorestore" value="false"/>
<preference name="webviewbounce" value="false"/>
<content src="index.html" />
<access origin="*" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="BackupWebStorage" value="none" />
<preference name="DisallowOverscroll" value="true" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="android-manifest/@android:installLocation" value="auto" />
<preference name="android-minSdkVersion" value="19" />
<preference name="cordova-custom-config-autorestore" value="false" />
<preference name="webviewbounce" value="false" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<platform name="android">
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
<plugin name="cordova-custom-config" spec="~2.0.0"/>
<plugin name="cordova-plugin-appversion" spec="~1.0.0"/>
<plugin name="cordova-plugin-inappbrowser" spec="~1.4.0"/>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
<plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
<plugin name="cordova-zeroconf-plugin" spec="~1.2.1"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<plugin name="cordova-custom-config" spec="~2.0.0" />
<plugin name="cordova-plugin-appversion" spec="~1.0.0" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" />
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2" />
<plugin name="cordova-plugin-whitelist" spec="~1.2.2" />
<plugin name="cordova-plugin-zeroconf" spec="~1.1.1" />
</widget>
5 changes: 3 additions & 2 deletions merges/android/app/services/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@

service.servers = function(timeout) {
return $ionicPlatform.ready().then(function() {
var zeroconf = $window.cordova.plugins.zeroconf;
var deferred = $q.defer();

$window.ZeroConf.watch('_mopidy-http._tcp.local.', function(obj) {
zeroconf.watch('_mopidy-http._tcp.local.', function(obj) {
var url = obj.service.urls[0];
$log.debug('zeroconf: ' + obj.action + ' ' + url, obj.service);
switch (obj.action) {
Expand All @@ -60,7 +61,7 @@
});
deferred.resolve(result);
if (--watchers === 0) {
$window.ZeroConf.unwatch('_mopidy-http._tcp.local.');
zeroconf.unwatch('_mopidy-http._tcp.local.');
servers = {};
}
});
Expand Down
6 changes: 3 additions & 3 deletions www/app/settings/licenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ <h3>

<div class="item" ng-if="platform.isWebView()">
<h2>
<a href="https://github.com/vstirbu/ZeroConf/" target="_system">ZeroConf plugin for Cordova/Phonegap 3.0</a>
<a href="https://github.com/becvert/cordova-plugin-zeroconf" target="_system">Cordova ZeroConf Plugin</a>
</h2>
<h3>Copyright &copy; 2013 Vlad Stirbu.</h3>
<h3>Copyright &copy; 2015 becvert.</h3>
<h3>
<a href="https://github.com/vstirbu/ZeroConf/blob/master/LICENSE-MIT" target="_system">
<a href="https://github.com/becvert/cordova-plugin-zeroconf/blob/master/LICENSE" target="_system">
MIT License
</a>
</h3>
Expand Down

0 comments on commit 2706890

Please sign in to comment.