Running in the background

487 views
Skip to first unread message

Vish Seenarain

unread,
Sep 11, 2015, 6:59:51 PM9/11/15
to AndroidScript
Hello

Is there a way to start my app when the phone turns on?
And can the speech recognition recognize if the app is running in the background???

Thank you

sankarshan dudhate

unread,
Sep 12, 2015, 8:42:16 AM9/12/15
to AndroidScript
Hi Vish,
I think there is a way to auto start your app but I'm not sure about it.
To keep any functionality in background, you will need background services. Services are available in latest beta. So, you can contact Dave and grab the latest beta.

Kieran Mason

unread,
Sep 12, 2015, 9:41:12 AM9/12/15
to AndroidScript
As for the automatic starting when your phones does:
app.SetAutoBoot(TrueFalse)Calling app.SetAutoBoot( true ) method will cause DroidScript be started automatically when your phone boots. 
The method will also work in your own apps if you build APKs.
An extract from the Wiki

However, as for the background speech recognition, I'm not too sure about. Perhaps try testing it and see what the outcome is

sankarshan dudhate

unread,
Sep 13, 2015, 7:07:09 AM9/13/15
to AndroidScript
Hi guys,
You can make speech recognition work in background. It works fine with services. I was actually working on an Assistant app, almost got there when I paused the project because I thought it requires a widget.

Vish Seenarain

unread,
Sep 13, 2015, 11:55:19 AM9/13/15
to AndroidScript
Hey sankarshan,

I wanted to make a kind of assistant app that can work in the background.
Can you give me a sample of the speech recognition in the background??

Thanks :)

Vish Seenarain

unread,
Sep 13, 2015, 11:56:35 AM9/13/15
to AndroidScript
Hey Kieran,

Thanks and taken into consideration.

Vish

Syed Munawer Hassan

unread,
Aug 17, 2016, 1:33:46 PM8/17/16
to DroidScript
All you need to do is to write app.ToBack() in OnStart function this function will run your app in background

Alex F

unread,
Aug 17, 2016, 2:40:57 PM8/17/16
to DroidScript
Will it be also possible to show a layout on the lock-screen (exmp: CleanMaster) or on the home-screen like the music/ weather/ Memo/ Calendar app? Or is that (homescr lay) only possible because they are installed by android

Nick Weber

unread,
Aug 20, 2016, 6:30:42 AM8/20/16
to DroidScript
It's easy, just create a service. And then put your speech reg app into there.
Reply all
Reply to author
Forward
0 new messages