le Wadablog

Aller au contenu | Aller au menu | Aller à la recherche

dimanche 23 février 2014

StartApp banner ads in an Android app built with AndroidAnnotations

If you want to put a StartApp ads banner in an Android app built with AndroidAnnotations, as the documentation says that you must do StartAppAd.init() in the onCreate() which you don't write when you use AA, well this is how to do
public void pub() {
StartAppAd.init(this, "XXXXXX", "XXXX");
and of course, you insert the relevant xml copy-pasted from the StartApp pdf, in your layout

It works on my machine :)

lundi 8 avril 2013

On BatooJPA on the Andoid platform

As you may know, I've done more serverside than mobile dev.
Therefore, I was looking for a way to unite the JEE serverside part and the mobile app.
You know, not having to code same things twice. 
Thus the idea to share code between the two. Not the UI of course, but the JPA entities.

I found BatooJPA (https://github.com/BatooOrg/BatooJPA) which is a competitor to Hibernate and has a sample project for use on Android (it creates data and displays a listview).

Seemed like a good finding however, that does not really match well with me because : 
* Maven based (I used maven 1 and still have nightmares) 
* maven plugin to build & install 
* eclipse 3.7 only 
* uses H2 instead of SQLite 
* Android sample not maintained anymore 
** has to tweak it to make it recognized as an Android project in Eclipse 
** a dependency seems not to be in maven central anymore 
* heavyload APK & app (several Mb) 
* class not found exception at runtime 
As the sample was not working out of the box, I had to recreate it. 
I did it with http://androidkickstartr.com/ then updated the pom and copy/pasted the code.
Should had been ok but ended with a runtime exception. 
I concluded that its not the time for BatooJPA on mobile yet. 
Its sad because, I wanted to present it at DroidCon Paris ... 
Consequently, I recommend to use BatooJPA on the serverside and to make your mobile app a dumb REST consumer if you can afford your app to need network at all time. 
Alternatively, with a need for local storage, one can write a converter from JPA to ORMLite annotations. 
Or lets fund +Gray Watson and +Kevin Galligan to make ORMLite JPA compliant (hi guys).

vendredi 5 octobre 2012

BL'IMEI, a new app

Hi all,

Just pushed an app on the playstore last night.


Blimey, it will show you your IMEI (International Mobile Equipment Identity, see http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity)

It can show it via the ussd/samsung/dialer bug AND via the normal way of calling the dialer with an intent.

So that you'll know your IMEI without removing the battery.

Don't tell me it looks ugly, I know it :)

lundi 9 avril 2012

Android tip of tonight

As I work on an app that loads stuff in DB, I frequently have to go to "Manage Apps" then find my app in the list then click on it and then "clear data". 
As my app's name starts with "P" and I'm using my everyday phone, thats quite a quantity of apps to browse before I find mine.

Easy tip : prefix your app's name with "_____" for example, to have it at the top of the list of your apps.

mardi 27 mars 2012

Article dans une vraie revue du monde réel

(In English after the French §)
Certains savent que j'adore les livres et que je rêve d'un jour écrire un cycle comparable à Dune. 

Après une déception sur un projet qui n'a pas vu le jour (un chapitre sur mon WadRobotFramework dans un livre consacré à Wave chez un gros éditeur américain), 

En 2010 et 2011, j'ai eu la joie de tenir des livres où mon nom apparaissait dans la préface pour indiquer la qualité de ma collaboration en tant que relecteur technique.

Mars 2012,  j'ai le plaisir d'annoncer que j'ai écrit un article qui doit paraître dans un Hors Série d'une revue que j'apprécie particulièrement. 
Un premier article (rémunéré) dont je reparlerai quand il apparaitra en kiosque.

Je vais proposer un 2e article pour creuser le sujet, pour un numéro suivant.

J'espère participer à un livre en 2013 et pourquoi pas en co-signer un en 2014.

MAJ 2012-04-16 : j'apprends ce matin qu'il y aura DEUX HS Android à la suite.
Le premier sortira le 27 avril. Je ne sais pas encore si mon article sera dedans ou dans le suivant.
MAJ 2012-04-28 :  Mon article sera dans le suivant.
MAJ 2012-07-06 :  Mon article est paru dans GNU/Linux Magazine France, Hors-série n°61 Android. Vous le trouverez page 64.

Hi guys,
I have signed an article to be published in a real magazine later this year.

In 2010 & 2011, I had the pleasure to see my name in the prefaces of excellent Android books in sentences underlining the quality of my contribution. And its still huge memories for me to have worked with people I already respected for their previous books/blogs/dW articles (even kilometers of dW articles).

2012 is when I will finally have something published as author : an article in a special issue of a well-known French magazine.

Next step is propose & write a second, to go deeper into the topic.

My envy for 2013 is participating to a book. And co-sign one in 2014.

Dreams are what we live for. Aren't we ?
Update : My article will be in the issue to be published in July.
Update : My article is published. You can browse the magazine online at http://diamond.izibookstore.com/produit/169/9786000049683/GNULinux%20Magazine%20HS%20n61%20%20Creez%20vos%20applications%20Android%20comme%20un%20pro%20 , see page 64

mercredi 27 avril 2011

Android recycling

This post is not about teaching a phone to eat all your waste :)

What to do of "old" phones

As time goes by, one (developper) gets more and more smartphones and specs evolve, leaving older phones behind in terms of daily use.

Thus the question that arises is what to do of "old" phone ?

Of course, the quick and easy answers are :

  • let it rest in a drawer for ... hum ... future use.
  • give/sell it to someone

What else ... ???


There is a computer in the phone ! Remember ?
Depending on the phone model and the work done for it by the wonderful community, you can :

  • install another system, like Ubuntu on a Nexus One
  • install uncommon services
  • use as a remote home-monitoring system (camera to take pics periodically and upload to web if delta)
  • Experiment (roms, ...) : nice way to learn

To give an example to that second point, it would be to install a web server with a few pages, tie it to a dynamic dns (you'll need to configure your box/modem of course)

There is web servers for Android, you are not forced to install Ubuntu + Apache :) or even to cook your own.

It all depends all your available time

That is how innovation happens.

Maybe one day, we'll see Tomcat running on a mobile phone without slowing it to death.

jeudi 24 mars 2011

(FR) Application "Contrepeteries" pour Android

Entre autres choses, j'apprécie les traits d'esprit et les jeux de mots.
Il y a quelques années, je me suis intéressé aux contrepeteries et j'ai constaté que le web n'en manquait pas, mais qu'il y avait souvent les mêmes, dupliquées de sites en sites.
J'ai initié le site http://contrepeteries.free.fr pour qu'il soit collaboratif : que les visiteurs l'enrichissent et puissent récupérer les contrep's pour les utiliser sur d'autres supports.
Il y a eu des échanges fructueux avec le créateur d'une appli pour mac, des visiteurs qui ont beaucoup participé (Merci encore à Maud du fond du champ).
Mais le site vivote à 50 visites par jour.

Comme dirait le chien parlant que je n'ai pas : ça c'est de la niche !

A partir des données de mon site, j'ai créé une appli pour smartphones Android.

Elle s'enrichira au fil des versions. Aujourd'hui (v1.1), elle permet de

  • consulter +500 contrepeteries au hasard
  • partager la contrepeterie affichée (par mail, facebook, twitter, etc ...)
  • voir la liste des évolutions à venir (affichage des solutions est l'évolution la plus demandée)

Voici le lien vers le market web https://market.android.com/details?id=org.wadael.contrepeteries

Et le QR code correspondant

Amusez-vous bien et donnez-moi votre avis.

lundi 15 novembre 2010

Drops computing

I do not intend to produce a reference material with this blog post. At most, I'll get 'prior art' reference and avoid a corporation to patent this. 


Yet another "new" term for IT. 

What I mean with this "drops computing" is "distributed computing involving both machines 'in the cloud' and smaller connected machines like smartphones".

My point is that global computing power has grown in an important way in the last years. I am thinking of all the smartphones that have been sold lately.
What a waste of power to have them mostly do ... phone calls.

Nowadays, smartphones have capacities that sound similar to desktop PCs available a few years ago.
Altough they have different CPU architecture and less storage, I think you'll agree.

Do you remember that those PCs were used for distributed calculations via programs like Seti@Home ?
Whether it is decrypting alien gossip or the human genome, computing power is here, in our pockets.




Imagine continuous usage of the phone. Battery would drain quickly.


Calculations only happen when the phone is charging OR battery level higher then a percentage to be determined by user.



Smartphones cannot hold a complex model in memory.


Give "easy jobs" to smartphones.



Connectivity is not always available.


Be honest. Advise users without a real unlimited data plan not to join. 

Side note :
An architecture involving cloud computing machines and portable machines (drops) could be called "rain computing". But that would not be a very bankable term.

mardi 19 octobre 2010

Smudge attack parade ideas

I have read a post from Eric Vetillard (javacard expert amongst all and a colleague), about smudge attack against android terminals.

To quote his post :

this attack targets the authentication pattern that is used to unlock an Android phone. .... owners also know that smudge really is dangerous for this authentication technique. I have tried it with a colleague: after picking up my phone, it took him 3 tries to get my combination

Why that ? Because :

  • fingers are sweaty or greasy or both (weather is good in the south of France, isn't it Eric ?) so they leave traces on our shining screens
  • there is only one path to unlock the phone
  • this path 'looks' always the same on the phone

So, that post triggered some thinking. I think I've found possible solutions :)

First proposal
The pattern has to not be static. To reach that, my proposal is to have the dots or equivalents to be in a circle that will rotate.
Not randomly but more like a compass.
Just like a compass has an arrow, an arrow is used so that the user has a landmark and not get lost
Then either link the dots to unlock. (5 tries are allowed instead of 3)
With that, you will never not touch the screen at the same place (unless you unlock only at the very same place, with the same position of the body)
Derivated proposal :
A keyboard which keys are never at the same place, used to enter PIN code.
Most of us already know that, as this is used by online banks. The proposal is to integrate it as a proposed unlocking system.

Third proposal, I call it the psycho-camembert :)
It looks like a camembert (or pie chart) with equal parts coloured differently and having patterns (stripes, dots, etc ..).
This camembert is centered on the screen. Those parts are displayed in a random order.
To unlock, parts have to be dragged toward the exterior. Therefore, the traces on the screen are all lines from the center to the outside.
Of course, its a memory thing and one will have to memorize a colour order. Sorry for those who cannot distinguish colors, thats why patterns can be added.

I hope this contribution will find its way to the good ears.
Let's be frank, all the better if it brings me an all-inclusive invitation to IO 2011 !
I really liked San Francisco and have no idea on how to deserve an invite for next year.

Feel free to indicate me the classes of the API to look at in order to implement it.



Eric's post is here http://javacard.vetilles.com/2010/10/18/smudge-attacks-on-android
You can follow Eric on Twitter : @evetillard http://twitter.com/evetillard

jeudi 17 juin 2010

Android : OffLine Map App

If, like me, you use your 'Droid only in wifi mode then you may regret not to be able to use google maps whenever you get lost, outside civilization, far from a wifi access-point.

Then the MapDroyd app was made for you.
After an initial/install-time download of the "Open Street Map" project's maps relevant for you, you are ready to go

For the moment, it is not on the market but available at http://www.mapdroyd.com/