5월, 2024의 게시물 표시

react native gps foreground service - android, kotlin (1)

react native 에서 gps 트래킹을 해야한다. 앱이 백그라운드에 있어도 동작하도록 네이티브 모듈을 만드는 것만 해도 많이 안하다보니 까다로운데 gps + 서비스 동작을 해야한다니. 기본으로 돌아가기로 했다. 일단 안드로이드 앱에서 GPS 트래킹하는 코드부터 시도해보았다. ### MainActivity.kt ``` package com.example.gpstracker import android.annotation.SuppressLint import android.content.Context import android.content.pm.PackageManager import android.location.LocationListener import android.location.LocationManager import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.Button import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.core.app.ActivityCompat import com.example.gpstracker.ui.theme.GpsTrackerTheme val T

react native gps foreground service - android, kotlin (1)

react native 에서 gps 트래킹을 해야한다. 앱이 백그라운드에 있어도 동작하도록 네이티브 모듈을 만드는 것만 해도 많이 안하다보니 까다로운데 gps + 서비스 동작을 해야한다니. 기본으로 돌아가기로 했다. 일단 안드로이드 앱에서 GPS 트래킹하는 코드부터 시도해보았다. ### MainActivity.kt ``` package com.example.gpstracker import android.annotation.SuppressLint import android.content.Context import android.content.pm.PackageManager import android.location.LocationListener import android.location.LocationManager import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.Button import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.core.app.ActivityCompat import com.example.gpstracker.ui.theme.GpsTrackerTheme val T

Modularization of react NativeModules

써드파티 SDK를 붙이는데 해당 업체에서 npm package 가 아닌 각 OS의 SDK 와 react native 코드를 주면서 앱에 내장하라는 가이드를 받았다. 물론 이를 그냥 앱에 넣을 수는 없어서 package 로 분리하는 작업을 하였다. 이 작업을 하며 겪었던 트러블슈팅을 정리하고자 한다. # Android ## 자바와 코틀린간 패키지 참조 불가 build.gradle (app) 에 하단 설정 추가 ``` apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' ``` ## Could not find com.this.repo. 모듈의 example 프로젝트에서 받고자하는 sdk 라이브러리가 없다는 에러. example 프로젝트의 build.gradle 에 아래 코드를 추가하여 필요한 sdk 를 다운받을 수 있도록 한다. Can’t find module in example project, and I fixed it adding below codes in build.gradle (example) ``` allprojects { repositories{ maven { url 'https://repository.something/‘ } // change this line to download the sdk you aimed } } ``` ## Workspaces can only be enabled in private projects. 모듈을 붙이고자 하는 프로젝트는 프라이빗 프로젝트이기 때문에 npm 에 퍼블리쉬되지 않은 패키지의 경우 package.json 에 "private:true" 를 추가해야 한다. Because my project is “private:true”, If I want to add non-published package, the package should be

Operating System Concept Eng(1)

이미지
1.1 In a multi-programming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a. What are two such problems? Because of storage or memory resource sharing,  security is weak. Someone strangers can still or copy others' data. b. Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer. I think, dedicated machine(like a computer for military purpose) have more external technology security plan, so we can't ensure the same degree of security in general used machines. 1.13  The issue of resource utilization shows up in different forms in different types of operating systems. List what resources must be managed carefully in the following settings: a. Mainframe or minicomputer systems Because many people connect to A computer, we have to consider fair distribution of cpu time, memory resource and I/O b. Workstations

이 블로그의 인기 게시물

Operating System Concept

카카오 내비 리엑트 네이티브 모듈 만들기 ft.코틀린

Operating System Concepts 9th