JetCracker

Life-time learner's blog

Category Archives: On the Internet

HAXM not working on Mac OS X 10.10 Yosemite

By default Android emulator is extremely slow. It takes 5 minutes to start the emulator!

To make it faster there are two approaches:

  1. If your machine supports Intel VT-x technology, you can install special HAXM extension, so that the emulator will make use of all the power your computer has.
  2. If your computer doesn’t support virtualisation, you can still significantly improve the boot time of the emulator by configuring it to save its state. This will make the emulator start faster, but the UI will still be slow, and it will take a bit longer for the emulator to close.

There is a pretty detailed Stackoverflow answer regarding HAXM and Android emulator performance.

Unfortunately, my old laptop didn’t support Intel virtualisation technology, so I didn’t even consider working with emulator. Instead, I always used a physical android device to test my apps.

When I started the emulator on Mac, I hoped it would run much faster (with SSD and Intel Core i7 on board). But no – the emulator was still very slow. This brought me to Stackoverflow, where they discussed how to enhance the speed of Android emulator by installing HAXM.

So, I tried to make the emulator on freshly installed Mac OS X 10.0 Yosemite run faster. I followed the instructions provided in the article, but at the end of installation, I got error message, saying that my laptop supports virtualisation, but VT-x is disabled.

According to Apple official specs, all latest macs that are running on Intel CPUs, have VT-x feature enabled by default. It might seen as disabled by the HAXM Installation Manager for two reasons:

As I didn’t have any other emulators or virtual machines running, I decided to find a way to make it work. And after some googling, I finally found a solution. According to the blog post I found, there was an issue with an incorrectly signed kernel extension on Intel’s part. I believe Intel will fix it soon, but for now as a workaround, we can use the following command:

sudo nvram boot-args="kext-dev-mode=1"

This makes kexts to run in dev mode and disables all signing checks. Changes will take affect after system restart.

Speedometer Gauge with Needle for Android

I am working very hard on my CardioMood app for Android.

As described in one of my previous posts, CardioMood is a health monitoring social service with a stress monitor app. It measures your stress level according to heart rate variability. It also shows a bunch of other parameters, which are represented as different kinds of charts.

Stress Index is a quantitative characteristic of your stress. Normally, the value of Stress Index varies from 50 to 150. The SI value outside of the range could be caused by a number of factors, such as physical or emotional stress, diseases (including heart diseases), and low quality of data obtained from heart rate sensor.

In CardioMood Stress Monitor app, we need to visually represent a calculated value of Stress Index – and that is another problem. I decided to use a speedometer-like gauge.

A simple way: WebView

In our measurement report screen used WebView to visually represent the result.

Android WebView supports almost all HTML and javascript features, which enables developers to render anything and use various javascript libraries already available on the net.

So, WebView gives you an easiest way to add Speedometer gauge to your android app. In our case we used a solution from Geek’s Retreat.

Their implementation is purely javascript. It has a certain number of limitations. For example, you have to specify the exact width and height of the canvas before rendering.

We had hard time with sizing and layouting components in WebView. Soon, we realized that WebView is not reliable – it’s better to use native controls than spend days on fixing issues and supporting diverse screen densities and sizes in HTML.

Hard way: Implementing Android custom view

I decided to take a bull by the horns and convinced our team to stop using WebView. After two days of working, I finally created SpeedometerView – a simple speedometer with needle gauge for Android. It looks similar to it’s javascript brother and has the same features.

CardioMood SpeedometerView in action

Supported features:

  • Major and minor tick marks
  • Custom labels
  • Colored value ranges
  • Animation of arrow (requires Android API level 11+)

Download

Check out a GitHub repo to see source code, release binary and usage example.

UPD: The component was moved to AndroidWidgets library.

GitHub: https://github.com/ntoskrnl/AndroidWidgets

Screenshot of CardioMood with SpeedometerView

Feel free to comment, request features or report bugs.

EnglishSmacks – Real life English words and phrases

English Smacks logoThe-English-Patient.Com – a ground-breaking service for learning English – has recently released a preview of its brand new service: EnglishSmacks!

The app tests your English language skills! Just listen to the phrases and fill in the gaps typing the words missing in the transcript.

There are 5 levels of difficulty. Phrases are taken from world news (CNN, BBC), science movies, pop music etc. I am sure that you will enjoy gathering “tambourines”. Good luck!

Download EnglishSmacks from Google Play!

EnglisSmacks-sceenshotEnglishSmacks-screenshot2

Key features

  • Huge base of phrases
  • Daily updates of exercises
  • Reliable sources (CNN, BBC, movies)
  • Awesome phrases from real life situations

Feel free to download, rate and review the app!

CardioMood Stress Monitor for Android

CardioMood.ComI’d like to introduce an Android application for our CardioMood health service, which is going to revolutionize today’s health & fitness approaches.

You can evaluate your stress level and estimate health of your heart.

Download from Google Play!

ImageImage

Feel free to rate this app and leave your feedback.

Key features

  • Displaying current heart rate
  • Analyzing stress level (by heart rate variability)
  • Different visual representation of collected data with description
  • Storing all your measurements locally
  • Saving results to PNG-images or TXT-files
  • Uses Bluetooth Low Energy (Bluetooth SMART) technology

This application doesn’t use or require any network connections and can be used safely.

Limitations

  • This application is standalone and currently supports devices with Bluetooth 4.0 Low Energy (Motorola phones with Android 4.0+ and other phones with Android 4.3+).
  • The application currently supports only Polar H7 heart rate monitor (was tested and proved to be working).
  • Devices with small screens are currently not fully supported (we are working on it).

This is a demo. In the future we are going to support a much wider range of Android devices and heart rate monitors.

Stay with http://www.cardiomood.com !

TagsCool – Tag your photos online

TagsCool – Tag your photos online

http://www.TagsCool.com – Upload your photos, tag them and share!!!

You can also use it to store your school notes!

www.TagsCool.com

Demo: http://www.youtube.com/watch?v=4OC5kun9v9Y

Java REST client for Android

In one of my previous posts I told you that I started learning how to code for Android, and created my first Android app. But most of mobile apps are useless when they do not exploit the advantages of the Internet. That is why in order to create a good application you should know how to use the power of the Internet in your app.

There are different ways of how your application is interacting with the Internet and its resources, for instance an app can download data, connect to remote databases, but the most popular way of interaction is RESTful services  (in the development of mobile apps). It just works more effectively than SOAP when the bandwidth is limited.

In this article I’ll show briefly how to create a client for a RESTful service in Android (this should also work in any device supporting Java). Read more of this post

Check out “Polar H7 HRM for Motorola”

https://play.google.com/store/apps/details?id=info.danshin.android.sandbox this link is deprecated (see updated link at the end of the article).

If you are the owner of Polar H7 heart rate monitor and have got Bluetooth LE enabled phone from Motorola, check out my new app.

A new and fully functional version of app for heart rate variability analysis can be found here: https://play.google.com/store/apps/details?id=com.cardiomood.android

See also my article about the app.

Ludwick Marishane: A bath without water

Ludwick Marishane: A bath without water #TED : http://on.ted.com/p2rD In the future, people will not have to bathe. A simple lotion will help to avoid this necessity. 🙂

[English Essay] Creating New Society

Nuclear explosionAgain, new English homework. Essay on the topic “Creating new society”.

There are a lot of stuff on the internet concerning this extremely boring topic and I could have easily copied it… But I was so lazy to google, so I just wrote down some of my thoughts. If you are still interested in reading this bullshit, here it is. But don’t say that I didn’t give you a warning. Read more of this post

Fashion Designer: Ralph Lauren

I know absolutely nothing about fashion. Frankly speaking, sometimes I found it difficult to go shopping and buy some clothes. Really!… When I go to some clothing store in order to buy jeans, the only thing I think of is how to pick up something and get out of there. Once, I had to ask my friends to help me out and go with me. Is it silly?.. Many people have some issues – that is mine.

Even though I am a complete newbie in fashion, I have to create a report about any fashion designer I like. You know what: they all suck! 🙂

I should probably write something about one fashion designer in order to make them get off me (and by them, I imply my English teacher). So, I looked into Wikipedia and came across one interesting name – Ralph Lauren.  Let’s see who he is and what he is. Read more of this post