Teaching PhoneGap – Write Apps in Javascript and HTML5

I’ll teach the next mobile development course in PhoneGap. The Haaga-Helia course Mobiilituotekehitys bus4tn008-2 will be in Finnish. The course seems to be fully booked already, but you can get a place if someone cancels. I’ll teach the course with … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , | 2 Comments

Drawing to Canvas on Android – Code Example

Draw full screen on your Android phone This is just example code. For a throughout explanation, see Make Arduino Bots and Gadgets: Boxing Clock. package com.botbook.drawingoncanvas; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Align; import android.os.Bundle; … Continue reading

Posted in Uncategorized | Tagged , , , , , | Comments Off on Drawing to Canvas on Android – Code Example

Tee yksinkertainen peli Androidille

Tee yksinkertainen peli Androidille. Paljonko on 2*14? Mikä luvuista ei ole jaollinen kolmella? Haluatko ostaa vokaalin? Monennellako yrityksellä arvaat numeron? Paljonko 2 jalkaa 3 tuumaa on nykyaikaisissa yksiköissä? Mikä sana on kontiksi konoxlintti? Hymynaama Vapaaehtoinen lisätehtävä: Piirrä Androidilla hymynaama. Edistynyt … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Comments Off on Tee yksinkertainen peli Androidille

Android Cheatsheet for Beginners

Also check out Boxing Clock for Android (and MABG), search Stack Overflow, read Android Developers Guide and Reference. Toast private void tToast(String s) { Context context = getApplicationContext(); int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, s, duration); toast.show(); } … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Android Cheatsheet for Beginners

TextViews in Android

TextView is a text field, usually user editable. You can read and write TextView values from code. You often have to cast between CharSequence, String, int and other types. Prequisites: Android Hello World Explained Read TextView final TextView q = … Continue reading

Posted in Uncategorized | Tagged , , , , , | Comments Off on TextViews in Android

Tee yksinkertainen laskin Androidille – Läksy kurssilla "Mobiili tuotekehitys" bus4tn008-1

Tee Androidille yksinkertainen laskin. Se voi laskea vaikkapa painoindeksin, huoneen tilavuuden tai muuntaa vanhentuneita mittayksiköitä nykyaikaisiksi.

Posted in Uncategorized | Tagged , , , , | Comments Off on Tee yksinkertainen laskin Androidille – Läksy kurssilla "Mobiili tuotekehitys" bus4tn008-1

Simple Button for Android – XML onClick + public method

Probably the simplest way to create Android Button. Create a new public method (e.g. goButtonClicked) and add it to your layout XML. Prequisites: Android Hello World Explained In Java, define a new public method that takes view as parameter. public … Continue reading

Posted in Uncategorized | Tagged , , , , , | 4 Comments

Lifecycle Code Example for Android – onCreate(), onPause(), onResume()

In Android lifecycle, methods are automatically called. This simple example toasts a message each time this happens. Create a new project SimpleStuff, package com.botbook.simplestuff. Run your program and see the states change. Press home button to stop the program. Hold … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

Fix Android Build Problem with main.out.xml and strings.out.xml

When you edit an Android XML file in Eclipse, build fails and main.out.xml is created. Fix it by disabling XSL transformation build and set to always build the last build. Eclipse: Window: Preferences: Run/Debug: Launching: Launch Operation -> Always Launch … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | Comments Off on Fix Android Build Problem with main.out.xml and strings.out.xml

Shaking Tower Panda for Android

Update: Thousands of installs in just two weeks. Great review. Save the Panda! Kimmo and Ville created a new Android game. Panda is trapped on a tower and your goal is to get him back to the ground safely. Remove … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | Comments Off on Shaking Tower Panda for Android