I'm afraid I've never owned an android device and only have the emulator to work with.
I am building a widget (>= API 14) and would like to test it on the homescreen. However, I have no idea how to actually create my widget! A long press on the homescreen just shows the "Select wallpaper from" popup.
I can see it in the list when I use the Widget preview app but as part of my testing I want to test real functionality. How do I get the widget to appear on the homescreen?
How do I get the widget to appear on the homescreen?
Open your launcher. Keep swiping right-to-left to get to the app widgets. Long-press on an app widget to add it to the home screen.
Related
I realy dint know how this screen is named :/ i called it after the message it shows when no app is running "your recent screens appear here". It basicly shows all apps currently runnning on the device.
So you know what im talking about here screens (sry big and spammy) with and without running apps. The second screen also shows the google widget i want to get rid off.
Is there a way to adjust the "your recent screens appear here" screen on Android phones and Tablets?
Is there a solution without using the Device Administration API?
If the Device Administration API is required - where can i find a documentation/tutorial that teaches me how to do it?
Currently we created a Launcher App for Android in order to deny access to most other Apps. It only shows our app and the android settings.
Unfortunately there is an Google Widget on the "your recent screens appear here" screen. It is the same widget shown on the Home screen, when using the default launcher. When i disable the Google Application the Widget disappears properly from the Home screen, but leaves a "Couldn´t add widget" message on the "your recent screens appear here" screen.
Currently we are looking for an easy solution to get rid of that widget.
there is actually no way to customize this page without changes in the OS.
still i found a workarround to get rid of the widget.
when starting an App i add a flag that prevents it from beeing displayed in the recent apps screen. this way the user only sees the empty recent apps screen which has no widget.
Intent i = manager.getLaunchIntentForPackage(apps.get(pos).name.toString());
i.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
HomeActivity.this.startActivity(i);
Is there any way to retrieve position/location of android widget which is activated in android device, like whether its on lock screen, home screen etc. In lock screen is it the main widget displayed.
On Android 2.1 and later, with some select home screens, you can find out where an app widget resides when it is clicked via getSourceBounds() -- this value is attached to any Intent you spawn via a PendingIntent via setOnClickPendingIntent().
However:
this only works on Android 2.1 and newer
not all home screens might do this, as this is part of the Launcher code IIRC
the coordinates are in pixels IIRC
there is no way to interrogate the home screen to find out this information any other way, since there is no API to interact with the home screen
Hence, I think your stated goal ("Depending on whether it's on the top of the desktop or at the bottom different layouts for the widget will be chosen") is impossible, I think.
I have problem with android widget(it shows battery state). If You have this widget on home screen and you will update it from android market there is a problem with working. Widget doesn't work until battery state will not change. I don't know how to fix it. Is there any function, which is started (after installation of new version ) in appwidgetprovider or service?
Sometimes you have to restart the program launcher to get a widget to update after installing it from Market.
Go to Settings → Apps → Running.
Choose "Launcher" (this may be named differently depending on your version of Android; you may also have to touch "Show Cached Processes" to see it).
Touch "Stop".
Now touch the Home button again, and go back to your widget chooser
(pre-Android 4.0, long-touch the home screen; Android 4.0+, touch
the application launcher button in the middle of the bar and select
the Widgets tab).
You should now see the widget. Add it to your home screen as normal.
Is there a way of creating a Car Home shortcut that acts like a app widget where I can send dynamic updates like an app widget?
For example, a car home shortcut that displays the current speed.
No. It is not possible to dynamically update the shortcut icon for an app.
You'd have to make a custom widget that looks like an app icon. This would be very difficult, as there are many different Android launchers out there (e.g. HTC Sense, Samsung TouchWiz).
See Android Home Screen Widget (icon, label - style) for more about this process.
I am developing an android widget to show in the homescreen. Now, I can show the widget in main homescreen. Now, is there any way to show that widget every homescreens (in most of the devices there are several homescreens where we can swipe to left or right from the homescreen)?
Only if the user manually adds your app widget multiple times.
These depends on entirely on the home screen app. Some home screen apps could certainly implement a UI to have a widget like this. The launcher that is part of stock Android does not have such a facility.