Wednesday, May 19, 2010
Android mediaserver segfault
Hmm... we just want to stream some video... giving android a MPEG TS stream does not work, giving it a HTTP Pantos, does not work, giving it a ms3u playlist segfaults the mediaserver. fun
Android and Java
I am now playing with the Android UI/Java Code and right now I have something really really simple to do. Over time I have a bunch of URIs to GET or POST and after it is done I want to have the status and the data. On top of that it should not block the UI thread. Android is using the HttpComponents of the apache project. The good thing about it is that Google was not reinventing the wheel, the bad thing is that the code is Java. So I will need to write 200 lines of code to setup a threadsafe ConnectionManager and a HttpClient on top of that and then I need to write my own thread pool... Which is bringing one back to the main complain about Java, it is an overengineered system...
But in general I think the Android UI classes are very promising, yesterday I implemented the preferences for my application and it is really really easy, better than anything i have dealt with before. One needs to create a xml/preferences.xml, one can use "categories" and each category can have different preference items, even custom ones. The system will automatically create the view for that (like with the most xml documents for Android) and it will take care of saving/loading the settings.
RR Channel Release and USSD
Traditionally we have a struct gsm_lchan representing a logical channel. It has a given type based on the physical allocation (SDCCH, TCH/H, TCH/F), a given mode (traffic or signalling) and the trx and timeslot it is on. We also have a struct gsm_subscr representing a GSM Subscriber in our combined HLR/VLR. Whenever a Channel is used for a subscriber we are taking a reference count and assign the subscriber to the lchan. Whenever releasing the lchan we check the subscriber pointer and if it is set send a proper RR Channel Release and a SACH Deactivate.
For the real OpenBSC BSC we have no HLR/VLR in process, we have no local database as I am paranoid on running out of diskspace on a system that should work without maintainenance. But this means that on a channel release I am not running through the GSM04.08 RR Channel Release and so far this has worked out well. Well until we have figured out that USSD is broken. The workaround for now was to create one dummy GSM Subscriber and assign it to the channels, the proper fix is on the way by a proper split between BSC and MSC functionality but that is taking quite some time.
For the real OpenBSC BSC we have no HLR/VLR in process, we have no local database as I am paranoid on running out of diskspace on a system that should work without maintainenance. But this means that on a channel release I am not running through the GSM04.08 RR Channel Release and so far this has worked out well. Well until we have figured out that USSD is broken. The workaround for now was to create one dummy GSM Subscriber and assign it to the channels, the proper fix is on the way by a proper split between BSC and MSC functionality but that is taking quite some time.
Friday, May 07, 2010
Programming for Android
In previous lifes I have done development for Windows Mobile, the iPhone and now it is time to use Android. In general I had a negative bias towards Android because of the fact that they create an island on an island and have shown poor interaction with many upstream projects.
The Android SDK GUI is really really poor, it is worse than my Opie SDK attempts I did within a couple of days. It is really schocking how poor the UI design of Google is on such an important tool. The biggest issues for me are the usage of real estate. This starts with the new project dialog not fitting on 768 height (the resolution of my 13,3" notebook screen), it continues with the Android Log in the debugger view. It is a single Tab inside a Tab Widget with a huge amount of padding. With my screen setup one line of log fits, the text of it can not be selected and if the line is bigger than the 1366 width of my laptop I have bad luck, it can not be scrolled.
The other thing fewer people do is using JNI. The native library is placed into the android package and then uploaded to the target, when recompiling and then asking eclipse to launch the application the dependency on the library is not checked, deleting the Android Package is not recreating it as well, one has to make a change in a java file from within the IDE to get the new lib into the package. This is certainly not as poor as the above.
This is where Android starts to win me. There is plenty of Source Code to look at. It is starting with the Examples from the SDK/NDK, the huge amount of code for the core applications and various other resources. The adb utility is really awesome as well. It allows you to get a shell, upload/download files and to display the whole system log. I really appreciate a well crafted logging system and the Android one seems to fall into this class.
The Poor
The Android SDK GUI is really really poor, it is worse than my Opie SDK attempts I did within a couple of days. It is really schocking how poor the UI design of Google is on such an important tool. The biggest issues for me are the usage of real estate. This starts with the new project dialog not fitting on 768 height (the resolution of my 13,3" notebook screen), it continues with the Android Log in the debugger view. It is a single Tab inside a Tab Widget with a huge amount of padding. With my screen setup one line of log fits, the text of it can not be selected and if the line is bigger than the 1366 width of my laptop I have bad luck, it can not be scrolled.
The other thing fewer people do is using JNI. The native library is placed into the android package and then uploaded to the target, when recompiling and then asking eclipse to launch the application the dependency on the library is not checked, deleting the Android Package is not recreating it as well, one has to make a change in a java file from within the IDE to get the new lib into the package. This is certainly not as poor as the above.
The Good
This is where Android starts to win me. There is plenty of Source Code to look at. It is starting with the Examples from the SDK/NDK, the huge amount of code for the core applications and various other resources. The adb utility is really awesome as well. It allows you to get a shell, upload/download files and to display the whole system log. I really appreciate a well crafted logging system and the Android one seems to fall into this class.
Subscribe to:
Posts (Atom)