There are two reasons for services. One is for background task and the other is for communication between processes. There are two types of services: Local and Remote. If a service is started via Contex.startService(), then it is a Local Service. Remote service requires a AIDL file. AIDL stands for Android Interface Definition Language. In Eclipse, java code will be automatically generated for AIDL files. To me, the majoy difference between the local and remote service implementation and invocation is the AIDL file. The other steps are similar. Another difference is that local service as its name implies is only available to the parent process that invoke it while Remote service is available to all process in the same device (wihtin the same adroid phone for examle).
I want to publish an iphone app. And this time I want to make a fun game. I had made two small games in my iphone programming class but I don’t feel like publishing them because they are too generic. I want to make something looking good and a bit more complicated then what I did in class. In class we used iOS’s basic uikit library, which is not good for making fancy graphic games. I decided to use a game engine. The two very famous game engines on the market are Unity and Unreal. They both have free download versions for individual developers. After some research, I decided to use Unreal Engine for two main reasons. First, the Unreal Engine free version offers complete features. It offers the same functionality as the paid version. Unity’s free version is a stripped down one, some nice functions like advanced shaders are not available. Second, Unreal engine has better graphic rendering, the games made with Unreal looks better than games made with Unity. Top selling games like Gear of War, Unreal Tournament, and Mass Effect 3 are made with Unreal Engine.
I downloaded th Unreal Development Kit(UDK) and want to try it out. No surprise, it’s not easy for a beginner trying to make sence out of it. I have to search for documentations online. It turns out this UDK has a steep learning curve. Another thing I need to consider is that the Unreal Engine is a 3d engine. For starting game programmer, it’s better to use a 2d engine. Currently there is no better ios 2d engine than coco2d which I had been reading tutorials on it. I have to put down the UDK for now and work on coco2d first. And I just found out there is a framework named coco2d-X which is a C++ port of coco2d (objective-C). The good thing about coco2d-X is that it works on both iOS and Android. Write once and it runs on both mobile platforms with little tweaking. Sounds nice.
I once thought about getting a job as a game programmer. However, the researched facts turned me away. Here are the facts about professional game programmers: lower pay than other software professionals; much longer work hours(60-80 hr/week); much higher competition (people start making games at 15, a lot of people want to make games), people burnt out in 5 years or so. It is better to keep it as a hobby.
It’s a simple Temperature Converter that does conversion between Celsius and Fahrenheit. The codes are simple. One significant thing in this 2nd app is that I had embedded Admob and Leadbolt codes in it. So it will show Ads. Since the app is free, ads is the only way to get some rewards for the effort of creating the app. I don’t think this simple app will generate any ad money but it’s certainly a good practice. At least now I have a clear idea of how to put ads in my apps. Here is the link to my Temperature Converter in Google Play. Google Play is a great place to publish your apps. For beginning Android programmers, my advice is don’t wait. Publish it as soon as you have a simple functioning app. You could always add features later. When an app is published, I get a lot of motivation to work on the next one.
Over the last 6 months. My site was attacked by ad bots more than 5,000 times as evidence by the as many garbage comments I received on my posts. I installed Akismet plug-in immediately. Akismet is a spam protection app for WordPress. It worked to a certain degree. Some smart ad bots can simply by pass Akismet and post to my WordPress database directly. In order to defeat these smart ad bots, I ended up modifying one of Worldpress’s scripts. I don’t remember the details now. But it did eliminate 99% of the ad bots. The other 1% comments spams I have to manually handle them. I could live with that.
The Internet is such a messy place. Some unethical advertising companies and individuals just want to go out of their way to spam people so that they could have more click traffic and profit from them. Our government should enfore severe penalties for spamming on the internet.
I didn’t expect my first app for the Android market is an assignment from my Android class in City College of San Francisco. It’s a Quiz game on US state and capitals. I just think it would be cool to see my app actually appear in Google Play. At first, it seemed to be a difficult task to publish a game. I was prepared to spend 4 days to complete the publishing process. It turned out to only take me 2 to 3 hours. My time for publishing work was mostly spent on making the right size screen shots. Google required the screen shots to be exact for example 480 x 800. There are several sizes I could choose from. But the pixels need to be exact. You can’t have a 481 x 800 for example. What I did was use Print Screen to get a screenshot of the emulator. Opened windows Paint and pasted screenshot on a blank file, save it. And then I opened this same file with GIMP2 and used GIMP2’s crop tool to crop image to be exactly 480×800. GIMP2 is a free graphics software comparing to Adobe photo shop. I only use GIMP2 for precise cropping of images. Oh here is the link to my first Android App Quiz of States and Capitals. It’s a free app of course. I would be happy if someone like it. I certainly want to publish more Android apps later. At the least I can polish my programming skills. I had made several updates to the app after publishing it. There is always room for improvement on a piece of software.
By the way the Android class in City College of San Francisco is a good class taught by Abbas Moghtanei. If you want to learn Android programming, Abbas’ class is a good starting point.
It turns out Amazon does have a shopping cart for other eCommerce sites. It is similar to Google Checkout. One advantage of Amazon payment is that many people already have an amazon account, so they don’t have to sign up new accounts. They can use their existing Amazon account to make purchases. The bad news is that Amazon payment is relatively new compare to Paypal and Googlecheckout. I haven’t found a sigle popular Worldpress ecommerce plugin to support Amazon payment. If I want to use Amazon payment, I need to write more custom pages than using a plugin.
Bluehost.com provides unlimited email accounts for clients. I guess this is a good common feature for web hosting. Today I created an email account for one of the company officers, and she was very happy about having her own personal email account with this non-profit organization. Haha… I guess she is a happy girl overall and cherish all the little things she get. A great attitude. Many of us focus on the things we didn’t get instead of the many little things we have. Optimism is much better, we all know it, but we tend to forget about this principle.
I need a shopping cart for the site I am working on. Without much research I could only think of two products: GoogleCheckout and Paypal. I used both products before and no problems with either one. Those experience was from being a buyer. Now I am going to be the seller. So which one to use? Everytime I have a question, my default answer is goole it! And I found this article comparing the 2 shopping carts. Exactly what I want to know. In short, Google’s advantage is that your shopping cart fee will be lower if you have Adword account link to it. Paypal’s advantage is that customers can use their paypal accounts. Googlecheckout does not provide payment method through Paypal. As for developer like me I find it much much easier to use Google’s Store Gadget to set up a store. I try that Gadget thing and had my store setup in 5 minutes. That’s very impressive! In paypal, it took me near 5 minutes just to create a buy button. So, I go with GoogleCheckout. In limit experience, Googlecheckout wins. If you want your customer pay by Paypal, go with paypal’s shopping cart.
I made some changes to quite a few page files in my wordpress production site. And I don’t want to do the same changes again in my development site. So I used phpMyAdmin to export the production database and then import it to my development database. Wow, it turned out to be a mess. Since I imported the whole production wordpress database to development. Now some links in my development site points to the production site. And the worst part is my development site wordpress admin login page was now unaccessible. Luckily, phpMyAdmin still works which allowed me to change the wordpress options table manually. So I changed my development site url back to local and things work again. I was thinking to to reinstall WordPress at first. Thank god I don’t have to. Be very careful when you import wordpress database using phpMyAdmin.
The default password generated by WordPress was hard to remember. So I want to change it. It turned out to be quite easy. Log into wordpress admin page. Click Users on the left side menu then edit the admin user. In the password field enter new password and save it.