Androidãã¿ã ãããã¯ã¼ã¯ã«éä¿¡ããã¢ããªãä½æããã¨ãã«ãã使ãã¤ãã£ãªã ã¨ãã¦ãéä¿¡ãéå§ããåã«ããããã端æ«ããããã¯ã¼ã¯ã«æ¥ç¶ããã¦ãããã©ããã調ã¹ããã¨ãããã public Boolean isConnected(){ ConnectivityManager connManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = connManager.getActiveNetworkInfo(); if(networkInfo != null && networkInfo.isConnected()){ return true; }else{ return false; } } ãã®ã¡ã½ãããActivityã®å é¨ã§å®è£
3Gã®ãã¼ã¿éä¿¡ãæå¹/ç¡å¹ã«ããè¨å®ãæ¢ãã¦ãããè¦ã¤ãããªããããAndroid 2.3.4ã®ãè¨å®ãã¢ããªã®ã½ã¼ã¹ãè¦ã¦ã¿ãã ã½ã¼ã¹ã¯ä»¥ä¸ã https://github.com/OESF/OHA-Android-2.3.4_r1.0/blob/master/packages/apps/Phone/src/com/android/phone/Settings.java ããã¼ã¿éä¿¡ãæå¹ã«ããããã¿ã³ãæ¼ããæã®åä½ãã150è¡ç®ããè¨è¿°ããã¦ãããããã«ãã㨠ConnectivityManager#setMobileDataEnabled(boolean) ã§ãã¼ã¿éä¿¡ã®ãªã³/ãªããã§ããããã§ãããããããªã¡ã½ããã¯ãªããã¨ãããå°ãªãã¨ãå ¬éããã¦ããAPIã«ã¯ãªãã setMobileDataEnabledã§è²ã æ¤ç´¢ãã¦ã¿ãã¨@hideãã¤ããéå ¬éAPIã¨ãããã¨ã¯ç¢ºèª
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}