More Related Content
More from ecommerce poland expo
More from ecommerce poland expo (20)
TARGI MOBILNE, DZIEN I, SALA A, Narzędziownik programisty Android, Wojciech Kaliciński, We like caps!
- 13. HierarchyViewer https://github.com/romainguy/ViewServer/
public class MyActivity extends Activity {
public void onCreate(Bundle savedInstanceState ) {
super.onCreate(savedInstanceState);
// Set content view, etc.
ViewServer.get(this).addWindow(this);
}
public void onDestroy() {
super.onDestroy();
ViewServer.get(this).removeWindow(this);
}
public void onResume() {
super.onResume();
ViewServer.get(this).setFocusedWindow(this);
}
}
- 28. StrictMode
public void onCreate() {
if (DEVELOPER_MODE ) {
StrictMode.setThreadPolicy( new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog() // or .penaltyDeath()
.build());
}
super.onCreate();
}
- 29. $ adb shell dumpsys meminfo com.package
** MEMINFO in pid 9292 [pl.przepisy] **
Pss Private Private Swapped Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 9382 9356 0 0 16844 14427 148
Dalvik Heap 7963 7420 0 0 15564 15524 40
Dalvik Other 2076 1916 0 0
[...]
Graphics 17696 17696 0 0
[...]
TOTAL 48947 42776 2088 0 32408 29951 188
Objects
Views: 100 ViewRootImpl: 2
AppContexts: 5 Activities: 1
Assets: 2 AssetManagers: 2
Local Binders: 15 Proxy Binders: 24
Death Recipients: 0
OpenSSL Sockets: 1
- 30. $ adb shell dumpsys procstats com.package
[...]
* pl.przepisy / u0a85:
* pl.przepisy / u0a85:
TOTAL: 31% ( 39MB-47MB-87MB/36MB-43MB-72MB over 22)
Top: 31% ( 39MB-47MB-87MB/36MB-43MB-72MB over 22)
(Cached): 3.3% (45MB-56MB-67MB/40MB-48MB-56MB over 2)
* pl.przepisy.RequestService:
Process: pl.przepisy
Running count 12 / time 0.49%
Started count 6 / time 0.48%
Executing count 13 / time 0.02%
- 33. WebView remote debugging (4.4+)
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if ( 0 != ( getApplcationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) ) {
WebView.setWebContentsDebuggingEnabled(true);
}
}