분류 전체보기

1. Importance 채널 생성에 앞서 Importance에 따른 채널 중요도를 설정할 수 있다. 여기서 중요한 점은 헤드업 알람의 유무 2. 인자 id : 임의의 채널 id name : 알람 이름 importance level : 알람 중요도 3. 순서 Channel과 NotificationManager 초기화 후 마지막에 .createNotificationChannel을 해야한다. 4. 코드 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notific..
Code //오디오매니저 초기화 AudioManager mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); /* 현재 오디오모드확인 */ mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT : 사일런트 모드일 경우(값0) mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE : 진동모드일 경우(값1) mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL : 벨 모드일 경우(값2) //AudioManager.ACTION_AUDI..
1. Code 1. VibrationFragment.java public class VibrationFragment extends Fragment { private static final String TAG = "VibrationFragment"; private int newVibrationIntensity; private long[] timing = null; static ArrayList mVibrationPatternList; VibrationPatternListAdapter mVibrationPatternListAdapter; RecyclerView mRecyclerView; Slider vibrationIntensitySlider; @Override public View onCreateView(..
1. 개요 코틀린의 Companion object는 static 키워드와 다르다. 1) 같은점 Companion object와 static 모두 클래스 변수, 메소드 이다. -> 즉 클래스.메소드가 가능 2) 다른점 클래스명.companion은 클래스명만으로도 사용가능 class MyClass2{ companion object{ val prop = "나는 Companion object의 속성이다." fun method() = "나는 Companion object의 메소드다." } } fun main(args: Array) { //사실은 MyClass2.맴버는 MyClass2.Companion.맴버의 축약표현이다. println(MyClass2.Companion.prop) println(MyClass2.C..
Bell91
'분류 전체보기' 카테고리의 글 목록 (28 Page)