eunja511005 / AutoCoding

0 stars 0 forks source link

[안드로이드] 웹뷰 만들기 #144

Open eunja511005 opened 1 year ago

eunja511005 commented 1 year ago

1. 신규 모듈 생성

image

image

image

image

image

 

2. 모듈 삭제

image

image

image

3. Sdk 34 설정

image

image

4. 클래스 충돌 해결

// Fix Duplicate class
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))

image

eunja511005 commented 1 year ago

1.Dependency 추가

com.squareup.retrofit2

image  

com.squareup.retrofit2

image  

com.squareup.retrofit2

image  

io.reactivex.rxjava2

image  

io.reactivex.rxjava2

image

eunja511005 commented 1 year ago

1. STOMP 의존성 추가를 위한 레파지토리 추가

settings.gradle 파일에 maven { url "https://jitpack.io" } 추가

image  

2. STOMP 의존성 추가

simplementation 'com.github.NaikSoftware:StompProtocolAndroid:1.6.6' 추가

image  

eunja511005 commented 1 year ago

퍼미션 추가

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.VIBRATE" />

image  

HTTPS 통신 아니어도 오류 안나게 설정

android:usesCleartextTraffic="true"

image

eunja511005 commented 1 year ago

1. 웹뷰 메뉴 추가

image  

2. 웹뷰 페이지 추가

image  

3. 웹뷰 Fragment 추가

image  

4. 웹뷰 네비게이션 추가

image

eunja511005 commented 1 year ago

1. 앱바의 아이디를 지정해 준다.

image  

2. WebViewFragment에서는 앱바의 높이를 0으로 해서 숨긴다.

image  

3. 다른 Framgment에서는 다시 앱바가 보이도록 한다.

image