-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PokeMob notifications #149
Conversation
@@ -4,7 +4,8 @@ export class Mob extends POI { | |||
clusterId: number; | |||
tweets: MobTweet[]; | |||
timestamp: number; | |||
|
|||
coordinates: [number, number]; // [longitude, latitude] | |||
isMob: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is just how the mob object looks like PokemonGoers/PokeMap-2#32 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok 😆 I'll just accept it the way it is.
StatusBar.styleDefault(); | ||
} | ||
|
||
if (platform.is('android')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too restrictive, should be android, ios and potentially windows phone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are not planning on releasing an iOS or Windows phone application and I never tested it on anything other than Android I thought it's best to just support Android. If you want to test it on iOS and Windows phone feel free to do so :)
But thinking about this made me realize that there is probably something else wrong about this statement. platform.is('android')
also returns true if the app is running inside a browser on an Android device. So this should be changed to platform.is('android') && !platform.is('mobileweb')
.
https://ionicframework.com/docs/v2/api/platform/Platform/#is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
android && cordova
I can't build for iOS but I wouldn't have ruled it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cordova
is also true if we are running the app inside the browser so it's probably not what we want.
The decision to only publish on Android was announced by Guy or one of the tutors during the presentation week. I tried looking for some official statement but couldn't find anything unfortunately 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's reconsider this at a later point. However, I want to do a clean build and test with mock location before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way I can test if this works?
If yes, how? :)
LocalNotifications.schedule({ | ||
id: this.MOB_NOTIFICATION_ID, | ||
title: 'PredictEmAll - PokeMob detected', | ||
text: mob.tweets.length + ' persons in your area are tweeting about Pokemon', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more about tweets and not persons, right?
Also: "Pokémon" xD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
How is X tweets about Pokémon were posted in your area
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexanderLill Waiting for your opinion here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll updated it now. If you prefer some other text please let me know.
Mock location and go to a spot where Mock Mobs are happening. |
@WoH where is this location? |
|
The mobs you are seeing are triggered by the PokeMap-1 team and are not pushed over the websocket from the PokeData backend. Thus you will probably have hard time finding a real mob.
I assume you're talking about Android builds? They work for me. Maybe delete your |
Done already, but I'm not going to fix that today or tomorrow. Edit: I had the latest versions so I got an issue with the _.debounce() call by PM-1. |
Closes #79