mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Added dummy configuration file. This way we get data from the weather notification app.
Problem is we probably ned to add it as library, in order to unmarshal the intent. (That's why I commented the offending code in the receiver)
This commit is contained in:
parent
7a1a6dbb2b
commit
aa1014f51c
@ -203,6 +203,14 @@
|
|||||||
<action android:name="ru.gelin.android.weather.notification.ACTION_WEATHER_UPDATE_2" />
|
<action android:name="ru.gelin.android.weather.notification.ACTION_WEATHER_UPDATE_2" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
<activity android:name=".externalevents.WeatherNotificationConfig"
|
||||||
|
android:label="mockup">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="ru.gelin.android.weather.notification.ACTION_WEATHER_SKIN_PREFERENCES"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".externalevents.BluetoothStateChangeReceiver"
|
android:name=".externalevents.BluetoothStateChangeReceiver"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
package nodomain.freeyourgadget.gadgetbridge.externalevents;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
|
||||||
|
public class WeatherNotificationConfig extends Activity {
|
||||||
|
|
||||||
|
//TODO: we just need the user to enable us in the weather notification settings. There must be a better way
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package nodomain.freeyourgadget.gadgetbridge.externalevents;
|
package nodomain.freeyourgadget.gadgetbridge.externalevents;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -71,7 +72,7 @@ public class WeatherNotificationReceiver extends BroadcastReceiver {
|
|||||||
}
|
}
|
||||||
Bundle bundle = intent.getExtras();
|
Bundle bundle = intent.getExtras();
|
||||||
|
|
||||||
for (String key : bundle.keySet()) {
|
/* for (String key : bundle.keySet()) {
|
||||||
Object value = bundle.get(key);
|
Object value = bundle.get(key);
|
||||||
LOG.info(String.format("%s %s (%s)", key,
|
LOG.info(String.format("%s %s (%s)", key,
|
||||||
value.toString(), value.getClass().getName()));
|
value.toString(), value.getClass().getName()));
|
||||||
@ -85,6 +86,6 @@ public class WeatherNotificationReceiver extends BroadcastReceiver {
|
|||||||
Weather weather = intent.getParcelableExtra("ru.gelin.android.weather.notification.EXTRA_WEATHER");
|
Weather weather = intent.getParcelableExtra("ru.gelin.android.weather.notification.EXTRA_WEATHER");
|
||||||
if (weather != null) {
|
if (weather != null) {
|
||||||
LOG.info("weather in " + weather.location + " is " + weather.currentTemp);
|
LOG.info("weather in " + weather.location + " is " + weather.currentTemp);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user