Test Android Wear apps on phone? - android

Interestingly enough, I noticed that when developing, I can choose to run a Wear app on the phone instead of a Wear device. It looks the same--just huge, of course.
Based on https://plus.google.com/+AndroidDevelopers/posts/QhWQArNDfS3, I gather I could use ADB to make the phone screen small enough to do a fair imitation of a rectangular smartwatch...
But what about testing for round Android Wear devices? Is there something I can do to the phone (or a rectangular Android Wear device, for that matter) to make it show as a circle (and even better, identify as a round device to Android Wear) in order to test the round interfaces?
Yes, there's always cutting a round hole out of a page and holding that over the device, but that's obviously far from ideal.

You can test your app on a round emulator. Here are instructions how to do this: https://developer.android.com/training/wearables/apps/creating.html
EDIT:
About round and forcing round on a square device: you can try to pretend that the device is round, but it's a little hacky and ugly.
In your Activity you need to implement inset listener and then use reflection to change WindowInsets.mRound field. Then dispatch the insets further down the hierarchy. This will trick your views to think that the device is round.
Check this article about handling square and round: http://gruszczy.blogspot.com/2015/03/handling-round-screens-using.html It describes how insets with the information about device display type are delivered.

Related

How to make app UI to work 100% same on all devices?

How to make sure that my App's popup or text appears exactly how I intended it to appear in all screen sizes? I want the aspect ratio of the popup to appear same and all the text that appears at the time of designing the popup to be same in all the devices.
Imagine an image who's size and content will be same across devices. But for some reason I can not use image here, the requirement is to use popup with text and butto. I dont want any screen to cut the popup or make the text of the popup disappear or turn to crap.
I can not do testing with one device at a time as I read on a site that there are over 10,000 android devices :|
Is there anyway or any tool part of Android Studio which can like quickly draw outlines of all the phones screen sizes to help me understand what aspect ratio is right for my popup?
Im a noob so my question may not make sense to you so please bear with me.
Unfortunately it's going to be nearly impossible to get things to appear 100% the same across all devices and browsers – Android runs on all sorts of devices and there are probably hundreds or thousands of different possible screen sizes, in addition to browser and operating system quirks. Start with identifying specific devices and screen sizes you wish to support. See Android's screen compatibility overview for some good information on this topic.
If possible look at user analytics to narrow down the most common devices, operating system versions, and browsers, then test against those.

Android Settop box Display viewport only at the right bottom of the screen

I have a Geniatech ATV1220 android set top box running android 4.2.2 and am using an arduino with motion sensor connected to it to modify content on a website when someone is in front of the sensor via NodeJS.
This works great, but what I would like to do is to manipulte the complete system viewport of the android system. For example if someone steps in front of the sensor, the whole system should be displayed in a reduced size like 1/4 original at the bottom right side of the screen while the other area should just display black or basically nothing.
It is really hard to find something because of the pretty common keywords like display, viewport, size and so on. I could probably do it dependent on individual applications but I also want to use it in third party applications, which I cannot modify.
Currently I am sometimes using commands like this:
echo 1 >/sys/class/graphics/fb0/blank
to modify the actual content that is displayed, in this case it all turns black/blank and I wonder if there is a similar way to achieve what I want to do. Any help is greatly appreciated.
What worked in the end was using the Xposed Framework and installing "One-handed mode" like explained here: How to get a one-handed mode on almost any rooted Android device.

How to add padding to the android screen?

I want to add black padding (a thick black border) to the android screen such that every app is displayed with the padding around it. I know how to do this for my app but how do I do this such that when my app is running in background the display is padded?
I don't believe this is possible unless you're willing to create and run a custom ROM.
Thankfully, this is not possible for the average non-ROM third party Android developer.
The screen on mobile devices is actually very limited, and when programming for the mobile environment, you have to learn to get away from the windows metaphor used by traditional desktop PCs.
On the other hand, may be your app could pretend it is running in the background, but still stay in the foreground with its transparency enabled. And perhaps if you can't do something, may be you can find a way to fake that something for your users.
Also, note that the default home launcher is capable of doing something similar to what you want, but only for widgets. And if being able to run widgets is sufficient for you, perhaps you could write your own launcher application that can embed widgets.

Part screen Android application, always on top

Hello fellow programers!
I'm trying to figur out if it is possible to develop an application that:
Does not cover the whole screen, and hence, can interact with the application or OS behind.
Always is on top of the other application.
I'm thinking something along the windows-forms on a PC, that can be resized and moved around.
Also, I'm using API 15, but could if necessary change to API 17.
Thanks!
Sony use something called small apps https://play.google.com/store/search?q=small+apps&c=apps, try researching this? http://cdn7.staztic.com/app/a/1240/1240459/small-app-tutorial-184485-0-s-307x512.jpg

Smaller/Customized In Call DialPad for Android (Samsung S3)

Preface:
I moved to the S3 from an old flip phone with a small keypad with which I could easily type things like a telephone banking passcode or the like, shielding one hand with the other as I typed.
With the S3 smartphone, the dialpad is huge, making it hard to shield one hand with the other, and the required finger movement is too great and too easily observed.
Question:
Is there any way to either:
(A) Shrink the size of the "in call" dialpad used by the S3, through any means, even a screen scaler or spliiter, or
(B) Achieve a similar end using a custom dialer?
If I rotate the phone to landscape mode, I do get a nice sized, smaller dialer initially, but once I enter the call (say, voicemail), it jumps back to portrait mode and the stock dialer. From the research I've already done on custom dialers, it seems that they don't work once a call starts, so I'm not too hopeful.
Is the only solution to root the phone and hack it very deep? (Obviously, anything can be done with a rooted phone if you know what you're doing.)
Unless the phone provides such a setting, not really. Generally you cannot change/influence apps other than your own, and the only proper way to do this would be to right a custom dialer and replace the system one. A slightly easier way might be to replace the dialer keypad images with custom ones with smaller font, etc. and just repackage the app, but that won't change the overall layout.
Much better: don't use telephone banking, use their website, smartphone app, etc. (if available, if not bug them to create one :)

Categories

Resources