referring to the post Any way to go directly to the "Enable Usb Debugging" page in Android?, I understand it is possible to simulate long tap on some quick setting tiles in Android. My question is, is there any way to simulate a short tap on the tiles? The one I am particular interested in is the work profile tile, which when clicking will enable/disable the work profile. Thanks.
Related
I need to add an additional button to the right of the system buttons, as shown in the photo. clicking on it will perform a specific action related to my app. Can this be done?
In general: No. There's not an API for this, only the OS can control the navigation area. Consider also the problems you'd run into with the variety of system navigation styles available, many of which, like gesture navigation, don't even have buttons.
Some apps fake things with screen overlays that reimplement some or all of the navigation and/or hide the system navigation, but you're going to run into all of the above issues doing so, plus the issues inherent in screen overlays, plus you'll have no guarantee that however you do it will continue to work into the future. I wouldn't recommend trying this approach.
My boss ask me to develop an app which have to be always on the user screen. I have to disable the three Android native buttons (back, home and history buttons).
How can I do that ? Create a custom launcher ?
Thanks.
In general you can't really do the things you mentioned above, at least there are no official supported APIs.
However, there can be legitimate use cases where one would benefit from this kind of applications, and Android provides something for this.
Have a look into Lock Task Mode and ScreenPinning.
How to show Driving/Cycling/Walking options in Android?
I know setting the profile will change the way directions are shown but I want to provide to the user direction options in the UI. Is it possible in Android like the picture below?
Directions options
It seems according to this question Unable to hide profile ui (Traffic, Driving, Walking, Cycling) that should be a profile switcher in controls. But I didn't find it in Android.
Thank you,
Hey thanks for checking out the Mapbox SDKs! Unfortunately, we don't have a pre-built Android UI for selecting direction options like the picture you linked - you would need to build your own UI in your app code. Sorry for the inconvenience
I am just creating a quick application in which there would be a floating icon on the home and the user have to just drag and drop that icon to the app and then it will show a alert window.
I know how to create the floating icon using some maths and windowmanager but don't know how should i get the name of the app on which the floating icon is dropped. I have thought of some ways to archive this, but don't know how to implement it....
By Getting the position of the touch when ACTION_UP Trigger is occurred and then checking what's the app is by comparing it with its position.
But there is a problem in this way, because i don't know how to get the position of launching icons on the homepage.
Help me to archive this task. Please tell me How can i get the position of launching icon(like facebook, google play) on the homepage . Also it would be very helpful if you can suggest me other ways of doing this.
I know this can be done because winners of techcrunch hackathon have
made the same application. A short video of this can be found here, in
case you might want to look,
http://techcrunch.com/2015/09/20/disrupt-sf-2015-hackathon-winners/
i don't know how to get the position of launching icons on the homepage.
That is not possible in general, outside of perhaps the accessibility APIs.
Please bear in mind that there are > 1 billion Android devices in use. Those span thousands of device models, representing hundreds or thousands of home screen implementations. Users can also install third-party home screen implementations (e.g., from the Play Store) and use those.
There is no requirement that a home screen have "launching icons" that meet your expectations. I could write a home screen whose app launcher consisted of text hyperlinks, for example. Or, I could write a home screen that is designed to be used by an external keyboard, where launching apps is triggered by keypresses rather than icons.
There is no requirement that a home screen have some sort of API that, given some X/Y coordinate on some arbitrary piece of that home screen, would tell you an app that is represented by something visual at that X/Y coordinate.
You are welcome to try using the accessibility APIs to find details of a widget at the desired X/Y coordinate on the current screen. However, from there, you would have to make guesses as to whether or not that is a launcher icon and, if so, what app it would represent. This approach is likely to be unreliable, except for specific scenarios that you have hard-coded. Hard-coding is what the team you cited appears to have done, based on the prose on the TechCrunch site.
I'm currently working on a map/navigational project for Android, and I chose OpenLayers because it claimed to support mobile development and the examples worked well on my Android phone.
I made a basic map prototype with one marker, a popup from the marker, and a layer switch control. All of this works as intended on both my PC and my Android, except for one weird issue with Android. I'm the .html file and all dependencies through a WebView in my app, and there are some weird issues coming up. For one, whenever I tap something like my marker or the zoom controller, an orange box appears briefly around it, and sometimes it doesn't register the tap.
To clarify, I have touch navigation enabled on my map, and all events for the popups are on-touch and working for the most part. But the orange boxes and occasional failure to register a tap are really ruining any degree of polish that the app has. Just wondering if anyone else has encountered this at before, and possibly has a fix?
whenever i see this type of behavior, i.e. orange crisscrossed boxes in openlayers, it is many times caused by failure to locate icon graphics files. try creating a marker whose icon file does not exist where it should and see if that is the "orange box" that you describe.
if so, then you should check any broken links (mouseovers, especially).