пятница, 22 мая 2015 г.

Android app stress testing. Monkey.

http://developer.android.com/tools/help/monkey.html
You'll need an emulator or an ADB-connected device.
It's a command line utility. To start it:

$ /Users/Username/Library/Android/sdk/platform-tools/adb shell

Start pushing events (an example for 500 events):
monkey -p your.package.name -v 500

Enjoy your phone's life:)

Android SDK location on OS X

Default path is /Users/username/Library/Android/sdk

You can change it via File -> Project structure -> SDK Location in Android Studio

понедельник, 15 сентября 2014 г.

Library projects cannot include raw assets


The tools do not support the use of raw asset files (saved in the assets/ directory) in a library project. Any asset resources used by an application must be stored in the assets/ directory of the application project itself. However, resource files saved in the res/ directory are supported.


И никаких шрифтов в assets библиотек больше!

четверг, 21 августа 2014 г.

XML shapes in Android L

This would work in pre-L android:


    android:shape="rectangle" >

            android:angle="270"
        android:color="@color/orange" />

            android:bottomLeftRadius="5dp"
        android:bottomRightRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp" />




But in Android L you would see... nothing. To fix it you should always use selectors. You'd get the result this way:




   
           

           
       

вторник, 29 июля 2014 г.

Decoding AndroidManifest of an apk archive

1. Get apktool + helper script for your OS https://code.google.com/p/android-apktool/downloads/list
2. Put them + apk file together to the directory
3. Print
apktool d MyApp.apk ./MyApp


Thanks http://stackoverflow.com/questions/4191762/how-to-view-androidmanifest-xml-from-apk-file


среда, 11 сентября 2013 г.

вторник, 16 октября 2012 г.

Вызов диалога вне UI-треда


на самом деле, внутри, конечно:)


Thread startMap = new Thread(new Runnable() {
         @Override
          public void run() {
                        GameAuthActivity.this.runOnUiThread(new Runnable() {

@Override
public void run() {
showDialog(START_ARMY_DIALOG);

}
  });
                  }
        }
    };