File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
src/AndroidClient/techstacks/src/main
java/servicestack/net/techstacks Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 33 package =" servicestack.net.techstacks" >
44
55 <application
6+ android : name =" .TechStacksApplication"
67 android : allowBackup =" true"
78 android : icon =" @mipmap/logo_transparent"
89 android : label =" @string/app_name"
Original file line number Diff line number Diff line change 1+ package servicestack .net .techstacks ;
2+
3+ import android .app .ActivityManager ;
4+ import android .app .Application ;
5+ import android .content .Context ;
6+
7+ /**
8+ * Created by mythz on 12/8/2015.
9+ */
10+ public class TechStacksApplication extends Application {
11+ private static Context ctx ;
12+
13+ @ Override
14+ public void onCreate () {
15+ super .onCreate ();
16+ ctx = getApplicationContext ();
17+ }
18+
19+ public static Context getContext () {
20+ return ctx ;
21+ }
22+
23+ static ActivityManager .MemoryInfo memoryInfo = new ActivityManager .MemoryInfo ();
24+ public static ActivityManager .MemoryInfo getMemoryInfo (){
25+ ActivityManager mgr = (ActivityManager ) TechStacksApplication .getContext ()
26+ .getSystemService (Context .ACTIVITY_SERVICE );
27+ mgr .getMemoryInfo (memoryInfo );
28+ return memoryInfo ;
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments