Patrick Boos

Tokyo, Japan

pboos.ch

Age: 30

Swiss, developer, husband, father
Blog: http://pboos.ch
Twitter: http://twitter.com/pboos

Aug
12
answered Android Service-Activity 2 way communication
Aug
12
comment Android Service-Activity 2 way communication
Gregg's answer is correct. Read here: survivingwithandroid.com/2014/01/…
Aug
3
comment Google App Engine Golang - how to get user's IP address?
When logging an IP address. Make sure to log both RemoteAddr AND X-Forwarded-For. Reason? A hacker can always set the X-Forwarded-For header ;-). On the other hand. A hacker will most likely use TOR or another way to hide his IP.
Jun
15
awarded Revival
Apr
22
comment Get the current language in device
@trante you are right it isn't fair. all i tried was helping people to get correct answers (thought that is what stackoverflow is about). sorry for not getting that it is about competing with others for points before helping people getting answers...
Apr
22
comment Get the current language in device
Sorry about that. It is true i added it in there. I should have left a note it came from here. I made the mistake trying to help people find the answer they need quicker. Because yours obviously is the better answer. But of course yours will never come to the top, because people don't see it as often as the top one. Is it okay if we add it in there with a note that it came from this answer?
Mar
25
answered Best way to check whether a certain exception type was the cause (of a cause, etc ...) in a nested exception?
Mar
17
comment Changing Android Device orientation with ADB
First you have to run adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0 to turn off the automatic rotation
Mar
3
comment Android Studio doesn't recognize Espresso classes
Not working well anymore on aar dependencies since gradle android plugin version 1.1. Reason is that it does not allow provided aar dependencies.
Feb
14
comment How can a remote Service send messages to a bound Activity?
Only problem with this answer is: It is only for a local service. But the question is asked clearly on how to do this with a remote service. But thank you anyway for writing this up. But maybe note that this is not the answer to the real question :)
Jan
29
awarded Good Question
Jan
12
comment Android: ScrollView force to bottom
This is needed only in cases where the layout has not yet been measured and layouted (for example if you run it in onCreate). In cases like pressing a button, .post() is not needed.
Jan
6
comment A better class to update property files?
That works great and keeps the comments there. Took the liberty to add some sample code :)
Jan
6
revised A better class to update property files?
added some sample code
Jan
5
comment How to lock orientation during runtime
@JiMMaR SCREEN_ORIENTATION_LOCKED is the best way for Android >= 18. But in case you target something lower, that does not work. I suggest using jp36's answer below.
Dec
16
comment Animate ProgressBar update in Android
should be ofInt ;-) and probably 0 to 100 (but you should setMax(100) on progreso to make sure. But otherwise good. Like it better than the other answers.
Dec
2
comment Volley Android Networking Library
Bad idea to do this. That library in there is 1 year old. And doubt it will get updated ;-)
Nov
24
comment Android ActionBar MenuItem LowerCase
@Mike: It worked with older support libraries. But somehow it does not work in 21.0.x anymore. I wonder why. Maybe they do not want that to work at all? Kind of annoying.
Nov
19
comment Get the current language in device
@gregm's comment is wrong. Just try it out yourself and you will see, that Locale.getDefault() will change when you change the language in settings.
Nov
19
revised Get the current language in device
adding what was mentioned in comment
1 2 3 4 5