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" />
|
||||
</intent-filter>
|
||||
</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
|
||||
android:name=".externalevents.BluetoothStateChangeReceiver"
|
||||
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;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
@ -71,7 +72,7 @@ public class WeatherNotificationReceiver extends BroadcastReceiver {
|
|||
}
|
||||
Bundle bundle = intent.getExtras();
|
||||
|
||||
for (String key : bundle.keySet()) {
|
||||
/* for (String key : bundle.keySet()) {
|
||||
Object value = bundle.get(key);
|
||||
LOG.info(String.format("%s %s (%s)", key,
|
||||
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");
|
||||
if (weather != null) {
|
||||
LOG.info("weather in " + weather.location + " is " + weather.currentTemp);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue