Monday, September 28, 2015

Install google services on AVD

http://inthecheesefactory.com/blog/how-to-install-google-services-on-genymotion/en

Saturday, September 12, 2015

If geny doesn't start under Ubuntu

If you use Linux, make sure that the dkms package is installed and that it compiles VirtualBox kernel modules each time a new kernel update is available. To do so, run 
sudo /etc/init.d/vboxdrv status
You should get the message VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded
If not, force VirtualBox kernel modules compilation by running
sudo /etc/init.d/vboxdrv setup 
Make also sure that you are part of the "vboxusers" group. If not, run 
sudo usermod -a -G vboxusers <login>

https://www.genymotion.com/#!/support?chapter=vbox#faq

Thursday, September 3, 2015

Выполнение AsyncTask - onPostExecute не выполняется

Интересный случай.
AsyncTask запускается внутри View.
Фоновая работа проходит успешно, но метод onPostExecute или выполняется через неприлично долгое время или вообще не выполняется.
Решение - создавать и запускать AsyncTask в методе post объекта android.os.Handler, полученного в Application.
Вынести создание таска в активити.

upd. RxJava

Thursday, July 23, 2015

Swipe menu for RecyclerView

https://github.com/baoyongzhang/SwipeMenuListView


Derby db start under Ubuntu

Start JavaDB (Derby DB) under Ubuntu
  
add into file /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy following string

permission java.net.SocketPermission "localhost:1527", "listen";

To perform execute this:
alxr@alxr-dell:~$ sudo gedit /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy 

Pathes could vary
To make sure run sysinfo:
Start server from point where you have right to write.
For example you can create folder for database in home folder (for me it's /home/alxr):

Now you can run:

Leave this window alone. Server works, any further movements you should do in other  windows.



Thursday, July 16, 2015

Ormlite single quote issue solution

Correct way to implement com.j256.ormlite.stmt.Where<T, ID>:

you should use com.j256.ormlite.stmt.SelectArg object instead of using Object
SelectArg arg = new SelectArg();
titleArg.setValue(value);
Where<T, ID> where = where.eq(fieldName, arg);

Using this way you will avoid this issue http://stackoverflow.com/questions/26254896/android-ormlite-selectarg i.e. if  String value contains single quote.