The Cocoa and Cocoa Touch frameworks has a really nice function for acquiring a localized string NSLocalizedString(). Just pass in a key and you are done, for strings that are known at least. Sometimes you are getting unknown strings from a data source not under your control, strings representing just a fraction of the text [...]
Entries Tagged 'Embedded' ↓
Google Translate and iPhone apps
January 11th, 2010 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
Tags: frameworks, iphone, localization, mobile, objective-c, web
OpenGL ES Tutorial for Android – Part III – Transformations
January 1st, 2010 by Per-Erik Bergman — Android, Embedded
Last tutorial was about building your polygons. This tutorial is all about transformations, how to move the polygons around. I will continue this tutorial from where the previous ended so you can use that source code or make a copy of it. I am not going to bore you with a lot of mathematics but [...]
Tags: opengl es, programming, tutorial
Java ME: The Lost Application
December 11th, 2009 by Darius Katz — Embedded
As a professional Java ME developer I’ve never really come to terms with the MIDlet class and its underlying aesthetics. As a sort of remedy I often use a simple utility-class I wrote some years ago to conceal the principles of the MIDlet class. It concerns the way you write your Java ME-application so I [...]
Tags: innovation, j2me, java me, programming
OpenGL ES Tutorial for Android – Part II – Building a polygon
December 4th, 2009 by Per-Erik Bergman — Android, Embedded
Previous tutorial was all about setting up the GLSurfaceView. Be sure to read it beacuse it’s a really importent one to be able to continue. Building a polygon In this tutorial we will render our first polygon. 3D models are built up with smaller elements (vertices, edges, faces, and polygons) which can be manipulated individually. [...]
Tags: opengl es, programming, tutorial
OpenGL ES Tutorial for Android – Part I – Setting up the view
December 3rd, 2009 by Per-Erik Bergman — Android, Embedded
I’m going to write a couple of tutorials on using OpenGL ES on Android phones. The theory of OpenGL ES is the same on different devices so it should be quite easy to convert them to another platform. I can’t always remember where I found particular info so I might not always be able to [...]
Tags: opengl es, programming, tutorial
Pimp-my-Pumpkin!
October 16th, 2009 by Peter Neubauer — Embedded, Java
As Halloween is approaching and the aftternoons grow rainy, it’s time for some tinkering. So, why not try to get the pumpkins a bit more interesting than cut-out veggies? Getting some tinkerers together was no problem, so we got three families with kids, 4 pumpkins, one LEGO Mindstorms set and 2 Arduinos to start with. [...]
Tags: innovation, lego mindstorms, open source, programming
The BROWSABLE category revealed
September 24th, 2009 by Mattias Rosberg — Android, Embedded, Java
Assume that you on your desktop computer browse to a web page with the following page source Clicking on the first link you expect your browser to start a new tab and navigate to the url that was specified in the href. If you click on the second link you would expect that the browser [...]
Tags: mobile
Add some polish to iPhone app start up
June 29th, 2009 by Fredrik Olsson — Cocoa, Embedded
First impressions last, and the very first impression your users have of your iPhone application is the start up. First step is to have a nice Default.png, but not many words spilled on that one, it is well covered in Apple’s documentation. Creating a perfect Default.png is impossible, especially if you have different setup of [...]
Tags: frameworks, iphone, mobile, objective-c, programming
Regular Expressions and Cocoa
May 6th, 2009 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
Regular expressions is a powerful tool for solving many problems related to text. It can be misused as any good tool, but there are moments when they are the best solution for a given problem. At those moments the lack of regular expressions for Cocoa on Mac OS X and Cocoa Touch on iPhone OS [...]
Tags: apple, frameworks, iphone, mac, mobile, objective-c, open source, performance, programming, regex
Working with SD cards in the Android emulator
April 22nd, 2009 by Mårten Österberg — Android, Embedded
Working with external storage in the Android emulator could be a little tricky and the documentation is not easy to find. I’ll try to give a brief walk through of the steps needed to create a SD card image, mount the image in Linux, put content on it and use it in the emulator. Creating [...]
Tags: linux, mobile, sdk, tools
Adding Sorted Inserts to Cocoa Arrays
March 28th, 2009 by Fredrik Olsson — Architecture, Cocoa, Embedded, Tips & Tricks
NSArray and NSMutableArray have methods for sorting arrays, NSArray returns new sorted arrays and NSMutableArray can be sorted in place. The sort methods comes in three flavours; using a function, using a selector, or using an array of NSSortDescriptor objects. NSArray admits to sorts being a slow operation, and adds a method pair for comultive [...]
Tags: frameworks, iphone, mobile, objective-c, open source, performance, programming
Layout resources in Android
March 26th, 2009 by Mattias Rosberg — Android, Embedded, Java
One thing that often confuses developers new to the Android platform is the handling of layout resources. The xml files describing the layouts are magically transfered into a more efficient binary format behind the scenes and hidden away – leaving the developer with a static reference to the resources via the R.java file. By using [...]
Tags: mobile, programming, tricks
Bridging the Gap Between Java and Cocoa
March 24th, 2009 by Fredrik Olsson — Architecture, Embedded, Java, Tips & Tricks
Many Java developers are looking at new dynamic languages, such as Groovy and JRuby, mostly because of the freedom and rapid development that a dynamic language allows. Some of my colleagues are also looking at Cocoa and feel daunted at the sight of Objective-C. Here I will use a small example that is easy and [...]
Tags: design patterns, frameworks, iphone, mobile, objective-c, programming, ruby
UIToolbars in iPhone OS 2.x
March 22nd, 2009 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
The new release of iPhone OS 3.0 adds some nice API:s for managing a contextual toolbar. This is well needed as toolbars in the current iteration of iPhone OS is not only poorly documented, it is also quite hard to do right. So I will go over how to do toolbars the right way, for [...]
Tags: apple, design patterns, frameworks, iphone, mobile, objective-c, open source, programming, tutorial
Getting started with JavaME jUnit testing
March 22nd, 2009 by Mattias Severson — Embedded, Java, Testing
Introduction Unit testing is a very powerful tool that should be included in every developer’s toolbox. Unfortunately, this has not always been the case, especially not among MIDlet developers. One reason is that JavaME projects usually are small (compared to Java SE projects), which implies that manual testing could be enough. However, as soon as [...]
