Monday, 20 January 2014

BreakFree is Officially Published

Hello peoples. Its been two days since the launch of BreakFree, and the response has been decent. I've collected about 75 odd downloads with seven people rating it (all 5 stars as yet, woohoo). I would have obviously liked the download numbers to be better, don't we all hope for our apps going viral, but this is still ok. Considering this is a beta launch and I did not marketing whatsoever, except for posting comments in some articles and Youtube videos.

I have already made two updates due to the bugs found by users. I have also created quick and dirty website (it seriously was quick, about 3 hrs to learn Wordpress and create the website). You can check it out by clicking the 'BreakFree' link under 'My Apps'.

My strategy is to wait till I get about 500 downloads, after which I start my heavy duty promotions. I am still coming up with a plan for the promotion piece. Will share that you as well.

Attaching a few screenshots of the app. You can get more detail by visting the website or the Google Play Store page.

Have fun.





Saturday, 18 January 2014

BreakFree App Launched for Android

Just wanted to send a quick note out to tell you that I have launched my third app, BreakFree. The app is meant to help users use their smartphones mote constructively. The app monitors your phone usage, gives you an 'Addiction Score' and also gives you tools to help you be away from your phone.

Give the app a try, I am sure it will help you save time for the important things in life :)

Get it on Google Play


Wednesday, 8 January 2014

December Income Report

My App Download and Income report for the month of December. 

My sales for December are almost identical to the November sales. Not surprising at all, considering I didn't put in any updates for my apps. I've just been working on my upcoming app 'BreakFree', which should be out (hopefully) this month. 



Fuel Buddy



Downloads in December: 3363
Admob Revenue: $123.06
eCPM: $0.73
In-app: 32 Orders, $51






Pingy Pong



Downloads in November: 1304
Admob Revenue: $21.22
eCPM: $0.36

Sunday, 29 December 2013

Andlytics - A Nice Substitute to the Google Play Developers Console

I wanted to talk about this app Andlytics that I have been using since a while now. Andlytics provides stats for your app listed on Play Store in a clean and concise manner. For me it trumps the Google Play Developers Console because of the following:


  • Its an App - Duh.. all said and done the experience of clicking a button and watching data load on a native app is superior to opening a web page on your mobile, zooming in and making sure you click the right link.
  • Features Ratings/Comments for the Day - This is probably the biggest plus for me. I get to see how many ratings/comments I have received on a particular day. This data is impossible to get on the Developer Console unless you manually make note of the ratings and comments everyday.
  • Features Percentages - Andlytics divides stats into majorly 4 parts, comments, downloads, revenue and ratings. All of these feature a percentage feature which is missing in the Google counterpart. Eg, I know what % of my total downloads are active installs and how this % is tracking on a daily basis. Or what % of my total comments are 5 starts, etc.
It also lets you integrate your Admob a/c, which I honestly I do not find very useful. I still prefer going to the Admob html page to view my revenue.

All in all this is a very useful app if you have your app listed on the Play Store. This app cannot replace the Developers Console, because you get a lot more analytics there, but for frequent checking of data on your mobile phone, this app definitely is the best I have found.

You can download Andlytics from the Play Store.

Friday, 6 December 2013

Create a Circular Progress Bar in Android

For my current project, BreakFree, I needed a circular Progress bar, and not the spinning kind. A progress bar that behaves like the horizontal one, but is circular. 

A circular one would fit my layout a lot better. I did not find a straight answer on the internet  but I did manage to put one together, so I thought I'd write a TUT for it. In case anyone decides on creating such a Progress Bar.

This is what the final result should look like (Ignore the number in the center):




Lets start with the steps to recreate this view.

1) You will need to create a drawable which defines your progress bar. Here you will give it the shape of a ring. Adjust the inner radius and thickness of the ring as you wish. I have also added a gradient starting from red, moving to yellow and then ending in green. You can play around with these settings.


<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@android:id/progress">
    <shape
             android:innerRadiusRatio="3"
             android:shape="ring"
             android:thicknessRatio="7.0"
             android:useLevel="true">
  <gradient
             android:startColor="#fb0000"
             android:endColor="#00FF00"
             android:centerColor="#fbf400"
             android:type="sweep" />   
</shape>
</item>
</layer-list>

2) In your layout xml, create a horizontal Progress bar. And set the progressDrawable to the drawable file created in step 1 (in my case I have named the file in step 1 circular_progress_bar.xml.

<ProgressBar
        android:id="@+id/progressBarToday"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="250dp"
        android:layout_height="273dp"
        android:layout_centerInParent="true"  
        android:indeterminate="false"
        android:max="48"
        android:progress="45"
        android:progressDrawable="@drawable/circular_progress_bar" />

3) Most of our job is done. Now the only problem is that since this is a horizontal progress bar, it is aligned horizontally and not vertically. So basically the start and finish is to the right of the circle and not at the bottom. To counter this I used RotationAnimation to rotate the Progress Bar by 90 degrees. This will rotate the progress bar and the start and finish will be at the bottom of the circle making it look realistic. Since I have not specified a duration the animation will happen as soon as the view is created.


ProgressBar pb = (ProgressBar) view.findViewById(R.id.progressBarToday);

Animation an = new RotateAnimation(0.0f, 90.0f, 250f, 273f);
an.setFillAfter(true);
pb.startAnimation(an);

I hope this helps.

Until next time.

EDIT: Lollipop onwards Android has changed the default value for useLevel from "true" to "false". Hence you now need to add android:useLevel="true" in the shape tag in the drawable.

Sunday, 1 December 2013

November Income Report

Publishing my App Download and Income report for the month of November. 

Two updates launched for 'Fuel Buddy'. The major one being that the app now has in-app purchases implemented. I have added a pretty cool feature where the users can email their logs from within the app. And as with other features the email is fully customizable. I have added this an an in-app purchase. The initial sales were as expected. But then towards the end of the month the sales started to dry up. Not sure why.

In any case the numbers are much better than the October report. But still need to be better.

I have not been able to devote the time I would have liked to because I have been quite busy with the development of my third app. It should be launched in December. Will keep you guys posted.

My numbers are below:

November Download and Income report



Fuel Buddy



Downloads in November: 3359
Admob Revenue: $128.47
eCPM: $0.76
Requests:169,911
In-app: 16 Orders, $25






Pingy Pong



Downloads in November: 1247
Admob Revenue: $17.31
eCPM: $0.37
Requests: 48,083

Friday, 29 November 2013

Create a Fade In/Fade Out Effect With Fragments Within a View Pager

So I am working on my new app, and from the start I wanted it to have a combination of Pager Tabs Strips and View Pager in my app (the kind you see in Play Store app). 

What else I thought will be cool is to have a fade in/fade out effect as the fragments in my app are scrolled within the View Pager. I have not seen this being implemented in any other app, so thought I'll explain how I did it.

First, familiarize yourself with what a View Pager is here.

1) Create an adaptor and assign it to your instance of View Pager:

MyAdapter mAdapter = new MyAdapter(getSupportFragmentManager());

final ViewPager mPager = (ViewPager) findViewById(R.id.pager);

mPager.setAdapter(mAdapter);

2) Create an On Page Change Listener for you View Pager instance:

mPager.setOnPageChangeListener(new OnPageChangeListener() {

      @Override  
       public void onPageSelected(int position) {}

      @Override
      public void onPageScrolled(int position, float offset, int arg2) {}

      @Override
       public void onPageScrollStateChanged(int state) {}
}

3) The idea is to reduce or increase the alpha value of each fragments parent layout as you scroll in and out of the fragments. I have three fragments, each with one parent layout:
Fragment 0: achievementLayout
Fragment 1: dbLayout
Fragment 2: adHocLayout

Before you can increase/reduce the alpha levels on these layouts, you need to retrieve your layouts in the onPageScrollStateChanged method. I found it best to get the current page being scrolled in this method itself, using the SCROLL_STATE_DRAGGING event. The page being scrolled is being stored in temp_page. 

@Override
public void onPageScrollStateChanged(int state) {
       //define layouts once
       dbLayout = (RelativeLayout) findViewById(R.id.dbLayout);
       adHocLayout = (RelativeLayout) findViewById(R.id.adHocLayout); 
       achievementLayout = (RelativeLayout) findViewById(R.id.achievementLayout);

       //once dragging starts capture the dragged page
       if(state == ViewPager.SCROLL_STATE_DRAGGING){
              temp_page = mPager.getCurrentItem();
       }
}

4) Now that we have the page being scrolled and the layouts, we can start the fade in fade out. This will happen in the onPageScrolled method. 

@Override
public void onPageScrolled(int position, float pos, int arg2) {
        switch (temp_page){
        
             //Fragment 0 scroll
             case 0:
                  achievementLayout.setAlpha(1-offset);
                  break;

             //Fragment 1 scroll
             case 1:
                   //swiping to higher
                   if(temp_offset<pos){
                           dbLayout.setAlpha(1-pos);
                           adHocLayout.setAlpha(pos);
                  }
                  //swiping to lower
                  else if(temp_offset>pos){
                          dbLayout.setAlpha(pos);
                          achievementLayout.setAlpha(1-pos);
                  }
                 temp_offset = pos;

                 break;

           //Fragment 2 scroll
           case 2:
                 adHocLayout.setAlpha(offset);
                 dbLayout.setAlpha(1-offset);
                 break;
      }
}

Offset value starts from 0 and goes up to 1 when a fragment is scrolled from left to right, and vice versa when scrolled from right to left. Hence alpha is set either directly or by doing a (1-offset). The tricky part here is how to determine if the fragment is being scrolled left to right or right to left in the case of the middle fragment (Fragment 1). To overcome this, I used a temporary variable temp_offset to capture the offset value and compare it to the next offset value, if temp_offset is lower than the next offset, then the fragment is being scrolled from right to left and vice versa. 

There are a few other minor tweaks which you can make to smoothen the scroll and the flickering. But if you've understood the above piece, that is child's play.

Hope this helps.

Till next time.