Watchface complications - Wear OS Q&A, Help & Troubleshooting

Hello All,
I am developing a watchface in Android studio in java targeting Android 12.
I need to add complications data on my watchface. I want that complication should be set to a default system complication without requiring user to configure it.
I also found it challenging to handle double click/touch gesture on the complications in wear os.
Is there any good and complete tutorial/guide/sample for adding complications on wear os watchfaces in java?
I found one sample on the android developer website but it is not sufficient.
Any help would be much appreciated.
Thanks all.

Teste

salwan.hemant said:
I want that complication should be set to a default system complication without requiring user to configure it.
Click to expand...
Click to collapse
I'm not sure that is even possible? The whole complication system gets data from the system. Your watch face only gets to receive the data the user has allowed via the system dialog your app invokes.
salwan.hemant said:
I also found it challenging to handle double click/touch gesture on the complications in wear os.
Click to expand...
Click to collapse
I made a watch face, but ended up not using the system's support for drawing complications, rather I grabbed the data and did the drawing myself. That also made it trivial to handle clicking, since there isn't anything else to capture events.
The example I link to below suggests you can just not pass tap events to the drawable (if it's not doing what you want). I'm going to guess the standard thing is just to invoke the pending intent, which you can do yourself.
salwan.hemant said:
Is there any good and complete tutorial/guide/sample for adding complications on wear os watchfaces in java?
Click to expand...
Click to collapse
I found this project to be useful...
GitHub - android/wear-os-samples: Multiple samples showing best practices in app and watch face development on Wear OS.
Multiple samples showing best practices in app and watch face development on Wear OS. - GitHub - android/wear-os-samples: Multiple samples showing best practices in app and watch face development o...
github.com
But since I was targeting an older watch (stuck on Android 8) and using Java, I had to go back to a much older version of the code.
git checkout 5c2e340

Related

[REPO] The library thread

Hello everyone,
Based on the release of the new forums here, and the seemingly enthusiastic response, I have decided to create a repository of libraries that are useful to Android developers.
Libraries:
AChartEngine : This is a library that lets you make and display all kinds of charts, from line to bar to scatter charts. A very good solution, should you need charts.
Uses: Well... Charts!
Made by 4ViewSoft.
ActionBarSherlock: This library will help you in maintaining an easy-to-use and consistent UI across all version of Android above 2.1.
On Android 3.0+, it will use the native ActionBar, and below that, a backport of the 4.x native ActionBar has been used. Note that this is not needed if you want to target APIs that support the AB natively.
Made by Jake Wharton.
aFileChooser: The basic version of Android File Chooser, it features somewhat less graphical hints about, for example, your current folder, but does provide a somewhat cleaner UI.
Uses include a simple file chooser for opening a file from a specific folder.
Made by Paul Burke.
android-hybridchoice: A ListView that lets users open a single list item, while also letting you select one or more other items. This way, you can (for example) view a mail while selecting others to throw away, instead of having to do that separately.
Uses: Making any app with items that have detailed info in a ListView that can be changed.
Made by Kiran Rao.
android-lockpattern: A library for you to include a lock pattern in your app. It was adapted straight from Android source code, and is very useful for keeping data secure.
Uses: Root apps, apps with sensitive data or other apps that could hurt one's phone.
Made by Hai Bison.
Android FileChooser: Helps you in letting the user select a file. A visual GUI is made available to you and the user, through which the user can navigate to select a folder.
Use cases: A file explorer, a downloading action, moving/copying files, etc.
Made by Hai Bison.
Android Maps Extensions: A library that extends a number of Google Maps API v2 features. It features things like marker grouping, where it won't display individual markers when there's a lot of them together.
Can be used in an application with a Maps View, to make it clearer and easier to understand.
Made by Maciek G
Android Proxy Library: This lets you provide an easy and better (than Google's) solution to the Android Issue 1273 (OF DOOOOOOOM!). It allows you to easily get the proxy settings of an Android device.
Uses: You know, getting the proxy settings.
Made by Marco Pagliari.
BetterPickers: A cool library that implements the Android 4.2 Clock time picker for you to use in your own apps as you please. It is a very nice way to keep your app Holo-themed, and it continues the push for a consistent UI in Android.
Among others, uses include clock and calendar apps.
Made by Derek Brameyer.
Build.prop Tools: A library to get access to the properties in a device's build.prop, which include its codename, Android version, CPU name and others.
Uses: Having to edit or otherwise get access to certain build.prop entries in your app, for example to display system info.
Made by Jonathan Haylett.
Cieo: A library that lets you animate text. It is currently in very early Alpha stages of development, but does work.
Uses: Word games, for example Hangman, where you can add a little extra to make it more dynamic.
Made by Igor <LastNameUnknownException>.
DroidParts: This library helps you add the most used parts of Android apps without problems. It can help you add a number of more complicated parts that have been modded to be simpler, like an ImageFetcher and an improved ASyncTask.
Uses: Just about every app can do this. Easier everything!
Made by Alex Yanchenko.
droidText: A PDF creator library. Should you need to create a PDF easily, this is the library you want!
Uses include parsing user input and saving it to a PDF file for later use, or to send (i.e. via email).
Made by Markus Neubrand.
EventBus: This helps you tie together Activities, Fragments and background threads. It eliminates the need for overly complex listeners and interfaces, to make your life a lot easier.
Uses: Apps with background threads, Activities and/or Fragments working together.
Made by Markus Junginger.
FlipView: A FlipBoard-like animation to use for scrolling. Give your app a little extra eye candy, when you have multiple pages to scroll through.
Uses: News readers and other apps that separate content into clear "pages".
Made by Emil Sjölander.
GAST (Great Android Sensing Toolkit): A library to help you use an Android phone's internal sensors. It will help you control many sensor, including NFC, the camera and the accelerometer.
Uses: A diagnosing app, or one that uses certain sensors for controlling an app feature.
Made by Greg Milette and Adam Stroud.
GoogleDateTimePickers: TimePickers done right. A beautiful replacement for Google's standard DatePickers and TimePickers, It is designed with the Holo style in mind, and makes it much, much easier to select the date and time of your liking.
Uses: Letting the user pick a date or time, e.g. when setting an alarm.
Made by Mirko Dimartino.
Hansel And Gretel: This allows you to visually display the Fragment Stack. When you open a new Fragment, it is added to a 'tower' of Fragments, from which you can also pop (remove) the top one. This library allows you to visually represent that Stack in your app.
Uses: If, for example, you travel through multiple Fragments within one Activity, you can show which Fragments the user has gone through.
Made by Jake Wharton.
HoloEverywhere: A library that backports the Holo UI design to earlier Android versions (like ActionBarSherlock does for the ActionBar). It uses the Android 4.1 Jelly Bean assets and makes them usable on Android versions 2.1 Eclair and up.
Uses: An application that needs Holo on all platforms it runs on. Be aware that it might disrupt the UI consistency for the user, so think about that before including this in your app.
Made by Sergey Shatunov and Waza_Be.
Inscription: For displaying information about your app to the user. It contains a ChangeLogDialog and a WhatsNewDialog, where the former displays more detailed information (version numbers, etc.) than the latter.
Useful for showing a dialog after the user updated your app, without having to write too much code.
Made by Martin van Zuilekom.
JacksonInFiveMinutes: A library to help in parsing and processing JSON, offering different ways to do so: A streaming API, a tree model and data binding.
Of course, you can use this anywhere to parse JSON data (Twitter apps, for example).
Made by Tatu Saloranta (?).
JazzyViewPager: Makes it easy to add a nice effect when changing pages with a ViewPager. Easily done: just add it, change some references and pick an animation!
Uses: Spicing up your app's animation portfolio, when using a ViewPager.
Made by Jeremy Feinstein.
ListViewAnimations: An easy way of animating your ListView items easily and nicely, to give your app that little bit extra.
Uses: To spice up any ListView that needs more fancies.
Made by Niek Haarman.
NumericPageIndicator: A ViewPagerIndicator 'plug-in' that lets you easily display which page you're looking at. For example, show "page 2 of 20" at the bottom of the page.
Uses: Letting the user know which page they are on.
Made by Manuel Peinado.
OrmLite: A library that simplifies database interaction in Android apps. It is designed to work with multiple database systems, including SQLite and MySQL.
Uses: Database creation, management in Android. Various DB systems supported.
Made by Gray Watson.
osmdroid: An almost full, free replacement of Google's MapView. It includes numerous functionalities, like a number of on- and offline tile sources.
Uses: To add a map to your app, and easily use functionalities surrounding it.
Made by a number of non-disclosed awesome people!
PDFViewer SDK: A free PDF viewer library that works well. However, it does have a watermark on the screen, and you'll have to pay to remove it.
Uses are obvious: Building all kinds of PDF viewers!
Made by GEAR.it.
PlayView: This helps you in creating a Google Play-like style in your UI, by extending the CardsUI library (which can be found in the PlayView thread).
Good to use in an application where you want a nice smooth UI, with a modular and changeable look and feel.
Made by Androguide.fr and GadgetCheck, among others.
ProgressButton: A nice library that shows you the progress of a download in the same button that you press to start the download. See Google Music for a working example.
Comes in handy when there's a list of items to download, and you want to facilitate easy downloading and keeping tracks of those downloads.
Made by Prateek Srivastava, based off of Roman Nurik's examples.
PullToRefresh: Expand a Listview (multiple versions are supported) with the ability to refresh its content upon pulling down at the top.
Uses include social media clients, lists of other network-based updated items (orders, for example).
Made by Chris Banes.
Remote Metadata Provider: Get system information about, for example, which music is playing on your phone. This could help you implement lockscreen music controls for your app.
Uses: Lockscreen music controls, for example.
Made by XDA member Dr.Alexander_Breen.
RoboSpice: A library that makes long-running asynchronous tasks easy. For example, it offers caching (very useful for orientation changes).
Uses: Any app that implements an ASyncTask, especially when it is a bigger and longer-running one.
Made by Octo Technology.
RootTools: This library will make it very easy for you to gain superuser access and execute commands based on that. This way, you can, for example, move and replace files anywhere on the system.
This is especially handy when you are making a sort of backup app, or when you need the ability to do things that aren't possible without root access.
Made by Stericson.
ShowcaseView: This is a library that lets you highlight certain areas of the screen. Just like the Android launcher on first launch (or YouTube), it will allow you to tell the user how to interact with what, and what it does.
Uses: Clarifying certain UI elements and their purpose to the user.
Made by Alex Curran.
SlidingMenu: This lets you include a menu that slides into your app from the side, like the YouTube app has it. There, you can add a whole hosts of options and actions that don't fit or belong in the ActionBar. SlidingMenu also lets you customise the menu. The new Android supportv4 library version, revision 13, also has a basic version of this.
Uses: Menus with additional items, like channels in the YouTube app, shortcuts to your app's settings, etc.
Made by Jeremy Feinstein.
Spring For Android: A library that helps you integrate some features easily. For example, it can simplify using REST in your app.
Uses: Whenever your app needs REST of auth support.
Made by GoPivotal.
StandOut: A library that enables you to make your apps float! Basically, you can make any app you want float. Look in the thread for numerous examples!
Useful when you are making an app that is also used parallel to other apps, like a calculator or note taking app.
Made by Mark Wei.
StickyListHeaders: This is a great way to help you order alphabetised lists in a clear and very recognisable way. The current letter which you are scrolling through will be shown at the top of the screen, for as long as the first letter of the top item on the screen starts with that letter.
Use cases are, for example, scrolling through songs, email addresses, names and articles.
Made by Emil Sjölander.
Sugar ORM: An easy way to use SQLite libraries in your app. It takes away some of the more complex and annoying tasks of database management.
Uses: Managing and querying SQLite databases in your app.
Made by Satya Narayan.
UpdateChecker: This library is a quick and easy way of making sure that users know about updates to your app. It will show a Dialog every 5 times (by default) the app is launched, informing of an app update being available in the Play Store.
Uses: Making sure people update your app. It is handy in just about every app.
Made by Pietro Rampini.
ViewPagerIndicator: This library emulates the multiple ways of showing tab locations without using the ActionBar. This can be used to replicate the Play Store, older Google+ versions, launcher-like indicators and more!
This library is always handy when using tabs, but without wanting to, for example, sacrifice too much screen real estate to use the ActionBar.
Made by Jake Wharton.
Sites, etc. collecting libraries:
Android Libraries provides a big list of libraries for all sorts of tasks, including graphics engines.
Android Snippets is a collection of little snippets of code to help you in navigating some commonly (and less commonly) seen challenges in Android development.
Android UI Patterns for all kinds of UI libraries, with a nice app to go with it.
AndroidKickstartR is a web-based tool for quickly starting an Android app, including a number of (library) options to help ease some of the pain of adding extras. Fair warning: this seems to include older versions of some things, double check the generated project.
AndroidViews for multiple nice UI-based libraries that help make your app look and work awesome!
DevAppsDirect is an app with examples of libraries. Test without setting up a whole new project!
ramdroid77's Google+ community for GitHub-based libraries.
Libraries for developers: A nice little app that has a collection of libraries available to developers.
Also make sure to spread the word about and contribute to this repo!
Have fun,
bassie1995
very helpful thread! thanks mate
roottools is also a very helpful library: http://code.google.com/p/roottools/
nikwen said:
roottools is also a very helpful library: http://code.google.com/p/roottools/
Click to expand...
Click to collapse
Forgot that one as a big one. Shame, since I used it . Will add in a sec.
Sent from my Nexus 7 using Tapatalk HD
I used this library to include a file-chooser in my App:
https://code.google.com/p/android-filechooser/
Click to expand...
Click to collapse
and forked this, that acts basically the same:
https://github.com/dentex/aFileChooser
Click to expand...
Click to collapse
xda_dentex said:
I used this library to include a file-chooser in my App:
and forked this, that acts basically the same:
Click to expand...
Click to collapse
I shall be including this later today. Thanks for contributing!
bassie1995 said:
I shall be including this later today. Thanks for contributing!
Click to expand...
Click to collapse
You're welcome!
Also the other project seems valid. If you want, point to the original repository.
The main difference is that it stays on the standard sdcard only, by default.
I also found a really good site with cool libraries: http://www.androidviews.net/
I'm sure I will want to include some of them.
xda_dentex said:
You're welcome!
Also the other project seems valid. If you want, point to the original repository.
The main difference is that it stays on the standard sdcard only, by default.
I also found a really good site with cool libraries: http://www.androidviews.net/
I'm sure I will want to include some of them.
Click to expand...
Click to collapse
Yep, I'm including both. Also, AndroidViews is already mentioned at the bottom of the OP .
Sent from my Nexus 7 using Tapatalk HD
bassie1995 said:
...AndroidViews is already mentioned at the bottom of the OP
Click to expand...
Click to collapse
Oops... Sorry.
Sent from my GT-I9100 using xda app-developers app
I'm running a community on G+ about Android libraries hosted on github. Tons of stuff in there:
https://plus.google.com/u/0/communities/100609058582053363304
ramdroid77 said:
I'm running a community on G+ about Android libraries hosted on github. Tons of stuff in there:
https://plus.google.com/u/0/communities/100609058582053363304
Click to expand...
Click to collapse
Nice, will include the link in OP.
I was going to mention androidviews too; a very handy site. There's also a handy little app out on the Play store called Android UI Patterns (free), which is basically an app with quite a few libraries built in, so you can see what they look like in action on an actual device.
And I'm not sure if I should post this, or if it should have it's own thread (paid libraries or something), but I would argue that as there are quite a few professional developers here, a compilation of good, paid, non viral licensed libraries would be a good resource. On the other hand, XDA is all about the homebrew, open, sharing community.
Anyway, whatever the mod-gods decide, I was looking for a good, cheap, non-gpl3 licenced PDF framework for the company I work for. Many frameworks were RIDICULOUSLY expensive and many open source ones were SLOW or not functional enough. In the end I found a good alternative at androidpdf.mobi . It's fully functional, affordable and they have good support. I know this may sound like an add, but I spent some time researching this, we now use it in production and figure I might save someone some time.
MacDegger said:
I was going to mention androidviews too; a very handy site. There's also a handy little app out on the Play store called Android UI Patterns (free), which is basically an app with quite a few libraries built in, so you can see what they look like in action on an actual device.
And I'm not sure if I should post this, or if it should have it's own thread (paid libraries or something), but I would argue that as there are quite a few professional developers here, a compilation of good, paid, non viral licensed libraries would be a good resource. On the other hand, XDA is all about the homebrew, open, sharing community.
Anyway, whatever the mod-gods decide, I was looking for a good, cheap, non-gpl3 licenced PDF framework for the company I work for. Many frameworks were RIDICULOUSLY expensive and many open source ones were SLOW or not functional enough. In the end I found a good alternative at androidpdf.mobi . It's fully functional, affordable and they have good support. I know this may sound like an add, but I spent some time researching this, we now use it in production and figure I might save someone some time.
Click to expand...
Click to collapse
I have seen and used Android UI Patterns, forgot to include it.
About the licensed libraries/technologies, maybe that's a good divide for this thread. Not between UI and functional libraries, but between paid and free? Don't think there are many paid libraries for daily use, though?
If you can link me to the PDF parsing library you used, I will be including that.
Also, everyone, updates are a little slow due to school work. Hardest exam that's yet to come is on Monday, will update it probably that afternoon (my time zone ).
Sent from my Nexus 7 using Tapatalk HD
The pdf library is found at androidpdf.mobi.
You can d/l the sdk and use it for free; you pay to get rid of the watermark on each page (the fee is per application, though).
I have come across some paid UI widget libraries (coverflow type things etc). It took me a while to adapt existing OS code to achieve the same kind of effect, so sometimes, if it's the right price, it's more effective to buy these kinds of things...
AChartEngine is a good one for charts and graphs http://www.achartengine.org/
MacDegger said:
The pdf library is found at androidpdf.mobi.
You can d/l the sdk and use it for free; you pay to get rid of the watermark on each page (the fee is per application, though).
I have come across some paid UI widget libraries (coverflow type things etc). It took me a while to adapt existing OS code to achieve the same kind of effect, so sometimes, if it's the right price, it's more effective to buy these kinds of things...
Click to expand...
Click to collapse
tmka said:
AChartEngine is a good one for charts and graphs http://www.achartengine.org/
Click to expand...
Click to collapse
Thank you both. I hope to be updating the OP tomorrow.
Sent from my Nexus 7 using Tapatalk HD
StandOut is a great library to create floating app :good:
Hello everyone,
I'd suggest also DroidText, for creating PDF files
Tiwiz
ciao99 said:
StandOut is a great library to create floating app :good:
Click to expand...
Click to collapse
That looks awesome, I think I'll try it myself
tiwiz said:
Hello everyone,
I'd suggest also DroidText, for creating PDF files
Tiwiz
Click to expand...
Click to collapse
Nice, a PDF creator! I'll take a look and add it.
To everyone: Sorry for not updating, exams are busting my nuts right now . I'll try and get some more in there today or tomorrow .
Sent from my GT-I9300 using Tapatalk 2
With the exams over and spare time at 1:44 AM, I'll update this again with all the suggestions from this thread. I'll add more "external" ones later.
EDIT: Done!

Anything similar to Pebblekit JS?

The Wear SDK doesn't appear to have anything similar to the Pebblekit JS Framework. Does this mean that any watch app that wants to access the internet (such as a simple weather app) will need a dedicated companion phone app? Or am I missing something?
The Wear emulator technically looks like Android, but on a small screen, and with a different "launcher".
You can run many existing Android apps on it. I tried one of mine, and it worked, more or less, but the UI was squished as would be expected.
This is why it's called "Android Wear". It's just an Android variant. There may be some "normal" Android APIs it won't support, and there will be watch specific APIs I'm sure.
IMO, it makes sense and is smart of Google to do this. I don't want to deal with 10 different smartwatch OS's.
NOW is the time for a bigger, richer smartwatch OS, because it's now possible to put enough ARM compute power in a watch sized device.
I presume that Google Play will support watch apps at some point. And I'm looking forward to seeing custom watch ROMs. I hope there won't be too much locking down of devices, or at least a Nexus watch or 2 that can be unlocked.
I agree with all of your comments, but I also think the cool thing about pebble is that I can write a watch app that will, for example, get weather from a JSON source on the internet without requiring the user to install another phone app. I don't think you can do that with Wear.

ExtensibilityApp class in WP 8.1 Silverlight

Hi all,
If you've read the text that USED to exist here before, scratch that. Big Thanks to @Sunius1 for clarifying what I thought was a win. Due to this, I DID find something interesting in regards to the ExtensibilityApp class (Windows.Phone.System.LockscreenExtensibility.ExtensibilityApp). I happened to also find a hidden capability "ID_CAP_SHELL_DEVICE_LOCK_UI_API" (Seems to be a locked CAP because it only works on Emulator. I get a deployment error on my if I try including this capability). I suspected that these two worked together, but I wanted to make sure of this.
Before we get started, read through the documentation from this site: http://msdn.microsoft.com/en-us/lib...lockscreenextensibility.extensibilityapp.aspx.
We have the following methods:
BeginUnlock
EndUnlock
GetLockPinpadHeight
IsLockScreenApplicationRegistered
IsSystemOverlayApplicationRegistered
RaiseToastNotifications
RegisterLockScreenApplication
RegisterSystemOverlayApplication
UnregisterLockScreenApplication
UnregisterSystemOverlayApplication
EDIT: After the release of the Live Lock Screen app, my speculations about the ID_SHELL_CAP_DEVICE_UI_API capability and the ExtensibilityApp object were correct. Thanks to @jessenic for finding out a good bit of info on this with me.
It seems that in order to get this working, we have to add an Extension to the WMAppManifest.xml
<Extension ExtensionName="LockScreen_Application" ConsumerID="XXXXX" TaskID="_default" ExtraFile="Extensions\\LockAppExtension.xml" />
In the LockAppExtension.xml:
<?xml version="1.0"?>
<x:Extension xmlns:x="urn:LockApp">
<AppID>AppNameForLockScreen</AppID>
</x:Extension>
As usual, Microsoft doesn't really give us much in terms of documentation.. Probably because it isn't meant to be used by the normal developer Confirmed: For now we have to actually ask for permission in order to use the cap. As to whether we'll get that granted? Who knows....
All of these methods have no parameters at all, but I can almost guarantee this has to do with having an application that can control the lock screen.
This thread will be for efforts in breaking this open and seeing whether we can create lockscreen applications..
Homebrew Lockscreen Apps:
Lockscreen App by @-W_O_L_F-
There are actually two Windows.winmd files in Windows Phone SDK, one for Silverlight 8.1 apps and one for Jupiter 8.1 phone apps (located in C:\Program Files (x86)\Windows Phone Silverlight Kits\8.1\ and C:\Program Files (x86)\Windows Phone Kits\8.1\). There's only one the phone. And some APIs support only one app type (it's phone limitation it seems: faking .winmd file results in Platform::InvalidOperationException, saying you cannot use that API from this app type). That explains why the one on the phone has more APIs available than either of for single app type.
As for LockscreenExtensibility - it's documented, just not available for Jupiter apps:
http://msdn.microsoft.com/en-us/lib...ows.phone.system.lockscreenextensibility.aspx
Sunius1 said:
There are actually two Windows.winmd files in Windows Phone SDK, one for Silverlight 8.1 apps and one for Jupiter 8.1 phone apps (located in C:\Program Files (x86)\Windows Phone Silverlight Kits\8.1\ and C:\Program Files (x86)\Windows Phone Kits\8.1\). There's only one the phone. And some APIs support only one app type (it's phone limitation it seems: faking .winmd file results in Platform::InvalidOperationException, saying you cannot use that API from this app type). That explains why the one on the phone has more APIs available than either of for single app type.
As for LockscreenExtensibility - it's documented, just not available for Jupiter apps:
http://msdn.microsoft.com/en-us/lib...ows.phone.system.lockscreenextensibility.aspx
Click to expand...
Click to collapse
Well that is very good to know! Thanks for the clarification. The best part is that I was actually able to compile without receiving an error (somehow).
I found something that may be of use in order to get the LockscreenExtensibility working (I just tried on a Silverlight 8.1 app and got access denied).
<Capability Name= "ID_CAP_SHELL_DEVICE_LOCK_UI_API"/> <----. Can't be used OOTB
EDIT: I just tested this in the Emulator and it really IS the capability that the LockscreenExtensibility needs in order for it to work.
snickler said:
I found something that may be of use in order to get the LockscreenExtensibility working (I just tried on a Silverlight 8.1 app and got access denied).
<Capability Name= "ID_CAP_SHELL_DEVICE_LOCK_UI_API"/> <----. Can't be used OOTB
EDIT: I just tested this in the Emulator and it really IS the capability that the LockscreenExtensibility needs in order for it to work.
Click to expand...
Click to collapse
I assume this is the thing Rudy Hyun used to create the lockscreen app at Build?
TheInterframe said:
I assume this is the thing Rudy Hyun used to create the lockscreen app at Build?
Click to expand...
Click to collapse
I speculate that this is what he's using. I bet there's more going on that we have yet to figure out. It also could be that the base class EXISTS, but the full implementation isn't available yet. Who knows.
snickler said:
I speculate that this is what he's using. I bet there's more going on that we have yet to figure out. It also could be that the base class EXISTS, but the full implementation isn't available yet. Who knows.
Click to expand...
Click to collapse
Ah, Yes that makes sense. I wonder if there are any other "half-baked" API's in the SDK?
Edit: I Know it sounds stupid but honestly I think we should have a thread dedicated to finding odd API's (Just found one: Windows.Phone.System.SystemProtection, nothing terribly useful though)
TheInterframe said:
Ah, Yes that makes sense. I wonder if there are any other "half-baked" API's in the SDK?
Edit: I Know it sounds stupid but honestly I think we should have a thread dedicated to finding odd API's (Just found one: Windows.Phone.System.SystemProtection, nothing terribly useful though)
Click to expand...
Click to collapse
there are also some hidden APIs in the current SDK for 3D Touch-enabled Apps!
From WP Central:
Some of the features include APIs for gestures, side interactions and even heat maps.
Crazy stuff.
Believe it or not, some of these APIs for developers are in the current SDK, they're just not visible. What this mean though is developers will have access to this 3D Touch technology for their apps. It also means that Microsoft will have a small batch of third-party apps supporting this 3D Touch technology on launch day.
Click to expand...
Click to collapse
source: http://www.wpcentral.com/microsofts-next-flagship-windows-phone-november-3d-touch
Yea, even though those 3D touch APIs may be available, they're not particularly useful, as they require special hardware to work.
Sunius1 said:
Yea, even though those 3D touch APIs may be available, they're not particularly useful, as they require special hardware to work.
Click to expand...
Click to collapse
That is true. Sort of of a side question though, has anyone made a OEM account and looked over the API documentation there? There maybe some useful things we could learn about WP and maybe further a jailbreak for all WP devices....
TheInterframe said:
That is true. Sort of of a side question though, has anyone made a OEM account and looked over the API documentation there? There maybe some useful things we could learn about WP and maybe further a jailbreak for all WP devices....
Click to expand...
Click to collapse
API isn't much useful as long as you cant really use most of functions due to policies.
ultrashot said:
API isn't much useful as long as you cant really use most of functions due to policies.
Click to expand...
Click to collapse
Ah, Yes that makes sense....
http://www.wpcentral.com/joe-belfiore-announces-new-updates-sheds-details-lock-screen-app
Sounds like there will be a dev preview update to enable lockscreen functionality quite soon. Joe also mentioned keeping the lock screen in memory. So 512 MB devices won't get the functionality soon....
Good stuff. Another question: can apps show the action center? Because I want code an app to show notifications on lockscreen. Thanks
Marocco2 said:
Good stuff. Another question: can apps show the action center? Because I want code an app to show notifications on lockscreen. Thanks
Click to expand...
Click to collapse
something to force the volume/music control on the lock screen to automatically open would be really useful as well
Updated first post with some more data since the Live Lockscreen App debuted yesterday. There's more I didn't get into, but I want others to dig in and find out
I suppose we can only speculate how it works at this point, but if I had to guess, it goes like this:
1. You have 2 projects in your LockScreenApp solution, one for the application to register the lockscreen, and the second one for the actual lock screen application.
2. The former would use ExtensibilityApp APIs to register the the second one, coupled with the manifests so it's all "valid".
3. The second application is just a another app that is able to process input and draw whatever it wants on the screen. That would explain why there's a delay at it starting when you press lock screen button while the phone is sleeping (probably it's a time for .NET to startup? Direct3D app should be able to start much faster).
Although this is only speculation, I think this makes sense, because that's how background tasks work on Windows, at least. I wonder though, why Microsoft is not releasing the APIs to be used in public - are they afraid somebody will make a lockscreen application that will drain the battery fast or something?
Sunius1 said:
I suppose we can only speculate how it works at this point, but if I had to guess, it goes like this:
1. You have 2 projects in your LockScreenApp solution, one for the application to register the lockscreen, and the second one for the actual lock screen application.
2. The former would use ExtensibilityApp APIs to register the the second one, coupled with the manifests so it's all "valid".
3. The second application is just a another app that is able to process input and draw whatever it wants on the screen. That would explain why there's a delay at it starting when you press lock screen button while the phone is sleeping (probably it's a time for .NET to startup? Direct3D app should be able to start much faster).
Although this is only speculation, I think this makes sense, because that's how background tasks work on Windows, at least. I wonder though, why Microsoft is not releasing the APIs to be used in public - are they afraid somebody will make a lockscreen application that will drain the battery fast or something?
Click to expand...
Click to collapse
I don't think its that but most likely the fact that the API is un-optimized, some of the facts you stated (i.e. Slow start up, documentation is lacking) etc... The fact the OS needs to be updated to show a section telling the user what lock screen app has taken over (since the setting page doesn't now)
Edit: Remember what Joe said about keeping the lockscreen in memory and 512MB devices might not be supported for that reason? Yeah seems like they aren't doing that since you can see the resume time for the lo screen is wayyy to much
Sunius1 said:
I suppose we can only speculate how it works at this point, but if I had to guess, it goes like this:
1. You have 2 projects in your LockScreenApp solution, one for the application to register the lockscreen, and the second one for the actual lock screen application.
2. The former would use ExtensibilityApp APIs to register the the second one, coupled with the manifests so it's all "valid".
3. The second application is just a another app that is able to process input and draw whatever it wants on the screen. That would explain why there's a delay at it starting when you press lock screen button while the phone is sleeping (probably it's a time for .NET to startup? Direct3D app should be able to start much faster).
Although this is only speculation, I think this makes sense, because that's how background tasks work on Windows, at least. I wonder though, why Microsoft is not releasing the APIs to be used in public - are they afraid somebody will make a lockscreen application that will drain the battery fast or something?
Click to expand...
Click to collapse
You are correct. Two projects: One is the settings page, which is the main entrypoint of the app when it's opened from the start menu and the second one is the actual lockscreen app.
The settings page uses the ExtensibilityApp APIs to register the second one as a lock screen application. That second application is another 8.1 Silverlight app that uses a LockScreen_Bridge WinRT component that has native access to read what is shown on the lockscreen from the WP Settings item.
It then uses some storyboards to make it do different things as you're swiping up and down on the LayoutRoot grid. It does use a timer so that's where that little lag comes from.
The only background stuff it's doing is latching on to system events ("Start button being touched for example").
I can see where MS would be protective of this. They DID say that they would be releasing a public version of the API at some point. I'm hoping it's not one of the situations that leaves it public only when they've approved you to be able to use it.
It does suck that it's restricted to 8.1 Silverlight though. I could see some Music Apps wanting to take advantage of the lockscreen like this.
snickler said:
You are correct. Two projects: One is the settings page, which is the main entrypoint of the app when it's opened from the start menu and the second one is the actual lockscreen app.
The settings page uses the ExtensibilityApp APIs to register the second one as a lock screen application. That second application is another 8.1 Silverlight app that uses a LockScreen_Bridge WinRT component that has native access to read what is shown on the lockscreen from the WP Settings item.
It then uses some storyboards to make it do different things as you're swiping up and down on the LayoutRoot grid. It does use a timer so that's where that little lag comes from.
The only background stuff it's doing is latching on to system events ("Start button being touched for example").
I can see where MS would be protective of this. They DID say that they would be releasing a public version of the API at some point. I'm hoping it's not one of the situations that leaves it public only when they've approved you to be able to use it.
It does suck that it's restricted to 8.1 Silverlight though. I could see some Music Apps wanting to take advantage of the lockscreen like this.
Click to expand...
Click to collapse
Quite interesting...!
The API in itself is quite powerful, custom lockscreens with weather animations are possible! http://wmpoweruser.com/wp8-1-live-l...amazing-lock-screen-weather-animations-video/

How to: easily integrate different services into your application!

Hey guys,
I want to explain you how you can integrate different services like Facebook, Dropbox or Slack into your application.
Why is this important?
In the kind of ever evolving market place that we are now in, it is more important than ever that your application can rapidly add new features. You don't have to invent the wheel again, there are thousands of great software solutions out there. All you have to do is to leverage those software and integrate them into your application. By doing so you can provide your users a more pleasant user experience and make your application stand out from others.
What is the problem?
Integrating different services also means to deal with all the different APIs since all the services are using their own API which are very often complex and you will need a lot of time to become familiar with all of them. This means you lose time which you could spent on focusing on your core application.
How to solve this issue?
A very simple solution is to use the CloudRail SDK. CloudRail is a completely free developer tool which allows you to combine all the different APIs including all the features you want to only one universal java or android API in only a few steps. By making the process of adding any new integration quick, simple, and easy, you can start ignoring all of the busy work and get on with making simply great applications.
I would love it if you did check it out and let me know any feedback, good or bad!

Need help developing a lockscreen android

Hey guys, I plan on creating an app but I need some tips and/or tricks to help me get started. I do plan on releasing the app on here (Using XDADevelopers) first to get some attention, then release it on the Google Play store. Here are the details of the app:
App Type: Lockscreen Customization
Minimal SDK: API 16 (JellyBean)*
Testing Device: Samsung S6 Edge (Rooted, running Android Marshmallow)
IDE: Android Studio
Key Components:
The app must be able to detect weither the home button is being pressed (which makes the phone access to the launcher, we dont want that) and quickly intercept the action and return back to the locker
Allow to lots, and I mean LOTS of customability (Much like C Locker, which is the app that has inspired me ^^), some of these customizations include the following:
App widgets and custom widgets like images, text, sprites, etc
LED/Vibration/Notifcation settings for apps
Change speed of animations (Like NovaLauncher does), also be able to choose different types of animations for the lockscreen
Customize colors in app
Integrate Android Wear (make the watch vibrate or ring your phone is low on power, or when the connection is lost)
Different lockscreens that show whenever the conditions configured are met, similar to C Locker (like bluetooth connections, music playing, WiFi, SmartLock conditions ,etc)
This is the cricual part: MUST have several different unlock unlock, like fingerprint (Thanks to Android 6.0.1), pattern, pin, SmartLock, Slide-To-Unlock, and Gestures
Be able to integrate as a plugin for Tasker, like have tasker check for launched apps
Intregrate voice assistants like Google Now/Google Assistant, S Voice, and such others
Have high and steady performance for all phones like. Also not be a resource hog!
This may is maybe feature: Be able to do functions like override the system settings and bypass system lock via root
Utilize Material style (this is a personal preference tbh)
I will add in some more ideas I have for the app.. Actually, I haven't gotten a good name for the app, but I'm thinking of Trinity Locker.
As you can see, I have numerous of ideas for this app.. all I need is some help with creating it. I will warn you guys this, I am pretty new to Android development (I typically code on Minecraft, even created some pretty decent mods), so I need some guidance on what and how things work with the Android system. I do have some coding experience from coding mods for Minecraft and taking a class on the basics of C++. If you guys have some ideas or tips and tricks to give, I'm all ears. Thank you!
NOTE: Anything with a * means that it is subject to change!
Oh yeah, I forgot to mention, I did also have a chance of using MIT App Inventor so I have a small foundation of the Android development. But I am new to Android Studio, so I need some tips with using that as well.
ALSO, to crucially note, I am in high school.. So I may not have time to respond to everyone/program the app since I have majority of my classes are cross college (or to most known as Dual Enrollment or Advanced Placement (AP)) courses :crying:. Oh and I live in the Central US Timezone, so my time will be different (or the same) for most
NovaViper said:
Hey guys, I plan on creating an app but I need some tips and/or tricks to help me get started. I do plan on releasing the app on here (Using XDADevelopers) first to get some attention, then release it on the Google Play store. Here are the details of the app:
App Type: Lockscreen Customization
Minimal SDK: API 16 (JellyBean)
Recommended SDK: API 23-24 (Marshmallow and Nogaut)
Testing Device: Samsung S6 Edge (Rooted, running Android Marshmallow)
IDE: Android Studio
Key Components:
The app must be able to detect weither the home button is being pressed (which makes the phone access to the launcher, we dont want that) and quickly intercept the action and return back to the locker
Allow to lots, and I mean LOTS of customability (Much like C Locker, which is the app that has inspired me ^^), some of these customizations include the following:
App widgets and custom widgets like images, text, sprites, etc
LED/Vibration/Notifcation settings for apps
Change speed of animations (Like NovaLauncher does), also be able to choose different types of animations for the lockscreen
Customize colors in app
Integrate Android Wear (make the watch vibrate or ring your phone is low on power, or when the connection is lost)
Different lockscreens that show whenever the conditions configured are met, similar to C Locker (like bluetooth connections, music playing, WiFi, SmartLock conditions ,etc)
This is the cricual part: MUST have several different unlock unlock, like fingerprint (Thanks to Android 6.0.1), pattern, pin, SmartLock, Slide-To-Unlock, and Gestures
Be able to integrate as a plugin for Tasker, like have tasker check for launched apps
Intregrate voice assistants like Google Now/Google Assistant, S Voice, and such others
Have high and steady performance for all phones like. Also not be a resource hog!
This may is maybe feature: Be able to do functions like override the system settings and bypass system lock via root
Utilize Material style (this is a personal preference tbh)
I will add in some more ideas I have for the app.. Actually, I haven't gotten a good name for the app, but I'm thinking of Trinity Locker.
As you can see, I have numerous of ideas for this app.. all I need is some help with creating it. I will warn you guys this, I am pretty new to Android development (I typically code on Minecraft, even created some pretty decent mods), so I need some guidance on what and how things work with the Android system. I do have some coding experience from coding mods for Minecraft and taking a class on the basics of C++. If you guys have some ideas or tips and tricks to give, I'm all ears. Thank you!
Click to expand...
Click to collapse
You can only choose one minimum or target API level
Sent from my GT-S7580 using Tapatalk
DodoGTA said:
You can only choose one minimum or target API level
Click to expand...
Click to collapse
What I meant by the recommended api is the api I'm starting on first (since that's what Android Studio defaultly sets mento the develop on the latest first)
Hey I have gotten the first bits of the app started! I'm trying to work on the setup phase of the app (where the app asks for permissions and basic settings to start). I even got the code uploaded on Github. Oh also, I might create a XDA Developer project and start adding some info there
Hey guys! I've been adding lots of stuff to the app! If you guys notice something off with the coding, please let me now at Github! Thanks!

Categories

Resources