Programming selectable Pebble Watchfaces (Time) - pebble-watch

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

Related

Change application opening animation in flutter

Below is the link of the natural behavior flutter desktop application shows in my application:
https://screenrec.com/share/wtcI6OFJ7L
Because this is the system tray application for desktop, to give the feel, i want it to open as:
https://screenrec.com/share/FfJknUReT3
How can it be achieved? The animation plugins in flutter that i have researched so far does not provide this functionality.
Since this is only about windows platform, I found a WIN32 API that may meet your needs. Follow this link:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-animatewindowHere is a YouTube video on it: https://www.youtube.com/watch?v=meIci7gOTLk You can call the api using win32 package in your flutter application. Here is the link: https://pub.dev/documentation/win32/latest/winrt/AnimateWindow.htmlAs per its documentation, the API enables you to produce special effects when showing or hiding windows. There are four types of animation: roll, slide, collapse or expand, and alpha-blended fade.

Configure platform page with platform specific options

We've begun evaluating Xamarin for a up and coming project involving both iOS and Android, with the overriding intention to produce a single UI layer (and some share code, obviously) (I'm also new to C#)
TL;DR
I've begun exploring Xamarin on iOS. I started with the Phoneword example and it worked well enough.
The first issue I found was running the code on the iPhone X, which I was able to solve by using MainPage.On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true); in the platform App class
While testing this, I noticed some issues with the ListView not scrolling properly (the core issue was actually with the platform padding).
I then used (MainPage as Xamarin.Forms.NavigationPage).On<iOS>().EnableTranslucentNavigationBar(); to enable translucent navigation bars (as we're targeting iOS 11+) and now everything appears under the navigation bar.
This is easily fixed in xCode and after some research I've found that I need to be using UIKit.UIViewController.EdgesForExtendedLayout Property, the immediate problem I'm facing is, the only "snippets" of code I can find are from the View is displayed under status bar in iOS 7 and EdgesForExtendedLayout doesn't help forum post.
Issue at hand...
The example solution snippets posted seem to be making use of a platform (iOS) specific solution. The problem is, I want to keep using the "cross-platform" code in the "platform" project and simply provide some custom configuration for the iOS platform which can apply these states.
I understand it could be possible to use a renderer, but this seems to counter-interactive, as I'd need one for both iOS and Android, where the platform page is doing just fine as it.
I understand that I could setup a DependencyService, but this seems annoying to have to include a specific "configuration" service just to solve this issue for iOS
I was hoping it might be possible to setup a iOS Page which would "override" some of the functionality of the platform page and would allow me to make use of things like viewDidLoad so I can apply the iOS specific configurations on a page by pages bases, so we could keep the platform page as it, but when running under iOS, it would provide me access to iOS life cycle of the actual view...
I've been trying to search the documentation and tutorials and haven't yet come across anything which would seem to do this or something similar (not to say there isn't one, but I'm just not finding it).

Xamarin Forms - Magnified UI Issue

My company has just started a new development project using Xamarin Forms. The app looks great on most Android devices but on certain devices the whole app appears magnified. The font is huge, icon resolution looks poor and even the device time, connection, battery life, etc looks magnified.
Has anyone come across this before and did you find the cause?
Appreciate the help!
Will
I think that the problem is related to devices performance and it's not related with the app if problem are battery life , connection and device time , but if you talk about some poor UI you need to check your resolution folder in android or if you use default android theme so it will not look good for old android versions
Before developing the android application you should consider the below things.
1. You should take care of DPI mechanism for different device - For UI issues
2. The child hierarchy level should not exceed 4 to 6.
3. You should not create the objects inside the ondraw method.
4. Don't layout the base at all the times.
5. Inside ondraw, don't use any looping mechanism.

ARCore unity debugging

For example I try to print out to the console and it doesn't, my script is attached to my main camera so we can rule that out and yes the script is active also, any help will be appreciated, right now what I am working on is to click on a certain part of my GameObject in AR and while my phone is connected to the computer I want to see the name of the certain part I clicked on in the console.
When you run the app on and Android device the log does not go to the Unity editor console. In order to see it you need to open Android Studio and then use the Logcat tab to see the device log.
Alternatively, you can run logcat from the command line
adb logcat.
More information: https://developer.android.com/studio/command-line/logcat.html
I have worked with ARCore and had the same frustating experience when it comes to debugging.
If you just want console prints, then use Log viewer which can catch and show them on Android too. (https://assetstore.unity.com/packages/tools/log-viewer-12047)
However, because I wanted more control and the ability to test and debug my game logic right inside the editor (without deploying to the phone all the time), I wrote a little plugin that allows me to do just that. This plugin simulates the operation of ARCore inside Unity editor. You can just hit play and ARCore will be simulated for you, so you can freely develop and debug your game logic. Moreover, you can then just build and deploy the project without changing anything, and ARCore will work like normal on your phone.
Using it is very similar to native ARCore, so you will not have much difficulty getting into it. It does not cover ALL features of ARCore yet, but it covers the basics. You can still use native ARCore for the rest.
You can find it here: https://github.com/VR-House/Eazy-ARCore-Interface
In current versions of Unity you can output logs from connected devices to Unity Editor. To do this, build your project in Development Mode and connect the Console to your device.
But I would recommend a more advanced way of testing AR in Editor with a plugin I wrote. I wrote it for my project and decided to make it into a plugin so everyone else can benefit from it.
AR Foundation Editor Remote plugin:
https://forum.unity.com/threads/ar-foundation-editor-remote-test-and-debug-your-ar-project-in-the-editor.898433/
I use debugging like this in C# script:
Debug.Log("Debug message and image name "+Image.Name);
To see this real time, I use Android Device Monitor (it's in Android's sdk folder, usually \Users\AppData\Local\Android\sdk\tools\monitor.bat. If device is connected, it appears on the devices list and it can be selected.
Or if I want to see the debug log in device, I put these lines in script:
private void OnGUI()
{
GUIStyle style = new GUIStyle();
style.fontSize = 50;
GUI.Box(new Rect(350, 0, 500, 500), Image.Name, style);
}
The Rect(350,0 is the position, 500,500 is the width and height of rectangle.

Display app icon on top of all window in android wear?

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/

Resources