6.8 KiB
layout, status, published, title, author, author_login, author_email, author_url, wordpress_id, wordpress_url, date, categories, tags, comments
| layout | status | published | title | author | author_login | author_email | author_url | wordpress_id | wordpress_url | date | categories | tags | comments | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| post | publish | true | Strange bug with long XML files in android. | Julien Lengrand-Lambert | jlengrand | julien@lengrand.fr | http://www.lengrand.fr | 912 | http://www.lengrand.fr/?p=912 | 2014-01-29 09:51:46.000000000 +01:00 |
|
|
Lately I encountered a strange bug while developing my android application, and I think it is strange enough to share it in this blog post.
Brestram is an android application that aims at delivering real time bus schedule for the people living in Brest. For each new version, I want to display a small message with the new features of the version. I need to deliver the message both in English and in French, and I wanted to keep history of all the messages I have written in the past for reference. On top of this, I wanted to be able to write that message in an understandable format (for me) to avoid formatting errors.
I decided to go for XML, for all the reasons above, and also because android supports it really well out of the box.
Here is how my update file would look like :
{% highlight xml %}
<?xml version="1.0" encoding="utf-8"> "Mise à jour du site Bibus" "Bibus a récemment changé son protocole de communication pour les horaires temps réel.\n Il est donc en ce moment impossible pour BresTram de fonctionner correctement.\n (Merci Lucas de m'avoir prévenu!)\n Ceci est totalement indépendant de BresTram, et je fais mon possible pour corriger ceci au plus vite!\n En attendant, si vous trouvez l'application utile, aidez-moi en votant sur le play store!\n Merci d'avance, et désolé pour le dérangement." . . . "Mise à jour du 27 Janvier" "BresTram vient d'être mis à jour.\n\n" "Un nouvel onglet a été ajouté pour vous permettre de faire des recherches par ligne de bus.\n" "Il vous est maintenant possible de voir la liste de toutes les lignes possibles dans l'onglet lignes.\n\n" "Cette nouvelle fonctionnalité est pour le moment encore en beta, il est donc possible que vous rencontriez des bugs." "Faites moi part de vos remarques sur le play store où sur le Twitter de l'application!" "BresTram was updated to version 1.5" "BresTram has been updated to the latest version.\n\n" "A new tab has been added, that lists all bus lines and their associated bus stops.\n" "This functionality is currently still in beta, and you might find bugs.\n\n" "Let me know your suggestions on the playstore or the twitter of the application!" @array/update0 . . . @array/update12 {% endhighlight %} Basically, my update mechanism rely on two different things :- A large group of XML arrays
- Then, another array lists all the update messages.