New MvvmCross plugin + new iOS view ports

|
It has been a busy couple of weeks and the result of this is now available to all of you.

ALRadialMenu

Last week I released a new NuGet package called ALRadialMenu, which is a port from Swift to C# of Alex Littlejohn's ALRadialMenu. It is simply a menu which spawns N amounts of UIButton's in a circle around the point you want it to. It is highly configurable.


You can find the source code and instructions in the GitHub repository.

SGTabbedPager

I also released a new NuGet package called SGTabbedPager, which is mimicking a ViewPager and ViewPagerIndicator on iOS. This is a port from Swift to C# as well.


Source code and instructions are on GitHub

DeviceInfo MvvmCross plugin

This week I created a Device Information plugin for MvvmCross. I know there are some other plugins. However, not all of them covered exactly what I needed. The plan is to expand it with more device information, such as batter, storage, connectivity etc. Ideas are welcome and can be submitted as a GitHub issue on the repository.

This plugin can be found on NuGet too as Cheesebaron.MvxPlugins.DeviceInfo and targets Android, iOS and Windows 8 + Windows Phone 8.1 (universal). It should also work in the new Windows 10 UWP apps, although not tested.

Removing shadow from NavigationBar and TabBar on iOS

|
I am making an app where I don't want to display the shadow underneath the NavigationBar and the top gradient on a TabBar.

For some reason the Apple SDK does not provide a simple boolean Property where you can just disable it. A lot of solutions on StackOverflow requires you to set a background image and a shadow image to remove it entirely.

Digging through solutions a bit I found that these two ways seem to work pretty well.

So for the NavigationBar, what you do is traverse through all subviews to find the UIImageView which is the shadow and simple remove that from showing up. This is done as follows.


For the TabBar it is slightly different. It has a member variable, which is private, so you cannot get hold of it directly. However, using the SetValueForKey() method, which all NSObject's have, you can set that variable to true.

See the difference?


Getting rid of "No -tsa or -tsacert is provided" when signing APKs

|
Since JDK 1.7u51 Oracle introduced some extra strictness to the jarsigner, which is fine. Although, a lot of you might have seen some warnings when Xamarin.Android signs your APK, something in the lines of:

Warning:
No -tsa or -tsacert is provided and this jar is not time stamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2xxx-xx-xx) or after any future revocation date.
I am using a property group like this in my csproj file, which defines where my keystore is and which passwords it has, for convenience:

I could not find any options to add parameters to the jarsigner command, but I did notice, that the alias always came in the end of the jarsigner command in the output window. So my small workaround is to simply append the alias with -tsa http://timestamp.digicert.com, which removes the warning (yay!)
So now the property group looks like:


Although, I have recently put up APK files on the Play Store without this hack to remove the warnings and they were accepted just fine. So I guess... do whatever you want ;)

Enabling unknown sources on Phillips PUS7909 series Android smart TV

|
I recently bought a TV, mainly to watch the upcoming Le Mans race, but also the occasional movie and such. To my surprise, though, the Play Store application only shows very few applications, and you cannot install own APK's on the TV and the Security Settings menu is hidden along with the Developer Settings menu.

So in order to get into those you need a little bit of terminal-fu and a Terminal application. The latter you can get from the Play Store, just grab "Terminal Emulator for Android", which should install without problems.

To get to the menu where you can enable Unknown Sources so your can install 3rd party apps write:


This will bring up the Security Settings menu, where you can enable Unknown Sources. This allowed me to install apps such as YouSee Film & TV and other apps, which are not available in the Play Store on this device.

To allow more applications being installed on the device, you can open the Developer Options and enable more applications from play store at the bottom. What it essentially does is to tell Play Store that the TV has a touch screen, which is what limits what is shown. To do so write the following in the terminal:

Many apps only work with touch screens, which is why this is disabled, because it makes it super cumbersome to navigate the application. Even with the air pointer thingie built into the remote, which is super hard to get to point properly. What I did though, was to plug in a USB mouse for those apps which are super hard to use.

iOS WebView insets

|
I have been battling some UI constraints on iOS and I have finally found a solution to how to solve this specific problem and just wanted to share.

My problem was that I had a UIWebView, which kept laying itself out underneath the NavigationBar in my controller. A quick fix would be to just set edges for the extended layout to none like so:



However, this will make you lose the nice effect of views scrolling behind the NavigationBar, for instance if the web page you are displaying scrolls.
Enter insets. As the name kind of indicates you add some spacing into your view. There is a property called AutomaticallyAdjustsScrollViewInsets. However, for some reason it does not do anything in my case, so I had to manually adjust the inset, which I did in ViewWillLayoutSubviews as in ViewDidLoad the TopLayoutGuide is not ready yet and will give you 0 for its Length. Basically this is what I had to do:



This tells both the UIWebView's internal ScrollView and the scroll bar that you want some space in the top equals to the height of the NavigationBar.