In the past month I have followed the book Beginning iOS Programming to build the Bands App, which has many features, such as accessing iPhone's photo album and camera, data storage, sharing band information via email and instant message, searching internet for band information, finding music stores on google map, and using iTunes web service to listen to song previews.
Today I also build my first Android App: the Birthday Calculator. The idea came from a friend, who used to have trouble calculating per person bill for a birthday party, where the person on birthday is free of charge, other people pay. He wanted an App to do the calculation. I did it today, just one day, about 8 hours. It's more just like a Bill calculator, given total bill (plus tax), tip rate, and number of persons, calculate per person bill. When running inside Android simulator, the interface is like this:
The top text box lets one enter the total bill (plus tax). Under this the user can choose from 4 fixed tip rates: 10%, 15%, 20% and 25%. It also allows the user to enter a customized tax rate, which defaults at 17% when the App initially starts. Under this the user can increase or decrease the number of persons using two buttons, or enter directly in the text box to the right side. The last line in green shows per person bill. Whenever the user changes anything on the UI, the bill, the tip rate, or the person number, it automatically updates all other fields for the change, so you see all the values instantly update on the interface as you type.
Considerations are made for exception cases. The total bill allows only decimal number input, and there are the cases the user enters something like ".25". When "." is first entered, the number conversion shouldn't crash the App. The bill should also be limited to at most 2 decimal digits. The customized tip rate and person number text boxes allow only integer input. The customized tip rate is limited between 0-99%. For person number you need to avoid 0, which would lead to divide by 0 error. Listeners are used to monitor keyUP and onFocus events.
A similar calculator is the 9mi web calculator for salary. They are looking for people to make it onto Android and iOS. Feel like I'm ready for that job.
This is the first step towards a new world for me.
== OCR software ==
Another thing, a friend's son wants to build an App with OCR function. A few days ago I did a search on line about OCR library for iOS and Android.
For iOS, the Tesseract OCR iOS library can be used. Tesseract for Android is also available, see here for experience on how to use it.. The Tesseract OCR was developed at HP lab since the 1990s. Between 1995 and 2006 there were few work done, but after that it was improved by google. It is arguably (one of) the most accurate OCR library. It is under the Apache 2.0 license now. Should be handy to use.
When searching for existing OCR products, a quick search on App store using keyword "ocr" found CamScanner, which has 4.5 star rating, but OCR function is available only for premium version, which costs $4.99/month or $49.99 per year. Most others are not free, like Scanner with OCR by SwissMadeApps, Pixter Scanner OCR by Quanticapps, SmartScan+OCR by AMAXIM APPS, Perfect OCR by Pksoft Inc. etc. Leadtools OCR Application has 3 star rating and is free. OCR Scanner by Smart Mobile Store is also free. I downloaded these 2 to have a try.
OCR Scanner seems not bad in recognition quality, but it's UI interface is a little off position to the top, so the top header is half covered and can't be seen. There is no way to cancel a conversion in the middle. It allows 5 free conversions a day.
Leadtools OCR has a more friendly UI, richer functions, can cancel a conversion in the middle. But the recognition quality seems not so satisfying in dim light, and is more sensitive to disturbance.
Showing posts with label iOS. Show all posts
Showing posts with label iOS. Show all posts
Tuesday, July 1, 2014
Sunday, June 15, 2014
iPhone development
Bought a book on Beginning iOS Programming, by Nick Harris. This is a very good book imo. It directs you through the entire process of building a Bands application, which stores your favorite music bands, and allows you to search online about band information, find nearby stores in map, and listen to preview samples of the band's tracks on iTunes, it also allows you to share the band's information with other people by email or messages. So by following the book, you instantly build a full functional iPhone application with rather complex functionalities. - I got through the book in 3 weeks, with this finished Bands application on my iPhone.
But when started trying the example project, I found it's using Xcode 5 for iOS 7. The book didn't even mention which version of Xcode it's using.
I'm still running Xcode 4.1 on OS X 10.7.5, a.k.a OS X Lion. 10.8 is Mountain Lion, and 10.9 is Mavericks which was released on 10/22/2013. Mavericks is the first free upgrade of OS X. However there are quite some security media coverage on it.
Without a time machine to backup Lion, should I give up upgrading to Mavericks? After reading many of the terrible feedback on line I don't want to upgrade for now.
Why these major software upgrade prematurely only to replace stable old version and ruin their reputation and cause damage to their users? There is a point that when cross it it's overdone.
Maybe I'll stop working on iOS programming now and just concentrate on Android development.
Or let me try virtual machine. VirtualBox is free on Mac. Try to install VirtualBox and see if I can install OS X 10.8 Mountain Lion and then upgrade to Maverick. Note that Mountain Lion needs to be 10.8.4 or above to run Xcode, so if it's 10.8.3 then you need to find the upgrade. Yikes! It works! So now I can run Xcode 5.1 in Mountain Lion from VirtualBox on my Lion iMac!
About sharing files between host and guest, it can use the shared folder option in VirtualBox guest OS setting. This needs to install GuestExtension on the guest machine. The GuestExtension is often included in the OS X installation kit, or can be downloaded separately from http://download.virtualbox.org/virtualbox/. However for Mac guest, there is no way to use shared folder this way, because GuestExtension is not available for Mac. So the alternative is to use file sharing on a network. For this, the guest machine should set network as "Bridged Network" instead of "NAT". Then the host and guest can share files on the local network. The file transfer speed can be as fast as hundreds of MB per second.
To remote desktop to PC from a mac, one needs to install Microsoft Remote Desktop Connection Client for Mac.
To install Mountain Lion on VMWare on PC seems hard. But use VirtualBox is fine.
But when started trying the example project, I found it's using Xcode 5 for iOS 7. The book didn't even mention which version of Xcode it's using.
I'm still running Xcode 4.1 on OS X 10.7.5, a.k.a OS X Lion. 10.8 is Mountain Lion, and 10.9 is Mavericks which was released on 10/22/2013. Mavericks is the first free upgrade of OS X. However there are quite some security media coverage on it.
Without a time machine to backup Lion, should I give up upgrading to Mavericks? After reading many of the terrible feedback on line I don't want to upgrade for now.
Why these major software upgrade prematurely only to replace stable old version and ruin their reputation and cause damage to their users? There is a point that when cross it it's overdone.
Maybe I'll stop working on iOS programming now and just concentrate on Android development.
Or let me try virtual machine. VirtualBox is free on Mac. Try to install VirtualBox and see if I can install OS X 10.8 Mountain Lion and then upgrade to Maverick. Note that Mountain Lion needs to be 10.8.4 or above to run Xcode, so if it's 10.8.3 then you need to find the upgrade. Yikes! It works! So now I can run Xcode 5.1 in Mountain Lion from VirtualBox on my Lion iMac!
About sharing files between host and guest, it can use the shared folder option in VirtualBox guest OS setting. This needs to install GuestExtension on the guest machine. The GuestExtension is often included in the OS X installation kit, or can be downloaded separately from http://download.virtualbox.org/virtualbox/. However for Mac guest, there is no way to use shared folder this way, because GuestExtension is not available for Mac. So the alternative is to use file sharing on a network. For this, the guest machine should set network as "Bridged Network" instead of "NAT". Then the host and guest can share files on the local network. The file transfer speed can be as fast as hundreds of MB per second.
To remote desktop to PC from a mac, one needs to install Microsoft Remote Desktop Connection Client for Mac.
To install Mountain Lion on VMWare on PC seems hard. But use VirtualBox is fine.
Friday, May 4, 2012
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2026
(36)
-
▼
June
(19)
- C10K to C10M: from thread-per-connection model to ...
- Benchmark server performance
- Application server for php, python, java, node.js,...
- Application server for C++, Go and Rust
- Nginx as reverse proxy and load balancer
- Infrastructure running: nginx, apache, php, python...
- Flow chart of nginx+apache+uvcorn infrastructure
- Flow chart of apache+uvcorn infrastructure
- Uvicorn and Gunicorn
- What's deadsnakes PPA
- What's the optional lsb-core package
- Codex known logging bug
- Daemonsize a service
- Train text to image model, to generate images of c...
- Train a model based on OpenAI API
- Open port 8080 for WebSocket
- Add websocket support on Bluehost Ubuntu VPS for D...
- Install Claude Code on ubuntu VPS of Bluehost
- Install PostgreSQL on Mac
-
▼
June
(19)
