widget home screen or app widget - android

I'm making an assignment about widgets but I wanna learn firstly difference between app widgets and home screen widgets? Is there any difference? what can i care about them while im explain them

Is there any difference?
Quoting the documentation:
App Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates.
In most cases, app widgets are "home screen widgets".

App Widgets can be added to either home screen or the lock screen or even to a custom app widget host for that matter.
Home Screen Widgets are just a sub set of app widgets. As the name suggests, they can only be hosted in home screen.

you can read all about Widgets here:
http://developer.android.com/design/patterns/widgets.html

Related

Create Android Widget inside App

I'd like to link to my app widget configuration activity from inside my app. I know it's possible to launch the Android widget picker but can I bypass that step and let my users create a widget on their home screen from inside my app?
can I bypass that step and let my users create a widget on their home screen from inside my app?
No. For example, the user's home screen may not support app widgets (Android TV, Chrome OS, specialty home screen implementations, etc.).

How to Guide Users to Add Widgets?

I have an app which is mainly two things: a widget that can be added to the hone screen, and a how-to-add-widget activity made out of images.
As I noticed, there are different ways to add widgets to the home screen depending on the device/android version. So, my activity's guided images will be different according to the device.
Do you have suggestions in how I can display the right how-to in the right device?
Is there a programmatic way to open device's widgets list to the user?
Thanks.

recommended way for "reminder" on Android similar to iPhone's icon badge

Since Android does not directly have icon badges I would like to use app widget as a reminder.
The idea behind this is that if a user wants to remind her/himself to do a certain task within my app the app widget should show it, otherwise either the app widget is not on the screen (if that is possible at all) or the widget just shows by its nature that everything is OK.
Ideally I would like to have an app, (not a widget) that just shows a widget as a reminder.
Is this the "recommended" way to do this or do I just need to make a widget that changes its look and forget about the app?
Can I actually make an app widget appear and disappear from within an app?
Many thanks!
Can I actually make an app widget appear and disappear from within an app?
If by "disappear" you mean "draw nothing but take up space", sure. Use a RemoteViews that has transparent contents, then update the app widget with that RemoteViews.
Personally, I don't like the UX of this, and I would suggest that perhaps you allow the user to choose between "invisible" or "default" app widget contents when there is no reminder.

Android: HomeScreen

I'm currently developing a simple android HomeScreen with just 1 page.
I would like to know how to enable my HomeScreen to run and display widgets like this free widget.
Thanks so much in advance!
The best way you can use it, just get sources of Launcher application and find how AppWidgetHost added to view hierarchy and how it is maintaining AppWidgetHostView instances.
Launcher sources you can get here:
Laucnher.git
The home screen widgets are added by users based on the free-space they have and where they want the widget to be placed in their home-screen. As a developer you can only provide a widget, but adding that to the home-screen is purely in the control of the user.

Spawn Android desktop widget from an application

I have an Android application does many things. I would like to be able have it spawn a desktop widget (?) that opens the application to do a specific thing when the widget is clicked.
Can someone give me a road map on how to do this?
As far as i know, Android applications can not add App Widgets to the home screen. Applications can define App Widgets, but user has to add them manually to the home screen.
However it is not hard to launch Activitys from a widget using PendingIntent.
This is called AppWidget and is described in details in Android documentation (both references and step-by-step guide). Note, that it's the user that adds the widget to his launcher screen. AFAIK there's no way to add it to launcher in code (though HTC might have some undocumented ways).

Categories

Resources