Android Adaptive Launcher Icons

Android 8.0 (API level 26) introduces adaptive launcher icons, which can display a variety of shapes across different device models. For example, an adaptive launcher icon can display a circular shape on one OEM device, and display a squircle (square circle) on another device.

More …

Today I learnt

Been having some issues with implementing OneSignal push notifications in an Android app at work lately. Main issue was that clicking a push notification was causing the app to do a fresh start, showing the splashscreen, rather than navigating to the correct page. Eventually came across this SO post, which basically says that the default OneSignal behaviour is to do a fresh start of the app. Seems stupid, but you have to edit the manifest.xml to stop this behaviour:

<application ...>
   <meta-data android:name="com.onesignal.NotificationOpened.DEFAULT"  android:value="DISABLE" />
</application>

Access .net core web api from xamarin emulator

I recently started building a .net core web api for a personal xamarin project. I struggled to get the app to connect to the api, running on my local machine. By default, VS 2017 starts the api on http://localhost:port with IIS express. The problem is that your app code cannot refer to local host because that is shorthand for “this machine”, which in this case means the Android virtual machine, not the machine running your web api. There is also a bunch of port forwarding stuff mentioned on the internet which I couldnt be bothered to dig into.

More …

Moving blog to static site generator

I previously maintained a blog, which was hosted on Github and consisted of raw html and css files. Obviously, this method is rather tiresome and difficult to maintain consistency across the site.

More …