Skip to content
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

Merged
merged 5 commits into from
Oct 27, 2016
Merged

PokeMob notifications #149

merged 5 commits into from
Oct 27, 2016

Conversation

johartl
Copy link
Collaborator

@johartl johartl commented Oct 23, 2016

Closes #79

@@ -4,7 +4,8 @@ export class Mob extends POI {
clusterId: number;
tweets: MobTweet[];
timestamp: number;

coordinates: [number, number]; // [longitude, latitude]
isMob: boolean;
Copy link
Member

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?

Copy link
Collaborator Author

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)

Copy link
Member

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')) {
Copy link
Member

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

Copy link
Collaborator Author

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

Copy link
Member

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.

Copy link
Collaborator Author

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 😕

Copy link
Member

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.

Copy link
Collaborator

@AlexanderLill AlexanderLill left a 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',
Copy link
Collaborator

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

Copy link
Collaborator Author

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 ?

Copy link
Collaborator Author

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 :)

Copy link
Collaborator Author

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.

@WoH
Copy link
Member

WoH commented Oct 23, 2016

ionic build android

Mock location and go to a spot where Mock Mobs are happening.

@AlexanderLill
Copy link
Collaborator

@WoH where is this location?

@WoH
Copy link
Member

WoH commented Oct 23, 2016

  1. In Munich, open it up in a browser and check the console or watch the screen.
  2. Builds are failing on develop already or is that just me.

@johartl
Copy link
Collaborator Author

johartl commented Oct 23, 2016

In Munich, open it up in a browser and check the console or watch the screen.

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.

Builds are failing on develop already or is that just me.

I assume you're talking about Android builds? They work for me. Maybe delete your platforms and plugins folder and run ionic prepare again.

@WoH
Copy link
Member

WoH commented Oct 23, 2016

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.

@johartl johartl merged commit 90e5a9b into develop Oct 27, 2016
@johartl johartl deleted the notifications branch October 27, 2016 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants