Page 1 of 2
Working with Widget
Posted: 01 Oct 2013 08:42
by rsegoly
I tried before working with Automagic widget but it looked to complicated.
I have web site which is connected to Database
I can query data by opening URL with PHP screen
I am looking for simple solution whether Automagic widget or other
I need a 2X4 buttons with different text for each one and ability to display some data on top which is result of database such query
So ___________________________________
Temp at home XXXX
Button1 Button2
Button2 Button3
Button4 Button5
Button6 Button7
Any recommendations?
Re: Working with Widget
Posted: 01 Oct 2013 17:22
by Martin
Hi,
You can show the contents of a global variable in a text element of a widget by setting the text of the element to {global_xyz}.
The content of the global variable can be set from a flow using an action Script:
global_xyz = "test";
Please check out the widget tutorial for an example:
http://automagic4android.com/en/help/cr ... tom-widget
You can also directly modify a widget using a script. The Tips section at the end of the tutorial describes how this can be done.
Regards,
Martin
Re: Working with Widget
Posted: 01 Oct 2013 18:17
by rsegoly
Thanks
Can the widget be bigger than 1x1?
Re: Working with Widget
Posted: 01 Oct 2013 20:17
by Martin
The widget can be resized on most newer Android versions (Android 3.1+).
Long-click the widget and release. The widget border should be marked with a resize border which can be dragged to create bigger widgets.
Re: Working with Widget
Posted: 02 Oct 2013 02:09
by rsegoly
I realized after i posted, now i have nice working widget
Thanks
Re: Working with Widget
Posted: 02 Oct 2013 18:50
by rsegoly
One more issue I remember being able to create an action to display public transportation on Google map from current location to specific place but can't find this option again.
Re: Working with Widget
Posted: 02 Oct 2013 19:34
by Martin
There is no built-in action in Automagic to do this.
You can try if following action works on your device (I think it's not officially supported by Android):
Start Activity
Data URI:
https://maps.google.com/maps/?daddr=38. ... 7&dirflg=r
Explicit Component:
checked
Package Name:
com.google.android.apps.maps
URL query parameters:
saddr=source location (coordinates)
daddr=destination location (coordinates)
dirflg=h - Switches on "Avoid Highways" route finding mode.
dirflg=t - Switches on "Avoid Tolls" route finding mode.
dirflg=r - Switches on "Public Transit" - only works in some areas.
dirflg=w - Switches to walking directions - still in beta.
dirflg=d - Switches to driving directions
Re: Working with Widget
Posted: 03 Oct 2013 03:45
by rsegoly
I remembered later, it was not on Automagic but rather Map original widget with shortcut on screen
Re: Working with Widget
Posted: 03 Oct 2013 16:20
by Martin
I completely forgot about shortcuts

You can also use an action
Shortcut to launch 'Directions' from Automagic.
Re: Working with Widget
Posted: 03 Oct 2013 16:53
by rsegoly
What do mean launch directions?
Map and direction as class?