How to Guide Users to Add Widgets? - android

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.

Related

Is there a way to create an Android app that looks and behaves just like the homescreen of the same device?

I need a home screen clone app that uses apps, folders, swipable screens of more apps and so on.
So far, I have looked into custom launchers like this one here: https://www.androidauthority.com/make-a-custom-android-launcher-837342-837342/
But to achieve what I need will require a lot of extra additions (the icons are easy enough, but I'll need folders and swiping as well).
Another approach I wondered about is Kiosk mode/Lock-Task-Mode and multi-app kiosk mode. I've looked at the docs and wondered if this could be used to harness the actual homescreen, while still executing code in the background based on what apps the user selects (ultimately acheiving the same desired effect of my project).
I've spent a full day looking at this but I want to know if I'm on the right path. Obviously, I could create an app that contains all of this, but I do think I want it to be a launcher app that's locked in place so that users can't operate the actual home screen and its apps. No malicious intent here, it's just for a closed-off research project.
Any insight is greatly appreciated.

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.

How to make a popup settings page for an Android widget

Ok so I am very new to the Android SDK, but not to programming. I want to attempt to make a simple Android widget. I've been looking around for things on the web pertaining to widgets, and have been able to find lots of information, but nothing pertaining to my main question.
How can I make a settings dialog that will adjust the widget when it is launched? When you add the Google search widget, it prompts you to specify what type of widget you want it to be. In my widget I'm making, I want to allow the user to specify the widget height right after they select it.
How can I present that type of dialog? What does that entail? Any code snippets or tutorials or help anyone has to offer will go a long way.
Thanks!
Check here How to put multiple widget sizes in one apk?
The answers quote resources for both several widgets in one paackage and configuration page. Still, the size choosing is done not in the own configure dislog, but during add.

android emulator, get the widgets on home screen

i am currently working on getting the list of widgets that are present on home screen, i want to write a code that can create a list of all the widgets present on home screen.
googled it but no luck!
any help is appreciated!
thanks
There are dozens, perhaps hundreds, of home screen implementations. Perhaps one will have an API that will let you accomplish this, but there is no standard API for this.

Getting Home Screen Positions on Android

My question today relates to the android home screen and where it stores icon / widget positions. Specifically, I am interested in accessing the positions and sizes of any icons that are currently being displayed. I have, so far, been unable to find a method of retrieving the positions of other applications but i figure it must be possible in some way due to the presence of third-party home screen applications.
Ideally, I am hoping to query the positions of whatever is on the screen at the moment from a live wallpaper and adjust my rendering accordingly.
Thank you in advance for your time.
There is no way as far as I know of doing this. You may be able to contact the developer of the homescreen (if it's not the default one or senseUI) and have them expose an API to do this.
Third party homescreens draw all the icons themselves. They REPLACE the original homescreen, they don't just put a theme on top of it.
You should just create your live wallpaper and if the user wants to see it instead of homescreen icons or widgets, they can move them. It would be impossible to take into account all the widgets and crap on the screen.

Categories

Resources