running handler with Main Looper


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public static void SetGeofenceInfoAgree (final Context context)
    {
        Handler mHandler = new Handler(Looper.getMainLooper()) {
            @Override
            public void handleMessage(Message message) {
 
                L.d(TAG, "===== GeofenceUtil SetGeofenceInfoAgree =====");
 
                GlobalClass gGlobalClass = (GlobalClass) context.getApplicationContext();
 
                if (gGlobalClass.isLogined() == 1)
                {
                    GeofenceSDK.Geofence_SetInfoAgree(context, "Y");
                    L.i(TAG, "===== GeofenceUtil SetGeofenceInfoAgree -> Y =====");
                }
                else
                {
                    GeofenceSDK.Geofence_SetInfoAgree(context, "N");
                    L.i(TAG, "===== GeofenceUtil SetGeofenceInfoAgree -> N =====");
                }
 
                L.d(TAG, "===== GeofenceUtil SetGeofenceInfoAgree END =====");
 
            }
        };
 
        mHandler.sendEmptyMessage(0);
    }
cs


'Developer > Android' 카테고리의 다른 글

AppCompatButton with change Color  (0) 2017.07.25
Dialog with Callback  (0) 2017.07.24
running handler with Main Looper  (0) 2017.06.09
MaxHeightScrollView  (0) 2016.08.09
MaxheightListView  (0) 2016.08.09
SharedPreferences Gson Put / Get  (0) 2016.08.03

이 글을 공유하기


댓글(0)

Designed by CMSFactory.NET