суббота, 25 января 2014 г.

Copy files to LG Nexus 4 from Ubuntu

So, recently I bought this device and found out that it can't be connected as flash-card. It can be done in Windows and Mac. Of, course I can find some comp with these OSs but it is bored.
I decided use adb trying copy files.

понедельник, 20 января 2014 г.

How to delete a system android app?

Yesterday I was need remove some programs from my android. The app was in system so the originla methods doesn' help. As I use Ubuntu it's very comfortable work from console. Last time I used this method:

воскресенье, 5 января 2014 г.

How to know if point is inside polygon


The lines of polygon can be imagined like straights. The point can be inside, outside or on the polygon. The most simplest way find intersections of the line from point with lines of the polygons. We will draw line from point to 0,0. So if it will be on the polygon lines or outside it will intersects polygon more than 1 time, in the other case it will intersects only one time. The first step in cycle find all intersections with line from point with polygon. It can be done with method from Slope of a Straight Line Android.

Slope of a Straight Line Android

For example, you need find intersection of the line and touch. You have some line on the screen like on the pic1. 


вторник, 8 октября 2013 г.

четверг, 26 сентября 2013 г.

Android Studio & NDK

Today I started investigating of features of native library. I used this tutorial: http://www.ntu.edu.sg/home/ehchua/programming/android/Android_NDK.html. As usually I used Android Studio (Ubuntu) and encountered the problem.

Caused by: java.lang.UnsatisfiedLinkError: Cannot load library

воскресенье, 22 сентября 2013 г.

Error android studio after update to 0.2.9

After updating studio via Check for updates and downloading patch I was getting this error during creating new project:

The following dependencies were not resolvable. See your build.gradle file for details.- com.android.support:appcompat-v7:18.0.0

    The old projects weren't opened as well. After some googling I didn't found the complete answer how to solve it on Ubuntu or found ways didn't help.
Then I removed whole android-studio. Download the latest package (it was 0.2.x) and extract it as usual. But the problem was't solved anyway.

    As this problem should be solved quickly I decided to remove all settings of android studio. In my case it was placed under ~/.AndroidStudioPreview.

cd ~/
rm -rf .AndroidStudioPreview/
rm -rf ~/Desktop/android-studio/  - removed android-studio again as it was placed on Desktop


Then extract android-studio again. This time studio has downloaded required files from gradle by herself. After that I was able to create new projects. Hope update to 0.2.9 goes smoothly.