I am developing an wear app, i want the app icon to be display on top of window
above the watch face. I have tried using WindowManager but failed to get the
result.
WindowManager.LayoutParams params=new
WindowManager.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
params.gravity= Gravity.CENTER|Gravity.CENTER;
params.x=160;
params.y=160;
windowManager=(WindowManager)getSystemService(WINDOW_SERVICE);
windowManager.addView(mfloatview,params);
my question is it possible to add an floating app icon in android wear?
I'm not sure if this feature (Display app icon on top of all window) is available. But you can try checking the documentation - Watch Face Complications.
A complication is any feature in a watch face that displays more than hours and minutes. For example, a battery indicator is a complication. The Complications API is for both watch faces and data provider apps.
Just like this:
Since you are using Android Wear 2.0, Complication API will be available for use.
Hope this helps.
I tried this one and works for android wear also...
apply same concept to wear, it works
http://www.androidhive.info/2016/11/android-floating-widget-like-facebook-chat-head/
Related
I would like to create a zoomed/scaled UI as in Screenshot 1 below:
Keep in mind that I am NOT using the Zoomed option in iOS Display Settings.
So, somehow it is possible to make an app look like it is scaled/ zoomed.
Are such apps created with an old version of XCode and that's why their UI looks scaled or it is some sort of a technic?
Screenshot 1 (taken on iPhone 6s Plus 1920x1080)
Screenshot 2 - Normal app.
hi by default the OS will scale your app EITHER because it is an iphone app running on an iPad or because AX is on or it is a very old app where the LaunchImage does tell ios it doesnt really support the screen size.
you cant really say 'hey ios, scale my whole app for me'
that said, you can DRAW 'scaled' by applying a transformation to your root window/view.. dont know if there are issues with scaling the whole hierrachy but it technically works
i just know the bug with facebook sdk its when you call your fb friends list in the app and it scales all the ui after that window xd
Google play console wants me to add some 7-inch tablet screenshots in order to make the app easily accessible to tablets. But I don't have any tablet. Don't understand what's the problem. I have made screenshots in the final phase of development, testing the game in the Unity editor. I suppose these .png images are as good as if they were made from a phone. I don't even know how to make screenshots from a phone.
Is there a hidden feature to identify a screenshot as being made from the 7-inch tablet? Why don't they simply state the image resolution they want for the tablet "screenshot"??
Actually, it doesn't matter what resolution your image is. Just upload the images to that section, the purpose of that section is only to let your users have a first look of what your app looks like before they install it. If you don't intend to make your app for Tablet, just let that section empty, upload images only to Phone's section.
If you are using an Android phone such as Samsung, I would recommend you have a look at Settings/Advanced Features/ Smart Capture (turn it on). Then you can swipe your screen to take a screenshots (it has a tutorial there)
I have started with Pebble watchfaces programming on my Pebble Time, and although the watchface displays fine, it is loaded as an application, not a watchface, in that it is available in the list of applications, not the watchfaces sub-menu. I found that there are watchface online development sites that will produce actual watchfaces that get installed as such.
What is the difference ? What would I have to add to the code to make it a watchface ? Or manifest file ? The samples with the SDK were all for applications, not watchfaces.
Thanks :-)
Watch apps can do more things than watch faces can. For example, watch faces can't respond to button clicks. The SDK (CloudPebble or the C SDK) generates different code for the two types of programs. So you have to tell it what you are trying to build.
In the appinfo.json file there is a section like
"watchapp": {
"watchface": false
},
Change false to true and it should start showing up as a watch face
Does anyone have any information to share regarding gesture detection using wrist movements (in contrast to swipe movements on the touchscreen) with Android Wear?
Is there official support for this in the API? If not, do you think this can be enabled via custom ROMs?
Considering Android Wear is... well, Android, and Android has all the API functions to get data from the accelerometer of an Android based smartphone (and lots of helpful development sources), I assume it wouldn't be too hard? Or am I overlooking something?
Someone said the following at http://forum.xda-developers.com/android-wear/development/gesture-detection-using-wrist-t2936656
Use asus remote camera app for android wear. If you twist your watch
it will take a picture with your smartphone camera!
To which I replied:
So wrist gesture detection is perfectly possible it seems? But can you
or anyone else give me some additional background about Android Wear:
Should I see Android Wear as a simple extension of the Android API?
By which I mean: can I utilise all the Android API functions related
to interpreting smartphone/tablet sensor data, provided the smartwatch
has that sensor? (e.g accelerometer)
Since I was looking in this
particular section related to Wearables (Remove the spaces: developer
. android . com/training/building-wearables.html ) and I couldn't find
any information about wrist gesture detection.
Is that simply because
everything else from the Android API is automatically also applicable
to smartwatch development?
(As one can tell, I'm quite new to mobile development.)
So far no answer. I'm now asking here in hope I get an answer...
Wrist gestures were added in Android Wear 5.1 however at the time of this response, Android Wear 5.1 is only available on the LG Watch Urbane. This update is expected on other Wear devices in the upcoming weeks
Two common wrist gestures are interpretted by the system as swipe up/down. You change the speed of the flick either away or towards you.
If you flick your wrist away from you quickly, then back slowly that will cause a scroll down.
If you turn your wrist slowly away then flick it quickly back towards you, this will scroll up.
You can see the wrist gestures in action here - https://www.youtube.com/watch?t=14&v=_R0qbB4hVbU
You can use the IBM Wearables SDK for Android
to record and recognise all kinds of gestures not only wrist
for more info:
https://github.com/ibm-wearables-sdk-for-mobile/ibm-wearables-android-sdk
Disclaimer: I am the author of the articles/code described below.
I just created an Accessibility Service that does exactly what you are describing: it gives you the ability to completely control your smartwatch using wrist gestures.
I created it for my own use (I can only use one of my hands, the one in which I wear the watch) and I can fully control it using wrist gestures.
https://jsalatas.ictpro.gr/handsfree-wear-a-wrist-gesture-input-method-for-android-based-smartwatches/
notice that in the current phase I'm not sure if the model that recognizes the wrist gestures can generalize or if it just recognizes my wrist gestures only.
How to implement such appearance for notification card using Android Wear SDK?
Demo video — http://youtu.be/tKoQatxG0_8?t=26s
It has the same custom layout in preview and active mode. But I cannot achieve such behaviour using setDisplayIntent and related API for creating custom layouts. I checked samples of wear apps from SDK, it also has different views for preview and active mode of custom layout notifications.
Oh no!
Right now it's hidden API, so Google can make such appearance for standard apps, but other third-party developers are out of the board.
Confirmed by +Wayne Piekarski — https://plus.google.com/u/0/+BenoitBoDLubek/posts/2o4SVBhWg5z
So the answer is impossible at current moment.