Android Tutorial Android "Kiosk mode" tutorial

ZeroSoft

Member
Licensed User
Longtime User
You can add this:
B4X:
<action android:name="android.intent.action.MAIN" />              
<category android:name="android.intent.category.HOME" />                 
<category android:name="android.intent.category.DEFAULT" />               
<category android:name="android.intent.category.MONKEY"/>

to the activity in the manifest, and bind the application too the home key
 

ribber

Member
Licensed User
Longtime User
I've also read about your solution @Zero

But if I bind the application to the home screen I have always to select a launcher for this action. Is there a work around?
 

rbsoft

Active Member
Licensed User
Longtime User
That sounds like an interesting approach.

I am using Erel's Kiosk mode right now. But it takes to long for the app to show again. It gives the user enough time to switch Gps off or put the device into flight mode.

Rolf
 

rbsoft

Active Member
Licensed User
Longtime User
@ZeroSoft

B4X:
<action android:name="android.intent.action.MAIN" />              
<category android:name="android.intent.category.HOME" />                 
<category android:name="android.intent.category.DEFAULT" />               
<category android:name="android.intent.category.MONKEY"/>

How and where exactly would you add this in the Manifest Editor?
Can you post an example?

Rolf
 

rbsoft

Active Member
Licensed User
Longtime User
Ok, got it sorted out. Just needed to add like this in the Manifest Editor.

B4X:
'Kiosk Mode
AddActivityText("main",
   <intent-filter>
   <action android:name="android.intent.action.MAIN" />
   <category android:name="android.intent.category.HOME" />
   <category android:name="android.intent.category.DEFAULT" />
   <category android:name="android.intent.category.MONKEY"/>
   </intent-filter>
)
'End Kiosk Mode

Absolutely great!

Rolf
 

slowtime

Active Member
Licensed User
Longtime User
Hi,

I'd like permit user exit the kiosked application for 5 minutes, but at the end of 5 minutes he must return to kiosked application

Is it correct change in

HTML:
sub Activity_Pause (UserClosed As Boolean)

.... dateTime.Now + 1 

in to 

....dateTime.Now + 300 (60 * 5 minutes)
Must I change other in service module or this change is all I must do.

Thank you for help

Ciao
 

slowtime

Active Member
Licensed User
Longtime User
Hi Erel,

This solutions works
HTML:
Sub Activity_Pause (UserClosed As Boolean)
If KioskService.limitNumberOfTicks >= 10 Then Return 
'If kiosk Then StartServiceAt(KioskService, DateTime.Now + 20 * DateTime.TicksPerSecond, False)

This solutions woks too.
HTML:
Sub Activity_Pause (UserClosed As Boolean)
If KioskService.limitNumberOfTicks >= 10 Then Return 
If kiosk Then StartServiceAt(KioskService, DateTime.Now + 1000 * 60, False)

I'll use Erel solution.

I'm going to implement settings flags in pause and resume so I can set different time of kiosk mode (es user read mail by intent from application, user use another application by intent from main application)

But I can't understand because when main application return by kiosk it is seems like service was called twice. Like 2 instance of the the same application o same service is running togheter.

Thank you for suggestions.

Sorry but English is not my languange.

Ciao
 

slowtime

Active Member
Licensed User
Longtime User
Hello Erel

I set in service module -> Notification.Sound = true

I sometime listened two beep when application exit and then come back by kiosk.

Maybe i wrote in the code something wrong, i'm checking, but kiosk is full useable.
Anyway thank you for kiosk and b4a.
I love ba4, simple and incisive.

Ciao
 

AllanD

Member
Licensed User
Longtime User
Stop The mini apps on Galaxy Tablet

Hello, I am loving this kiosk app but I still have one issue on the Galaxy Tab, and that is how to prevent the "mini apps" at the bottom of the screen from showing.

Does anybody have an idea how to do that?

Thanks,
Allan
 

ykucuk

Well-Known Member
Licensed User
Longtime User
it works but...

Its really work great. but when i click search or home button device return to homescreen for some second and after turn back to kiosk app.

i understand that there is no way disable buttons but is there any chance to set time more less for turn back our app again.

i chance timer 's interval 100 to 10 but notting happened. its stil about 2-3 second.

my device is android 4.0.3

thank you
 

lszomb

New Member
got a noob question: how can I download the attachment? do I need to subscribe first. Second question: can kiosk app suppress incoming call and SMS? thanks
 

lupiana

Member
Licensed User
Longtime User
Delete kiosk

I tried to run the program Kiosk in
emulator.

I only found one bistable Button: STOP and START.

The problem:
are in DEBUG mode, I close the program and create another program.

Launching the new program and when it connects with
the emulator always displays the kiosk and NOT the programa
in activity '.

What can I do to eliminate this inconvenience?

Another problem: I tried to assign
a Private Key and every time I open a new program
give me ERROR not finding the Keystore.

How can I eliminate this Private Key Sign?


Thanks

Lupiana
 

GaNdAlF89

Active Member
Licensed User
Longtime User
KioskService with multiples activity

How I can modify KioskService code to run with multiples activity?

example: I have an activity for login and an activity for menu. From menu I can start others activities.
I want that KioskService doesn't run when menu activity starts, and when others activities start from menu...

(sorry for my bad english!)
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…