The AdvancedRecyclerView Library is incredible. It has support for so many niceties, it’s almost indispensable. Unfortunately, documentation is sparse.
I wrote a quick demo for the draggable and swipable functions of the library that may be perused below. I plan to add support for the expandable items in the future. So, if you happen to need some documentation for the library, click the link below.
Android’s SwipeRefreshLayout is pretty useful for internet based apps that need to notify a user when a pull to refresh action has occurred. However, if you have a complex view hierarchy that uses a FrameLayout to draw certain items over another, say for example a contextual toolbar, the circular ProgressBar drawn by the SwipeRefreshLayout is obscured and hidden from the user.
A way to fix this is to create a class that extends the SwipeRefreshLayout, and Override the OnTouchEvent. Once overridden, call on the superclass to make sure the widget performs as intended, keep the boolean it returns in a local variable, and handle the motion events which will in turn fire off an interface callback when certain conditions are met.
It’s not complicated when presented in code form. The extended class is shown in it’s entirety below
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
First post of the new year! I figured, I’d start with something interesting.
Over winter break, I went home to the lovely warmth of West Africa, and had an epiphany of sorts as to how to extract the resistive values for intracellular water (ICW), extracellular water (ECW) and the capacitive value for the cell membrane after performing a frequency sweep on biological tissue (or model circuit) of interest.
If your Android app has paired with your device before, and you update the Gatt structure of your BLE Slave / Peripheral, you will need to clear the cache Android side, else the Android app will continue to show the old Gatt structure.
To clear the cache, all you need to do is toggle Bluetooth on and off. With this done, the cache should be clear and your new Gatt structure will be picked up when you scan and connect to your device again.
If you bought the breakout board linked in the previous post from Jeff Rowberg, congrats! It is already pre-flashed with the gatt.xml, hardware.xml and everything you’ll need to get it work immediately with the Arduino sketch to follow. If you didn’t, refer to this to learn how to flash your BLE112.
Over the past 3 months I’ve been learning about Bluetooth Low Energy Communication, Android apps, additive manufacturing using soft materials, the Arduino microprocessor and a host of other things. Now summer is over and I’ve been thrust back into my day job, which at this point is looking for a full time job. I’m still actively involved in all the projects I worked on during the summer, but in this transition phase I need to document my methods and procedures for students that will later be working on the projects I worked on.
I’ve been working on an open source accelerometer based on BlueGiga’s BLE112 Bluetooth Smart module and Bosch’s BMA250 accelerometer. The circuits I’m using were already pre-made by the classy fellows at Tiny-Circuits.
I plan to eventually release the source code for both the Arduino Sketch and the Android App.