| Simples api client pour Android | |
|
|
|
Auteur | Message |
---|
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Simples api client pour Android Dim 8 Fév 2015 - 9:57 | |
| Bonjour Je ai fait ce programme simple pour appeler certains OJN de serveur API à partir d'un cellulaire Android .. si vous voulez le tester .. seulement trois fonctions pour le moment (oreilles, texte et respiration) les graphismes sont horribles la première chose à faire est de définir les données de connexion et le serveur et le Mac dans le menu des paramètres et redémarrer l'application. ici apk https://hubic.com/home/pub/?ruid=aHR0cHM6Ly9sYjEwNDAuaHViaWMub3ZoLm5ldC92MS9BVVRIXzQzM2QyNDgwNTIzN2JkZjZmYmEzYWYzZjUwYmIyMGUyL2RlZmF1bHQvLm92aFB1Yi8xNDIzMzg1MDc2XzE0MjU5NzcwNzY/dGVtcF91cmxfc2lnPWYyNGUyYmY2YzRiMmUxMzNiOTBmYjA2ZTk2YzMxMTNlMDg0ZTg1MzAmdGVtcF91cmxfZXhwaXJlcz0xNDI1OTc3MDc2# Voici la source pour Eclipse https://hubic.com/home/pub/?ruid=aHR0cHM6Ly9sYjEwNDAuaHViaWMub3ZoLm5ldC92MS9BVVRIXzQzM2QyNDgwNTIzN2JkZjZmYmEzYWYzZjUwYmIyMGUyL2RlZmF1bHQvLm92aFB1Yi8xNDIzMzg1MDM2XzE0MjU5NzcwMzY/dGVtcF91cmxfc2lnPWFlNjk3ZTQxZGI5YzZiYTYwZWFmZjZjOWI5OWY1MjhhMmRjYWI5OTkmdGVtcF91cmxfZXhwaXJlcz0xNDI1OTc3MDM2# Ciao Carlo ...excusez mon google-français! | |
|
| |
tikismoke Bronze Nabz
Localisation : Pays de la moutarde Nabaztag : Nabaztiki Nbr de messages : 299 Carottes : 6600
| Sujet: Re: Simples api client pour Android Dim 8 Fév 2015 - 12:32 | |
| You should post jour code on github. It may allow people to help you on it.
| |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Lun 9 Fév 2015 - 20:08 | |
| ok I try! https://github.com/ccarlo64/nabz | |
|
| |
tikismoke Bronze Nabz
Localisation : Pays de la moutarde Nabaztag : Nabaztiki Nbr de messages : 299 Carottes : 6600
| Sujet: Re: Simples api client pour Android Lun 9 Fév 2015 - 20:28 | |
| I got acces denied everytime i try anythings. Or 404 if i change the address. Will look at the code when having time | |
|
| |
tikismoke Bronze Nabz
Localisation : Pays de la moutarde Nabaztag : Nabaztiki Nbr de messages : 299 Carottes : 6600
| Sujet: Re: Simples api client pour Android Lun 9 Fév 2015 - 20:34 | |
| OK after restarting the apps all is OK. Maybe a problem to apply new params.
Great works as improvement I suggest multi nabz. Or if it is an admin account get lost of bunny and Mac from server pages.
| |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Mar 10 Fév 2015 - 16:46 | |
| yes a restart it's good.. like windows.. :-)
thanks! I not found api call for retrieve Mac of bunnies, i will add a manual field into db..
Carlo | |
|
| |
Pixel du Rezo Special Nabz
Age : 45 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13341
| Sujet: Re: Simples api client pour Android Jeu 12 Fév 2015 - 8:41 | |
| @carlo64 : what api call do you want ? all bunnies for an account ? _____________________________
Toutes les infos sur mon serveur openJabNab sont sur mon wiki nabaztag/tag et openJabnab
| |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Jeu 12 Fév 2015 - 11:59 | |
| - Pixel du Rezo a écrit:
- @carlo64 : what api call do you want ? all bunnies for an account ?
yes, is it possible? I have not found here http://ojnwiki.psnet.fr/commandes_api please help, what I'm doing wrong? Carlo | |
|
| |
Pixel du Rezo Special Nabz
Age : 45 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13341
| Sujet: Re: Simples api client pour Android Jeu 12 Fév 2015 - 12:04 | |
| This page is not updated. Here are some api calls : http://openjabnab.fr/ojn_api/bunnies/getListOfBunnies() http://openjabnab.fr/ojn_api/bunnies/getListOfConnectedBunnies() http://openjabnab.fr/ojn_api/bunnies/getListOfSleepingBunnies() You should find yourself what they do _____________________________
Toutes les infos sur mon serveur openJabNab sont sur mon wiki nabaztag/tag et openJabnab
| |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Jeu 12 Fév 2015 - 14:56 | |
| - Pixel du Rezo a écrit:
- This page is not updated.
Here are some api calls :
http://openjabnab.fr/ojn_api/bunnies/getListOfBunnies() http://openjabnab.fr/ojn_api/bunnies/getListOfConnectedBunnies() http://openjabnab.fr/ojn_api/bunnies/getListOfSleepingBunnies()
You should find yourself what they do very well! Now I just have to work .. thanks | |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Sam 21 Fév 2015 - 12:38 | |
| Hi! new version here https://github.com/ccarlo64/nabz2 sorry many changes inside.. I change the repository... please first uninstall old version - now retrieve the name and mac address from server - test if connected - save button in settings now do a reconnect - add plugin nose blinking - add plugin sleep / wake up - add debug info with last api call and last response (under menu option) Ciao Carlo | |
|
| |
Pixel du Rezo Special Nabz
Age : 45 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13341
| Sujet: Re: Simples api client pour Android Sam 21 Fév 2015 - 13:01 | |
| Great work !. I didn't try to compile it for now, but here are a few comments / questions : - why are you still using Eclipse ? Honnestly, I've used it for a long time, but after trying Android Studio, I think it's easier (maybe it's because I'm working on Android Wear Watch face, and that require to have 2 apps compiled in the same apk) - is it possible to use english as reference in the code. Some words like "risultato" could easily be translated by non-italian speaking people, but some words, like coniglio are way more difficult Using english let more people work with you (in my opinion) - all url should be defined as constants (and maybe also create some helpers : getAuthUrl(login, pass), getOnlineBunniesUrl(token), or even better, a helper class, with a "setToken" function, and token is stored in the class, so that functions like getOnlineBunnies does ot require to have the token, as they already have it) No other comments for now ps: I'll try to create a fork, and build it with Android Studio _____________________________
Toutes les infos sur mon serveur openJabNab sont sur mon wiki nabaztag/tag et openJabnab
| |
|
| |
tikismoke Bronze Nabz
Localisation : Pays de la moutarde Nabaztag : Nabaztiki Nbr de messages : 299 Carottes : 6600
| Sujet: Re: Simples api client pour Android Sam 21 Fév 2015 - 13:08 | |
| Try it and found it very better than v1. The debug options is very good to found why it would.t work. A / at the end of the adress was not good. Good job. | |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Sam 21 Fév 2015 - 15:11 | |
| thanks - Pixel du Rezo a écrit:
- Great work !.
I didn't try to compile it for now, but here are a few comments / questions : - why are you still using Eclipse ? Honnestly, I've used it for a long time, but after trying Android Studio, I think it's easier (maybe it's because I'm working on Android Wear Watch face, and that require to have 2 apps compiled in the same apk) - is it possible to use english as reference in the code. Some words like "risultato" could easily be translated by non-italian speaking people, but some words, like coniglio are way more difficult Using english let more people work with you (in my opinion) - all url should be defined as constants (and maybe also create some helpers : getAuthUrl(login, pass), getOnlineBunniesUrl(token), or even better, a helper class, with a "setToken" function, and token is stored in the class, so that functions like getOnlineBunnies does ot require to have the token, as they already have it)
No other comments for now
ps: I'll try to create a fork, and build it with Android Studio I'm learning android and i chose Eclipse but without a reason now i will try to pass to Android Studio, i hope to do.. :-) ah ah yes i know , any time think in italian and few words .. who knows what you will out good idea the Class with url precompiled! I really think I'll try! - tikismoke a écrit:
- Try it and found it very better than v1.
The debug options is very good to found why it would.t work. A / at the end of the adress was not good. Good job. thanks Carlo | |
|
| |
jpp77350 Red Kryptonite Nabz
Age : 59 Localisation : 77 LE MEE SUR SEINE Nabaztag : CRISTAL77 & ANDROID V2 Nbr de messages : 10713 Carottes : 13751
| Sujet: Re: Simples api client pour Android Lun 23 Fév 2015 - 10:12 | |
| grazzie milla! signore! _____________________________ La haine prospère sur la lâchetéOn n'arrête pas de jouer parce qu'on vieillit, on vieillit, parce qu'on arrête de jouer! De la Rochefoucauld ... Soyons Joueurs! | |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Mer 11 Mar 2015 - 21:13 | |
| Hi just another new version .. https://github.com/ccarlo64/nabz3 .... Source traslate for AndroidStudio I hope it is ok... app-release.apk under app/ v3 (android studio) - I started to clean up the code as recommended ... but very slowly :-) - add plugin webradio (stream) in menu->option add your favorites webradio. I have insert just some url for example. Stop url is used with a blank url for stop the radio. Ciao Carlo ..next time maybe not change reposository .. :-) | |
|
| |
Pixel du Rezo Special Nabz
Age : 45 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13341
| Sujet: Re: Simples api client pour Android Jeu 12 Mar 2015 - 7:48 | |
| Great work, I'll try this as sson as I found some spare time. _____________________________
Toutes les infos sur mon serveur openJabNab sont sur mon wiki nabaztag/tag et openJabnab
| |
|
| |
jpp77350 Red Kryptonite Nabz
Age : 59 Localisation : 77 LE MEE SUR SEINE Nabaztag : CRISTAL77 & ANDROID V2 Nbr de messages : 10713 Carottes : 13751
| Sujet: Re: Simples api client pour Android Jeu 12 Mar 2015 - 10:29 | |
| will try asap _____________________________ La haine prospère sur la lâchetéOn n'arrête pas de jouer parce qu'on vieillit, on vieillit, parce qu'on arrête de jouer! De la Rochefoucauld ... Soyons Joueurs! | |
|
| |
Pixel du Rezo Special Nabz
Age : 45 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13341
| Sujet: Re: Simples api client pour Android Jeu 12 Mar 2015 - 12:58 | |
| Works fine (after reload when changing setup). Some possible updates : - sort the bunny list, with online bunnies first, off line at the end (Maybe put the last bunny used on first) (I have a lot of "fake" bunnies in my account, and they are at the top... ) - send the commands to multiple bunnies would be great - sleep does not work with openjabnab.fr (need more test) I really need to add in openjabnab a list of "friends" to send them messages _____________________________
Toutes les infos sur mon serveur openJabNab sont sur mon wiki nabaztag/tag et openJabnab
| |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Ven 13 Mar 2015 - 9:14 | |
| thanks for yours feedback! sleep not work? mmm maybe i have messed around too.. Carlo | |
|
| |
jpp77350 Red Kryptonite Nabz
Age : 59 Localisation : 77 LE MEE SUR SEINE Nabaztag : CRISTAL77 & ANDROID V2 Nbr de messages : 10713 Carottes : 13751
| Sujet: Re: Simples api client pour Android Ven 13 Mar 2015 - 10:12 | |
| hi carlo nice app similar to swiss army carott
https://play.google.com/store/apps/details?id=com.smithyproductions.swissarmycarrot&hl=fr_FR _____________________________ La haine prospère sur la lâchetéOn n'arrête pas de jouer parce qu'on vieillit, on vieillit, parce qu'on arrête de jouer! De la Rochefoucauld ... Soyons Joueurs! | |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Ven 13 Mar 2015 - 20:11 | |
| that's interesting maybe I can get some idea .. | |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Sam 14 Mar 2015 - 11:43 | |
| ok This was easy.. adding storage choice rabbit! Carlo | |
|
| |
tikismoke Bronze Nabz
Localisation : Pays de la moutarde Nabaztag : Nabaztiki Nbr de messages : 299 Carottes : 6600
| Sujet: Re: Simples api client pour Android Lun 13 Avr 2015 - 22:38 | |
| Hi Where are stored DATA? Uninstall and reinstal the apps but can't get access to change the adress of ojn. So th apps always crash | |
|
| |
carlo64 Bronze Nabz
Localisation : italia Nbr de messages : 163 Carottes : 3828
| Sujet: Re: Simples api client pour Android Mar 14 Avr 2015 - 0:07 | |
| Hi go to menu -> setting for change server and user/pwd you should have no problems Carlo - tikismoke a écrit:
- Hi
Where are stored DATA? Uninstall and reinstal the apps but can't get access to change the adress of ojn. So th apps always crash | |
|
| |
Contenu sponsorisé
| Sujet: Re: Simples api client pour Android | |
| |
|
| |
| Simples api client pour Android | |
|