T

SAvctatmottt. SUtv^Uw

NrV.unv.4W*

public static String fetch netcfg info() I Log.i("fetch_process_inio", "start "); String result : null;

CMDExecute cmdexe new CMDExecute(); try (

String[] args - ( "/system/bin/netcfg" f; result = cmdexe.run(args, "/system/bin/"); I catch (IOException ex) (

Log.i("fetch process info", "ex=" + ex.toString()); )

return result; )

^ immftz

MHtJWr "/system/bin/netcfg"

hiiiWjsifjStt^WÄÄtaKB 16-n m-/j<c 5. ^sia^PttA

iTM/f<-WJ CPU, IHte* itfE^K Hitf^^»aSfWÄ'fl1. Kitf«*»*?

ÄJRÄ^WiA/J^^E^ (\ Android 'I'. 'fcföifc j' DisplayMetrics "I WifflÜt getApplication Context()„ getResources(), getDisplayMetrics() Sf? it. iä rflj $ flX it W © ( widthPixels )„ iW, (heightPixels) 35H&&, K0PJ*:

public static String ge'.DisplayMetrics (Context cx) ( String str = "";

DisplayMetrics dm new DisplayMetrics();

dm = cx.getApplicationContext<).getResources().getDisplayMetrics();

int screenWidth dm.widthPixels;

int screenHeight dm.heightPixels;

float density = dm.density;

float xdpi dm.xdpi;

float ydpi = dm.ydpi;

str f= "The absolute width:" + String.valueOf(screenWidth) ♦ "pixels\n"; str += "The absolute heightin:" + Strinq.valueOf(screenHeight) * "pixels\n";

str += "The logical density of the display.:" + String.valueOf(density) + " \ n " ;

str I "X dimension :" »• String.valueOf(xdpi) ♦ "pixels per inch\n"; str f- "Y dimension :" f String.valueOf(ydpi) + "pixels per inch\n"; return str; )

^ DisplayMetrics IfiJffijSt ¡$)iJ.getApplicationContext().getResources().

getDisplayMetricsOlRiUfCW^igJa. f&fri&MWJi-fä'fä (widthPixels). hf (heightPixels)

/Am 16-12 m#m&^trim'¡wm«& 320, && 480. Jkt'&m*®-

159.3723, ipj 320.8401 o

[im öaaioö

eoelnfo5Ä$si$t»nt: «rSfaS ■

mm®.

Was this article helpful?

0 0

Post a comment