Unit Price Calculator Android App

Do you want to save money on standard package item, mega package item or any other item you purchase? To get a good deal and save some money, you need to know how much you are paying per unit. That’s a reason I have created Unit Price Calculator.

unit price calculator
Compare unit price

This app will help you calculate price per unit for every item. You can also calculate price per 1 item if the items are in bulk. For example, you can calculate price for one toilet paper roll in a 6, 12, 18, 24 or any other quantity in one package. Doing so will help you know which bundle offer the best price for your money so that you can save on your daily purchases.

What can you do with Unit Price Calculator Android app?

– You can compare unit price for up to four items
– You can save item’s name, size, price, and store name for later reference
– You can create shopping list and save it on your phone
– You can save a lot of MONEY!

Unit price calculator is available in more than one language. To this date, this app is also available in Spanish, Italian and France. I am working to add more languages like Germany, Portuguese and many more depending on demand. Also, if you think Unit price calculator can be beneficial to you and would like it to be translated to your native language, please do not hesitate to let me know.

If you would like more features added to the app, remove something or you experience any kind of a bug or error, you can always leave a comment or send me an email and I guarantee you that I will work on it as soon as time permit. This will make your experience more friendly.

Last but not least, I will appreciate if you will take few seconds to rate the app. This will help me get your honest opinion about the app and if it is working for you. Personally, I use this app whenever I go to the store.

My Personal Experience

The other day I went to get toilet paper from a local store. I had to make a decision between a 12 or 24 package on my two favorite brands. Using Unit Price Calculator app, I was able to compare all four items at once and able to save more than 14 cents per roll. If it was not for this app, I could easily waste more than $1.50 on just this one item. Can you imagine how much money you can save using an app like this on your daily or weekly purchases?

Posted in Android Apps | Tagged , , | Comments Off on Unit Price Calculator Android App

CakeDC Users Plugin Install Tutorial – CakePHP Application

Do you have CakeDC users plugin install problems? Here’s the solution. Currently, I am working on a CakePHP project. The project requires user management system for registration as well as capable to log in before they can access or perform some actions. Before I decide to develop my own system, I came across CakeDC Users plugin which has very good feedback from many CakePHP developers. On the flip side, new CakePHP developers struggle with this plugin when trying to install into their application.

Here is a simple and straight forward solution on how to install CakeDC users plugin. It is a step by step installation guide that I have used on my current project am working on. I hope you will be able to follow and get you going right away. I am working on a Windows XP environment using WAMP server. Also, I will be using cake console to create users table but I will not cover how to set up CakePHP console or shell. Setting up CakePHP console tutorial will be covered in the near future.

CakeDC Users Plugin Installation and Setting Up

  • CakeDC Users plugin requires PHP 5.2+, CakePHP 2.X, CakeDC Search plugin, and CakeDC Utils plugin.
  • Download CakeDC Users zip file from Github. The zip file is located at the right hand column.
  • Create a ‘Users’ folder in your app plugin folder located at [project_name/app/Config/Plugin/[Users folder goes here]

    Application Plugin Folder
    Application Plugin Folder
  • Unzip the CakeDC file and copy its contents into the Users folder created above.
  • Download CakeDC Utils and CakeDC Search plugins. These are requirements for CakeDC users plugin.
  • Create ‘Utils’ folder and ‘Search’ folder in your app plugin folder, [see step 2 above] at /project_name/app/Config/Plugin/
  • Create users table using cake console.
    1. Open command prompt – Start->run->[type in ‘cmd’]
    2. Change directory to your app folder – cd [your drive]:\path-to-wamp-www\project_name\app

      Change path
      Change Path to Project App
    3. Create users table, path-to-project\app>cake schema create users –plugin Users

      Run Cake Schema Create Command
      Create CakeDC Users Table
    4. Follow/answer questions
    5. Done. CakeDC users table created.

CakeDC Users Plugin Routes and Loading

Open your application routes.php file and paste the following code

CakeDC users routes
Declare CakeDC users plugin routes

Open your application bootstrap.php file and load all the plugin

Load CakeDC Users
Load CakeDC Users plugin

To open register page on yor browser, go to localhost/project_name/users/register.

CakeDC Users Add Page
CakeDC Users Add Page

To open login page on yor browser, go to localhost/project_name/users/login

CakeDC Users Login
CakeDC Users Login Page

That’s it for today. If you have given up before, I guarantee you that if you try this easy to follow CakeDC Users plugin installation guide, you will have your CakePHP up and running in no time. If you have any question or suggestion, feel free to address them.

Posted in CakePHP | Tagged , , , | 7 Comments

Pick a Deal – Customize Deals and Coupons You Receive

I just published a new daily deals Android app, Pick-a-Deal in Google Play this week end.

What is Pick-A-Deal?

Pick-a-Deal is an app that gives power to users by letting them personalize what kind of deals, promotions, or coupons they would like to receive. For example, if a user is interested in buying a new home, she or he will have to subscribe to that channel to receive new houses deals or promo material from realtors who are in the local market as well as financing information from banks. The same apply to other products, services or informational that users might be interested to.

No need to chase deals from one website to another, or have to download apps from different stores or services. The concept is very simple and straight forward. Consumers need to have a say on what and when they want. I believe this is the best approach for both party, namely consumer and business. Consumers will be able to get what they need, when need it and business will be able to timely compete and target the right group. Doing so will lead to a better decision making during the process as well as real competition among businesses.

The other great thing about this app is, user can only subscribe local if she or he choose to. What does this mean? If a user subscribe to local market, she/he will only receive promotional materials from local businesses. The aim is to support local businesses and help grow economy.

If you are a local or nationwide business owner, the app provides a great opportunity to reach your customers who a looking for a specific product that your business offers. With eCommerce, business can promote their products to millions of subscribers in a matter of seconds.

Pick-a-Deal is for everyone. If you are small business owner with a store front, eBay store, eCommerce site or a niche blog that sells a product, Pick-a-Deal is for you. It is affordable to everyone and you reach potential customers right away. Reach millions of customers in a matter of seconds!

Finally, we want to hear from you, users and advertisers. We will hear any idea you might have to improve your experience in order to meet or exceed your expectation.

Posted in Android Apps | Tagged , , , | Comments Off on Pick a Deal – Customize Deals and Coupons You Receive

SharedPreferences Between Applications

On my last post, I wrote about SharedPreferences Between Activities and how one activity can retrieve persistence data saved by another activity on the same application. But what if an application needs to access some sort of data stored in SharedPreferences from a totally different application? That’s what I will cover today.

Also, I will touch on something I left out in my last post, that’s mode parameters that you should pass when creating SharedPreferences objects. It will be something short and straight forward for everyone who wants to implement it.

Starting with SharedPreferences between applications, one application can access preferences from another application simply by referencing the first application package name plus a proper mode parameter. Lets say PackageTwo needs to access a preferences from PackageOne. Assuming that the first application preference was defined as a constant with a PREF_NAME name, this is how to access it.


Now, the second application can store or retrive values from PackageOne using the secondPreference object.


So far I have passed MODE_PRIVATE on all the SharedPreferences objects I have created. If MODE_PRIVATE or 0 is passed as parameter, the read and write access will only be allowed to the application that created the preference.

There are two more parameters that can be passed which are MODE_WORLD_READABLE or 1 and MODE_WORLD_WRITABLE or 2. Both modes give shared preferences access between applications. Depending on how your application is going to share data, be certain that a proper mode is passed.

Posted in Android Development Tutorials | Tagged , , , , | Comments Off on SharedPreferences Between Applications

Shared Preferences Between Activities – How to Retrieve Values

It can be tricky or frustrating when your application needs to share data between two or more activities in a very simple way. I am saying this from my own experince especially when I started developing Android apps. Soon you will realize how simple it is to store strings or numbers and retrieve between activities.

By creating SharedPreferences object, you can accomplish just that and your data will be persistance. Depending on what kind of application you are doing, the data can be anything from log in information, todo list or anything that can be stored in the key/value form.

To illustrate this, look at the two activities below. The first activity creates a shared file that will be accessed with two or more activities. I do assume that you can create a new project since I will not cover that part.

Create your first activity and give it any name. My activity keeps track of team’s score. Layout file is not shown in the example but I will reference each view that is in the layout.


Now lets access scores stored in SharedPreferences object. Again, layout file is not included below but I am going to initiate and reference all the views from it. Pay attention on how I access the SharedPreferences file.


To show a score for a specific team, a user will type in team’s name and press the “Show Score” button. If a user misspelled team’s name or one that’s not stored, the “Team not found” message will be displayed.

As you can see, shared preferences between activity above has been accomplished by accessing the file name that is declared as constant in TeamScore activity. All data stored in the file can be accessed by creating SharedPreferences the same way. This will not work for Shared Preferences between applications.

Posted in Android Development Tutorials | Tagged , , | 2 Comments

How to Hide the Title Bar in Android

An activity with title bar removed
No Title Bar – eBay Fee Calculator

How do you hide the title bar on an application in Android? I have seen this question over and over again. As a developer, you must use the small screen size very wisely when laying out your app. Yes, new phones come with a bigger screen size nowadays but still you need to make sure that all users who can potentially download your app are able to use it.

So, depending on what kind of an app you are developing, gaining few pixels by removing the title bar can go long way. I am sure if you are developing a game, you will appreciate every extra pixel you can get which in turn will improve user experience.

You can remove or hide the title bar or status bar from your activity in two ways. The one way I have used in almost all my apps is through WindowManager in an activity. It is very simple and you only need to import android.view.Window and write one line of code. WindowManager has other few features that can help you customize the look and appearance of your activity window.

Here’s how you can remove or hide title bar applied in an activity.

What if I have my own custom title? I am glad you asked. You can set custom title to an activty if you have one made in your layout resource. Following along the same lines, first you will have to request window feature as shown above and then you have to call the custom title from resources. I will show you how to create a custom title in the future.

Again, here’s hide or remove title bar by setting a custom title.

It is very important that requestWindowFeature() is made before setContentView(). If the feature request is made after, the default title will remain in place. Also, it is worth to mention that both FEATURE_NO_TITLE and FEATURE_CUSTOM_TITLE cannot be used with any other Window features because the default title is completely replaced.

The second way that you can use to remove status bar from window is by applying custom theme in the manifest file. Custom theme can be applied to a selected activity or the entire application. I will not go into how to create custom themes today but if you have one in place, you can easily apply in the manifest file as follows. Assuming style.xml is the file inside resources folder with “noStatusBar” and “noTitleBar” theme names.

Apply custom theme to remove status bar and hide title bar on individual activities.

That’s it for today. I hope this tutorial will shed some light on how to hide title bar and help you customize your activity’s title bar or status bar.

Posted in Android Development Tutorials | Tagged , , , , , | Comments Off on How to Hide the Title Bar in Android

How to Create Scrolling TextView in Android.

On my last tutorial, I showed you how to create drawable background in Android using XML. Today I will shift gears to show you how to create an app with a scrolling TextView across the screen. Not exactly sure why you would do that but hey, there are so many ideas out there and scrolling text can be useful to someone who needs it.

This tutorial will be short and easy to understand even for beginners who are looking for easy way to learn Android app development. Before I show you how to implement, you need to have your specific Android project ready with its an XML file that you are going to add scrolling text.

Although Android TextView has built in marquee feature, this option alone is not enough to make displayed text scroll across the screen. Setting android:ellipsize=”marquee” is just a key step to avoid long text from being truncated. I will show you in a second what other attributes and their respective options that need to be declared in your XML layout file.

Now lets create a scrolling text that repeats 10 times. Open your XML layout file, decide which  TextView to scroll and set its attributes as shown below.

As you can see, XML layout does the heavy lifting. I have declared two extra attributes, android:singleLine=”true” and android:scrollHorizontally=”true”.  The two attributes help position the TextView properly and make the text longer than the screen view. To make scrolling animation happen magically, set selected state to true in the main Java file.

If you want the text to scroll indefinitely, set android:marqueeRepeatLimit=”marquee_forever”. One important point to remember about marquee feature is, the text will only scroll when it is focused or selected. So if you run your project and nothing happens once the emulator is up and running, don’t panic.

That’s it for today and hope it will help you on whatever project or app idea you are trying to accomplish.

Posted in Android Development Tutorials, Android Layouts | Tagged , , , , , | Comments Off on How to Create Scrolling TextView in Android.

Monetize Apps | Best Ad Networks to Monetize App

Monetizing an app is a challenge many average developers face everyday. Either they don’t know what mobile ad networks to go to or they are frustrated with the payout they get. There are many mobile ad networks out there that you can sign up to monetize your app. With few apps I have in the market today, I have signed up with several ad networks that I am fully satisfied with. It does not cost any mone and you can simply sign up today and start making money right away.

Before I start you might ask, “Is it necessary to have more than one?” My answer to that question will be resounding, Yes. The reason is very simple and you should always remember this, “Never keep all your eggs in one basket”. Now I have answered your question, here are my most profitable ad networks.

LeadBolt Ad Network

Very easy to integrate into your app. You can display different ad format depending on app layout as well as device screen size. LeadBolt ad runs Cost Per Click (CPC) as well as Cost Per Action (CPA) ads. Both CPC and CPA offer high paying amount if users take action by clicking the ads, fill out forms, call a phone number or provide email address depending on what type of an ad they are presented in that moment. The other thing that impress me about LeadBolt is their high fill rate. It it always above 90 percent.

The standard payment schedule is monthly. To receive your payment on the 15th of the month for the previous month, you need to submit your payment request seven business days before the 15th. They refer this process as Net 15. To be eligible for Net 15, you need to have a minimum of $100 balance in your account. If your balance is below $100 or you did not submit payment request seven business days before the 15th, your balance will roll over to the following month’s payment. LeadBolt pay through PayPal, Wire or Payoneer.

Creating LeadBolt account as a Publisher or Advertiser is free. Try LeadBolt ad network today and let me know your experience.

AdMob Ad Network

AdMob ad network which is now owned by Google is one of the great mobile ad network that has been around since the inception of mobile ads. I started using AdMob about two years ago to this day without any problem or disappointments. Since taken over by Google, the network has improved in many different ways. Compared to two years ago, the fill rate range between 98 to 100 percent most of the time. You can literally intergrate AdMob SDK in your app in less than 30 minutes. The SDK instructions are very easy to follow and you need less than 10 lines of code, you are done.

The ad format AdMob offers is mostly 320X50 banners that display at a set rate in your app. AdMob Mediation is another cool tool that has been introduced recently. What this tool does is, if you have account with other ad networks that are currently supported, AdMob Mediation will serve ads from these networks. Doing so you can drive traffic from specific country or region or even from a highest eCPM network.

Earnings base on Cost Per 1000 (CPM) impressions. The more impressions you have, the more you make depending on that day effective Cost Per 1000. Payments are processed the first week of each month if your account balance is $20 or more. Any accumulated earnings that are below $20 rolls over to the following month. As a publisher, you can receive your payment through PayPal, ACH or Wire transer if you are outside US.

AirPush Ad Network

AirPush ad network was my first ad network that uses Push Notification Ads, Icon Ads and AppWall. The idea was new to me but I was really impressed with the revenue I was getting compared to other in-app ad networks. AirPush also pays on weekly basis if your earnings are over $400 a week which is big deal for developers rather than waiting 30 to 90 days. If your account is below $400 weekly balance, your payment will be processed at the 30th of each month as long as you meet a $50 threshold for the previous month. The payments are sent directly through ACH, Wire or your PayPal account.

Developers are paid on a Cost Per 1000 impressions (CPM) basis. You might wonder how they define CPM on Push Notification Ads and Icon Ads? Don’t worry. Anytime an ad is pushed to a device it counts as an impression. For Icon Ads, impressions are on new SDK installs basis. Very simple and it makes a lot of sense. Some users do not like these types of ads but from my personal experience, these types of ads a non destructive compared to in-app ads especially when you are playing a game or reading something. You can easily integrate AirPush into your apps by following their step by step instructions after downloading the SDK.

If you are looking for ways to monetize an app or best ad networks that offer higher CPM or CPC, try them and see the results for yourself. Just remember the golden rule, “Don’t keep all your eggs in one basket”. That’s all I have for today and you can find more about each mobile ad network from their sites.

Posted in Android Apps | Tagged , , , , , , , , | Comments Off on Monetize Apps | Best Ad Networks to Monetize App

How to Create Drawable Background in Android

Did you know that you can create drawable background in Android? I bet you didn’t? Creating drawable as background can make your life very easy. As you all know, compared to iPhone, Android devices come in different screen sizes not to mention fragmented operating system. If you are planning to use an image as background in your app, you will have to scale it to fit all screen sizes. You don’t want to have users who like your genius idea but at the same time you failed to present to them.

Scaling images alone can take a long time reducing development and app production time. By using XML resources, you can create custom backgrounds with different shapes and never worry again about screen sizes. Drawable background can be as stylish as you want them to be by defining different shapes like oval, ring, rectangle, or line. To spice up drawable background even more, you can apply rounded corners to rectangular shapes, border around the shape, as well as solid or gradients with different colors.

First, create your project as you normally do. If you are are using Eclipse like myself, it will create an XML layout for you. To create a drawable background, create an XML file and save in res/drawable folder. To create one, right-click drawable-hdpi, go to File ->New ->Other-> Android XML File, click NEXT -> name your file, [mine is roundbg.xml] -> select shape as root element and click Finish.

Android drawable background
Rounded Corners Drawable Background

In this example, I will show you how to create a rectangle drawable background with border and rounded corners.


Only few lines and you are done. Very simple and easy. As you can see, <shape> is the main tag in our XML drawable background. First we need to define what shape our background is going to be. In this case I defined a rectangle on line 3, android:shape=”rectangle”. Line 4, android:color define blue as our background color. To style our rectangle with rounded corners, I added android:radius with 16dip on line 5. Last but not least, I added a red border with 8dip stroke using android:color and android:with respectively.

Other shapes you might be interested to know about that can be defined in XML drawable are android:shape=”oval”, android:shape=”oval”, android:shape=”ring”, and android:shape=”line”. I will cover these in the future unless I receive a lot of request from you.

Once you have created a drawable background, you can easly reference it as you would for other resources like strings or even images in your drawable folder. Simply reference your drawable file without .xml extention in your layout using android:background=”@drawable/rectanglebg”.

Here’s the project’s main XML layout.


Hope this helps and you have learned something today. Check out these two great books, Professional Android 2 Application Development  and Beginning Android 2 to learn more about app development. Till next time!

Posted in Android Development Tutorials, Android Layouts | Tagged , , , | 1 Comment

How to Customize Displayed Text on Return Key | Android Input Method

Android IME Options
Default imeOptions Dispaly

The “Action” text displayed on the return key or enter key in Android soft keyboard can be customized with different action values using IME or android:imeOptions in your XML layout file. Some of the action values that. I am sure you have come across especially when entering text in EditText widget are “Next”, “Go”, mirror image for “Search” and few more.

As developer, sometimes we do not pay attention to cosmetic details like this. Certainly, users who use your app appreciate if they can quickly figure out how to use it once they download from the market. If the input method is not specified, the default displayed value will be set according to the phone or device.

Here’s an XML layout with and without custom input method options declared for the return key.



After creating an XML layout with customized action display on return key, we can focus on each EditText widget and see the results.

Emulator images:

android actionDone imeOptions android actionSend imeOptions

Going through the layout, android:imeOptions is not declared on name1 EditText widget.  When in focus, the displayed text on return key is by default determined by the emulator, see the first image. On the other hand when focused, the customized name2 and zipcode EditText widget respectively display “Done” and “Send” on enter key.

To finish it up on Android Input Method or IME, I have listed android:imeOptions below that can be used to customize return key with their respective action events.


Text to Display imeOptions Action Event
Send actionSend IME_ACTION_SEND
Next actionNext IME_ACTION_NEXT
Done actionDone IME_ACTION_DONE
Search actionSearch IME_ACTION_SEARCH
Default actionUnspecified IME_ACTION_NULL

Hope this is what you have been looking for and good luck on your next app.

Posted in Android Development Tutorials, Android Layouts | Tagged , , , , , | Comments Off on How to Customize Displayed Text on Return Key | Android Input Method