Recently changed documents

Parse.com
Cocoafish - Appcelerator now
Stackmob
Applicasa

Identity

More documents like this are at:  Shells: My Writes

9-Jan-13

I am so odd and different,
That I am glad in this Land where
I have no crisis that is named Identity!
I am glad it has no name or shape or form in this land.
With my blots and blemishes,
Thoughts and twisted limbs,
I am glad I have so many
Profound things that I think of,
But never of identity.
Like trees in a crowded forest,
I am glad to push and shove,
Twist and turn,
Crawl and climb,
To seek the Sun,
Unaware of my shape and limb.
I am so glad Identity is not my crisis!

How to publish from google to youtube

More documents like this are at:  Computer Hardware

7-Jan-13

How to publish from google to youtube

Taking stock of 2012

More documents like this are at:  Humanities Current

3-Jan-13

Likes and dislikes of 2012.

Ivy of Sadness

More documents like this are at:  Shells: My Writes

30-Dec-12

Are we what we are given?
When I look back
some have struggled to become Paupers
and some Potentates,
like pre-disposed leaves blown in a genetic wind,
in apparent delusion of self-determination.
Could we really change who we are?
Could we really make the right choices?
Could we discipline our mind to see the truth,
And when not the courage and conviction to forgive ourselves!

Perhaps, as a collective human race,
we are at a stage to finally understand
and solve this quagmire called human mind.

To discipline, 
To Rein in,
the goalless neurons,
to a determined purpose,
I pray be possible,
not necessarily by medicine,
but by that called WILL,
and an ample dose of repeatable Science.

GSON JSON for Mobile App Storage

More documents like this are at:  Android Data Storage

28-Dec-12

You will be surprised how GSON can propel your mobile app productivity especially release 1 candidates. In this approach you will represent the persistent state of your apps as JSON. You will use the "Beautiful" tool called GSON from google to convert your application objects to JSON and persist the resulting JSON string either in a shared preference or on internal storage as files.

This approach is really suitable for writing apps really quick. It is not unreasonable to release apps with in 1 to 2 weeks once you get seasoned at this. This would probably take a month or two otherwise. You may get a 2 to 3 times advantage on simpler apps.

Even when you consider complex apps you may get significant advantage while you are prototyping the idea and test it out on a limited release.

This semi article which will eventually be part of our upcoming Expert Android book documents the necessary elements and present the code snippets and answers the questions I ran into as we researched this topic.

This article answers the following questions


What does Android recommend for data storage options? The Official line!
The JSON solution
What is GSON?
  What is GSON's homepage?
  Is there a user guide for GSON?
  Can I save nested objects?
  Can I save nested collections of objects?
  How are characters in strings escaped?
How do you add external jar files to Android APK file?
What are shared preferences?
Difference between getSharedPreferences and getPreferences?
How to get a context independent of an activity?
Where are shared preference files stored?
How do you save JSON to a shared preference file?
What does the saved preference file look like?
How do you read JSON from shared preferences back as Java Objects?
How does escape characters work in android preferences?
What is internal storage?
How do you save to internal storage?
How do you restore objects from internal storage?
Should you use external storage like the SD card?
What are the useful references while working with this approach?
How do you code such a way that you can migrate in the future to SqlLite?
What Next?

Myriad colors of Shared preferences

More documents like this are at:  Android Data Storage

27-Dec-12

There are 2 intended purposes for shared preferences in Android. First of these is a persistence mechanism to quickly remember user preferences for android apps. In that context Android has a declarative framework for generating the UI and also the persistence of the values chosen in the UI.

The second use is an extension of the first minus the UI. In this context preferences are merely key/value pairs that are stored by the application at any point of its life with no constraints of the UI.

Inventive programmers have finagled the second usage pattern to store arbitrary java objects as JSON strings and persist them using the preferences key/value pair APIs.

See the ProAndroid series to understand the first two usage patterns well. The book also shows how home screen widget state can be maintained in preferences.

In the upcoming Expert Android book I am going to write about the unintended, but quite useful, json usage pattern using the shared preferences.

This article is a quick rehash of the links and the code snippets that I am collecting which in due time will make their way to the Expert android book.

Storage data options for Android apps?

More documents like this are at:  Android Data Storage

26-Dec-12

I started this research article to answer the following questions: what are the limitations of using shared preferences as data storage for simple apps and games? is there an official word not to use them for more than simple key value pairs? is there a maximum limit to the amount of data that can be stored using this scheme? Should I explore other data storage options? What does it mean by internal storage and external storage? Should I instead use files to save my dynamic data?

Although there is sqllite resident on android, it is lot of work to go between java objects and a relational database. Even in the simplest case of using wonderfully crafted o/r mapping tools or libraries, it is still lot of work. So I looked for a work around. This led me to use gson/json combination to go between java objects and json strings. These strings can then be stored in shared preferences. Some of my colleagues have tested this and found it really working well for 10s of kilobytes of data. This is quite sufficient for simple games and apps.

Here is what I found

There are 5 ways to data storage in Android: 1) shared preferences 2) internal files 3) external files 4) sqllite 5) network storage in the cloud.

shared preferences are internal to the application and device. this data is not available to other applications. User cannot directly manipulate this data by mounting on to a usb port. this data is removed automatically when the application is removed.

internal files is very similar to shared preferencces except that these are standalone files that you can write to with out any predefined structure. Shared preferences is structured key/value pair data and follows a few other semantics imposed by Android for using them as preferences. I suppose I could easily switch to internal files from shared preferences as they are pretty close. Importantly I haven't found a "compelling" or "impending" reason to swtich with urgency.

external files are stored on the sd card. these become public files that other apps incuding the user could see outside the context of your application. For my app I don't believe this is applicable the data doesn't make sense outside of the context of the application. These are not user created images or documents that the user want to see independently. I may go this route if I had been storing data in the order of 10s of megabytes. this is not the case so I am not constraining the device significantly.

Sqllite is good but I don't have the bandwidth to go through the cumbesome coding for release 1. For subsquent releases this is an excellent option as I can be much faster and use much less power. this is the ideal state. but if the app becomes really popular we will take this step. However one must code so that this switch can happen with minimal change to the rest of the application. One way to do this is to have an explicit service layer that separates persistence aspects completely outside of the logic. These databases also are private to the application and not available to the outside apps.

Network storage is not an option at all as I need the app to work when disconnected. There may be suppplemental opportunities to use parse.com or a similar BAAS (Backend as a service) platform to do some of that.

Hope this helps someone else out there in the cloud as well.

So the bottom line is I am going to stick with the shared preferences, gson/json for release 1. Internal file storage is a reasonable good behavior. But I am not compelled to be good so quickly. Go to sqllite in a year or two if it gathers GOOD moss.

See the rest of the notes for links and supporting research.

How to customize AKC homepage by using the homepage url

More documents like this are at:  Aspire Notes

23-Dec-12

Aspire AKC portal allows you to define a custom home page URL. This file documents how to specify a home page in your multi-tenanted account and also possibly use a different background for the homepage.

Tagged menus

More documents like this are at:  Aspire Notes

22-Dec-12

Tagged menus

A copy of default inner master page

More documents like this are at:  Aspire Notes

19-Dec-12

This document is useful for customizing akc inner master page. I will document later all the details. For now this is just a reference.

Possible TED sessions

More documents like this are at:  GDGJax2012

19-Dec-12

This is a list of wonderful TED sessions that I have planned to show at UNF for the GDGJax 2012 event.

All I want to do is zip up a directory under windows 7. I use the send to file context menu in the file manager. I have done this for years. Same computer. Same account. Worked every time. For some reason it has stopped working this morning. Not sure what the culprit is.

I am able to search google and find the cause. In my case it turned out to be TEMP folder permissions. I have no idea how that got changed!!!

Click on the link above for full details.

Implementation notes and documentation on how I have implemented client side widgets on this site and AKC in general. At a high level I use aspire, jquery, jquery jsrender, akc xmltojson, and plain html divs.

Notes on Ted Diet

More documents like this are at:  GDGJax2012

19-Dec-12

(Important, Signficant, and possibly authoritative) Information that was buried in niche human conclaves is rising to the surface through the combination of YouTube and Ted. These two are an incredible mix. I believe this pair will bring a new era of positive knowledge and also expedite the research, at least by contagion.

I have watched a few sessions on diet based on my search in youtube "Ted Diet". I will list the ones below in a minute that are remarkably relevant to all of us.

The question these sessions try to answer is "Can we heal through diet"?

The answer, if we were to believe even 50% of it, is very very very encouraging and hopeful.

Documenting these sessions here is a reminder to myself and if you happen to run into them, I consider this effort my good deed for the day.

Click on the title of this topic link above to see the videos.

GDGJax Presenters and Contacts

More documents like this are at:  GDGJax2012

17-Dec-12

GDGJax Presenters and Contacts

What is GDGJax2012

More documents like this are at:  GDGJax2012

17-Dec-12

What is GDGJax2012

GDGJax 2012 decks

More documents like this are at:  GDGJax2012

17-Dec-12

GDGJax 2012 decks

picasa

More documents like this are at:  Computer Hardware

17-Dec-12

picasa

Ted Extractions

More documents like this are at:  GDGJax2012

14-Dec-12

Ted Extractions

My key words for Ted

More documents like this are at:  GDGJax2012

14-Dec-12

My key words for Ted

Agenda

More documents like this are at:  GDGJax2012

14-Dec-12

Agenda

Custom Suggestion Provider Code Snippets

More documents like this are at:  Android Search

9-Dec-12

Custom Suggestion Provider Code Snippets

Why is word capitalizing the leter i

More documents like this are at:  Computer Hardware

8-Dec-12

Why is word capitalizing the leter i

A Simple Suggestion Provider

More documents like this are at:  Android Search

6-Dec-12

A Simple Suggestion Provider

Search Code Snippets

More documents like this are at:  Android Search

2-Dec-12

Search Code Snippets

Search surprises in 4.0

More documents like this are at:  Android Search

30-Nov-12

Search surprises in 4.0

Research Notes on Android Search

More documents like this are at:  Android Search

30-Nov-12

You will find here random Research Notes on Android Search. I use this page as a research log.

How to work with Android ActionBar (3.0 feature)

More documents like this are at:  Android Basic UI

29-Nov-12

Click on the item link above to read about Android ActionBar and how to use it.

Search in 4.0

More documents like this are at:  Android Search

29-Nov-12

Search in 4.0