iBeacon Scanner Android

At In The Pocket‘s Harald I’ve developed a library for Android: the iBeacon Scanner Android library.

This library takes the pain away when you want to scan for iBeacons on Android. You register the iBeacons you are interested in and via a callback you are notified when you enter or exit the range of an iBeacon.

You can read more about this on In The Pockets developer blog.

On top of that I created 2 apps that build upon this library:

  • iBeacon Scanner scans for all the iBeacons around you and displays them.
  • iBacon allows you to broadcast an iBeacon via your bluetooth chip on your Android phone.

How to use the Microsoft Azure Storage SDK

After visiting Microsoft Cloud Camp in Brussels last week I wanted to dive into android developing by using Microsoft Azure.

I wanted to store images on a storage account, and since I didn’t use Gradle or Maven, I had some issues getting it to work. In the end, this is quick guide how I did it.

On github you can find the Microsoft Azure Storage SDK for Android. I checked out the project information on the maven-repository. I had to download the com.fasterxml.jackson.core since that was a dependency I wasn’t yet using.

On the repository URL I found the azure-storage-android-0.3.1.aar file. You need to download it and open it with a ZIP client. The classes.jar file is the library you need to put in your libs folder. I renamed it to azure-storage-android-0.3.1.jar. I also put the azure-storage-android-0.3.1-sources.jar in the libs folder.

For uploading an image to a storage account, this is a code example. Remember to execute it in an Async Task!

The image object is returned after pushing it to an Azure Mobile Service and contains the sasQueryString to authorize the upload.

String FileRef = FILEPATH + FILENAME of the file.
String BaseUrl = "http://storageaccountX.blob.core.windows.net";
CloudBlobClient blobClient = new CloudBlobClient(new URI(BaseUrl);
String blobName = image.ResourceName;
URI uri = new URI(blobClient.getEndpoint().toString() + "/" + "containername" + "/" + blobName + "?" + image.SasQueryString);
CloudBlockBlob sasBlob = new CloudBlockBlob(uri, blobClient);
File fileReference = new File(FileRef);
sasBlob.upload(new FileInputStream(fileReference), fileReference.length());

 

Copy file to android in ClockWorkMod

If you installed a malfunctioning ROM on your android smartphone, it can happen that your android phone no longer works. I have had this often enough to write a blog post on how copy a hopefully better ROM on your device, to install that one.

Why didn’t the ROM work?

  • If you install nightlies from cyanogenmod, it can happen that a nightly is actually broken.
  • Sometimes the file you downloaded from the internet and copied to your smartphone got corrupt.

What do I need?

This guide will only work when you have ClockworkMod Recovery installed on your phone.

You also need the android SDK. If you are a developer you will already have this. It’s in the folder AndroidSDK/platform-tools.

How to

  1. Copy your new cyanogenmod ROM (or other) file to this AndroidSDK/platform-tools folder. (Or any file you would like to copy.)
  2. Give it an easy name, something like cm-11.zip
  3. Control-Shift click in the folder, and choose Open command window here.
    adt-openshell
  4. Boot your smartphone into ClockworkMod Recovery. Every smartphone has it’s own way to do. For the Galaxy S3 you need to push power, volume-up and the home button all together. When the boot logo shows you can stop.
  5. Go to mounts and storage in the ClockworkMod Recovery menu.
  6. Make sure it says unmount /system and unmount /data by entering on the items.
  7. Now go to your shell and start the copy process with this command: adb push cm-11.zip /sdcard/0/cm-11.zip. (Of course, change the files to your filenames!)
    adt-shell
  8. The process can take a while, it will respond with the copy speed and the total bytes / total time it took. That means it was successful!
  9. Go back, and choose install zip, choose zip from /sdcard to install the MOD!

Drakkar – Mobile Vikings

The Drakkar Android app is about getting information from your Mobile Vikings (a mobile provider) sim plan. This by making it a simple, lightweight experience. Have a look at the app, maybe install it, from the store!

drakkar-app

Making this app speeds up my learning curve of the Android development platform, since it intrigues me. It’s really fun to learn, make and build stuff for Android!

Android App Analysis (BeerTab)

Definition

BeerTab is going to be an android app to help you memorize how many drinks you have had. You can then use this information to bill your bill. This is especially useful if you are with a group in a pub and are allowed to pay individually.

Functional requirements

  • Tell you how much you need to pay for the drinks you have had.
  • Add drinks and their price.
  • Easily add consumptions to drinks.
  • Choose the budget you want to spend beforehand.

MoSCoW

MoSCoW is a analytical method to help you understand what is important, in 3 levels and what you absolutely won’t do!

Must

  • See how much you have spend.
  • Simple and self explaining interface.

Should

  • Have an evening budget.
  • Add some jokes to it.

Could

  • Keep track of multiple persons.
  • Select from venues.
  • Remember prices for venues.

Wont

  • Have multiple languages.
  • Integrate with social networks.

 

Plan your gps route for Sygic on your smartphone

Planning a Sygic route might be much easier on your computer, sometimes you do not have one at your disposal! Especially when you are on your motorbike, it is fun to choose curvy roads and scenic views instead of the shortest one!

Change some settings

For easy planning, there are a few settings you need to set to ‘no’. Avoid toll roads, avoid unpaved roads, avoid motorways and avoid ferries are just a pain in the ass if they are set to ‘always ask’. While adding waypoints to your route, it will constantly re-ask these questions! Just choose yes or no, and when your route is planned, change those, if desired!

sygic-settings

After changing these settings, let’s go start planning!

Navigate to

Screenshot_2013-07-16-20-50-26

I always start with Navigate to… and select my destination. Usually I do use the Address or POI function.

After selecting the address, I go for Drive to and Navigate. Now I get a map with 3 possible routes. I stick with number one, since that is the shortest route, and then modify it to go to where I want!

When you touch the pink line, you get a flag. You can move that flag to a place where you want Sygic to navigate through. Every time after placing a flag, you need to wait a bit, since it tries to calculate a new route already! It might be a bit cumbersome, but when you try to create a good motorcycling route, on the road, this is your best option for now!

Screenshot_2013-07-16-21-02-35 Screenshot_2013-07-16-21-03-52

Don’t forget to save so you can load later! Yes it’s important, since Sygic sometimes crashes! Go to options, Route options and choose Save route.

sygic-route-options sygic-save

Since the calculation of route 2 and 3 can sometimes be slow, I wonder if there is an option to limit the road proposals to 1, which would definitely be much quicker!

Sms notification number doesn’t go away

Are you also experiencing this problem where the sms notification number doesn’t go away, even though you do not have any unread messages left?

I had this on the Samsung Galaxy S3, and solved it this way:

  1. Go to Settings
  2. Go to application manager
  3. Go to theĀ All tab
  4. Search for BadgeProvider
  5. Choose Clear data
  6. Restart your phone

It should be fixed!

sms-settings sms-applicationmanager sms-badgeprovider

Plan your gps route for Sygic on the computer

Sygic is a great android offline gps. It uses tomtom maps and is characterized with it’s more intuitive interface than other comparable apps.

For car drivers a gps app is usually about getting somewhere the fastest and the cheapest. As a motorbike & touring addict it’s very important to be able to choose your roads! Scenic views, special curves and the fun of driving!

Although Sygic might tell on their website that it’s easy to choose your route, it’s not very comfortable to create your custom route on a small smartphone screen without to much error. It’s just much easier to do it on your computer!

This post is about how to get it done!

sygic-start sygic-search sygic-routing

What do you need?

Create your route

Just use google maps to create your route! Choose your start point, select an endpoint, and be sure to select enough waypoints! Because sygic will recreate the quickest route, based upon these waypoints!

If you use the old google maps, use the link icon next to the printer icon. This gives you an url that you can use to share to route with everyone. (Has a block circle on the next screenshot:)

google-maps-route

If you use the new google maps, you need to use the settings icon at the bottom and use the Share and embed map link.

google-maps-new-share

Convert your route to a file

After installing, start the litlle utility ITN Convert, and paste your link in the Name field:

itn-paste

A popup will ask if you want to interpret this link. Choose yes. As you will see this gives you the start + end point and all waypoints!

itn-interpreted-2

Select Sygic GPS Navigation 13 as Export file format, choose Export and your gps route file has been created!

itn-save

Add your route to Sygic

You need to copy the .itfs file to this folder on your android device: Sygic / Res / itinary

android-filestorage

Now start Sygic. Choose Route, Load Route, and select your created route!

choose-route

Have fun driving!

Note

Please do note that Sygic will create a route upon your settings selected when calculating from start to end by the selected waypoints. So do add enough waypoints!

installing cyanogenmod 9 on the galaxy tab 10.1

Introduction

Todo: include picture from my own galaxy tab (with samsung case).

This tutorial is made for owners of the Galaxy Tab 10.1, version GT-P7500. That’s the 3g version. How can you see what version you have? When you have the driver/samsung kies installed, you can easily see this upon usb connection:

Todo: add screenshot.

Concepts

Before starting, it’s always good to have a bit of understanding of what you are doing! That’s why I would like to explain a couple of terms:

ROM?

A (custom) ROM is a version of Android. Just like you have different versions of Windows, there are different flavours of Android. And since Android is open source, everyone can make a ROM himself! What changes can ROM’s from other people / companies have compared to the default Android ROM google produces? It can just be some code to make it work better on a given device, or change homescreens, add more apps by default, have a modified user interface!

So there are different versions of android! And you have the freedom to install whatever version you would like!

One of the mayer custom ROM’s is cyanogenmod!

Rooted

To be able to install custom ROM’s, your device needs to be rooted. But what is that exactly?

As most of us know, in Windows you need to be administrator to do certain things, like installing software, modifying system settings. Android is the same! To disable apps and users abusing the system, a normal android device doesn’t have ‘administrative’ or root access.

Luckily enough, there is for almost every device a way to root it, with what they mean that you will have administrative access and be able to grant it, if needed, to apps.

Follow this link to do it for your android galaxy tab 10.1!

What to do?

  1. Root your device.
  2. Install a ROM manager.
  3. Backup your ROM.
  4. Install cyanogenmod 9!
  5. Have fun with family & friends.

Let’s get started

I used this guide, it’s quite good, go get started: http://www.androidauthority.com/galaxy-tab-10-1-wi-fi-3g-gt-p7500-cyanogenmod-9-nightly-93525/!

Issues afterwards:

Gps

At first, it was a rather slow. But after turning Google’s location service, enabling GPS satellites, selecting the correct GPS source (internal gps antenna), it started to work smooth again. It’s like by default, apps can not seem to access the gps.

Usb mode

After installing ICS, I wanted to connect it to my computer with the usb cable, but after attaching it, nothing happened at all.

Beause it’s a setting you need to enable!

In Settings go into Storage, then on the sub-menu (right top three circles simbol) and check Media device (MTP).

Notes

  • If you use Mac osx you have to download “android file transfer”, windows users have to do nothing at all to get it working!
  • You could also boot into CWM recovery, select option mount/unmount and choose USB storage.

Sources

  • http://forum.xda-developers.com/showthread.php?t=1670964
  • http://www.androidauthority.com/galaxy-tab-10-1-wi-fi-3g-gt-p7500-cyanogenmod-9-nightly-93525/