한국어

스마트폰앱

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


 

 

 

   public class ConnectivityReceiver extends BroadcastReceiver {

     @Override
     public void onReceive(Context context, Intent intent) {
      
      
     // Toast.makeText(getApplicationContext(), "Broadcast Message", Toast.LENGTH_SHORT).show();
         Log.i(getClass().getName(), "A change in network connectivity has occurred.");
        
         NetworkInfo info = intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
        
         if(info != null)
         {
             Log.v(getClass().getName(), "Reported connectivity status is " + info.getState() + ".");
         }
         updateConnectivityState(); // Notify connection manager
     }

     }
   
   private final BroadcastReceiver receiver = new ConnectivityReceiver();

    @Override
    protected void onPause()
    {
        super.onPause();
        unregisterReceiver(receiver);
    }

    @Override
    protected void onResume() {
        super.onResume();
        IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
        registerReceiver(receiver, filter);
    }


   
    private void updateConnectivityState() ///////////////Broadcast Receiver Sub/////////////////INTERNET CONNECTION changed
    {      
// boolean datalive = false ;
 
 ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
 NetworkInfo mobile = connec.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
 NetworkInfo wifi = connec.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
 
 if(connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED )///|| connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTING ) 
 {
 datalive = true; ///numTxt.setText("hey your online!!!") ;
 updateConsub();
 ////Toast.makeText(getApplicationContext(), "Data Connected", Toast.LENGTH_SHORT).show();
 }
 if (mobile.isConnected() )///||  mobile.isConnectedOrConnecting() )
 {
 datalive = true;
 ////updateConsub();
 /////Toast.makeText(getApplicationContext(), "Mobile Data Connected", Toast.LENGTH_SHORT).show();
 
 } else if ( mobile.isConnectedOrConnecting() )///|| wifi.isConnectedOrConnecting())
 {
 /////datalive = true;
 ////updateConsub();
 //// Toast.makeText(getApplicationContext(), "Mobile Data Connecting", Toast.LENGTH_SHORT).show();
 }
 
 else if (wifi.isConnected() )///|| wifi.isConnectedOrConnecting())
 {
 datalive = true;
 ////updateConsub();
 /////Toast.makeText(getApplicationContext(), "WiFi Data Connected", Toast.LENGTH_SHORT).show();
 }
 else if ( wifi.isConnectedOrConnecting() )///|| wifi.isConnectedOrConnecting())
 {
 /////datalive = true;
 ////updateConsub();
 /// Toast.makeText(getApplicationContext(), "WiFi Data Connecting", Toast.LENGTH_SHORT).show();
 }
 
 else if(connec.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED ||  connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED   )
 {
 datalive = false;///numTxt.setText("Look your not online");
 ////Toast.makeText(getApplicationContext(), "Data DisConnected", Toast.LENGTH_SHORT).show();
 }        
     ///return datalive;
    }
   
    ////////////////broadcast==>>sub====>sud of sub/////////////////////////////////////////
    private void updateConsub()
    {
    String phonenumber = getMyPhoneNumber(); ////getMy10DigitPhoneNumber();
 System.out.println("phonenumber: " + phonenumber); 
 
 String message = "xxxxx " + "xxxxx"  ;
 
 /////////////////////////////////in korea///////////////////////////////////////////////////////////
 
 if (getPreference("Local")==0 && getPreference("Local")==2)
 {
 }
 else if (getPreference("Local")==1)  ///in korea use socket send message
 {
  client.clientdcd(message);
 }
       
    }///end ()

조회 수 :
29678
등록일 :
2012.10.31
18:14:09 (*.160.42.233)
엮인글 :
http://webs.co.kr/index.php?document_srl=15309&act=trackback&key=ee1
게시글 주소 :
http://webs.co.kr/index.php?document_srl=15309
List of Articles
번호 제목 글쓴이 날짜 조회 수
36 Rotary Dialer clip art admin 2013-04-20 24185
35 Java 프로그램 실행화일 만들기 : Launch4j admin 2013-02-21 19989
34 java network programming source code, learning socket programming admin 2012-12-04 17636
33 2X Client Configuration | Android Remote Desktop 안드로이드 PC 리모트 데스크탑 admin 2012-12-02 19043
» WIFI 3G 인터넷 연결 실시간 체크 소스코드 Broadcast Receiver 사용 (Adnroid) admin 2012-10-31 29678
31 통신사별 와이파이 비밀번호 admin 2012-10-31 34738
30 팁, wifi 패스워드 모음집 password admin 2012-10-21 17815
29 Android User Session Management using Shared Preferences admin 2012-10-16 51165
28 Unicode Tables v4 admin 2012-10-16 49416
27 HTML Codes admin 2012-10-16 17102
26 IBM Scan Codes EBCDIC Codes admin 2012-10-16 18768
25 ASCII Table and Description admin 2012-10-16 18709
24 How to Show Alert Dialog in Android (간단하고 쉬운설명) admin 2012-10-15 39759
23 How to read contacts on Android 2.0 admin 2012-10-14 20607
22 WIFI 3G 인터넷 연결 체크 소스코드 직접 사용한 코드 android admin 2012-10-14 23695
21 Android Detect Internet Connection Status admin 2012-10-12 28693
20 JAVA + SSL (server and client examples) admin 2012-10-07 31026
19 Querying The Android Contact Database admin 2012-09-30 18757
18 Manage Contacts android admin 2012-09-30 19677
17 Android Contacts API 2 example admin 2012-09-30 22899
16 Android 2.0 주소록 동기화 기능 admin 2012-09-30 65864
15 안드로이드용 앱 개발 마켓등록 까지 해본거 샘플 무료국제전화 앱 FreeDialer admin 2012-09-27 23221
14 아이폰 IPhone 앱 개발 기본 admin 2012-09-27 19472
13 [안드로이드/개발] Intent admin 2012-09-23 35896
12 안드로이드 타이머 절적한 설명과 간단한소스코드 등 안드로이드 프로그램 설명 깔끔 admin 2012-09-23 48827
11 google voice source code admin 2012-09-22 18123
10 [안드로이드] 서버/클라이언트 소켓(Socket) 통신하기 admin 2012-09-20 38794
9 FreeDial 무료국제전화는 프리미엄 국제전화 다이렉트 회선사용 admin 2012-09-20 19775
8 Android SQlite 사용 admin 2012-09-04 21192
7 안드로이드마켓에 앱 등록하는 순서 admin 2012-08-19 63836