homescreen

Homescreen widget, listView shows “Loading”

让人想犯罪 __ 提交于 2020-01-02 00:54:34
问题 To start off, an image says thousand words: This takes place although getViewAt is called 4 items as my cursor size is. Here's the code: public class WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { System.out.println("Factory"); return(new WidgetViewsFactory(this.getApplicationContext(), intent)); } } The widget provider: public class WidgetViewsFactory implements RemoteViewsService.RemoteViewsFactory, LNTConstants { private

How to redirect User to default launcher in an android app?

依然范特西╮ 提交于 2020-01-01 16:49:39
问题 It's been now a long time since I try to figure out how to develop a android unlock screen app working with an NFC authentication. I am working with a Nexus S. After several researches on the Internet, I came to the conclusion that replacing the lock screen as a third party app is just not supported right now and that we need to modify the platform to do a decent implementation. This is the reason why I developed an home screen app that give the illusion of an unlockscreen app. But my problem

Android emulator shows home screen upside down mirrored and locked (why?)

北战南征 提交于 2020-01-01 09:19:30
问题 I am starting the emulator from the command line to try and speed it up a little, with these arguments: emulator -avd foo_hvga2 -cpu-delay 0 -no-boot-anim Here is a verbose dump of the emulator output.... thank you for any clues emulator -avd foo_hvga2 -cpu-delay 0 -no-boot-anim -verbose -debug all -show-kernel emulator: found SDK root at /Users/foobear/android-sdks emulator: Android virtual device file at: /Users/foobear/.android/avd/foo_hvga2.ini emulator: /Users/foobear/.android/avd/foo

check if user has already installed PWA to homescreen on Chrome?

删除回忆录丶 提交于 2019-12-31 09:23:48
问题 I'm trying to create an "Add To Home Screen" button on my progressive web app, as described in Chrome's documentation. I'm generally following the prescribed pattern, where I have some hidden button which is displayed when Chrome's beforeinstallprompt event fires. I capture the event once it fires, and then use the event to begin the native install dialogue once my own install button is clicked. The sample code is below: let deferredPrompt; window.addEventListener('beforeinstallprompt', (e) =

How to remove application shortcut from home screen on uninstall automatically?

依然范特西╮ 提交于 2019-12-30 08:51:58
问题 I'm developing an application that should add its shortcut to home screen after installation and remove it after the application is being uninstalled. The application will be preinstalled on the end user device, but still should have an option for uninstall). The task looks very simple but I've faced lots of troubles implementing it. What I have done: Add shortcut to the home screen using com.android.launcher.action.INSTALL_SHORTCUT on app first launch or on newt device reboot. MANUALLY

Check if web app is added to home screen on Android

纵饮孤独 提交于 2019-12-29 07:37:07
问题 I have a web app and on the Android I would like to display an alert describing how to add my app to the home screen. (Add it to "Bookmarks" and then "Add it to home screen" or "Add to shortcut in Home"). Then a icon will be displayed on the screen that opens my app. But off course I only want this to show if the app is not added to the home screen. Does anybody know how to do this? Any input appreciated, thanks. 回答1: Yes, you can. While technically a page open in Chrome browser tab can't

Get a list of every launcher in Android

孤者浪人 提交于 2019-12-29 04:54:29
问题 In my application I want to show a list of every available launcher (for homescreen) on that specific Android phone. Is it possible to get some kind of information from Android OS and how do I make this call? Thanks! Kind regards Daniel 回答1: You can query the list of ResolverInfo that match with a specific Intent. The next snippet of code print all installed launchers. PackageManager pm = getPackageManager(); Intent i = new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_HOME); List

Check Widget is Placed on Android Screen

江枫思渺然 提交于 2019-12-29 04:46:48
问题 Can someone tell me how to check that my widget have been placed on the homescreen? I have some code in my app that should run only if the widget is placed on the homescreen. 回答1: You need to store that information yourself. I usually use the application preferences, but you could use anything. Generally widgets use services to communicate, so your code that does stuff is likely in a service, but using the preference allows any portion of your app to access this. In your widget class that

Install home screen widgets progrommaticly

前提是你 提交于 2019-12-29 02:10:31
问题 I have main activity window in my app, which displays three icons on it, also there are 3 home screen widgets in this application. is there a possibility for long press on one of the icons in the main activity, to do the same behavior as when you install the program shortcuts from the application menu when dragging shortcuts on the desktop?(for example this video: http://www.youtube.com/watch?v=DQ37cASti4k) or the user to have to go to home screen \ menu \ add \ widget?? 回答1: The user will

can not launch home from android 4.0

核能气质少年 提交于 2019-12-23 23:05:22
问题 I want to launch Home Screen From my application for that I used Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); I also follow this thread Now I am having problem to launch in ICS(4.0). Problem is that I can't launch home screen while I am in some other application(to check this I created a thread in my app which will sleep for 5 sec and fires the intent so that I get time to go in