Since my last post, Android 5.0 Lollipop came out for current Nexus devices, and will soon be rolling out to other devices! Since I have a Nexus 5, I was able to get Android Lollipop as soon as it came out. As such, I wanted our app to adopt the design principles of the new version as quickly as possible. This was simple enough for devices running Lollipop, but I soon realized that it would not be as easy for non-Lollipop devices.
Initially, I had 2 different designs for devices on SDK level 21 and those on other SDK levels. However, I decided that the original design looked really bad by comparison, so I wanted to port over the design to lower API levels as well. This should have been fairly simple, given that Google provides the appcompat library for us to use. It should have been as easy as just switching the parent theme to AppCompat, but nope. Apparently calling getActionBar() returns null with AppCompat theme on SDK levels below 21. And since we're using a tab based interface, the way we add tabs is by using actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS). Since actionBar is null, we get a NullPointerException. How fun. The first thing I'm thinking of trying is switching over to a SupportActionBar, which might fix it. Otherwise, I'm not really sure. Maybe I'll post on StackOverflow about it.
Also, one of the features I added was creating rides. Users create rides by pressing the FAB (Floating Action Button) on the RidesFragment, but some of the methods used to create the FAB are SDK 21 only. And the methods I could use to make it work on lower API levels were deprecated upon the release of API 21. I'll just go bang my head on a wall for a little while.
A light appears in the darkness, though. Someone released an open source library which claims to bring easier implementation of Material Design to Android levels as low as 2.2 (https://github.com/navasmdc/MaterialDesignLibrary). We're only supporting Android levels as low as 4.0.3, so this would definitely be an awesome library to use. I'm going to try to implement use of this library over Thanksgiving break.
DrMemory on Windows 8.1 seems to crash for very many people when doing anything pointer heavy (... for Data Structures), and so most people have to resort to Cygwin or to a virtual machine. However, it seems that when running DrMemory using the option -light there is no internal crash.
From the help option on DrMemory: -light Enables a lightweight mode that detects only critical errors.
Usage: drmemory -light -- hw8-m32.exe
In my iOS app I implemented a slide menu for easy navigation.
This blog post is written because of the LITEC LEDs.
I may, or may not, have "borrowed" some to be used in this project.
While I was setting up the LED, I tried measuring the characteristics of the LED using a multi-meter because LITEC doesn't have any datasheets for these LEDs that I know of currently.
More accurate data will be provided once I get it, but I noticed from my testing that: Forward voltage was equal to 2.1 V Forward current was equal to 10 mA
Which means that the ideal resistor connected for the LED is 290 Ohms at 5 V.
This was, by no means, a rigorous test, but it was the best analysis that I could do at that point in time.