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.

Android / lock Android device butttons

Author
Message
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 12th Feb 2015 00:13
Hi all, I have looked everywhere but can't seem to find if there are any commands to disable the standard Android buttons, eg menu, back and swipe down menus etc.
Does anyone know if they exist in AGK2?

I only want to be able to exit the App I am making from the App itself via an exit button as it is designed for 2 to 5 year olds and I don't want the child to press a button related to Android device by mistake.

I have seen this working on Android kids Apps but not sure if can do this in AppGameKit?

Cheers.

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Feb 2015 03:06
I don't think you can disable the buttons from AGK.

It might be doable in the manifest for the Android build. Try researching that.

I believe that there is an AppGameKit command for detecting the back Android button. I expect that you would check it each loop and then ignore it when it happens (this should inhibit the default behavior).

But I don't know if commands for detecting the home and menu buttons in AGK2.

I suspect that Google might frown on disabling all of the buttons. That is virus like behavior.

Cheers,
Ancient Lady
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 12th Feb 2015 03:32
Yeah can't find anything for it other than the Back Button detect as you mentioned.
I have seen quite a few kids Apps on the play store now which do this so that the child can't escape out of the App every 5 minutes by accident.

Will have to Google Search Android build but can't imagine how to code something without using tier 2

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2015 03:33 Edited at: 12th Feb 2015 03:45
I didn't add anything extra in to disable anything for 6 Marbles

Check it out, the left back and right menu thingy do nothing, and the middle one pauses the game by letting you go back to your system stuff.
If you click the game's launch icon again it resumes right where you exited the game.
Maybe its just my phone, because I didn't really test those buttons much until just now.
What does your build do now?

There may be an internal mechanism that overrides them if virtual buttons are placed at the bottom???? :-| (dunno)
As, I said I did nothing to bypass, but I do have my buttons down there next to the phones.

Quote: "I suspect that Google might frown on disabling all of the buttons. That is virus like behavior."

I agree.
I lucked out on my setup working the way it does I guess.
There is a way out other than my exit button, but not where my controls are.


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 12th Feb 2015 03:50
On my tablet the back button does nothing actually but the home and App switch buttons both work and also if I swipe from the top of the screen the Android menu appears.

Just tried your game and it is the same on my tablet, oh and by the way, nice game, very impressed

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2015 04:00 Edited at: 12th Feb 2015 04:05
Thanks, I just broke my tablet back out and tried it and yeah, those buttons do work.
So, I guess it was just my phone, and my buttons are NOT in a good place after all

Quote: "It might be doable in the manifest for the Android build. Try researching that."

Thanks AL


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 12th Feb 2015 04:02
Back to the drawing board. It would be really helpful to just be able to lock them until the game finished especially of kids use.

Just rated your game on Play Store, that's another 5 stars

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 12th Feb 2015 15:19
Been looking again for some feature to do this, however still can't find.

Anyone else got any info or anything from TGC team.

Cheers.

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Feb 2015 21:12
Quote: "I suspect that Google might frown on disabling all of the buttons. That is virus like behavior."


I think this is true, although not very well monitored. The user is supposed to be free to use the standard buttons at any time. The OS is supposed to handle closing apps when it feels like it. So although you have "exited" the game, it stays in memory until Android decides it needs it for something else.

Quidquid latine dictum sit, altum sonatur
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 13th Feb 2015 21:25
Maybe, I have looked everywhere but can't find any commands in AppGameKit, just code in java by doing a google search.

Think this is a no go and will just have to keep the buttons active, fed up of looking through AppGameKit commands list now to try and find something.

Onto the next part of my game which is nearing completion now

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Feb 2015 00:42
I don't know how it's done, but I suspect it would require a special permission to do it if it were possible. But Lollipop negates the need to do this anyway as it comes with screen pinning, so the user can decide if an app should have the buttons disabled, and they can do it for any app.
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 14th Feb 2015 01:59
Paul, thanks for your answer. I wasn't aware of the settings for Apps in Android. I will look into that and put it in the instructions when I release my little Colouring Book game.
It is nearing completion now and I only have to draw pictures to colour in now because the main program is fully working.

If Android does this and users of the game know about it then it doesn't need coding to disable the buttons.

Thanks for your help with this.

Programming - AMOS on the AMIGA! / DBPro / Python / A bit of C C++ / now also AGK2! - Graphics - Deluxe Paint on the Amiga / Paintshop Pro / Photoshop / Lightroom / Grafx2
Previously worked for Prisma Software producing childrens educational software on the Amiga - Titles - Pepe's Garden - Paint Pot / Kids Academy range - Paint Pot II / Shopping Basket / Which Where What? / Blobs / Alvin's Puzzles

Login to post a reply

Server time is: 2024-03-28 23:44:03
Your offset time is: 2024-03-28 23:44:03