Category: Android

안드로이드 개발 관련 카테고리입니다.

Android

Caused by: java.lang.SecurityException: Permission Denial: startForeground from pid=6412, uid=10599 requires android.permission.FOREGROUND_SERVICE

2019-04-06 23:57:25.081 6412-6419/? E/eusingvibratio: Failed to send DDMS packet REAQ to debugger (-1 of 20): Broken pipe 2019-04-06 23:57:34.693 6412-6412/ddolcatmaster.bodymassageusingvibration E/AndroidRuntime: FATAL EXCEPTION: main     Process: ddolcatmaster.bodymassageusingvibration, PID: 6412     java.lang.RuntimeException: Unable to create service ddolcatmaster.bodymassageusingvibration.BatteryNotificationService: java.lang.SecurityException: Permission Denial: startForeground from pid=6412, uid=10599 requires android.permission.FOREGROUND_SERVICE         at android.app.ActivityThread.handleCreateService(ActivityThread.java:3587)         at android.app.ActivityThread.access$1300(ActivityThread.java:204)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674)         at android.os.Handler.dispatchMessage(Handler.java:106)         at android.os.Looper.loop(Looper.java:193)         at android.app.ActivityThread.main(ActivityThread.java:6853)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)      Caused by: java.lang.SecurityException: Permission Denial: startForeground from pid=6412, uid=10599 requires android.permission.FOREGROUND_SERVICE         at android.os.Parcel.createException(Parcel.java:1950)         at android.os.Parcel.readException(Parcel.java:1918)         at android.os.Parcel.readException(Parcel.java:1868)         at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:5080)         at android.app.Service.startForeground(Service.java:695)         at ddolcatmaster.bodymassageusingvibration.BatteryNotificationService.onCreate(BatteryNotificationService.java:34)         at android.app.ActivityThread.handleCreateService(ActivityThread.java:3575)         at android.app.ActivityThread.access$1300(ActivityThread.java:204)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674)          at android.os.Handler.dispatchMessage(Handler.java:106)          at android.os.Looper.loop(Looper.java:193) ...
Android

[안드로이드 7] RemoteServiceException: Bad notification posted from …… : Couldn’t expand RemoteViews for: StatusBarNotification 왜왜왜?

안드로이드 7 운영체제가 설치된 휴대폰에서 발생하는 오류이다. Fatal Exception: android.app.RemoteServiceException: Bad notification posted from package com.app.test: Couldn’t expand RemoteViews for: StatusBarNotification(pkg=com.app.test user=UserHandle{0} id=1007 tag=null key=0|com.app.test|1007|null|10243: Notification(pri=0 contentView=com.app.test/0x7f0b0032...
Android

[AndroidStudio 3.6.1][해결완료]Expecting ‘android:screenOrientation=’unspecified’ or ‘fullSensor’ for this activity 오류처리(Activity is locked to an orientation)

안드로이드 스튜디오를 3.6.1로 버전 업데이트 후 AndoridManifest.xml 파일 정보에 화면 회전 관련하여 빨간줄이 생겨났다. 빨간줄은 싫다. 언제부터인가 거부감이 생겼다. 개발자라서 그런가?? 기존에 설정된 portrait를 “fullSensor”로...
Android

[안드로이드] 구구단 프로그램 만들기(코드 포함)

아주 간단하게 구구단 프로그램을 만들어 보자..  activity_main.xml——————————————————–<?xml version=”1.0″ encoding=”utf-8″?><RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android“ android:layout_width=”match_parent” android:layout_height=”match_parent”> <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_marginStart=”10dp” android:layout_marginEnd=”10dp” android:layout_marginTop=”20dp” android:layout_marginBottom=”10dp” android:gravity=”center” android:orientation=”vertical”> <TextView android:id=”@+id/text_view” android:layout_width=”match_parent” android:layout_height=”match_parent”...
Android

Fatal Exception: java.lang.RuntimeException: android.os.DeadSystemException이 발생하는 이유

Fatal Exception: java.lang.RuntimeException: android.os.DeadSystemException이 발생하는 이유는 무엇인가? Fatal Exception: java.lang.RuntimeException: android.os.DeadSystemException at android.app.ActivityThread.handleSleeping + 4433(ActivityThread.java:4433) at android.app.ActivityThread.-wrap24(ActivityThread.java) at android.app.ActivityThread$H.handleMessage + 1918(ActivityThread.java:1918) at android.os.Handler.dispatchMessage + 106(Handler.java:106)...
error: Content is protected !!