Draw beautiful diagram effortlessly on ipad. Click here to know more..

Tuesday, January 10, 2012

My first android app: learning+coding+publishing in 5 days


Hey! don't be surprised.  This is not a game like "Angry Birds". Typically, 5 days are not sufficient for a beginner to create a descent app. But my app is not just a "Hello World" app. This is Scratchpad: a simple drawing app. This can be used mostly by kids to draw/erase with touch and can also share the drawing using emails or any other image sharing app. The Scratchpad also has a feature of smoothing the hand-drawn curve which makes it little different from other similar apps.

Here is how this was started: During the new year vacation, I wanted to learn about  Android app development. I got 5 days: 28th Dec to 1st Jan. On the first day, I spent few hours to read about the Android app fundamentals on the Android developer website. I already knew Java, so I did not have to learn a new programing language. After reading the fundamentals, I downloaded few sample projects from internet and started running them. On the 2nd days, I was going through the source code of the samples and running them on emulator. There were many samples to run, so I was not doing any modification to code. I was quickly running those code. At the end of second day, I got confidence that I can now write an app. Then got the idea of a drawing app and then started on this.

I started on development of the drawing app on the evening of second day. Then suddenly I thought that let me release this app on 1st of Jan and make this new year very special. I had only 3 days left (including 1st Jan), I was not sure that I will be able to complete or not.

By the end of 3rd day, I had most of the features working. I was feeling much more confident. But icon work was still not done. Here is the list of things that that I completed:-
  • Drawing using touch
  • Erasing
  • Selecting color
  • Setting pen width
  • Export the drawing as png to Pictures folder, so that it can be viewed in Gallery app.
  • Share the drawing using email or any other sharing app that is installed on device.

I had to struggle a bit for color picker dialog. I could not find any standard Android widget for this. I searched on internet, there were many samples available. I tried few of them and picked one.

On the 4th day morning, I was feeling much more confident. Now I was thinking to add a feature that can differentiate the Scratchpad from other similar apps. So I decided to add a feature of curve smoothing. I already had C++ curve fitting code. Porting the C++ code to Java could take much time. I wanted to wrap-up by the day. So tried java native interface using NDK. Using NDK was straight forward. I integrated the C++ code within few hours.

By now, I was done with all features that I wanted. Now it was time to work upon icons. I searched for free icons on internet and picked some free icons. But I had to edit almost all icons in GIMP.

Now it was 4th day evening. Everything done!! I was very happy!! Now started testing and found a bug!! The bug was in the C++ curve fitting code. It was silently crashing the app. I had no idea what was wrong. Tried the debugger that comes with NDK, but it did not work properly. The NDK build was striping-off the debug symbol even if it was given debug flag. I worked around this by copying the shared object file from obj folder to libs manually after the build. But it did not help. The debugger was reading the debug symbol incorrectly. I was not able to step or print the variable values. However I was able to break the debugger at given function. Now I had two options:- give more time to fix the debugging or create a standalone Linux application or standard Java application and use and test the curve fitting code there. But these options were to take much time. Then I worked around the issue by different way. The issue used to reproduce if the number of points to smooth were very high. If the number of points are very high, then not calling the smoothing was temporary solution. In a typical usage of the app, it was not reproing.

On the last day (1st Jan), I created developer account, signed my app, created screenshots and uploaded my app. After two or three hours, it was available on the Android market.
While publishing the app, I discovered that Indian developer can not publish paid app on android market. I was disappointed by this. Although the Scratchpad was free, I have plan for my next paid app. Now I am considering iOS platform for my future paid app.

On the next day I was very disappointed to see that there were no downloads of this app. Then I shared the the app on reddit (/r/androidapps)  and then the app started getting downloaded. As of now there are 30 downloads of this app.

I wanted to replace one of the screenshot of the app on the android market. It seems there is some bug. From the web interface, it lets to upload/replace screenshot but actually it is not updating.

One more thing that I did not mention yet. The experience of working on emulator is very bad. It is too slow to work on. I was mostly working on a tablet (Asus EEE Pad Transformer). My code was crashing on emulator with older version of android (older then Honeycomb). Because of time constraint and slow emulator experience, I did not get much time to debug the issue and removed the support for older android versions. The Scratchpad works for Honeycomb and newer Android version. I guess, the Scratchpad download would have been more if it supported older version.
Here is android market link to Scratchpad: https://market.android.com/details?id=com.avabodh.scratchpad

25 comments:

  1. Do you think you can post the source code or a barebones version as a reference for others?

    ReplyDelete
    Replies
    1. As I read the articles on different information blogs and peoples showing good responses to the essay service sites and clothing brands like wasket price in pakistan that was good and amazing.

      Delete
  2. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

    Java Online Training Java Online Training JavaEE Training in Chennai Java EE Training in Chennai

    ReplyDelete
    Replies
    1. Great Article
      android based projects

      Java Training in Chennai

      FInal Year Project Centers in Chennai

      Java Training in Chennai

      projects for cse

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  3. Hello. What a fine fellow you are!
    After all, one desire to do something is not enough. You have to try, constantly learn something.
    I, as a expert in college homework help, often communicate with different students. And I know that not many people want to learn something on their own. Many people prefer that they do everything for them. It's not a problem and I'm happy to help them write essays or other college papers. But I'm very glad that there are those students who are trying, albeit with errors, but independently to learn something. After all, it shows their desire to develop, which means that most likely they will become good specialists.

    ReplyDelete
  4. Thanks for sharing, I just like the valuable info you provide for your articles. I’ll bookmark your weblog and take a look at once more right here regularly. I am an essay writer. Writing is my passion. I am working in Buy essays online writing services where I write essays for college students. They provides you opportunity to score high academic marks.

    ReplyDelete
  5. Hi, I had a problem with the essay and very good guys helped me, I just wrote them "write my essay" and they did an excellent job with the task. I recommend to everyone.

    ReplyDelete
  6. After some research, I ended up selecting resumeyard to help create a resume. I was not disappointed with their services. The turn around time was much better than expected. My resume writer was very responsive to the feedback I provided and the end result is much better than what I could have built myself.

    ReplyDelete
  7. وهناك العديد من العوامل الأخرى ، ولكن ما سبق هو أهم النقاط التي ستؤكد لك قوة شركة مكافحة الحشرات التي ستتعاقد معها لأداء الخدمة ، كل الأشياء المتاحة لنا في الفناء وأكثر ، من حيث استخدام المبيدات الآمنة ، واختيار الموهوبين من الأفضل في مجال رش المبيدات ومكافحة الآفات في جميع أنحاء العالم ، وتوفير ضمان كامل وشامل لرضاكم ، وتلبية التواريخ المتفق عليها مقدما.
    ارخص شركة مكافحة حشرات

    ReplyDelete
  8. I am really satisfied with this service. You can rewrite my essay and it are always supplied through a highly qualified and very experienced rewriter who are able to provide you with completely detailed and unqiue copies of your papers.

    ReplyDelete
  9. As we all know that the one of the most famous and most trending faculty all over the world is the IT, CS and programming faculty and in this sense the students often stuck with their academics activities of diploma assignments writing help in regards of coding and programming for the application development although web or app. Such type of post really motivate and provide help to the students of those.

    ReplyDelete
  10. one click root email and password crack
    One Click Root Key It enables one to scroll through any menu or page in the top to the underside with a single touchscreen. Pairing the top left corner can take one into the upper and at the top side, you sometimes choose the pub into the ground.

    ReplyDelete
  11. speedify crack
    Speedify VPN Crack could be the quickest universe using a highspeed VPN. This instrument creates an elaborate job at this informative specific article performs.

    ReplyDelete
  12. expressvpn activation code
    Express VPN Crack is the totality of several big VPN services. Because it offers special-security entree to the Internet.

    ReplyDelete
  13. Sidify Music Converter Crack Free Download
    Sidify Music Converter Crack Expert is a tool for downloading audio straight from Spotify or even YouTube. It might capture/transform new music along with aac format in 320 kbps.

    ReplyDelete
  14. Tenorshare ReiBoot Crack Free Download
    Tenoreshare ReiBoot Activation Key is a very powerful free software for you to easily and easily get the recovery mode and out the device with a single click, which allows you to completely prevent all type of screen (White Apple Logo / Black screen/boot screen iTunes error in iOS/upgrading/restoring iOS on iPhone/iPod/iPod Touch without any loss or data loss.

    ReplyDelete
  15. Reimage Pc Repair Crack Free Download
    Reimage Pc Repair Crack is the best tool for solving all window’s problems. When you using the system and to your pc window and any software is a crash has solved this issue at all.

    ReplyDelete
  16. Wondershare Video Converter Ultimate Crack Free Download
    Wondershare Video Converter Torrent is a simple digital video converter. It also behaves as a DVD burner and changer from windows 8.

    ReplyDelete
  17. V-Ray SketchUp Crack Free Download
    V-Ray 2020 Crack for SketchUp brings up all the rendering, shading and lightening tools needed to create professional, photo-real images and animations. The tool specially designed to bring ease into the biggest projects and scenes. It enables the user to render anything in SketchUp by saving them time and brings you towards creativity.

    ReplyDelete
  18. Serato DJ Pro Crack Free Download
    Serato DJ Pro Crack is a very powerful and great application, especially for many who work with electronic digital music. Inside our checks, this program demonstrated high quality and good operation.

    ReplyDelete
  19. Clip Studio Paint Crack Free Download
    Clip Studio Paint Crack technologies are making progress day by day.old discoveries now are light compared to modern inventions.

    ReplyDelete
  20. Fully sanitize cabs we do checked drivers for every ride for u safe and happy journey. Mumbai Nashik pune or ANY OUTSTATION taxi available Cheap rate Sedan Suv Muv available. Open 24/7. Safe Rides. On Time Service. Courteous Driver. Clean Car.

    Outstation Local Taxi Service in Mumbai | Outstation Local Taxi Service in Shimla | Outstation Local Taxi Service in Haridwar | Outstation Local Taxi Service in Jodhpur | Outstation Local Taxi Service in Goa

    ReplyDelete
  21. That's nice! Creating your own program is really difficult especially if it's a game. You have to be very knowledgeable in coding. I'm also practicing coding because I want to develop a game. But, while my skills are not that yet developed, I enjoy my time looking for fun games to play. Recently, I have been a fanatic of Pokemon Go. Fortunately, there is already Pokemon Go for PC. Thus, I can play it in a bigger screen. There’s also this guessing game which I’m fond of visiting whenever I want some quick entertainment. You can find the app here: https://sites.google.com/view/akinator-pc

    ReplyDelete