1
Versions / Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« on: June 24, 2017, 09:41:48 »
Thanks for your answer, i fixed the issue.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<receiver
android:name=".PeriodicUpdateReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="locus.api.android.ACTION_PERIODIC_UPDATE" />
</intent-filter>
</receiver>
receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.d("Most jött", "adat a locustól");
try {
// Értelmes adat érkezett-e be?
if (intent == null || intent.getAction() == null) {
return;
}
if (!isLocusRunning(context)) {
return;
}
// Beolvassa a kapott adatokat
PeriodicUpdatesHandler.getInstance().onReceive(appContext, intent, updateHandler);
} catch (Exception e) {
return;
}
}
};
IntentFilter filter = new IntentFilter(
LocusConst.ACTION_PERIODIC_UPDATE);
registerReceiver(receiver, filter);
private PeriodicUpdatesHandler.OnUpdate updateHandler = new PeriodicUpdatesHandler.OnUpdate() {
/*
* Locustól kapott adatok beolvasásának a függvénye
*/
@Override
public void onUpdate(LocusUtils.LocusVersion locusVersion, UpdateContainer update) {
lastUpdate = update;
updatee(false);
Log.d("Most jött", "adat a locustól");
}
@Override
public void onIncorrectData() {
}
};
Thanks for the explanation. I have tried long pressing all of the buttons, but the up button symbol never changes, it always shows the up-arrow. I tested all sorts of combinations and long click durations, but to no success. I´m either not getting it right or it doesn´t work with the pebble time.
07-03 15:22:36.181 23591-23591/menion.android.locus.api.sample W/Bundle: Key 1204 expected Double but value was a java.lang.Float. The default value 0.0 was returned.
07-03 15:22:36.182 23591-23591/menion.android.locus.api.sample W/Bundle: Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Double
at android.os.BaseBundle.getDouble(BaseBundle.java:902)
at android.content.Intent.getDoubleExtra(Intent.java:5046)
at locus.api.android.features.periodicUpdates.PeriodicUpdatesFiller.intentToUpdate(PeriodicUpdatesFiller.java:97)
at locus.api.android.features.periodicUpdates.PeriodicUpdatesHandler.onReceive(PeriodicUpdatesHandler.java:87)
at menion.android.locus.api.sample.receivers.PeriodicUpdateReceiver.onReceive(PeriodicUpdateReceiver.java:38)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2673)
at android.app.ActivityThread.access$1700(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1428)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5389)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
07-03 15:22:36.187 23591-23591/menion.android.locus.api.sample I/PeriodicUpdateReceiver: onUpdate(locus.api.android.utils.LocusUtils$LocusVersion {
mPackageName: menion.android.locus.pro
mVersionCode: 500
mVersionName: 3.18.2
$change: null
}, locus.api.android.features.periodicUpdates.UpdateContainer@854e8ec)
2) Is there any way of manually starting you app? It disappeared twice from my watch (also the "sports" tile in the pebble menu was gone) and I didn´t know how to start it again, other than closing locus and opening it again.
R