flash with alternative positioning of the displayed toast?

219 views
Skip to first unread message

Zoltan Fazekas

unread,
Aug 7, 2016, 3:57:05 PM8/7/16
to Tasker
Hi,

I need to display toasts at the top instead of at the bottom of the screen as done by the flash action or the flash() method in Javascriptlets. My app displays toasts while the user is typing on the soft keyboard but on Android 6.0 the keys behind a toasts can not be pressed as long as the toast is visible.

Is it planned in the next release of Tasker to extend the flash action and/or the flash() method in Javascriptlets by a setting/parameter for chosing the position of the toast to be displayed?

I have tried to implement my own flash task using Java functions. I even managed to display a toast with the text "test" at the top of the display but the task gets stuck at action A5, a Java function calling Looper.loop():

toast (5)
Run Both Together
A1: Java Function [ Return: Class Or Object:Looper Function:prepare{} () Param: Param: Param: Param: Param: Param: Param: ]
A2: Java Function [ Return:toast Class Or Object:Toast Function:makeText{Toast} (Context, CharSequence, int) Param:CONTEXT Param:"test" Param:0 Param: Param: Param: Param: ]
A3: Java Function [ Return: Class Or Object:toast Function:setGravity{} (int, int, int) Param:48 Param:0 Param:0 Param: Param: Param: Param: ]
A4: Java Function [ Return: Class Or Object:toast Function:show{} () Param: Param: Param: Param: Param: Param: Param: ]
A5: Java Function [ Return: Class Or Object:Looper Function:loop{} () Param: Param: Param: Param: Param: Param: Param: ] 

A6: Java Function [ Return:looper Class Or Object:Looper Function:myLooper{Looper} () Param: Param: Param: Param: Param: Param: Param: ]
A7: Java Function [ Return: Class Or Object:looper Function:quit{} () Param: Param: Param: Param: Param: Param: Param: ] 


Does anybody know, how to deal with this? How can I quit the looper after displaying the toast? Or any other way in Tasker to display a toast at the top of the screen?

Thanks for any hints!


Regards,

Zoltan


Robert Ryan

unread,
Aug 7, 2016, 5:25:56 PM8/7/16
to Tasker
The AutoTools plug-in, in beta release, lets you control where to display toasts. You can also display in different foreground and background colors.

https://imgur.com/KKuvwIC

Jay M

unread,
Aug 7, 2016, 5:39:19 PM8/7/16
to Tasker

This^ or make a custom toast layout with a scene.


On Sun, 7 Aug 2016, 22:26 Robert Ryan, <rbr...@gmail.com> wrote:
The AutoTools plug-in, in beta release, lets you control where to display toasts. You can also display in different foreground and background colors.

https://imgur.com/KKuvwIC

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
--

Jay M ︻芫══一

Zoltan Fazekas

unread,
Aug 7, 2016, 5:48:11 PM8/7/16
to Tasker
Hi Jay M,

thanks for your answer. How can I change the standard toast layout with a scene in Tasker? The only option of the flash action is to control if the toast should be displayed long. Or did you mean displaying a custom scene instead of a toast?

Thanx, Zoltan

Jay M

unread,
Aug 7, 2016, 6:09:17 PM8/7/16
to Tasker
Yeah I ment make a scene that looks like a toast. The autotools plugin is the way to go though its got some nifty features here's a quick toast I made with it took less than 30 seconds most of the time was spent looking for nice colors to use.

Zoltan Fazekas

unread,
Aug 7, 2016, 6:11:57 PM8/7/16
to Tasker
Am Sonntag, 7. August 2016 23:25:56 UTC+2 schrieb Robert Ryan:
The AutoTools plug-in, in beta release, lets you control where to display toasts. You can also display in different foreground and background colors.

https://imgur.com/KKuvwIC


Hi Robert,

thank you for the hint. I have tried it with AutoTools and you are right, it works fine. My only problem is, that I need to export my Tasker app as an APK and it should not depend on other plugins that are not installed on the devices my app will be used on.

Regards
Zoltan
Reply all
Reply to author
Forward
0 new messages