Working with Widget
Moderator: Martin
Working with Widget
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?
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
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
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
Thanks
Can the widget be bigger than 1x1?
Can the widget be bigger than 1x1?
Re: Working with Widget
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.
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
I realized after i posted, now i have nice working widget
Thanks
Thanks
Re: Working with Widget
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
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
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
I remembered later, it was not on Automagic but rather Map original widget with shortcut on screen
Re: Working with Widget
I completely forgot about shortcuts
You can also use an action Shortcut to launch 'Directions' from Automagic.

Re: Working with Widget
What do mean launch directions?
Map and direction as class?
Map and direction as class?