Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / active app when screen is off

Author
Message
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 16th Jul 2015 00:51
Hi all,

Is there a way of running the app on the background while the screen is off, so it can go on by a command?

Example: about 10 seconds when the screen is off, the screen must go on.(the idea like a phone call, that the phone screen gets on when it is of.)

I want to make an app when the device is moving, it has to turn the screen on or play a sound.

The sound only plays when the screen is on, when moving. But when i push the half-power buttun, the app is also a kind off standby? It doesnt play the sound.

anyone an idea?
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jul 2015 01:43
Do you know of any other app that can do this?
As far as I know, apps are not allowed to take over your Android or Apple device like this, other than the phone. That is allowed because...well it's a phone!

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 16th Jul 2015 21:32
I was thinking of an alarm app.

if the phone is laying on the table, nothing happens. When someone picks it up, an alarm wil be sounded.

So the screen doesn't have to go on but a sound wil be played.

It wil only work when the phone screen is on, not when it is off. Some games wil sound when the lives are full. So it can be done, I think.
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jul 2015 22:00
Quote: "Some games will sound when the lives are full. So it can be done, I think."


This is done with push notifications. This can be done in AGK.
Sounding an alarm isn't possible in AppGameKit at the moment.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 16th Jul 2015 23:34
thanks for the reaction. The alarm is simulated with a wav file, just "playSound(id)".


I will try the push notification.
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 17th Jul 2015 00:17
emmm, I looked at it in the command list, but how does the pushnotification actually work in AGK2?

Do I need a Google development account first?


Maghnus
4
Years of Service
User Offline
Joined: 12th Jul 2015
Location:
Posted: 17th Jul 2015 02:14
I was actually looking this up earlier today (because of your topic, in fact): http://www.appgamekit.com/documentation/guides/push_notifications_android.htm
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 17th Jul 2015 22:37
Thanks for the link!

i've never seen this. I Shall check it out!

Greetings.

Login to post a reply

Server time is: 2019-10-18 00:06:18
Your offset time is: 2019-10-18 00:06:18