{"id":19073,"date":"2015-06-08T12:43:16","date_gmt":"2015-06-08T19:43:16","guid":{"rendered":"http:\/\/blog.xamarin.com\/?p=19073"},"modified":"2015-06-08T12:43:16","modified_gmt":"2015-06-08T19:43:16","slug":"put-some-cyanogen-in-your-xamarin-apps","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/put-some-cyanogen-in-your-xamarin-apps\/","title":{"rendered":"Put Some Cyanogen in Your Xamarin Apps"},"content":{"rendered":"<p>\t\t\t\t<a href=\"\/wp-content\/uploads\/sites\/44\/2019\/04\/CyanogenMod-SDK.png\"><img decoding=\"async\" class=\"alignright wp-image-19074\" src=\"\/wp-content\/uploads\/sites\/44\/2019\/04\/CyanogenMod-SDK-614x1024.png\" alt=\"CyanogenMod SDK on Xamarin\" width=\"260\" height=\"433\" \/><\/a>CyanogenMod is an enhanced open source firmware distribution of Android that offers customizable features and options. Cyanogen continues to grow in popularity, and they recently introduced an early version of their <a title=\"CyanogenMod Platform SDK\" href=\"https:\/\/github.com\/CyanogenMod\/cm_platform_sdk\/wiki\" target=\"_blank\">platform SDK<\/a>. Cyanogen launched this SDK by seeding it with the Quick Settings Tile API. <a href=\"https:\/\/www.cyngn.com\/developer-blog\/introducing-the-cyanogen-platform-sdk\" target=\"_blank\">Cyanogen\u2019s Leigh Momii and Adnan Begovic say<\/a> they hope to inspire the Cyanogen community to understand what&#8217;s possible and think up additional APIs to add to CyanogenMod.<\/p>\n<p>Quick Settings Custom Tiles are a great way to add an easy, global way for your users to do things like toggle a feature of your app on and off.<\/p>\n<p>Adding a Quick Settings Custom Tile to your Xamarin.Android app is easy with the new <a href=\"https:\/\/components.xamarin.com\/view\/cyanogen-platform-sdk\" target=\"_blank\">CyanogenMod SDK for Xamarin<\/a> in the Xamarin Component Store.<\/p>\n<p>After you&#8217;ve added the component to your project, you can use the <em>CustomTile.Builder<\/em>\u00a0to build your tile:<\/p>\n<pre class=\"lang:csharp decode:true\">\nvar customTile = new CustomTile.Builder (this)\n    .SetOnClickIntent (pendingIntent)\n    .SetContentDescription (&quot;Monkey Toggler&quot;)\n    .SetLabel (&quot;Monkeys &quot; + States.Off)\n    .SetIcon (Resource.Drawable.ic_launcher)\n    .Build ();\n<\/pre>\n<p>Once you&#8217;ve created your custom tile, you can publish it with the <em>CMStatusBarManager<\/em>:<\/p>\n<pre class=\"lang:csharp decode:true\">\nCMStatusBarManager.GetInstance (this)\n    .PublishTile (CustomTileId, customTile);\n<\/pre>\n<p>The <em>CustomTileId<\/em> is a unique ID associated with your tile.\u00a0When you publish a new tile with the same ID, it will update the existing tile under that identifier, making it possible to change the appearance based on the current state of your app.<\/p>\n<p>Don&#8217;t worry if your app isn&#8217;t running on CyanogenMod &ndash; in such a case, the SDK will gracefully fail. Rather than seeing exceptions, Custom Tiles won&#8217;t be published on platforms that don&#8217;t support it, so you can feel safe adding this feature to your app!<\/p>\n<p>This is only the first feature that CyanogenMod has released in its Platform SDK, and we&#8217;re excited to see what new features the <a href=\"http:\/\/www.cyanogenmod.org\/\" title=\"CyanogenMod\" target=\"_blank\">CyanogenMod<\/a>\u00a0community will\u00a0add in the near future.\u00a0Go grab the <a href=\"https:\/\/components.xamarin.com\/view\/cyanogen-platform-sdk\" target=\"_blank\">CyanogenMod SDK for Xamarin component<\/a> today and give your Cyanogen users a better experience!\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CyanogenMod is an enhanced open source firmware distribution of Android that offers customizable features and options. Cyanogen continues to grow in popularity, and they recently introduced an early version of their platform SDK. Cyanogen launched this SDK by seeding it with the Quick Settings Tile API. Cyanogen\u2019s Leigh Momii and Adnan Begovic say they hope [&hellip;]<\/p>\n","protected":false},"author":560,"featured_media":39167,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[14,4],"class_list":["post-19073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","tag-partners","tag-xamarin-platform"],"acf":[],"blog_post_summary":"<p>CyanogenMod is an enhanced open source firmware distribution of Android that offers customizable features and options. Cyanogen continues to grow in popularity, and they recently introduced an early version of their platform SDK. Cyanogen launched this SDK by seeding it with the Quick Settings Tile API. Cyanogen\u2019s Leigh Momii and Adnan Begovic say they hope [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/19073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/560"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=19073"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/19073\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=19073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=19073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=19073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}