Filter Static

tambiu3 years ago

Hi, I need help with Filter Static

I would like to change the source code to filter speed 0 only after 5 minutes after the vehicle was stopped, anybody can help me ?

private boolean filterStatic(Position position) {
        return filterStatic && position.getSpeed() == 0.0;
    }
Ahmad Bassel3 years ago

Hi tambiu;

I saw a little old post about the sound of notifications on ios that it worked for you,
I tried to put the code inside [class Notification] inside file [NotificatorFirebase.java] on traccar server source code and reassemble it and created jar file but still the sound not working:

@JsonProperty("sound")
private String sound;

I tried to put "default" value like Notification.sound = "default" but still not working.

Any help will be really appreciated.

tambiu3 years ago

Hi, I did this.

I used the built-in system with a "notification" structure with swizzling enabled (FirebaseAppDelegateProxyEnabled = YES in info.plist) and here is the json message I created:

{
"message":
     {
          "topic":"topic",
          "notification":
               {
                    "body":"body",
                    "title":"title"
               },
          "apns":
               {
                    "payload":
                         {
                              "aps":
                                   {
                                        "sound":"default"
                                   }
                         }
               }
     }
}

From source: https://stackoverflow.com/questions/48912020/how-to-show-an-alert-and-play-sound-when-receiving-notification-in-background

Ahmad Bassel3 years ago

much appreciated

i will try it

thank you