2014년 11월 30일 일요일

How to Set Shared Folder on Window 7 in Virtual Box

Go to "Devices" of Virtual Box settings and Run "Insert Guest Addition CD Image...".

It will download file on the internet. You will see "VirtualBox Guest Additions" on cd drive on Window 7.

Run VBoxWindowsAdditions-amd64 or VBoxWindowsAdditions-x86 that is right for your system.

Now you will see shared folder on File Explorer if you set shared folder on Virtual Box settings correctly.

2014년 11월 21일 금요일

android studio task '' not found in root project

I am using Android Studio 0.8.14 on Ubuntu 14.04.

I imported a project. And I got the error on title. I tried to fix it. I happened to click on sync again on top of editor window. And It worked like a miracle.

2014년 11월 17일 월요일

How to Show Big Notification


NotificationManager mNotificationManager = (NotificationManager) context
                .getSystemService(Context.NOTIFICATION_SERVICE);
        Notification notification = new Notification.Builder(this).setContentTitle(decodedMsg).
                setContentText(decodedMsg).setSmallIcon(R.drawable.appicon).build();

        RemoteViews bigContentView = new RemoteViews(context.getPackageName(),
                R.layout.custom_notification);
        bigContentView.setImageViewBitmap(R.id.image, bitmap);
        bigContentView.setTextViewText(R.id.title, decodedMsg);
        bigContentView.setTextViewText(R.id.time, PlusTimeFormatter.doIt());


        //아래 코드가 없으면 notification이 크게 표시안됨
        notification.priority = Notification.PRIORITY_MAX;
        notification.bigContentView = bigContentView;

        Intent notificationIntent = new Intent(context, FWWebViewActivity.class);
        notificationIntent.putExtra(PlusConstants.KEY_URL,
                FWConstants.BANNER_URL_HEAD + detailPageUrl);
        PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
                notificationIntent, 0);
        notification.contentIntent = contentIntent;

        // notification.flags |= Notification.FLAG_NO_CLEAR; // Do not clear the
        // notification
        notification.defaults |= Notification.DEFAULT_LIGHTS; // LED
        notification.defaults |= Notification.DEFAULT_VIBRATE; // Vibration
        notification.defaults |= Notification.DEFAULT_SOUND; // Sound



        mNotificationManager.notify(notificationID, notification);
        notificationID = (notificationID - 1) % 1000 + 9000;