Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Tuesday, February 10, 2015

Fix Parse 101 Error object not found for update

parse-com-cloud-screenshot


Parse.com is one of leading cloud service provider. I implemented push notifications in an ODesk based freelance client's app last year. They returned with some more work (I love returning clients!) and a request for updating the old app to latest Parse.com APIs. Latest Parse API version number is 1.8.2 at time of this writing.

I opened Parse.com documentation and started following it for sake of update. Several old methods have been deprecated from the API. For example the method
        PushService.subscribe();

Google's Mindset about adopted children Mozilla Firefox & Eclipse IDE

I had to switch from Eclipse IDE to Android Studio which is the new Google darling for writing code. Google did the same thing with Mozilla Firefox browser a few years back, they kept feeding Firefox to fight bloody battles with Microsoft Internet Explorer while they were conceiving their own child 'Chrome'. Once their own thing was in good shape, they kicked the adopted open source child out of their home.







How to fix Error object not found for update code 101

While following the instructions in Parse.com documentation I pretty much hit the wall with error 101. I then downloaded their sample application and in there I found some lines of code which were not mentioned in the docs. Adding these lines to my app code (application class onCreate) fixed things right away. The magic lines of Java code are given below:

ParseCrashReporting.enable(this);

// Enable Local Datastore.
Parse.enableLocalDatastore(this);

// Add your initialization code here
Parse.initialize(this, "*******", "******");

ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();

ParseACL.setDefaultACL(defaultACL, true);

// save the installation
ParseInstallation.getCurrentInstallation().saveInBackground();

I believe my readers will have enough sanity to avoid using * strings as parameters to initialize call.

Side note, more than one Parse.com apps

I also noticed later that I already had a parse.com app installed on my phone. This was the older version of the app which I was trying to update. So, I removed the older app as well just to get over with any confusion.

Bonus, a cool code image

Last but not least, here's a bonus C code image for you. I got it from pixabay, its a royalty free image. 

source-code-code-programming-c



Friday, November 11, 2011

What makes Android Programming Simpler and iOS difficult?

ios-5-android-ice-cream-sandwich-apple-google

I cannot start writing iPhone and iPad software because?

I don't have an Apple... No! don't bring me a KG of fresh red apples please, I am referring to the Apple which is a computer. It's impossible to code stuff up without an Apple machine, even for sake of learning. Apple MUST create a tool chain for people running Windows as we know it's the most widely used operating system, just like the iPhone which is a crazily used "Somewhat Smart" Phone. They could create a development environment, and a few emulators to get new going with iOS development. I believe it would cost less than $100k to develop such a solution, maintenance cost won't go beyond this as well.