본문 바로가기

AndroidStudio10

Firebase :google 클라우드 백엔드 플랫폼: firebasefirestoreDB plugins { id 'com.google.gms.google-services' version '4.3.15' apply false } plugins { id 'com.google.gms.google-services' } dependencies { implementation platform('com.google.firebase:firebase-bom:32.2.3') implementation("com.google.firebase:firebase-firestore") } XML JAVA package com.eunji0118.ex71firebasefirestoredatabase; import androidx.annotation.Nullable; import androidx.appcompat.app.App.. 2023. 9. 7.
Firebase :google 클라우드 백엔드 플랫폼: storage gradle :모듈앱 :기본 설정 plugins { id 'com.google.gms.google-services' } dependencies { //파이어베이스 core library implementation platform('com.google.firebase:firebase-bom:32.2.3') //파이어베이스 cloud Storage library implementation("com.google.firebase:firebase-storage") } gradle : project설정 plugins { id 'com.google.gms.google-services' version '4.3.15' apply false } ex70 package com.eunji0118.ex70firebasestor.. 2023. 9. 7.
Firebase : google 클라우드 백엔드 플랫폼 *실시간 채팅창만들기 android { buildFeatures{ viewBinding true } } firebase 문서 > 안드로이드> 등록 *프로젝트추가>단계별로 프로젝트 추가 후 > 안드로이드랑 연결후 > 사이트에 규칙 true 변경 *안드로이드스튜디오>사이트 다운로드 문서 중복되면 기존 꺼 삭제 후 사용 (이름변경 x )> ::프로젝트형식으로 변경 후 >APP폴더에 >다운로드 형식 복붙 :::(google-services.json) *안드로이드 gradle(프로젝트) plugins { id 'com.google.gms.google-services' version '4.3.15' apply false } *안드로이드 gradle(모듈앱) plugins { id 'com.google.gms.google-services.. 2023. 9. 7.
Uri를 절대경로로 바꿔서 리턴시켜주는 메소드 //Uri -- > 절대경로로 바꿔서 리턴시켜주는 메소드 String getRealPathFromUri(Uri uri){ String[] proj= {MediaStore.Images.Media.DATA}; CursorLoader loader= new CursorLoader(this, uri, proj, null, null, null); Cursor cursor= loader.loadInBackground(); int column_index= cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); String result= cursor.getString(column_index); cursor.close(); retu.. 2023. 9. 6.
웹 서비스 HTTP 통신 : 글씨랑 이미지 둘 다 가져오기* EX69 퍼미션하기 android:usesCleartextTraffic="true" gradle>viewbinding하기 buildFeatures { viewBinding true // 5개하면 됨. 시작부터 implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.google.code.gson:gson:2.10.1' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:converter-scalars:2.9.0' implementation 'com.github.bumptech.glide:glide:4.1.. 2023. 9. 6.
웹 서비스 HTTP통신 : 이미지만 올리기* EX68 VSC > 05Retrofit> aaa.php RetrofitService.java package com.eunji0118.ex68retrofitimageupload; import okhttp3.MultipartBody; import retrofit2.Call; import retrofit2.http.Multipart; import retrofit2.http.POST; import retrofit2.http.Part; //컴퓨터가 볼수있는 주석 @ public interface RetrofitService { //같이 써야함.. @Multipart //이미지를 담는 박스 @Multipart @POST("05Retrofit/aaa.php") Call uploadImage(@Part Multipar.. 2023. 9. 6.