tag:blogger.com,1999:blog-75659898622811450572024-01-25T15:57:17.514-08:00AndroidBloggerA blog from an Android developer.<br>
Developing since the start of the platform, and constantly improving my applications, I share my experience developping with Google OS for smartphones.AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.comBlogger71125tag:blogger.com,1999:blog-7565989862281145057.post-65512594330743209292014-04-27T16:15:00.002-07:002014-04-27T16:15:27.801-07:00Rant against Google Plus !<b style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><i>Disclaimer :</i></b><br />
<b><i><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /></i></b><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">First, this post is obvioulsy not about Android, but rather on google+.</span><br />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><br /></span>
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Next, Google Plus </span><i style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">is</i><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"> my social network of choice.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I hardly read Facebook, and I'm a passive user of twitter (ie I read there, but never write any message ).</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">So I'm essentially using Google Plus. I almost exclusively have a quasi professional use : as a vector to read and participate to news I'm interested in, techno geek things : game development, development in general, Android, web development, ...</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><b style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><i>The promise of Google plus :</i></b><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I was interested in G+ for one main reason : the circles.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I always wanted to behave differently depending on the people I'm with.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I won't have the same conversations with work friends, school friends, family, hobbies friends... </span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">So I don't want to share the same things with all these different people.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">That's why I was so interested in G+, the possibity to have different circles, and to choose who I want to share my messages with.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><b style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><i>Reality Check :</i></b><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I've been using G+ for 2 years, and I'm not really using it as I wanted.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Actually, as I already said, I'm using it exclusively for technology things.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I don't use it at all for my family, for my friends, for anything else...</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Even worst : I advice my friends and family </span><b style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">NOT</b><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"> to follow me !</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><i style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Why ?</i><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Because, I'm quite active on G+, posting more than one post a day, on technology subjects, and publicly shared.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">If my friends and family followed me, they would be spammed with post on C++, Unity3D, and Android that they would obvioulsy not understand, and not be interested in.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">So in order to protect them, I prefer them not to follow me !</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Actually, G+ is useful only if you only have one point of interest, if you only want to show one face to your audience.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Where is the promise ? You can read on G+ website :</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">"Circles make it easy to share the right things with the right people, just like in real life".</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">This just becomes untrue once you start sharing publicly.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><b style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><i>Workarounds :</i></b><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I'm obviously not the only one with this issue, so how are people dealing with this problem :</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><i style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Just posting on several subjects, and let your audience read only what they interested in :</i><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">For instance I'm following Romain Guy, a former Android developer. But half of his posts are about his passion for photography. Hopefully, he is not spamming with messages, so it's okay ( and he posts great photos :) ), but that's not what I was interested in in the first time.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">It's surely not a good solution if you post a lot, and care about your audience.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><i style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Posting in private :</i><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">That's a possibility that a lot of people are using : when people connect to your profile, ask them what they are interested in, put them in the associated circle(s), and only post in private for specific circles.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">The issue here is that privately shared post can't be reshared and they can be read by people that are not in your circle. </span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">So it lowers your visibility on G+, and creates some artifical barriers in the information diffusion.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><i style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Having several accounts :</i><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">One can create an account for techno things, one account for family, one account for friends.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">But it sounds like a painful thing to keep on changing account every now and then, as our google account is now central in our web experience ( as we're using Chrome / gmail / G+ / Android Phones / ... )</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">And I think it's forbidden by Google Term of use.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><b style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><i>Solutions ?</i></b><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I'm not here to explain google guys how to do their jobs, and I do completely understand it's not an easy problem.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">To be efficient, G+ should be as accessible as possible, and I'm sure any solution would add complexity.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">But I feel like something like "public circles" should be possible. </span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Current circles are a perfectly good solution, but they only work for private posts.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">So why not create some public circles, and let your audience choose which public circles they want to subscribe to ?</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I'm sure Google have a lot of talented UX specialists that can come with a better solution, my point is still that I can't use G+ as much as I would like to.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">As G+ is becoming more and more important for Google and for the user experience, it may be important to find a solution for this problem.</span><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br />
<br />
<br />
<a href="https://plus.google.com/100065261489826625246/posts/QEqChBizEQ1">( Also Posted on G+ )</a>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com0tag:blogger.com,1999:blog-7565989862281145057.post-37646775772821584202012-08-12T14:48:00.001-07:002012-08-13T08:12:34.190-07:00Android Activity Wizard : please let me create a simple activity !Today, I wanted to create a new activity in my next application...<br />
<br />
Nothing really strange for now...<br />
<br />
So I tried the new Activity wizard to create a very simple activity ( it's just to play a video, so I don't even want an action bar ) :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLkgBOPxJ_nvFQMa_Tv2_NX_tGfcmyzEloMb740KY8dHCcXUaDz2wToBn8bcrdHg3UQhxLA_wElVZDweqjI1hblFaPqxi82as3Zpwo711iKvvy4FgAJ_wbg9SMNKki2ubonauM7aJJS4c/s1600/AndroidWizardIssue_BlankActivity.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLkgBOPxJ_nvFQMa_Tv2_NX_tGfcmyzEloMb740KY8dHCcXUaDz2wToBn8bcrdHg3UQhxLA_wElVZDweqjI1hblFaPqxi82as3Zpwo711iKvvy4FgAJ_wbg9SMNKki2ubonauM7aJJS4c/s1600/AndroidWizardIssue_BlankActivity.PNG" /></a></div>
<br />
Then I choose not to use any navigation option :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCt5E1vQ7kGC2QSs_-OMnF70YDjyiYw1e_DaUjBrJACLPljhTC-w6zsBa4AzMb0KoA1LtHeEUp1MG55nzIJ7tH1ZIDiQOVv8sat_zMBZCsMcern3YSvhtsOT4KEEYK9JUmqnkOOaczR84/s1600/AndroidWizardIssue_NoNavigation.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCt5E1vQ7kGC2QSs_-OMnF70YDjyiYw1e_DaUjBrJACLPljhTC-w6zsBa4AzMb0KoA1LtHeEUp1MG55nzIJ7tH1ZIDiQOVv8sat_zMBZCsMcern3YSvhtsOT4KEEYK9JUmqnkOOaczR84/s400/AndroidWizardIssue_NoNavigation.PNG" width="400" /></a></div>
<br />
<br />
<br />
And Taadaaa !!<br />
It just failed :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9S67RGya0e6wedSOlkyzPj8NwaVoUWavAjp7PnbWZo4H1k0xfktuS7pHHhd7N2H9fo6MPBZ9xcoAKI1x7IrgZp2lYBoSjZ6_s8XcnO_prDE_BJ-BAbdMmapNe7n6U3WuD4_ZzcWBTD28/s1600/AndroidWizardIssue_Failed.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9S67RGya0e6wedSOlkyzPj8NwaVoUWavAjp7PnbWZo4H1k0xfktuS7pHHhd7N2H9fo6MPBZ9xcoAKI1x7IrgZp2lYBoSjZ6_s8XcnO_prDE_BJ-BAbdMmapNe7n6U3WuD4_ZzcWBTD28/s400/AndroidWizardIssue_Failed.PNG" width="400" /></a></div>
<br />
<br />
Note that I've installed the latest support library version ( 9 ), and restarted Eclipse :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiujAP8gDpCeMKf2LbZgPd73kLKIqJU45kV7MeeqP5KTzqgwETaomr6kEXTkNfzbIvJscm46rJEvN2xSPtwe60KJ8-wo8C46a5eLV9X8Dj2W1V1IGB8157QIDn0qjE9Te8rh0ULgDeVXio/s1600/AndroidWizardIssue_SupportLibrary.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiujAP8gDpCeMKf2LbZgPd73kLKIqJU45kV7MeeqP5KTzqgwETaomr6kEXTkNfzbIvJscm46rJEvN2xSPtwe60KJ8-wo8C46a5eLV9X8Dj2W1V1IGB8157QIDn0qjE9Te8rh0ULgDeVXio/s1600/AndroidWizardIssue_SupportLibrary.PNG" /></a></div>
<br />
But no, it won't let me create a new activity :(<br />
<br />
It's no big deal as I can still create it manually, but I was expecting more support from this wizard :)<br />
<br />AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com2tag:blogger.com,1999:blog-7565989862281145057.post-3230544621217133072012-06-23T18:08:00.000-07:002012-06-23T18:08:22.277-07:00What's wrong with Search in Google PlayWhat's wrong with the search in Google Play ?<br />
<br />
Yesterday, I was looking for something in my sliding tile puzzle called 'Nature Puzzle'.<br />
So I opened Google Play website, and started with a search for 'Nature Puzzle'.<br />
<br />
Here is the result :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsElFpZI3y4D263N8QzAXxCkjvlmTZfdjlt6Upvlho4q8kbHP52WiFYKj2XF9ktzQLhob_-PyZUiIxFBP6xGAHmtrROLK55p83P27IyDH-ZmbkokCY7VorMIyVTdKkWvo5FSQHkcbv_w/s1600/NaurePuzzle_GooglePlaySearch.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsElFpZI3y4D263N8QzAXxCkjvlmTZfdjlt6Upvlho4q8kbHP52WiFYKj2XF9ktzQLhob_-PyZUiIxFBP6xGAHmtrROLK55p83P27IyDH-ZmbkokCY7VorMIyVTdKkWvo5FSQHkcbv_w/s400/NaurePuzzle_GooglePlaySearch.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
We have :<br />
* Photo Puzzle Game, NumberPuzzle,<br />
* Nature Puzzles,<br />
* Nature Puzzle,<br />
* Natural Seasons,<br />
* Zoo and Nature Puzzle 2 in 1<br />
* kids Puzzle:Animal<br />
<br />
and my game is not listed !<br />
<br />
What I don't understand is that I gave the exact name, and I didn't find it !<br />
I looked at the last app (kids Puzzle Animal ) more closely, and there is only 1 occurence of 'natural' in the description.<br />
And the application called 'Nature Puzzle' ( so with the exact same name as mine ), it has the same rating, and less downloads.<br />
<br />
Note that<br />
* I'm not complaining here that my application does not have enough visibility : I only published it as a proof of concept of Html5 android applications<br />
* I'm not asking the description of the search algorithms in the Google Play Store !<br />
<br />
I'm just amazed that, from a customer point of view, giving the exact name of an application does not bring this application to the top !<br />
<br />
<br />
Actually, if I specify that I want to search only in Android apps, then my game appears at the 7th rank :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJs9LOEYWNMX9lZiuH_JheehSx0cJVGbzVvmMi4t1RtCOmOkWgPRDOCcl3CxKM8I3ZCqX4o3qXII_1FSWDO7_xB0ZFZTcdoqlHyQglc9BsiRbveucvOVLGGzigWxB0XGQEw0KrpMNba08/s1600/Nature_Puzzle_Found.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="325" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJs9LOEYWNMX9lZiuH_JheehSx0cJVGbzVvmMi4t1RtCOmOkWgPRDOCcl3CxKM8I3ZCqX4o3qXII_1FSWDO7_xB0ZFZTcdoqlHyQglc9BsiRbveucvOVLGGzigWxB0XGQEw0KrpMNba08/s400/Nature_Puzzle_Found.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
I even discovered another application named 'Nature Puzzle' ( it now sounds like a very common name ), that is even more badly ranked than mine !<br />
<br />
<br />
Am I the only one to found it strange ?<br />
Do you feel like there are some reasons, for the customer, not to put the application with the exact name first in the search results ?<br />
Do you understand how the ranking is done ?AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com7tag:blogger.com,1999:blog-7565989862281145057.post-1542197732417743772012-05-13T14:09:00.000-07:002012-05-13T14:09:28.470-07:00Ghost Recon Future SoldierIt's been a long time since my last update on this blog.<br />
<br />
Actually, my Android's developments are only hobby projects.
My real job is working on console video games.<br />
And we've just finished Ghost Recon Future Soldier !<br />
I was very busy finishing the game, so I couldn't really post any more.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZQ2KTcuofLz_wqcQQ1LBjoKJgcJLfLuVzbzot9e46jU0Hvg29nvSYrSaN4LO1h-UVrw2vwYcesqfW_Mr0gNBD1DY-ewbHwvsi8aVjDfSQoJP9HHKr_GvdAEsKI5k-5CRnMG2sKS7ihs/s1600/ghost-recon-future-skull.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZQ2KTcuofLz_wqcQQ1LBjoKJgcJLfLuVzbzot9e46jU0Hvg29nvSYrSaN4LO1h-UVrw2vwYcesqfW_Mr0gNBD1DY-ewbHwvsi8aVjDfSQoJP9HHKr_GvdAEsKI5k-5CRnMG2sKS7ihs/s400/ghost-recon-future-skull.jpg" width="400" /></a></div>
<br />
<br />
<br />
But the game is now done, I am really proud of it, the whole team has done an amazing job, so I will now be able to return to more Android developments !<br />
<br />
During this time, I could port my 'Word Prospector' game on the Blackberry Playbook, and I started a new project.<br />
More on all this later :)<br />
Now I just want to enjoy the Ghost Recon Future Soldier launch.<br />
<br />
<br />
<br />
<br />AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com0tag:blogger.com,1999:blog-7565989862281145057.post-89106974484828425732011-08-08T10:22:00.000-07:002011-10-23T09:25:24.050-07:00Orientation for both phones and tabletsTablets are now a new component to take into account when programming applications on Android.<br />
And it brings issues with your application orientation...<br />
<br />
My game Word Prospector was meant to be played in portrait mode on a phone.<br />
But on tablets, I want it to be played in landscape ( as it feels more natural for tablets ).<br />
<br />
But how to achieve that ?<br />
<br />
Activity orientation is fixed in the manifest, and you can't have different manifests for different screen configurations.<br />
<br />
So how to manage that ?<br />
I found three different ways...<br />
<br />
<u>First solution : different apk for different screen configurations</u><br />
<br />
Now that the Android market gives us support for multiple apk, ( see <a href="http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html">here</a> ), you can use it just to have some differences in the manifest.<br />
So you can have the very same application and only have different orientations in the manifest, and let the market make the work for you.<br />
<br />
But having several apk is painful for developers : it's a lot of work to develop, and to maintain.<br />
So I would not recommend this solution.<br />
<br />
<u>Second Solution : have some activity code to manage the orientation</u><br />
<br />
You can impose the orientation of your activity in the onCreate method of the activity, with the setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_XXX ) function.<br />
<br />
So you can have some code like this :<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>if ( isXLargeScreen() )
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
else
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
</code></pre>
<br />
With this code, when there is an orientation change, the activity is destroyed, then re created.<br />
To avoid this destruction / recreation step, that would break the smoothness of the user experience, you have to disconnect the destruction of the activity mechanism.<br />
So you have to add a<br />
android:configChanges="keyboardHidden|orientation"<br />
parameter in the activity declaration in the manifest, and add an empty onConfigurationChanged method.<br />
<br />
Now you can even be more flexible.<br />
If you want one configuration ( for instance the tablet one ) to handle both orientation, and the other ( the smartphone ) to handle only one orientation, you can do it :<br />
<br />
In the OnCreate method, impose the orientation only for the smartphone :<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>if ( ! isXLargeScreen() )
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
</code></pre>
<br />
Then in the onConfigurationChanged, you have to recreate the Activity only when on tablet. And in this case, you have to save the activty state, and restore it, as the classic destruction / creation of the activity is deactivated :<br />
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code> public void onConfigurationChanged (Configuration newConfig)
{
//Log.d("tag", "config changed");
super.onConfigurationChanged(newConfig);
if ( ! isXLargeScreen() )
return;
// CODE FOR ROTATION
// FOR BIGSCREENS :
SaveActivityState();
setContentView( R.layout.MyActivity );
RestoreActivityState();
}
</code></pre>
<br />
<u>Third solution : let's get back to the manifest...</u><br />
<br />
The manifest really is the tool Android developers gave us to handle the orientation...<br />
So my last ( and prefered ) solution is to have two different activities, with different orientation capacities :<br />
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code> <activity android:name="LetterGame"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"
android:label="@string/app_name">
</activity>
<activity android:name="LetterGameLandscape"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="landscape"
android:label="@string/app_name">
</activity>
</code></pre>
<div>
<br /></div>
<div>
and to create a MyActivityLandscape class, that just do ... nothing !</div>
<div>
It just inherits from MyActivity :</div>
<div class="code">
<div>
<br /></div>
<div>
<div>
package com.alocaly.LetterGame;</div>
<div>
<br /></div>
<div>
public class MyActivityLandscape extends MyActivity</div>
<div>
{</div>
<div>
}</div>
</div>
</div>
<div>
<br />
Then you just have to choose what activity to launch in the caller activity :<br />
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>Intent i;
if ( isXLargeScreen() )
i = new Intent(MainMenu.this, MyActivityLandscape.class);
else
i = new Intent(MainMenu.this, MyActivity.class);
startActivity( i );
</code></pre>
<div>
<br /></div>
</div>
<div>
And that's it !!</div>
<div>
The onConfigurationChanged function should still be empty, or you can specialize it for your second activity.</div>
<div>
<br /></div>
<div>
Do you see another technique to handle different orientations with different devices ?</div>
<div>
<br /></div>
<br />
<u>And my turn to ask a question :</u><br />
How can we easily implement an isXLargeScreen method ? ( my current implementation is something I'm really proud of :) )<br />
<br />
<br />
<br />
<br />AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com18tag:blogger.com,1999:blog-7565989862281145057.post-36028373551133193692011-06-02T04:42:00.000-07:002011-06-02T04:48:05.736-07:00An Android Application in HTML5Hi all,<br />
<br />
<br />
After my Blackberry / Html5 pause ( see <a href="http://androidblogger.blogspot.com/2011/04/blackberry-pause.html">here</a> ) , I decided to port the games I made in Html5 on android.<br />
So the first one is there now : it's called <a href="https://market.android.com/details?id=com.alocaly.NaturePuzzle">Nature Puzzle</a>, and it's a simple sliding puzzle.<br />
<br />
I will soon write another post on this development on android with Html5, but at least, it's here and feasible.<br />
And if some people are interested, I will perhaps open source this simple game...<br />
<br />
Although it's a very simple game, the pieces move is not totally smooth on my G1, but on my Nexus One, it's nice.<br />
I will soon try the second blackberry game I made, that was more demanding...<br />
<br />
<br />
<br />
Here is the link<br />
<a href="https://market.android.com/details?id=com.alocaly.NaturePuzzle">Nature Puzzle on Android Market</a><br />
<br />
And some screenshots :<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLuJOGPbiy236aUgYnkeE_ZaFMTJbAo9o057jIR0YsnZgij33OFyhmpDKZHOoaYQ1tbgYjIsQtPZwYROGurcFCcF7MXHd-HQErimHV4w-DL5z06S_s5E4a6L1eLos3cje-_QH8Mq1Hoxs/s1600/ScreenShot1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLuJOGPbiy236aUgYnkeE_ZaFMTJbAo9o057jIR0YsnZgij33OFyhmpDKZHOoaYQ1tbgYjIsQtPZwYROGurcFCcF7MXHd-HQErimHV4w-DL5z06S_s5E4a6L1eLos3cje-_QH8Mq1Hoxs/s320/ScreenShot1.png" width="192" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYWf6dZTk9KI2bW5tGKJG7DrvyEx3zk9-dgI04gSaEkRBIyoTNYJBzUl7HxaWbC54BktmCdU7yHdCgHrKs4nyQ6PQyHliSWWU296bJ86HB8-rh4kjYiLLMrNIZge-NvDnesgRylMUSq7A/s1600/ScreenShot2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYWf6dZTk9KI2bW5tGKJG7DrvyEx3zk9-dgI04gSaEkRBIyoTNYJBzUl7HxaWbC54BktmCdU7yHdCgHrKs4nyQ6PQyHliSWWU296bJ86HB8-rh4kjYiLLMrNIZge-NvDnesgRylMUSq7A/s320/ScreenShot2.png" width="192" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsQP9QJ0Y7WeCbcXvEdDBKF3a965zFmu1htOC2r1Wv2t_QVR13sZ5LNQM6MH-zCzfcyz4NYiNAH1ady4BTc4az6Mx8hcIlHpOTuQoKB33l6-IwLDjRc03urtpYSWttMcPPpIkKWqVJ-0/s1600/ScreenShot4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsQP9QJ0Y7WeCbcXvEdDBKF3a965zFmu1htOC2r1Wv2t_QVR13sZ5LNQM6MH-zCzfcyz4NYiNAH1ady4BTc4az6Mx8hcIlHpOTuQoKB33l6-IwLDjRc03urtpYSWttMcPPpIkKWqVJ-0/s320/ScreenShot4.png" width="192" /></a></div>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com7tag:blogger.com,1999:blog-7565989862281145057.post-32289841566872784552011-04-17T06:50:00.000-07:002011-04-17T06:50:33.972-07:00The blackberry pauseI have to confess it : I made a small pause in my Android development.<br />
During one month, I developped for the Blackberry Playbook, and it was a rather pleasant experience !<br />
<br />
Actually, it started when I read <a href="http://goo.gl/x4Agf">this blog entry </a>from James Becwar.<br />
Blackberry offered a free Blackberry Playbook ( their incoming tablet ) if you developped a application for it.<br />
This was a very tempting offer, so I decided to jump into this challenge !<br />
<br />
<u>The challenge :</u><br />
<br />
Actually, the challenge was that I read this blog entry on the 26th of February, and you had to submit your application before the 15th of March...<br />
I only had about 15 days to learn a new language, a new platform, a new submission process, and to develop my application.<br />
All that, while still having to manage my real job, my kids, my wife, my friends...<br />
<br />
On top of this, a friend proposed me at the very same time to play a '<a href="http://goo.gl/59LQX">Neptune's Pride</a>' play. "Neptune's pride" is a nice strategy online game, that played over 2 to 3 weeks. The things is when the game starts, you only have 4 units, so everyday it takes about 10 minutes to play. But the game quickly becomes more challenging, and more time consuming. Way too much for me ! But I couldn't make myself reasonable, and give up. So I played until the end ( I even won the match :) ! ).<br />
<br />
<u>Developping for the Blackberry Playbook :</u><br />
<br />
So I decided to start to develop for the Playbook.<br />
There are two ways one can develop for the playbook :<br />
- Using Adobe Air<br />
- Using Html5<br />
<br />
I decided to go the Html5 way : it is free ( I could use an evaluation version for Adobe Air, but I prefer to learn something that I will use as much as I want ), and I feel like learning Html5 can always be a good thing, for my work, for my android development, for some personal Web develpment, etc...<br />
<br />
<u>The tools to develop for the Playbook :</u><br />
<br />
The playbook comes with an SDK, and an emulator that really is a virtual Machine running under VmWare.<br />
<br />
Considering the short time I had to develop my application, I decided to stay as far away as possible from the device specific issues, so I decided to choose an application as simple as possible, and that I could develop as much as possible with Chrome.<br />
So I didn't wanted to write files, to use the camera, to use the GPS, or anything like that.<br />
I just wanted to develop in Chrome, and check every day that my development was still working in the emulator.<br />
<br />
So the application I chose to develop that a simple sliding puzzle ( also called the 15 puzzle ). Nothing really exciting, but something I really could finish in such a small amount of time.<br />
<br />
<u>Developping in Html5</u><br />
<br />
So I started developping in Html5, with Chrome.<br />
<br />
Html5 is some Html, css, and javascript.<br />
In my, case, I just took a canvas ( ie a part of the Html page ), and entirely control it in Javascript, from the event response to the display.<br />
So I didn't use the Css at all, I merely used the Html part to create the canvas. So quite all of my development were in javascript.<br />
<br />
And to be honest, I was really impressed by this way of developping.<br />
The 'iteration Cycle' - ie the time it takes to make a change in your code, and to check its effects in your application - is really low : you modify your javascript code, and just press F5 in your chrome browser, and voila ! It's done...<br />
It's much better than developping for Android, where the installation phase on the emulator or the real device, and even the compilation phase, for a big application, takes some time.<br />
<br />
Chrome contains a full debugger, so tracing a bug is quite easy, and you can even hot change the code !<br />
It also contains some profiling tools, and some tools to monitor the memory usage.<br />
Actually, I was impressed by all the stuff that were in chrome. I only had used it as a (fast) browser, and now I found it was also a valuable develoment environment !!<br />
<br />
Obviously, everything is not that easy in the Html5 development world :<br />
<br />
Javascript is a strange language:<br />
* not really object ( there is no real inheritance ),<br />
* Actually even creating an object is an strange thing : you create it as a special function !<br />
* sometimes Javascript is not strict enough : if you forget to define a variable as a new one, local to your function ( with the 'var' keyword ), it will use whatever var with the same name it can find in the namespace ( like a global one, or worth, one coming from a caller function ), creating some strange bugs...<br />
* the counterpart of all this strangeness is that javascript is a very flexible langage, so can do crazy things like modifying some methods of an instance of an object at runtime. ( at least for a C++ developper, this is a very crazy thing )<br />
* Chrome optimizes the javascript code, so sometimes, it's hard to debug : the code won't stop at some lines that are actually really executed !<br />
* Chrome is a real development environment, but I still prefer my Visual Studio environment !!!<br />
<br />
<br />
Developping for the Playbook added some specificities :<br />
* For some reasons, I wanted to use more html5 feature than just using my canvas, and failed. Something as simple as calling specific javascript code with clicking a link didn't work. I didn't investigate, and just put everything in my canvas !<br />
* A lot of features just didn't work, in the real device or in the emulator ( and I don't feel like releasing something without any test ) : sound, videos, orientation support, ...<br />
* The event for managing the touchscreen are a little different from the events for managing the mouse. Nothing really big, but enough to bring me some bugs...<br />
<br />
<br />
<u>Conclusion :</u><br />
<br />
All in all I was really happy with these development. Actually I manage to create my application in 15 days. At this time, the limit had been postponed to the 31th of March, so I ended up developping another application ( to be honest, I was a little ashamed to only deliver such a simple application as a sliding puzzle ), so I created a coloring game for child, in the next 15 days.<br />
<br />
I enjoyed doing these two developments, and could finished them by the deadline.<br />
<br />
Some time ago, with some friends from work, we made a kind of context where we were to create a little game prototype during our launch pause. So we only had 1 hour and half to create this prototype.<br />
Actually, I like the idea of developping something as fast as possible.<br />
<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">I would like to do it again, all by myself : to give me the constraint to create a little game in 15 days ( or at least a good prototype ). I always found that some good things were coming from this challenges.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">As for the result application, they are some applications I still can be proud of. </div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Actually, my older kid likes the sliding game, and both my kids like the coloring game. This is, in my opinion, a really good sign !!!</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Now, as this is essentially a Android blog, let's talk a little about more robotic things.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Now that I have two Html5 applications, I will try to port them to Android, and check how easy it it.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Actually, I would like to check if developping directly in Html5 is a viable option for Android, but I really have some big hopes in this area !!</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Here are the applications :</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><u>The coloring game :</u></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt05Dz_bdMbMd1ZVqsNhyphenhyphenLEkZSB21TNYv44L6SvAU6AnNbbR1dFCxgD0V6ccPMhl8E04AIPbQoRdrUgYPFEYkKKkG3EjN7YrH7KWG_LV7-JLC-eHrBi-UQROwX_Ld5j1or302vlUxI_xI/s1600/Boat1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUrLTDTb03g8Nm_bUz6maXoC_nzPEgwX47t0helymZZ1QCNWF7LFkA5TLhutSMjd0rE9Hgaaj-Nes6ZmuBh0VAm9x2O3SJ6FLEAm6GAmMBDzHFmXjtXup-em-51bbtdKEQbw6El3kid4E/s1600/Cow2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUrLTDTb03g8Nm_bUz6maXoC_nzPEgwX47t0helymZZ1QCNWF7LFkA5TLhutSMjd0rE9Hgaaj-Nes6ZmuBh0VAm9x2O3SJ6FLEAm6GAmMBDzHFmXjtXup-em-51bbtdKEQbw6El3kid4E/s400/Cow2.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt05Dz_bdMbMd1ZVqsNhyphenhyphenLEkZSB21TNYv44L6SvAU6AnNbbR1dFCxgD0V6ccPMhl8E04AIPbQoRdrUgYPFEYkKKkG3EjN7YrH7KWG_LV7-JLC-eHrBi-UQROwX_Ld5j1or302vlUxI_xI/s1600/Boat1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt05Dz_bdMbMd1ZVqsNhyphenhyphenLEkZSB21TNYv44L6SvAU6AnNbbR1dFCxgD0V6ccPMhl8E04AIPbQoRdrUgYPFEYkKKkG3EjN7YrH7KWG_LV7-JLC-eHrBi-UQROwX_Ld5j1or302vlUxI_xI/s400/Boat1.png" width="400" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><u><br />
</u><br />
<u> The sliding puzzle :</u><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJIJM-lWphWa4p3872YdlzmlsHF3R4WCiFaCg0Y8oJJuK_E7NkYEg546Pzica0d39sqpjVDIc-34IKZ8JNBB09H9NXIlGXg486tb6mSVjcix-yi_VA4a897mrNu9D_w1nqySaDdBllwvM/s1600/ScreenTaquin3_3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJIJM-lWphWa4p3872YdlzmlsHF3R4WCiFaCg0Y8oJJuK_E7NkYEg546Pzica0d39sqpjVDIc-34IKZ8JNBB09H9NXIlGXg486tb6mSVjcix-yi_VA4a897mrNu9D_w1nqySaDdBllwvM/s400/ScreenTaquin3_3.png" width="400" /></a></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZMarArdqi7uCP9GDLk_Ml9vxHPuC-YD2xnIt7zu4Mpo7PUEMRnted75ONH1FtJ_ylEtkiFgXwfoXGUiCXoX9LmVsji4V8AmpfaJCcxpKGCncMN9EKcWC_M6zUAMf27uhs2M9uKHi40w8/s1600/ScreenTaquin1_1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZMarArdqi7uCP9GDLk_Ml9vxHPuC-YD2xnIt7zu4Mpo7PUEMRnted75ONH1FtJ_ylEtkiFgXwfoXGUiCXoX9LmVsji4V8AmpfaJCcxpKGCncMN9EKcWC_M6zUAMf27uhs2M9uKHi40w8/s400/ScreenTaquin1_1.png" width="380" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div>And here are the link to the application for the Blacberry owners that are lost on this Android development blog :</div><div><a href="http://appworld.blackberry.com/webstore/content/37406?lang=en">The coloring game</a></div><div><a href="http://appworld.blackberry.com/webstore/content/34633?lang=en">The sliding puzzle</a></div>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com3tag:blogger.com,1999:blog-7565989862281145057.post-35312033901418196652011-04-10T07:21:00.000-07:002011-04-11T01:38:34.305-07:00Word Prospector on Win7 phones !!Word Prospector is now also on Win7 phones !<br />
<br />
Sebastien, a very talented game programmer fellow, has ported it on win7.<br />
Actually, he recoded from scrach, and the result is really nice.<br />
It looks like developping for Win7 is really nice and easy, with Visual studio environment, and the ease of use of C# and the XNA framework.<br />
<br />
Here are some screens of the final result :<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://gp32dev.free.fr/wordprospector/Screen2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://gp32dev.free.fr/wordprospector/Screen2.png" width="192" /></a><a href="http://gp32dev.free.fr/wordprospector/Screen3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://gp32dev.free.fr/wordprospector/Screen3.png" width="192" /></a></div><br />
<br />
The gameplay is the same, but the graphic design is nicer than mine (ok, it's not that difficult... I really need to do something in this area... ), with lots of fancy animations !<br />
<br />
Wish you the best with this game, Seb !!AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com0tag:blogger.com,1999:blog-7565989862281145057.post-42119679612569185812011-02-13T16:05:00.000-08:002011-02-13T16:14:34.990-08:00Instable Android, and the 'unable to open database file' bugHi everyone,<br />
<br />
Welcome to this little ( and scary ) episode of my Android user life :<br />
<br />
Yesterday, I came back from Canada. So in the plane, I turned my phone off.<br />
And when I turned it on... It became a (little) nighmare...<br />
<br />
I got something like a just installed Android on my phone. So I had to link the phone to my gmail account again, accept the different Terms Of Service, etc...<br />
Ok... Not that complicated... Not the thing you want to do in the airport, that early in the morning, with not much sleep and a big jet-lag, but, it's still feasible.<br />
Then the background had changed, and all of my shortcut and folders have vanished.<br />
Once again, it's a little painful, but still manageable...<br />
<br />
Then I quickly discovered that there was more than just that...<br />
Actually, my android version is now quite bugged :<br />
<br />
<br />
<u>A Bugged Android :</u><br />
<br />
* All the application installed on my SD card had disappeared !! There are more than one year of 'Spy My Apps' data on it, so this one IS serious. I just than I will find a way to get them back.<br />
* the lock screen is still present, but any combinaison will unlock it !!! This one was rather funny ( at least for me ). Resetting the combinaison in the settings fixed it.<br />
* gmail, Youtube, Google Maps were still in the old version, so I could rapidly found that I prefered the new ones ( but waiting a little get them back automagically ).<br />
* For a reason I still can't understand, Twitter was already in the 2.0 version, but the market was unaware of that, so it tried to download and reinstall the 2.0 version, and just failed. I had to unistall and reinstall it to have the market happy again...<br />
* Finally, and it is perhaps the most important, a lot of application ( my own "Word Prospector" included !!! ) just failed now ! Actually all the applications previously present on my phone and that were using a database are now unable to open it, although they find it.<br />
<br />
<br />
<u>The "unable to open database file" bug</u><br />
<br />
Actually, I find it quite funny, because for a long time I have this bug in my game where the database couldn't be opened. This bug was strange, because I couldn't reproduce it. Some people had some information that it was coming with a reinstallation of the OS, but I did several OS upgrades without any issue...<br />
Here are some people worrying about this bug :<br />
<a href="http://groups.google.com/group/android-developers/browse_thread/thread/a0959c4059359d6f">http://groups.google.com/group/android-developers/browse_thread/thread/a0959c4059359d6f</a><br />
Here is a google issue on this one :<br />
<a href="http://code.google.com/p/android/issues/detail?id=949">http://code.google.com/p/android/issues/detail?id=949</a><br />
<br />
The good news is that with this bug present on my phone, perhaps :<br />
1) I can manage to find something to do to fix my game ( actually I would rather call it a workaround rather than a bug )<br />
2) Perhaps someone from google can contact me so that we can try to find where this bug is coming from ?<br />
<br />
This bug is affecting ALL the applications that are using databases on my phone, and that were installed on my phone before the reboot.<br />
It is affecting both applications that were installed on the main memory and applications that were installed on the SD card ( in this case, when it would crash after the reinstall ).<br />
<br />
Here are some applications that are crashing :<br />
* AndroBlogger ( a blogger application ). It looks like it is crashing because it's using Google Analytics, that in turn, uses a database.<br />
<br />
* The official Google Blogger application. For some reason, I don't have the callstack in the logs, but those lines :<br />
Couldn't rename file /data/data/com.google.android.apps.blogger/shared_Prefs/bloggerPrefs.xml to backup file /data/data/com.google.android.apps.blogger/shared_prefs/bloggerPrefs.xml.back<br />
and :<br />
Sqlite3_open_v2("/data/data/com.google.android.apps.blogger/databases/blogger.db", &handle, 6, NULL ) failed.<br />
<br />
* Yahoo Mail, with the 'Unable to open database file" line in the callstack<br />
<br />
And many others...<br />
<br />
Actually, it looks like :<br />
Using google Analytics make the application fail<br />
Using Flurry makes the application fail<br />
And using a webview makes the application fail, as the webview uses a database to store its associated cache.<br />
Admob needs to have access to some image cache, and then crash if it can access it.<br />
<br />
Note that clearing the cache / data in the application part of the settings does NOT change anything. (I imagine it does not really clear the files that create the crashes ).<br />
<br />
<br />
<u>What can be the cause of the issue ?</u><br />
<br />
My understanding goes like that ( I'm far from being sure it is worth anything, but let's give it a try anyway ) :<br />
When you install an application, some disk space is available for this application only ( data/data/ApplicationName/ ).<br />
To insure that ony the application will have access to this data, I imagine Android uses user rights at the Linux level.<br />
Then when the 'strange Android reinstallation' occurs, perhaps there is a change with the user, and the right are no longer granted. But as the folder name is still the same, the application can't open any file already inside.<br />
<br />
<br />
<u>What next ?</u><br />
<br />
I imagine a "factory data reset" would reset my phone in a stable state.<br />
But I would first like to try to create a workaround for 'Word Prospector', that would just be to catch the exception around the database usage, and in case of problem, would retry with another database name.<br />
I would still like to find a way to get my data from 'Spy My Apps' back. I'm not sure there is any chance for this one, but... for the moment, I would like to be optimistic.<br />
<br />
And... if someone from Google could fix the bug, it would be very nice !!!!AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com11tag:blogger.com,1999:blog-7565989862281145057.post-62944920890528714892011-02-04T08:40:00.000-08:002011-02-04T08:40:16.533-08:00I can read english !!!!Ok, I'm not a native english speaker ( I'm french actually ), but I still can read (some) english...<br />
<br />
So why, why, is it so difficult for me to have access to the application comments in english ?<br />
The new market website is awesome, but I still can't acces any non-french comment...<br />
<br />
And for some very specific applications, most comments are in english and I just can't have access to them.<br />
Actually, it is not completely true : I can, on my phone, change my language, then check the comments in the market, then get back to french... But it is far from being practical...<br />
<br />
I would really like an option to decide how to filter the comments in both the website and the phone markets.AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com2tag:blogger.com,1999:blog-7565989862281145057.post-79733665974633638462010-11-14T16:26:00.000-08:002011-10-31T02:34:22.187-07:00The server could not process your apk. Try again...Today, I wanted to submit a new version of my word game 'Word Prospector'.<br />
<br />
Everything was okay, until I uploaded the ask on the market !<br />
There I had this nice message :<br />
"The server could not process your apk. Try again"<br />
<br />
Hum...ok...<br />
As I'm a kind of well educated one, and despite what my rational-software-engineer mind told me, I follow the note, and try again...<br />
I tried 3 times, and always get the same message !<br />
<br />
Unfortunately, this message is quite cryptic, and is not that helpful !<br />
Google was not my friend here...<br />
Luckily, Google, the search engine, did a better job than Google, the market creator, and I find <a href="http://code.google.com/p/android/issues/detail?id=2530">here </a>the solution :<br />
<br />
The manifest should not have an empty 'uses-configuration' tag !<br />
<br />
So I just get rid of the "<uses-configuration>" I had in my manifest file, and everything was fine again !</uses-configuration><br />
<br />
Thanks for the people finding the solution in the first time !!!AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com6tag:blogger.com,1999:blog-7565989862281145057.post-69690647128193312882010-10-31T05:19:00.000-07:002010-10-31T05:19:56.783-07:00Mobile screens : the next step ?<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/jXITjLurof0?fs=1&hl=en_US&color1=0x234900&color2=0x4e9e00"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/jXITjLurof0?fs=1&hl=en_US&color1=0x234900&color2=0x4e9e00" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object><br />
<br />
Have you ever action play games with buttons on your smartphone ?<br />
One of biggest grief I have against these games is that you don't _feel_ the buttons. So it's very easy to move your fingers out of the button position, and to loose some control. And the experience then become incredibly frustrating !<br />
<br />
So I really think some tactile feedback for our mobile will be an tremeduous boost in the user experience !AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com1tag:blogger.com,1999:blog-7565989862281145057.post-28800655158787191952010-10-18T05:00:00.000-07:002010-10-18T05:00:21.792-07:00Sooooo Cute !!<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/b07o_Ocj0HU?fs=1&hl=fr_FR"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/b07o_Ocj0HU?fs=1&hl=fr_FR" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object><br />
<br />
<br />
The korean ads for Android were really nice, and now the mascot is available !<br />
<br />
(Found on Romain Guy's twitter...)AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com0tag:blogger.com,1999:blog-7565989862281145057.post-42339780487169020412010-10-16T18:10:00.000-07:002010-10-16T18:10:32.040-07:00How to improve your application - the ultimate crash reporter : ACRAI've already introduce some way to create a crash reporter ( <a href="http://androidblogger.blogspot.com/2009/12/how-to-improve-your-application-crash.html">here</a> and <a href="http://androidblogger.blogspot.com/2010/03/crash-reporter-for-android-slight.html">here</a> ).<br />
But now, I've found what I think is the ultimate crash reporter for Android !<br />
<br />
<u>Remember : </u><br />
My solution was, when a crash occured, to collect the callstack, some potentially interesting other var, some custom data for the application, and to form a email with all these informations, give them to gmail, so the user could send this email with some data on the current crash !<br />
That was a nice first step, but a lot of people just didn't wanted to send the mail, fearing that it would be used for spams.<br />
A better solution would have been to have my own web server with a special page to receive and treat bug reports, but I didn't have time to make the server part, so I was still using my mail solution !<br />
<br />
<u>Here's come Nivek !</u><br />
Then, 6 month ago, on a french Android developer forum ( <a href="http://forum.frandroid.com/forum/viewtopic.php?id=10477">FrAndroid</a> ), someone asked how people were dealing with crashes. So I presented my solution. Some people found it interesting, and then Nivek has THE idea ! Nivek ( whose real name is Kevin Gaudin and who is the creator of <a href="http://www.cyrket.com/p/android/com.kg.emailalbum.mobile/">Email Album</a> ) is a smart guy, that was quite active on the forum, and whose interventions are always interesting ( and it's quite rare on developers forums... ).<br />
He proposed to send the crash report to a google doc form !<br />
Then he took my code, added this possibility, and make a nice open Source project from it.<br />
<a href="http://code.google.com/p/acra/">ACRA</a> was born !<br />
<br />
<u>The advantages of ACRA are :</u><br />
* You don't have to develop your own server side solution, it's all done by google. You don't even need a web server. A google login is enough !<br />
* All crash reports are sent. Nivek made it modular so you can choose how you inform the user that a crash was send ( no feedback, toast feedback, feedback as a notification )<br />
* <a href="http://code.google.com/p/acra/wiki/ACRAHowTo">it's soooo easy to use</a> !<br />
* It's working with every Android version<br />
* You still can add your own custom informations<br />
* You can use it to send information even when there is no crash ( for instance if your code is in a strange state, but you manage to catch the problem, and put it back in a stable state. You may still be interested by what bring this strange state in the first place ).<br />
* You can receive a mail each time the google doc has changed ( so each time a new bug arrived ), or in a daily digest form (that's what I'm using ).<br />
* Lastly, and this is something I didn't have time to investigate, but I'm sure is _really_ powerful, you can use all the power of Google doc to use the information and present it in any useful way you want.<br />
<br />
I really think the last point is very important !<br />
If you have your own web server solution, you can get the crash data and insert them in a database. But then you still need some tools ( ie some developments ) to interpret the data.<br />
Here, Google doc can really help you. For instance, creating graphics is a easy task.<br />
As I said, I didn't take time to investigate, but I think it would be really easy to have :<br />
* A graph with the number of daily bugs<br />
* A graph with the number of daily bugs for each different versions<br />
* A top of the most seens bug in the last X days.<br />
* A link between the crashes and the phone model<br />
...<br />
<br />
If you find some interesting way to use google Doc to present the crash information, please inform the community !!<br />
<br />
<u>Are there any cons ?</u><br />
Not really.<br />
-You obvioulsy need the internet permission to use it.<br />
-With the new license server introduced by google to fight agains piracy, it is highly recommanded to obfuscate your code. Obfuscated call stacks will be hard to understand in the google doc !<br />
- it won't catch Application Not Responding issues.<br />
<br />
And that's all I can see...<br />
To be honest, if you can leave with the internet permission, I just see no reason not to use it.<br />
<br />
<a href="http://code.google.com/p/acra/">Here is once again the link to the google code project.</a><br />
Make a better code, use ACRA !!!AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com7tag:blogger.com,1999:blog-7565989862281145057.post-27564423920278091832010-10-10T09:29:00.000-07:002010-10-10T09:29:52.287-07:00Spy My Apps : an application for developers to improve the Android MarketHi all,<br />
<br />
The Android market developer page is nice, but I always feel like some important tools were missing !<br />
<br />
I wanted in peculiar to have some graphs with the download, or the ratings of your application, so I can see whether things were getting better. Seing what web tools google can do like analytics, or adsense, it's strange so it is not (already) in the developer page !<br />
For a long time, I also wanted to have the comments : it was really strange that you couldn't read the comments on your own application ! Google finally fixed that and comments are now included in the developer page !<br />
<br />
So I developed my owned application to create these graphs : Spy My Apps !<br />
<br />
* Launch the application everyday, log in and get the data. It really launch the developer web page, and get the data from it.<br />
* Then you can see the graph of<br />
=> your downloads and active downloads<br />
=> The application rating<br />
=> The daily rating mean<br />
* You can also have the comments on your applications<br />
<br />
<u>Some screens :</u><br />
<u><br />
</u><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzouUc1N-CuEZFXBZTT8ze_H7YLPNMo8S5Tsq_1ws5dZt-HQsiLdHBUZ8WZJREuBJsNCRvz_ajy6YNWQp871ELUyDb8YYP6K4AYdcjynx5C_t2Sy99sxsvmEFLTCpSK1YpX8q6MyhRmhY/s1600/spyMyAppsMenu.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzouUc1N-CuEZFXBZTT8ze_H7YLPNMo8S5Tsq_1ws5dZt-HQsiLdHBUZ8WZJREuBJsNCRvz_ajy6YNWQp871ELUyDb8YYP6K4AYdcjynx5C_t2Sy99sxsvmEFLTCpSK1YpX8q6MyhRmhY/s200/spyMyAppsMenu.png" width="138" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgag5qdEp_0EobJvWu3a1vWK1Gm6pEKONB-g8juremLL5K1DtLFyykEfgOiuNMcuuYvSwYuv7VFglIp3tJiSJI1ymHxQZCEogAed9I8Sh5Rt0rM0H4u3NADX5vdBJvBGGr5_SMvfEayeLk/s1600/spyMyAppsComments.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgag5qdEp_0EobJvWu3a1vWK1Gm6pEKONB-g8juremLL5K1DtLFyykEfgOiuNMcuuYvSwYuv7VFglIp3tJiSJI1ymHxQZCEogAed9I8Sh5Rt0rM0H4u3NADX5vdBJvBGGr5_SMvfEayeLk/s200/spyMyAppsComments.png" width="180" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><u> The graphs :</u><br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoOVPczPPhYdEEn8wpDNadWIJlaCSwUxE0dB-Y3JmYN_FIZM3sIJjAJWZm01Zzd2x-UlvRG9qygSv-NU7sKIZZrIgYbk6CBQFwHO-sichM0Xx18tnr92P9feYubbqU_1T1lx-3lMrcwYg/s1600/SpyMyApps_Graph.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoOVPczPPhYdEEn8wpDNadWIJlaCSwUxE0dB-Y3JmYN_FIZM3sIJjAJWZm01Zzd2x-UlvRG9qygSv-NU7sKIZZrIgYbk6CBQFwHO-sichM0Xx18tnr92P9feYubbqU_1T1lx-3lMrcwYg/s320/SpyMyApps_Graph.png" width="213" /></a></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8bs3UZPPXz3XPAiqNJ_gt0RhL534ccs0CBAty6zYy7dXcUkNYGyCYFMbJ1h7qO7Oo2owMCu_FZLUYdVTL9otW-9GYDnyxz2eN6jmnAwuOYLiEHJDu5l59JGxop88vXX04oKvurxTSn3I/s1600/SpyMyApps_GraphRatings.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8bs3UZPPXz3XPAiqNJ_gt0RhL534ccs0CBAty6zYy7dXcUkNYGyCYFMbJ1h7qO7Oo2owMCu_FZLUYdVTL9otW-9GYDnyxz2eN6jmnAwuOYLiEHJDu5l59JGxop88vXX04oKvurxTSn3I/s320/SpyMyApps_GraphRatings.png" width="213" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
I used this application for several months now (or at least was was to be this application ), and it's really nice to see all this graphs days after days...<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Note : the application is not completely finished !<br />
In particular, the error dealing is not done, so it should be easy to have it crash.<br />
But still, it's very useful !<br />
:)<br />
<br />
<br />
Here the QR :<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn3s6Oxi_uxSuM1Jx-bjut1gnIDeo8aKN-Ug23zFp1hQD8tKDpB-BlvIbDwvLPs8kS5HvUG5klyrjt3H97Cg-PbHow7Z_NJ6pyWnwSElGyXrGyJVusvh65DJCEOQhErVXp8Lj92Oxvra0/s1600/QR_SpyMyApps.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn3s6Oxi_uxSuM1Jx-bjut1gnIDeo8aKN-Ug23zFp1hQD8tKDpB-BlvIbDwvLPs8kS5HvUG5klyrjt3H97Cg-PbHow7Z_NJ6pyWnwSElGyXrGyJVusvh65DJCEOQhErVXp8Lj92Oxvra0/s200/QR_SpyMyApps.png" width="200" /></a>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com1tag:blogger.com,1999:blog-7565989862281145057.post-62038403030176105892010-10-03T16:18:00.000-07:002010-10-03T16:18:18.930-07:0050 000 Downloads reached !!!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJDcmUNSuG7borCZkH6I4YW1cHtOj3p9byHB3Cs8iNX3DfhwVIhy-ssGLSki4PTNYkjRh7gMMckNQh5vWIOBxrtnbXmSKq_MnVaD2SsPdhVgfKWZjN_0Ib4-7im_LwdGUE_8YjXDpxd8U/s1600/DL_50000.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJDcmUNSuG7borCZkH6I4YW1cHtOj3p9byHB3Cs8iNX3DfhwVIhy-ssGLSki4PTNYkjRh7gMMckNQh5vWIOBxrtnbXmSKq_MnVaD2SsPdhVgfKWZjN_0Ib4-7im_LwdGUE_8YjXDpxd8U/s320/DL_50000.png" width="192" /></a></div>Youpee !!!<br />
<br />
'Word Prospector' has reached this week 50 000 donwloads !<br />
<br />
The first version of the game was released in April 2009, and it's been a long way from the first version to this one !<br />
<br />
The first version was done entirely on the emulator ( no real phone existed in France at this time ), and was far from perfect. The controls were not easy, its was way bigger than it should have been, and there were bugs.<br />
So the first rating were quite low...<br />
<br />
I constantly improved the version, and now the rating are quite good ( a 3.84 mean rating, still suffering from the start low ratings ! ), so improving a version really has an effect on the ratings and on the downloads !!<br />
<br />
<br />
Now the next step will be 250 000 downloads ? It looks a little big at this point, but who knows ?AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com0tag:blogger.com,1999:blog-7565989862281145057.post-65181368253032904912010-09-12T02:57:00.000-07:002010-09-12T13:45:32.394-07:00id software is coming to Android !After showing some impressive engine work on iPhone, id software is coming to Android !<br />
<br />
Their job page shows an announce for an Android programmer !<br />
This is a really good news for Android, as it shows the general move from the Game Industry toward our beloved platform !<br />
Till now, the iPhone was the preferred mobile platform, but the very strong growth of Android changed their state of mind :)<br />
<br />
John Carmack has a very large range of knowledge on game programming, as he started long before things like FPU, 3D graphic cards, or the web even existed. This is important for high performance mobile game programming, as we need old school programming tricks, understanding of how modern graphic cards work, or how to create an architecture to deal with big projects.<br />
<br />
Definitively a great news, can't wait to see what will come out of this ( although knowing id software, we should prepare for some wait... ).<br />
I'm sure Epic will also follow this move !<br />
<br />
Job page :<br />
<a href="http://jobs.gamasutra.com/jobseekerx/viewjobrss.asp?cjid=23463&accountno=73661">http://jobs.gamasutra.com/jobseekerx/viewjobrss.asp?cjid=23463&accountno=73661</a><br />
<br />
( This news came from Romain Guy Twitter )AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com1tag:blogger.com,1999:blog-7565989862281145057.post-82895492611418270082010-09-09T16:48:00.000-07:002010-09-09T16:48:38.908-07:00Adventures with Android Library ProjectsIt's been a long time, although I have continued my life as a hobbyist Android developer !<br />
<br />
Today, I will share my wonderful adventures with Library Projects !<br />
<br />
Library Projects are a new feature in Froyo, that I was really excited about (<a href="http://androidblogger.blogspot.com/2010/05/libraries-in-android-new-feature-no.html">see here</a>) !<br />
Library Projects allow you to share some whole parts of your applications, resources included. The main and immediate use is to create several versions of the same application.<br />
For instance, if you have a payed version and an ad supported free version, you need to have 2 differents applications, but with very few differences.<br />
In my case, I have two different games "Word Prospector" and 'Chasseur de mots", that are, basically, the same game, but with different data ( the dictionary : it is a english and a french version of the same game ). As the dictionary is 50% of the apk weight, I didn't want to have only one application with two dictionaries.<br />
But, let's face it : until now, I dealed with those two versions as badly as I could : when I made a development in one of the game, I had then to report it in the other game.<br />
I could not even copy / paste all the files, as some divergence appeared. For instance, some key values for middleware ( Flurry for instance ).<br />
<br />
So I was really impatient to try this new Android feature !<br />
<br />
<u>The start :</u><br />
Reading the Google doc, it seems really easy to use : make a library project, click "Is Library" in the project properties, then in the application projects, just select this library as "used library".<br />
<br />
<u>First step, first success...</u><br />
The first step was creating the library. I saw in the documentation that you can convert an existing project into a library project, with just one click ! But this arises a question : is this library still considered as a legit application ?<br />
So I tried to launch this library version... And it worked perfectly !<br />
It wouldn't last :)<br />
<br />
<u>Second step, first fail !</u><br />
Once I had my library, in just a matter of seconds, I tried to use it in my french version of the game.<br />
I started to copy my whole project (just in case thing would be funkier than expected ! ).<br />
Then I removed one activity from this game, expecting Eclipse to find it in the library.<br />
So I deleted this activity file, and in the manifest, I change its declaration, by adding the path to the library activity.<br />
So I was changing :<br />
<activity android:name="ScorePage"<br />
android:label="@string/app_name"<br />
android:theme="@android:style/Theme.NoTitleBar"<br />
><br />
into :<br />
<activity android:name="com.alocaly.EnglishVersionLibrary.ScorePage"<br />
android:label="@string/app_name"<br />
android:theme="@android:style/Theme.NoTitleBar"<br />
><br />
<br />
<br />
Looks quite simple, for at this moment, I really enjoyed it !<br />
Then I try to compile it, and Eclipse started complaining : it didn't know about this activity...<br />
Gasp... After different tries, I search on the Internet to find the solution :<br />
You have to close and re-start Eclipse !<br />
Ok, it just worked perfectly.<br />
...<br />
But, for some reasons, my confidence started to vanish...<br />
<br />
I continued with all my activities until I had a very simple project : an application, and some data files.<br />
All the activities were coming from the library...<br />
The manifest was OK with this config, but I still had some compilation issue.<br />
<br />
<u>Next Step : dealing with Attr</u><br />
As I'm using AdMob in my game, I have a custom AdMob view, and some custom attributes for this view, defined in an attr.xml file.<br />
Trouble is : the game using the library couldn't find the csutom attributes.<br />
Adding another attr.xlm file in the game using the library didn't help : the compiler complaining that some attributes being defined twice (aarggghhh.. )<br />
Searching on the Internet, I found this discussion <a href="http://groups.google.com/group/android-developers/browse_thread/thread/fc9ac9f168a2ec4f/33ac0c1a69e8d86c?lnk=gst&q=library+project+attr#33ac0c1a69e8d86c">here</a> where Xavier Ducrochet, Android SDK Tech Lead, said "At this time, the only solution is to remove the layout from the library and move it into the apps and edit the namespace to match the application package".<br />
Ok, so I tried to do that, but couldn't manage to have a compiling solution.<br />
<br />
So I took Admob off, while waiting for a good idea...<br />
( my goal at this point was to have something working as soon as possible, if necessary with less features. )<br />
<br />
<u>Getting the application from Activities</u><br />
As I said somewhere in the intro, the code for the two games is the same, but for some keys values for middlewares ( Flurry and Scoreloop ).<br />
So I decided to put the keys in the application ( as each game already has its own application ), and let the activities get them from the application.<br />
So I had some code like that in the (common) activities :<br />
<br />
Application CurrentApp = getApplication();<br />
LetterGameApp CurApp = (GameApp) CurrentApp;<br />
MyMiddlewareKey = CurApp.GetMyMiddlewareKey();<br />
<br />
<br />
But it just did not work : the activities are in the library, so the GameApp cast is interpreted as a<br />
GameLibrary.GameApp - the library application-.<br />
And in my game using the library getApplication returns a GameUsingLibrary.GameApp, that is not related to a GameLibrary.GameApp and the cast fails !<br />
<br />
My Solution at this point was to make the GameUsingLibrary application inheriting from the GameLibrary application.<br />
This way, the cast is still valid.<br />
<br />
Note that if it were only for the key values, I could have stored them in some xml files. But I'm also using the application to gather some informations on the user behaviour, to help me for debugging crashes, so I call some application methods from all over my code !<br />
<br />
<u>Final step, final fail...</u><br />
At this step, I had everything working correctly.<br />
Both the game used as a library and the game using the library were working correctly.<br />
It was quite late, and I was looking forward to go to bed.<br />
I made a last test on the game using the library ( you should never make a last test !! ), and found something really strange : a breakpoint being triggered on a empty line !! And then I could step throw some comment lines. WTF ???<br />
So I decided to clean the two projects, to rebuild them.<br />
I then tried to launch both of them... And when launching the game used as a library, Eclipse said 'Could Not Find EnglishGame.apk'.... ???<br />
I cleared the project once again. Same message. I modified the code a little... Same message...<br />
I restarted Eclipse. Same message.<br />
I reboot my computer. Same message.<br />
I'm sure all of you have already feel the same when a very last little modification ruins your entire development day. I felt a little distressed, tired, with a hard desire to kick my computer ( and I perhaps had some bad thoughts for Google engineers... Sorry guys... ).<br />
<br />
Finally, I unchecked the "Is A library" checkbox, and the .apk could at least be generated !<br />
<br />
<u>Dealing with attr, slight return</u><br />
As light as they can be, my revenues with AdMob are the only income I get from my android games, and at least as a symbol, I really want to keep it, so I wanted to fix the attr issue and have AdMob back before publishing the version.<br />
<br />
I couldn't find the solution for the attr issue, but I finally could fix my problem :<br />
I got rid of my attr file, and of the custom attributes of the AdMob view.<br />
And set this custom attribute values by code, and no more in the activity layouts.<br />
<br />
<br />
<u>Last comments</u><br />
Finally, I now need to uncheck the 'Is A Library' checkbox when I want to make the first game, and recheck it when I want to make the second game.<br />
This is a complete non sense, and I feel now like having a library that is also a legit application was just plain wrong. But the documentation is not completely clear on this point, and Eclipse partly let you do it, so it's easy to feel like it's possible when it's not really.<br />
I really should have a library project, and two application projects using this library.<br />
<br />
After some time using this configuration, I can tell you that Library Projects are really nice to use.<br />
There are still some place to make this feature better, there are still some confusing things. For instance, debugging is quite strange : you debug a kind of fake file, with a path like 'MyProject/PathInTheLibrary/FileInTheLibrary'.<br />
and this file really does not exist !<br />
Modifying this fake file really modifies the file in the library, so every thing seems to fit perfectly in place, but it still is quite strange, and several times, I launched the wrong game.<br />
<br />
There are still some issues - hopefully corrected in the next SDK version - but once your setup is done, and most of your issues solved, having this solution to have your code in only one place is a huge confort gain !<br />
<div><br />
</div>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com14tag:blogger.com,1999:blog-7565989862281145057.post-19833141247880481732010-06-29T06:19:00.000-07:002010-06-29T06:19:59.335-07:00Mario Live WallPaperI've just seen this live wallpaper on <a href="http://www.frandroid.com/">Frandroid</a>, and i was just really impressed by this work !<br />
<br />
I guess the guy took the Mario code from the <a href="http://julian.togelius.com/mariocompetition2009/">Mario AI Competition</a>, and make a Live Wall Paper out of it !<br />
<br />
On my FRF50 Froyo version, it is really smooth and hypnotic.<br />
I just think it will waste my batterie (but actually, the wall paper is not executed that often : only when switching from one application to another, so I don't think it is that bad ).<br />
<br />
<br />
Here is a video :<br />
<object height="385" width="640"><param name="movie" value="http://www.youtube.com/v/2g58o9w0bg4&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2g58o9w0bg4&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object><br />
<div><br />
</div><div>You can find it on the market with Android 2.2 ( search for "Mario Live Wallpaper" ), or from this <a href="http://forum.xda-developers.com/showthread.php?t=710647">Xda-developer forum</a>.</div><div><br />
</div><div>Enjoy !</div>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com2tag:blogger.com,1999:blog-7565989862281145057.post-75290626284937183802010-05-24T17:08:00.000-07:002010-05-24T17:11:48.871-07:00Application to SD card : it's working !!Yesterday, I discovered that the applications should put a special tag in the manifest in order to let the user put them on the SD card.<br />
<br />
Today, I tried it on Word Prospector, and<br />
Tadaaa ! It's working great :<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8N4rwYMqyG0UreUx1yd_ROEUjpqNAfRQpia3l5uOKWQth9M2-Z_o0vBqwz3mvbpzWBa41TvzGPL88DWvQyHLArPyDLKL3PaP4K_0GU6Yyn6wTOJceYj7MXR2e_pAJtkxnMZcqGFWZbg/s1600/SaveToSDCard.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8N4rwYMqyG0UreUx1yd_ROEUjpqNAfRQpia3l5uOKWQth9M2-Z_o0vBqwz3mvbpzWBa41TvzGPL88DWvQyHLArPyDLKL3PaP4K_0GU6Yyn6wTOJceYj7MXR2e_pAJtkxnMZcqGFWZbg/s400/SaveToSDCard.png" width="240" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
(Here in french, obvisouly)<br />
<br />
The move is instantaneous, completely transparent.<br />
And the application looks as fast as when running from the internal memory.<br />
Nice !!<br />
<br />
Additionnal note :<br />
I love the Bug-Droid icon when you are connected for debugging !!!<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRKiEBOcgZUY0D8FvaF0MJc4dz3Xd0wJeV-6zOEPxzfa0MFB5I9VJmUfs0dg955gxVd41psUZEzrZqvIk5kA8GRd3WquktcIE8YgrilqqUHuZSI9JG3v4rV7wrg5yRBpIMKRNJXXKIzsk/s1600/BudDroidIcon.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRKiEBOcgZUY0D8FvaF0MJc4dz3Xd0wJeV-6zOEPxzfa0MFB5I9VJmUfs0dg955gxVd41psUZEzrZqvIk5kA8GRd3WquktcIE8YgrilqqUHuZSI9JG3v4rV7wrg5yRBpIMKRNJXXKIzsk/s320/BudDroidIcon.jpg" /></a></div>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com1tag:blogger.com,1999:blog-7565989862281145057.post-70654458451494090182010-05-23T12:55:00.000-07:002010-05-23T12:55:01.700-07:00Installation of applications on the SD card with Froyo : the how- to !Youpeee !!!<br />
Froyo is finally here, sooner than I expected it !Thanks, Google !!!<br />
<br />
Now, like every other geek with their new toy in hand, I tried most of the new things...<br />
And all is great, but...<br />
The install on SDCard is always greyed...<br />
<br />
Then, I just read a tweet from Romain Guy explaining it in a few words.<br />
Your application should add this line in the manifest<br />
<span class="Apple-style-span" style="color: #333333; font-family: arial, sans-serif; font-size: 13px;"></span><br />
<pre class="prettyprint" style="background-color: #fafafa; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; color: #007000; font-family: monospace; line-height: inherit; margin-bottom: 1em; margin-left: 1em; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"><span class="tag" style="color: #000088;"><manifest></manifest></span><span class="pln" style="color: black;"> </span><span class="atn" style="color: #882288;">xmlns:android</span><span class="pun" style="color: #666600;">=</span><span class="atv" style="color: #008800;">"http://schemas.android.com/apk/res/android"</span><span class="pln" style="color: black;">
</span><span class="atn" style="color: #882288;">android:installLocation</span><span class="pun" style="color: #666600;">=</span><span class="atv" style="color: #008800;">"auto"</span><span class="pln" style="color: black;">
... </span><span class="tag" style="color: #000088;">></span></pre><br />
in order to be installed by the end user on the SD Card.<br />
<br />
<a href="http://developer.android.com/intl/fr/guide/appendix/install-location.html">http://developer.android.com/intl/fr/guide/appendix/install-location.html</a>AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com1tag:blogger.com,1999:blog-7565989862281145057.post-63364608874808053042010-05-21T16:39:00.000-07:002010-05-21T16:39:59.884-07:00libraries in Android : the new feature no body speak about in the SDKHi all,<br />
<br />
This Google I/O has been rich in announces and new and nice features.<br />
<br />
So everybody is speaking about :<br />
* flash : This is really nice, and a big plus for Android ( no, I didn't mention the Fruit Phone... )<br />
* performances : x2 - x5 for free is always good for developers. It also seems the general OS has been improved in this direction.<br />
* Teethering<br />
* Installation on SD card ( the size of applications will now explode !! )<br />
* Cloud to device messenging : this is like the push function in the Fruit Phone, but one step further, as it use the intent system, and can launch some application from the Cloud...<br />
* Application Backup Data : This is nice. Some developers were already doing it on their side, but having it included in the SDK is really a big plus.<br />
<br />
<br />
But there is a little new feature that I was waiting for for such a long time, and that is totally unexpected :<br />
<b><u>The project Libraries !!</u></b><br />
<br />
Project libraries are basically, Android libraries, with code and resources included.<br />
This is awesome !!<br />
<br />
It means that now, we can finally have one common code for a free and a paid application !<br />
In my case, I have 2 different application for the english and the french version of my game, I will now have only one version !<br />
<br />
Here is the thing :<br />
<a href="http://developer.android.com/intl/fr/guide/developing/eclipse-adt.html#libraryProject">http://developer.android.com/intl/fr/guide/developing/eclipse-adt.html#libraryProject</a><br />
<br />
And there is a sample :<br />
<a href="http://developer.android.com/intl/fr/resources/samples/TicTacToeMain/index.html">http://developer.android.com/intl/fr/resources/samples/TicTacToeMain/index.html</a><br />
<br />
Enjoy !!!AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com3tag:blogger.com,1999:blog-7565989862281145057.post-67745254940722300112010-04-30T17:51:00.000-07:002010-04-30T17:51:48.590-07:00Google added crash report feedback for developers !Hi all,<br />
<br />
I was telling it over and over again : crash reports are essential for developers, to make their apps more stable, and user experience more enjoyable.<br />
It looks like google agree with this statement, as they added some crash reports in the developer page :<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEroXieAqan8Y7W4YAF19zjHPVEisQcrO98XlpbQ2wAuVT_2C44udcl9-E89x9Y9_AeFtrTyo44ILTDScZX1ksdw2wmMhiVR_3rJ1KREdW5_SxoXu0DGAr6Gq5oGwZ3a8dZ7v_M3V-cNY/s1600/GoogleFeedbackAndroid.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEroXieAqan8Y7W4YAF19zjHPVEisQcrO98XlpbQ2wAuVT_2C44udcl9-E89x9Y9_AeFtrTyo44ILTDScZX1ksdw2wmMhiVR_3rJ1KREdW5_SxoXu0DGAr6Gq5oGwZ3a8dZ7v_M3V-cNY/s640/GoogleFeedbackAndroid.JPG" width="640" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
This is very good news, as it will make the Android platform a better platform to develop on.<br />
<br />
How does it work ?<br />
It looks like when a application crashed, the phone let the user send a feedback to the developer( with a custom message from the user, the callstack, and ... ??? ).<br />
I still don't know what is in this feedback - as I got 0 reports - but it definitively looks interesting !<br />
You can also see that is also reports freezes, that user made crash reporters can not intercept !<br />
The developer can then mark a report as 'old' ( so it won't appear again ? ).<br />
<br />
For the moment it is still at experimental state. For instance, it looks like you can check feedbacks from other application, but I couldn't get it to work ( having 'server errors' ), and I find it strange for privacy reasons.<br />
<br />
This is good to see that Android is going in the right direction !AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com4tag:blogger.com,1999:blog-7565989862281145057.post-84299542703532942482010-03-30T16:58:00.000-07:002010-10-17T16:15:23.078-07:00How to improve your application : a crash reporter to improve stability ( slight return )Hi all,<br />
<br />
For quite some time, I wanted to return on my crash reporter, and on this article <a href="http://androidblogger.blogspot.com/2009/12/how-to-improve-your-application-crash.html">here</a>.<br />
<br />
Actually, there are two things that I changed for my crash reporter :<br />
* First, I made it more robust, fixing a bug (that I can't understand, by the way) in it.<br />
* Then, I extended the crash reporter so that it can be even more useful to help me ( and you ? ) in the bug hunt...<br />
<br />
<u>1) Making the crash reporter more robust :</u><br />
<br />
At the launch of my crash reporter, I was gathering informations on the application environment, to give me more information on the system the bug was happening on.<br />
The code I was using was this one :<br />
<div class="code"><span class="Apple-style-span" style="color: #333333; font-family: Courier; font-size: 11px; line-height: 19px;">void RecoltInformations( Context context )<br />
<span style="white-space: pre;"> </span>{<br />
<span style="white-space: pre;"> </span>PackageManager pm = context.getPackageManager();<br />
try<br />
{<br />
<span style="white-space: pre;"> </span>PackageInfo pi;<br />
// Version<br />
pi = pm.getPackageInfo(context.getPackageName(), 0);<br />
VersionName = pi.versionName;<br />
// Package name<br />
PackageName = pi.packageName;<br />
// Files dir for storing the stack traces<br />
FilePath = context.getFilesDir().getAbsolutePath();<br />
// Device model<br />
PhoneModel = android.os.Build.MODEL;<br />
// Android version<br />
AndroidVersion = android.os.Build.VERSION.RELEASE;<br />
<br />
Board = android.os.Build.BOARD;<br />
Brand = android.os.Build.BRAND;<br />
//CPU_ABI = android.os.Build.;<br />
Device = android.os.Build.DEVICE;<br />
Display = android.os.Build.DISPLAY;<br />
FingerPrint = android.os.Build.FINGERPRINT;<br />
<span style="white-space: pre;"> </span>Host = android.os.Build.HOST;<br />
<span style="white-space: pre;"> </span>ID = android.os.Build.ID;<br />
<span style="white-space: pre;"> </span>//Manufacturer = android.os.Build.;<br />
<span style="white-space: pre;"> </span>Model = android.os.Build.MODEL;<br />
<span style="white-space: pre;"> </span>Product = android.os.Build.PRODUCT;<br />
<span style="white-space: pre;"> </span>Tags = android.os.Build.TAGS;<br />
<span style="white-space: pre;"> </span>Time = android.os.Build.TIME;<br />
<span style="white-space: pre;"> </span>Type = android.os.Build.TYPE;<br />
<span style="white-space: pre;"> </span>User = android.os.Build.USER;<br />
<br />
}<br />
catch (NameNotFoundException e)<br />
{<br />
e.printStackTrace();<br />
}<br />
<span style="white-space: pre;"> </span>}</span></div>And this code was crashing on some phones...<br />
I still can't understand where this code can crash ( if you have some ideas, I would happily hear them ! ), but it is actually quite easy to fix :<br />
* Catching all the exceptions, and incorporating the getPackageManagerPart in the try part so that its eventual failure would be caught.<br />
* Not calling this function at the start of the application, but only when it really is needed : when a bug occcurs. There was really no need to call it before.<br />
<br />
With this sole improvement, I could prevent the crash reporter to crash ( having a debug tool that creates bug is a _bad_ thing ), but still, I was receiving bugs with this info :<br />
<span class="Apple-style-span" style="font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"></span><br />
<div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">Informations :<br />
==============</div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">Version : null<br />
Package : null<br />
FilePath : /data/data/com.alocaly.LetterGame/files<br />
Phone Modelnull<br />
Android Version : null<br />
Board : null<br />
Brand : null<br />
Device : null<br />
Display : null<br />
Finger Print : null<br />
Host : null<br />
ID : null<br />
Model : null<br />
Product : null<br />
Tags : null<br />
Time : 0<br />
Type : null<br />
User : null<br />
Total Internal memory : 274464768<br />
Available Internal memory : 209596416</div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium;">It means, first that this code is no more crashing and then that the code that was crashing was in the very first lines of the function. So thrown by GetPackageManager, GetPackageName or GetPackageInfo. </span><br />
<span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium;">But, from the Android documentation, only the NameNotFoundException could be launched by these functions... And it was handled by my previous code !!</span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">Conclusion : I still don't understand what was happening !</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">2) Extending the crash reporter.</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">Taking some time to think about this crash reporter, we could wonder what is the primary goal of this tool. The real goal of this tool is to give us more information on the bugs that occured so that we can understand remotely what was really happening.</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">The callstack is a very valuable piece of information to get, the environment can give you some clues, but this is just not enough. Trying to understand where a bug lay with so few information is very tricky. </span></span><br />
<span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">But we can't add more informations, without doing something really specific for one application...</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">...</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">And that was the good idea : we obviously need some information specific for the application !!!</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">The application developer knows what kind of information would help him understand the bugs !</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">For instance, in my game 'Word Prospector', I finally had some crash in the function that checks whether or not a word is correct. Knowing what this strange-crash-creating-word is would be very valuable information.</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">So I decided to add in my crash reporter a way to add any informations. I just added a hash map with some Key/Values strings, add some functions to populate the hash map, and display this hash map in the report the crash reporter is creating when a bug occurs.</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">This was a really good idea ! I could find that this word was starting with a '?' : the user could enter some letters while quitting the pause state, where all the letters are replaced by some question marks...</span></span><br />
<span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;">So now, when there is a suspicious and hard to understand crash, I can had a lot of value to check, release a new version, and wait in front of my mail box !</span></span></div><div style="color: black; font-family: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div>Here is the new version of the code.<br />
I still init it from the application object, so I initialize it for the whole game with just one call.<br />
<br />
<div class="code"><span class="Apple-style-span" style="color: #333333; font-family: Courier; font-size: small;"><span class="Apple-style-span" style="font-size: 11px; line-height: 19px;"></span></span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Courier; font-size: small;"><span class="Apple-style-span" style="font-size: 11px; line-height: 19px;">public class ErrorReporter implements Thread.UncaughtExceptionHandler<br />
{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String VersionName;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String PackageName;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String FilePath;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String PhoneModel;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String AndroidVersion;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String Board;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String Brand;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String Device;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Display;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>FingerPrint;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Host;<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>ID;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Manufacturer;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Model;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Product;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Tags;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>long<span class="Apple-tab-span" style="white-space: pre;"> </span>Time;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>Type;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String<span class="Apple-tab-span" style="white-space: pre;"> </span>User;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>HashMap<string, string=""> CustomParameters = new HashMap< String, String>();</string,><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private Thread.UncaughtExceptionHandler PreviousHandler;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private static ErrorReporter <span class="Apple-tab-span" style="white-space: pre;"> </span>S_mInstance;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private Context <span class="Apple-tab-span" style="white-space: pre;"> </span>CurContext;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void AddCustomData( String Key, String Value )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CustomParameters.put( Key, Value );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private String CreateCustomInfoString()<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String CustomInfo = "";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Iterator<string> iterator = CustomParameters.keySet().iterator();</string><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>while( iterator.hasNext() )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String CurrentKey = iterator.next();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String CurrentVal = CustomParameters.get( CurrentKey );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CustomInfo += CurrentKey + " = " + CurrentVal + "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return CustomInfo;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>static ErrorReporter getInstance()<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ( S_mInstance == null )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>S_mInstance = new ErrorReporter();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return S_mInstance;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void Init( Context context )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>PreviousHandler = Thread.getDefaultUncaughtExceptionHandler();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Thread.setDefaultUncaughtExceptionHandler( this );<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CurContext = context;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public long getAvailableInternalMemorySize() { <br />
File path = Environment.getDataDirectory(); <br />
StatFs stat = new StatFs(path.getPath()); <br />
long blockSize = stat.getBlockSize(); <br />
long availableBlocks = stat.getAvailableBlocks(); <br />
return availableBlocks * blockSize; <br />
} <br />
<br />
public long getTotalInternalMemorySize() { <br />
File path = Environment.getDataDirectory(); <br />
StatFs stat = new StatFs(path.getPath()); <br />
long blockSize = stat.getBlockSize(); <br />
long totalBlocks = stat.getBlockCount(); <br />
return totalBlocks * blockSize; <br />
} <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>void RecoltInformations( Context context )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
try<br />
{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>PackageManager pm = context.getPackageManager();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>PackageInfo pi;<br />
// Version<br />
pi = pm.getPackageInfo(context.getPackageName(), 0);<br />
VersionName = pi.versionName;<br />
// Package name<br />
PackageName = pi.packageName;<br />
// Device model<br />
PhoneModel = android.os.Build.MODEL;<br />
// Android version<br />
AndroidVersion = android.os.Build.VERSION.RELEASE;<br />
<br />
Board = android.os.Build.BOARD;<br />
Brand = android.os.Build.BRAND;<br />
Device = android.os.Build.DEVICE;<br />
Display = android.os.Build.DISPLAY;<br />
FingerPrint = android.os.Build.FINGERPRINT;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Host = android.os.Build.HOST;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ID = android.os.Build.ID;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Model = android.os.Build.MODEL;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Product = android.os.Build.PRODUCT;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Tags = android.os.Build.TAGS;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Time = android.os.Build.TIME;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Type = android.os.Build.TYPE;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>User = android.os.Build.USER;<br />
<br />
}<br />
catch( Exception e )<br />
{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>e.printStackTrace();<br />
}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public String CreateInformationString()<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>RecoltInformations( CurContext );<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String ReturnVal = "";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Version : " + VersionName;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Package : " + PackageName;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "FilePath : " + FilePath;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Phone Model" + PhoneModel;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Android Version : " + AndroidVersion;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Board : " + Board;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Brand : " + Brand;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Device : " + Device;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Display : " + Display;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Finger Print : " + FingerPrint;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Host : " + Host;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "ID : " + ID;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Model : " + Model;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Product : " + Product;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Tags : " + Tags;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Time : " + Time;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Type : " + Type;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "User : " + User;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Total Internal memory : " + getTotalInternalMemorySize();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "Available Internal memory : " + getAvailableInternalMemorySize();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ReturnVal += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return ReturnVal;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void uncaughtException(Thread t, Throwable e)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String Report = "";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Date CurDate = new Date();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "Error Report collected on : " + CurDate.toString();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "Informations :";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "==============";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += CreateInformationString();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "Custom Informations :\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "=====================\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += CreateCustomInfoString();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "Stack : \n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "======= \n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>final Writer result = new StringWriter();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>final PrintWriter printWriter = new PrintWriter(result);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>e.printStackTrace(printWriter);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String stacktrace = result.toString();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += stacktrace;<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "Cause : \n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "======= \n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// If the exception was thrown in a background thread inside<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// AsyncTask, then the actual exception can be found with getCause<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Throwable cause = e.getCause();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>while (cause != null)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>cause.printStackTrace( printWriter );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += result.toString();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>cause = cause.getCause();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>printWriter.close();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Report += "**** End of current Report ***";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SaveAsFile(Report);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//SendErrorMail( Report );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>PreviousHandler.uncaughtException(t, e);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private void SendErrorMail( Context _context, String ErrorContent )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Intent sendIntent = new Intent(Intent.ACTION_SEND);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String subject = _context.getResources().getString( R.string.CrashReport_MailSubject );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String body = _context.getResources().getString( R.string.CrashReport_MailBody ) +<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>"\n\n"+<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ErrorContent+<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>"\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>sendIntent.putExtra(Intent.EXTRA_EMAIL,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>new String[] {"postmaster@alocaly.com"});<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>sendIntent.putExtra(Intent.EXTRA_TEXT, body);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>sendIntent.setType("message/rfc822");<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>_context.startActivity( Intent.createChooser(sendIntent, "Title:") );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private void SaveAsFile( String ErrorContent )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>try<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Random generator = new Random();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>int random = generator.nextInt(99999);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String FileName = "stack-" + random + ".stacktrace";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>FileOutputStream trace = CurContext.openFileOutput( FileName, Context.MODE_PRIVATE);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>trace.write(ErrorContent.getBytes());<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>trace.close();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>catch( Exception e )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// ...<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private String[] GetErrorFileList()<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>File dir = new File( FilePath + "/");<br />
// Try to create the files folder if it doesn't exist<br />
dir.mkdir();<br />
// Filter for ".stacktrace" files<br />
FilenameFilter filter = new FilenameFilter() {<br />
public boolean accept(File dir, String name) {<br />
return name.endsWith(".stacktrace");<br />
}<br />
};<br />
return dir.list(filter);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private boolean bIsThereAnyErrorFile()<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return GetErrorFileList().length > 0;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void CheckErrorAndSendMail(Context _context )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>try<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Courier; font-size: small;"><span class="Apple-style-span" style="font-size: 11px; line-height: 19px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>FilePath = _context.getFilesDir().getAbsolutePath();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ( bIsThereAnyErrorFile() )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String WholeErrorText = "";<br />
<span class="Apple-style-span" style="white-space: pre;"></span> <span class="Apple-tab-span" style="white-space: pre;"> </span>// on limite à N le nombre d'envois de rapports ( car trop lent )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String[] ErrorFileList = GetErrorFileList();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>int curIndex = 0;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>final int MaxSendMail = 5;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for ( String curString : ErrorFileList )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ( curIndex++ <= MaxSendMail )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>WholeErrorText+="New Trace collected :\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>WholeErrorText+="=====================\n ";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String filePath = FilePath + "/" + curString;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>BufferedReader input = new BufferedReader(new FileReader(filePath));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String line;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>while (( line = input.readLine()) != null)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>WholeErrorText += line + "\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>input.close();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// DELETE FILES !!!!<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>File curFile = new File( FilePath + "/" + curString );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>curFile.delete();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SendErrorMail( _context , WholeErrorText );<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>catch( Exception e )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>e.printStackTrace();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
}<br />
</span></span></div><br />
Enjoy it !!<br />
<br />
<br />
NOTE : I'm no more using this mail technic. Now I'm using ACRA, and the results are much more interesting !! See <a href="http://androidblogger.blogspot.com/2010/10/how-to-improve-your-application.html">here </a>for more info.<br />
<br />
<br />
Ps : here is a link I found while googling :<br />
<a href="http://web-authoring.seadvd.com/whats-google-up-to-with-android/">http://web-authoring.seadvd.com/whats-google-up-to-with-android/</a><br />
:)AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com12tag:blogger.com,1999:blog-7565989862281145057.post-557965720097221742010-03-02T16:36:00.000-08:002010-03-03T02:02:17.700-08:00Google really takes care of developers !Google really want developers to be able to develop in the best conditions !<br />
<br />
15 days ago, I was in Montreal for my real job...<br />
So I missed the Android Developer Lab in Paris ... and the Nexus One that was given to every attendant !<br />
Then there was an Android Developer Lab during the MWC, in Barcelona... with a new Nexus One distribution...<br />
There will also be a phone distribution at the Game Developer Conference.<br />
<br />
And now, I've just received this email :<br />
"<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;">Due to your contribution to the success of Android Market, we would like to present you with a brand new Android device as part of our developer device seeding program. You are receiving this message because you're one of the top developers in Android Market with one or more of your applications having a 3.5 star or higher rating and more than 5,000 unique downloads. "</span><br />
<br />
That is really nice !<br />
<br />
Actually, I think Google is doing the righ thing... Not only by giving ME a new phone, but by taking care of developers.<br />
<br />
The iPhone success has several reasons.<br />
For sure, the phone was really nice, and came with an interface never seen before... But the most important thing, in my opinion, is that they let any developer develop an application for the iPhone. This is why there are so many application on the iPhone, this is why there are so many good applications on the iPhone, so many new little ideas that make the phone really different...<br />
This is such a big thing that this is what they based their ad campaign on !<br />
<br />
Archos understood the importance of developers too, by offering a substancial reduction on their android tablet to developers.<br />
And now Google decided to follow the same way.<br />
<br />
This is good for developers, this is a good sign for Android - showing how much Google really involves in Android -, this is good for customers...<br />
<br />
Thank you, google !!<br />
<br />
IMPORTANT UPDATE :<br />
I received this email at 1.00 AM, the email was coming from Eric Chu, who always send us developers mails about Android updates, so I didn't even ask myself about the mail validity.<br />
And this morning, a lot of people were wondering whether it is a fake or a real mail :<br />
The registration form this mail send to us is hosted on Google Site, the google free hosting service, and it's basically filling a document on google docs. So it really could be a Fake mail, trying to collect some 'Google Order Number' ( Can we do something harmful with it ? )<br />
<br />
But it now has been validated by google, by several means, including a post by Roman Nurk, whose title is "Android Developer Relations" in this google group :<br />
<a href="http://groups.google.com/group/android-developers/browse_thread/thread/49da01a3cb7f8803">http://groups.google.com/group/android-developers/browse_thread/thread/49da01a3cb7f8803</a><br />
<br />
Conclusion : you really can trust this mail....AndroidBloggerhttp://www.blogger.com/profile/03281698485999677325noreply@blogger.com1