Profile cover photo
Profile photo
Andy Crowther
3,504 followers -
Retail Manager in Central London with a love of the NFL, biking, Android and PC online gaming.
Retail Manager in Central London with a love of the NFL, biking, Android and PC online gaming.

3,504 followers
About
Andy's posts

Post has attachment

Post has attachment
Another fun day at the ExCeL London for Comic Con 2017.

Let me start by apologising, I'm very new to Android development and feeling my way through my first app.

It's a kitchen timer app, that runs multiple timers at once. Using onTick, I managed each timer, knocking of 250 ms each tick, based on a few booleans which say whether on not each timer should be ticking (is it paused, is it time to start it yet etc.)

All was working great, but I've tied to build in Notifications. As a new item needs to start it's time, I call a method which makes a layout visible, with a message and button to close it.

This method is where I've put my Notification code. Now, the Notification fires, with the message, but when I tap the Notification and return to the app, I think it's fired up another instance of the timer somehow. The item timers are going at double time.

I think I have the right bits of code, but I'm struggling to work out where each bit should live. Here is what I have -

MainActivity
Intent intent;
Notification notification;
PendingIntent pendingIntent;
NotificationManager notificationManager;

onCreate
intent = new Intent(getApplicationContext(), MainActivity.class);
pendingIntent = PendingIntent.getActivity(getApplicationContext(), 1, intent, 0);
notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);

soundAlarm method
if (!isInForeground) {
notification = new Notification.Builder(getApplicationContext())
.setContentTitle("Kitchen Timer")
.setContentText(message)
.setContentIntent(pendingIntent)
.setSmallIcon(android.R.drawable.sym_def_app_icon)
.setAutoCancel(true)
.build();



notificationManager.notify(1, notification);
}

I did have it all in the soundAlarm method, but that gave the same results.

I wonder if someone could help a new developer?

As part of my development, I'm making an Overwatch (the big Blizzard game) Soundboard. I submitted it in the early stages in case there are copyright issues and I've had the app suspended before I've really begun due to 'impersonation'.

It's called 'Overwatch Soundboard' and has images of the characters, which when pressed, plays one of their phrases randomly.

There are other apps that use the word 'Overwatch' and others that play their sounds and use an image of the heroes. What should I do as I don't know what they think is wrong? Contact Google?

Post has attachment
So, answers on a postcard, how does that car and caravan end up pointing that way?!?!

Post has attachment

Post has attachment

Post has attachment

Post has attachment
A fun ride, even with the drama.

Post has attachment
On Super Sunday two years ago we tried Game of Thrones for the first time. 4 player and I was the Baratheon's and just went south and capped 7 castles. None of us had really twigged that was how you win, until it was too late. The game still took 3 hours.

This Sunday we wanted to try again, before the big game, this time with 6 players.

Almost 5 hours in, just finishing the 4th round (out of ten) we realised the game would start in half an hour, so pushed through one more round and ended it at 5.

Again, randomly I was Baratheons and managed to win. I'm not sure how as I got attacked early (being the reining champ) and it really weakened me.

Only once did we bid for the influence tracks (which is actually great fun) and I kept the Iron Throne.

Lanisters looked favourite early on, but then got beat back as they got to 5 castles, then I think it was House Martell looked strong, fighting out of their corner and only a late attack by House Tyrell that scuppered their plans. I took a last castle from House Greyjoy to take the win.

It's a fantastic game, with loads of strategy, but just takes so long to play.

I would love to have seen how the next 5 rounds would have panned out, as it would have been plenty of battles and ally making perhaps, but it looks like a full game would be 7 to 8 hours...
PhotoPhotoPhotoPhoto
07/02/2017
4 Photos - View album
Wait while more posts are being loaded