Android Tutorial Android home screen widgets tutorial - part I

Status
Not open for further replies.

Massimiliano

Member
Licensed User
Longtime User
Hi,
I'm having some problems with my widget app (sticky service) and the other app activities.

When i show a msgbox inside other activities (not the widget) sometime apps crashes without any message
If i remove the widget (so the service it's stopped) from home screen all seems to be ok.
I've read something about services and modal msgbox, but any help on how to show messages (eg. menu about box, exit application confirm....) would be appreciated

many thanks,
Massimiliano

b4a v5.02
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
Hello.. Is it possibile to catch every single view of the widget?
Like this code
B4X:
For Each v As View In Activity.GetAllViewsRecursive
...
Next
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
Hello,
how can I create automatically a widget, after the application installation?
 

Rusty

Well-Known Member
Licensed User
Longtime User
I've seen where you can now install application shortcuts on the home screen and would like to have my widget (once installed) automatically be put on the home screen.
Is there a way/method to do this?
Thanks,
Rusty
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
I've seen where you can now install application shortcuts on the home screen and would like to have my widget (once installed) automatically be put on the home screen.
Is there a way/method to do this?
Thanks,
Rusty

You can't.. See my post #188 and #189
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks...sorry, I didn't know what an "automatic widget" was...
 

Galaz

New Member
Licensed User
Hi all,
it is possibile to get value of text from widget ?
To sum up: I update widget and I would like to get value.
Do not ask me why I need this if first I update so I should know the value.
If is possibile please write me how. Thank you.
 

Galaz

New Member
Licensed User
I'm sorry but I don't understand. Which text?

Hello,
Thank you for trying to understand me.
I have some labels in widet that I update. In another activity I would like to get value of those labels. It is possible ? Thank you.
 

Martin Larsen

Active Member
Licensed User
Longtime User
Widgets do not support all views types. The following views are supported:
- Button (default drawable)
- Label (ColorDrawable or GradientDrawable)
- Panel (ColorDrawable or GradientDrawable)
- ImageView
- ProgressBar (both modes)

Does this still apply to newer versions of B4A?

What about very obvious views such as TextView and ListView?
 

Martin Larsen

Active Member
Licensed User
Longtime User
Oh bad :-(

Why such limitations? This means that B4A is not really suited for app widgets as you can only make the most simple kinds of widgets. I think it is a pity because you can make so much with B4A, but now I will have to go back to plain Java based Android for my next app.

Erel, any plans for the future?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…