...
This commit is contained in:
parent
175165184d
commit
5425589ad9
@ -808,7 +808,6 @@ async function handleCommon() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (window.scrollY < 5) {
|
if (window.scrollY < 5) {
|
||||||
console.log("window.scrollY >>> " + window.scrollY)
|
|
||||||
window.scrollTo({top: 5, behavior: 'smooth'});
|
window.scrollTo({top: 5, behavior: 'smooth'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ object OkHttpClientInstance {
|
|||||||
val client: OkHttpClient by lazy {
|
val client: OkHttpClient by lazy {
|
||||||
// 네트워크 로그를 보기 위한 인터셉터 설정
|
// 네트워크 로그를 보기 위한 인터셉터 설정
|
||||||
val loggingInterceptor = HttpLoggingInterceptor().apply {
|
val loggingInterceptor = HttpLoggingInterceptor().apply {
|
||||||
level = HttpLoggingInterceptor.Level.BODY
|
level = HttpLoggingInterceptor.Level.NONE
|
||||||
}
|
}
|
||||||
|
|
||||||
OkHttpClient.Builder()
|
OkHttpClient.Builder()
|
||||||
|
|||||||
@ -234,44 +234,6 @@ open class LauncherActivity : CommonActivity() {
|
|||||||
|
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent) {
|
override fun onNewIntent(intent: Intent) {
|
||||||
Blog.LOGE("onNewIntent intent >> ${intent}")
|
|
||||||
// if(intent?.action?.equals(Intent.ACTION_SEND) == true &&
|
|
||||||
// intent?.hasExtra(Intent.EXTRA_TEXT) == true) {
|
|
||||||
// intent?.getStringExtra(Intent.EXTRA_TEXT)?.let {
|
|
||||||
// if(it.startsWith("http") == false) {
|
|
||||||
// it.split("http").forEach { string ->
|
|
||||||
// if(string.startsWith("http")) {
|
|
||||||
// try {
|
|
||||||
// string.toUri()?.let { uri ->
|
|
||||||
// Blog.LOGE("onNewIntent string uri.lastPathSegment >>>>> ${uri.host}")
|
|
||||||
// Blog.LOGE("onNewIntent string uri.lastPathSegment >>>>> ${uri.lastPathSegment}")
|
|
||||||
// }
|
|
||||||
// } catch (e: Exception) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// try {
|
|
||||||
// it.toUri()?.let { uri ->
|
|
||||||
// Blog.LOGE("onNewIntent it uri.lastPathSegment >>>>> ${uri.host}")
|
|
||||||
// Blog.LOGE("onNewIntent it uri.lastPathSegment >>>>> ${uri.lastPathSegment}")
|
|
||||||
// }
|
|
||||||
// } catch (e: Exception) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else if (intent?.action == Intent.ACTION_WEB_SEARCH) {
|
|
||||||
// openWithIntent(intent)
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
// Blog.LOGE("onNewIntent intent?.hasExtra >> ${intent?.hasExtra(Intent.EXTRA_STREAM)}")
|
|
||||||
//&& intent.hasExtra("android.intent.extra.EXTRA_START_REASON") && intent.getStringExtra(
|
|
||||||
// "android.intent.extra.EXTRA_START_REASON"
|
|
||||||
// ).equals("startDockOrHome")
|
|
||||||
// )
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val fragment = supportFragmentManager.findFragmentByTag(AppDrawerBottomSheet.TAG)
|
val fragment = supportFragmentManager.findFragmentByTag(AppDrawerBottomSheet.TAG)
|
||||||
Blog.LOGE("fragment >>> $fragment")
|
Blog.LOGE("fragment >>> $fragment")
|
||||||
@ -640,6 +602,12 @@ open class LauncherActivity : CommonActivity() {
|
|||||||
|
|
||||||
// DB에서 위젯 복구
|
// DB에서 위젯 복구
|
||||||
private fun restoreWidgets() {
|
private fun restoreWidgets() {
|
||||||
|
// WorkersDb.getRealm().writeBlocking {
|
||||||
|
// delete(query<WidgetData>().find())
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
val widgets = WorkersDb.getRealm().query<WidgetData>().find()
|
val widgets = WorkersDb.getRealm().query<WidgetData>().find()
|
||||||
widgets.forEach { widgetData ->
|
widgets.forEach { widgetData ->
|
||||||
createWidget(null, widgetData)
|
createWidget(null, widgetData)
|
||||||
|
|||||||
@ -92,7 +92,7 @@ internal class LunaticLauncher : Application() {
|
|||||||
|
|
||||||
// Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
|
// Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
|
||||||
val response = chain.proceed(newRequestBuilder.build())
|
val response = chain.proceed(newRequestBuilder.build())
|
||||||
Blog.LOGE("응답 코드: ${response.code}:${response.message}")
|
// Blog.LOGE("응답 코드: ${response.code}:${response.message}")
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
.addInterceptor(logging)
|
.addInterceptor(logging)
|
||||||
|
|||||||
@ -192,7 +192,6 @@ class AppDrawerBottomSheet : BottomSheetDialogFragment() {
|
|||||||
}
|
}
|
||||||
binding.hidden.setOnClickListener {
|
binding.hidden.setOnClickListener {
|
||||||
binding.hidden.isSelected = !binding.hidden.isSelected
|
binding.hidden.isSelected = !binding.hidden.isSelected
|
||||||
Blog.LOGE("binding.hidden.isSelected >>> ${binding.hidden.isSelected}")
|
|
||||||
filterAppsList(keyword)
|
filterAppsList(keyword)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -375,7 +374,6 @@ class AppDrawerBottomSheet : BottomSheetDialogFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Blog.LOGE("unifiedList >>> ${unifiedList.size}")
|
|
||||||
|
|
||||||
// 6. [UI 업데이트]
|
// 6. [UI 업데이트]
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
|
|||||||
@ -85,7 +85,6 @@ class ForeGroundService : Service() {
|
|||||||
val NOTIF_ID = 830721
|
val NOTIF_ID = 830721
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
Blog.LOGE("onCreate")
|
|
||||||
mWorkManager = WorkManager.getInstance(this)
|
mWorkManager = WorkManager.getInstance(this)
|
||||||
val filter = IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED)
|
val filter = IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED)
|
||||||
registerReceiver(bluetoothreceiver, filter)
|
registerReceiver(bluetoothreceiver, filter)
|
||||||
@ -93,7 +92,6 @@ class ForeGroundService : Service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
Blog.LOGE("onStartCommand >>> ${intent}")
|
|
||||||
when(intent?.action) {
|
when(intent?.action) {
|
||||||
ACTION_SENDMSG -> {
|
ACTION_SENDMSG -> {
|
||||||
intent?.getStringExtra(EXTRA_MSGKEY)?.let {
|
intent?.getStringExtra(EXTRA_MSGKEY)?.let {
|
||||||
@ -205,7 +203,6 @@ class ForeGroundService : Service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent?): IBinder? {
|
override fun onBind(intent: Intent?): IBinder? {
|
||||||
Blog.LOGE("onBind intent >>> ${intent}")
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
private val CHANNEL_ID = "bums_service_channel"
|
private val CHANNEL_ID = "bums_service_channel"
|
||||||
|
|||||||
@ -24,7 +24,6 @@ class HourlyLogWriter(private val logDir: File) {
|
|||||||
// 로그 기록 함수 (비동기)
|
// 로그 기록 함수 (비동기)
|
||||||
fun writeLog(data: String) {
|
fun writeLog(data: String) {
|
||||||
if (true)return
|
if (true)return
|
||||||
Blog.LOGE("writeLog >>> ${data}")
|
|
||||||
ioScope.launch {
|
ioScope.launch {
|
||||||
try {
|
try {
|
||||||
if (!logDir.exists()) logDir.mkdirs()
|
if (!logDir.exists()) logDir.mkdirs()
|
||||||
@ -34,7 +33,6 @@ class HourlyLogWriter(private val logDir: File) {
|
|||||||
// 파일이 바뀌었으면 기록 경로 갱신
|
// 파일이 바뀌었으면 기록 경로 갱신
|
||||||
lastFilePath.set(logFile.absolutePath)
|
lastFilePath.set(logFile.absolutePath)
|
||||||
logFile.appendText("${System.currentTimeMillis()},$data\n")
|
logFile.appendText("${System.currentTimeMillis()},$data\n")
|
||||||
Blog.LOGE("writeLog >>> ${logFile.length()}")
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -175,7 +175,6 @@ open class GeckoWeb @JvmOverloads constructor(
|
|||||||
|
|
||||||
nUrl.let {
|
nUrl.let {
|
||||||
val finalUrl = if (it.split("//").size > 1) it.replace("//", "/").replace("https:/", "https://") else it
|
val finalUrl = if (it.split("//").size > 1) it.replace("//", "/").replace("https:/", "https://") else it
|
||||||
Blog.LOGE("Loading: $finalUrl")
|
|
||||||
this.session?.loadUri(finalUrl)
|
this.session?.loadUri(finalUrl)
|
||||||
}
|
}
|
||||||
currentRetryCount = 0
|
currentRetryCount = 0
|
||||||
@ -392,11 +391,8 @@ open class GeckoWeb @JvmOverloads constructor(
|
|||||||
|
|
||||||
// Delegate 연결 (NullPointerException 방지를 위해 상단 선언된 변수 사용)
|
// Delegate 연결 (NullPointerException 방지를 위해 상단 선언된 변수 사용)
|
||||||
session.contentDelegate = contentDelegate
|
session.contentDelegate = contentDelegate
|
||||||
Blog.LOGE("session.contentDelegate = $contentDelegate")
|
|
||||||
session.progressDelegate = progressDelegate
|
session.progressDelegate = progressDelegate
|
||||||
Blog.LOGE("session.progressDelegate = $progressDelegate")
|
|
||||||
session.navigationDelegate = navigationDelegate
|
session.navigationDelegate = navigationDelegate
|
||||||
Blog.LOGE("session.navigationDelegate = $navigationDelegate")
|
|
||||||
session.mediaDelegate = mediaDelegate
|
session.mediaDelegate = mediaDelegate
|
||||||
session.promptDelegate = promptDelegate
|
session.promptDelegate = promptDelegate
|
||||||
session.mediaSessionDelegate = mediaSessionDelegate
|
session.mediaSessionDelegate = mediaSessionDelegate
|
||||||
|
|||||||
@ -117,8 +117,6 @@ open class NeoRssActivity : CommonActivity() {
|
|||||||
var lastAction = MotionEvent.ACTION_HOVER_EXIT
|
var lastAction = MotionEvent.ACTION_HOVER_EXIT
|
||||||
override fun dispatchKeyEvent(ev: KeyEvent): Boolean {
|
override fun dispatchKeyEvent(ev: KeyEvent): Boolean {
|
||||||
val currentFragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
|
val currentFragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
|
||||||
Blog.LOGE("dispatch ev?.device?.name >>> ${ev?.device?.name} , keyCode >> ${ev?.keyCode}")
|
|
||||||
|
|
||||||
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
|
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
|
||||||
when(ev.action) {
|
when(ev.action) {
|
||||||
ACTION_UP -> {
|
ACTION_UP -> {
|
||||||
@ -199,13 +197,11 @@ open class NeoRssActivity : CommonActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun dispatchTrackballEvent(event: MotionEvent?): Boolean {
|
override fun dispatchTrackballEvent(event: MotionEvent?): Boolean {
|
||||||
Blog.LOGE("event >>> ${event?.device}")
|
|
||||||
return super.dispatchTrackballEvent(event)
|
return super.dispatchTrackballEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("RestrictedApi")
|
@SuppressLint("RestrictedApi")
|
||||||
override fun dispatchKeyShortcutEvent(event: KeyEvent): Boolean {
|
override fun dispatchKeyShortcutEvent(event: KeyEvent): Boolean {
|
||||||
Blog.LOGE("event >>> ${event.device}")
|
|
||||||
return super.dispatchKeyShortcutEvent(event)
|
return super.dispatchKeyShortcutEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +290,6 @@ open class NeoRssActivity : CommonActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun floatClick(v : View) {
|
fun floatClick(v : View) {
|
||||||
Blog.LOGE("v >>> ${v}")
|
|
||||||
showContents(v.id)
|
showContents(v.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -549,7 +544,6 @@ open class NeoRssActivity : CommonActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onTouchEvent(event: MotionEvent?): Boolean {
|
override fun onTouchEvent(event: MotionEvent?): Boolean {
|
||||||
Blog.LOGE("event >>> ${event}")
|
|
||||||
return super.onTouchEvent(event)
|
return super.onTouchEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -203,9 +203,7 @@ internal class RssHome : Fragment() {
|
|||||||
var openQuery = ""
|
var openQuery = ""
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
Blog.LOGE("arguments >>> ${arguments}")
|
|
||||||
arguments?.let {
|
arguments?.let {
|
||||||
Blog.LOGE("arguments >>> ${arguments}")
|
|
||||||
if(it.containsKey("query") && it.getString("query")!!.length > 0) {
|
if(it.containsKey("query") && it.getString("query")!!.length > 0) {
|
||||||
Blog.LOGE("it.getString ${it.getString("query")}")
|
Blog.LOGE("it.getString ${it.getString("query")}")
|
||||||
openQuery = it.getString("query")!!
|
openQuery = it.getString("query")!!
|
||||||
@ -328,7 +326,6 @@ internal class RssHome : Fragment() {
|
|||||||
var currentRss : RssData? = null
|
var currentRss : RssData? = null
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
fun openGecko(rssData: RssData? = null) {
|
fun openGecko(rssData: RssData? = null) {
|
||||||
Blog.LOGE("rssData >>> ${rssData}")
|
|
||||||
binding.layoutRssSummary.root.visibility = View.GONE
|
binding.layoutRssSummary.root.visibility = View.GONE
|
||||||
|
|
||||||
fun openSummary(rssData : RssData) {
|
fun openSummary(rssData : RssData) {
|
||||||
@ -466,7 +463,6 @@ internal class RssHome : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Blog.LOGE("useHiddenMenu >>> $openQuery")
|
|
||||||
if (openQuery.length > 0) {
|
if (openQuery.length > 0) {
|
||||||
binding.geckoWeb.loadUrl("https://www.google.com/search?q=${openQuery}")
|
binding.geckoWeb.loadUrl("https://www.google.com/search?q=${openQuery}")
|
||||||
openQuery = ""
|
openQuery = ""
|
||||||
@ -581,7 +577,6 @@ internal class RssHome : Fragment() {
|
|||||||
binding.geckoWeb.decoViews.add(activity.findViewById<ImageButton>(R.id.reload))
|
binding.geckoWeb.decoViews.add(activity.findViewById<ImageButton>(R.id.reload))
|
||||||
binding.geckoWeb.decoViews.add(activity.findViewById<ImageButton>(R.id.dl_video))
|
binding.geckoWeb.decoViews.add(activity.findViewById<ImageButton>(R.id.dl_video))
|
||||||
}
|
}
|
||||||
Blog.LOGE("binding.geckoWeb.decoViews >>> ${binding.geckoWeb.decoViews.size}")
|
|
||||||
|
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
@ -640,7 +635,6 @@ internal class RssHome : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun updateQuery(q: RealmQuery<RssData>) {
|
fun updateQuery(q: RealmQuery<RssData>) {
|
||||||
Blog.LOGE("updateQuery >>> ${q.description()}")
|
|
||||||
infosJob?.cancel()
|
infosJob?.cancel()
|
||||||
commandHandler.removeCallbacks(infoUpdate)
|
commandHandler.removeCallbacks(infoUpdate)
|
||||||
mLastedQuery = q.query("hide != $0", true).sort("pubDate ", Sort.DESCENDING).limit(500).distinct("originPage", "title")
|
mLastedQuery = q.query("hide != $0", true).sort("pubDate ", Sort.DESCENDING).limit(500).distinct("originPage", "title")
|
||||||
@ -881,7 +875,6 @@ internal class RssHome : Fragment() {
|
|||||||
try {
|
try {
|
||||||
imageView.visibility = View.INVISIBLE
|
imageView.visibility = View.INVISIBLE
|
||||||
imageView.setAlpha(0.05f)
|
imageView.setAlpha(0.05f)
|
||||||
Blog.LOGE("loadImage >>> $url")
|
|
||||||
Picasso.get()
|
Picasso.get()
|
||||||
.load(url)
|
.load(url)
|
||||||
.into(imageView, object : com.squareup.picasso.Callback {
|
.into(imageView, object : com.squareup.picasso.Callback {
|
||||||
|
|||||||
@ -249,7 +249,6 @@ init {
|
|||||||
val imageLoader = CoilInstance.getImageLoader(holder.itemView.context)
|
val imageLoader = CoilInstance.getImageLoader(holder.itemView.context)
|
||||||
|
|
||||||
|
|
||||||
Blog.LOGE("imageUrl >>> ${imageUrl}")
|
|
||||||
holder.imageView.load("https://lunaticbum.kr$imageUrl",imageLoader) {
|
holder.imageView.load("https://lunaticbum.kr$imageUrl",imageLoader) {
|
||||||
crossfade(true)
|
crossfade(true)
|
||||||
error(R.drawable.ic_news) // 에러 시 보여줄 이미지 (ic_error.xml 같은 drawable 필요)
|
error(R.drawable.ic_news) // 에러 시 보여줄 이미지 (ic_error.xml 같은 drawable 필요)
|
||||||
|
|||||||
@ -198,11 +198,6 @@ internal class RssItemAdapter (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rssData.thumbnailUrl()?.length ?: 0 > 6) {
|
if (rssData.thumbnailUrl()?.length ?: 0 > 6) {
|
||||||
Blog.LOGE("rssData.thumbnailUrl() >>> ${rssData.thumbnailUrl()}")
|
|
||||||
// val requestOptions = RequestOptions()
|
|
||||||
// .diskCacheStrategy(DiskCacheStrategy.ALL)
|
|
||||||
// .timeout(3000) // 3초
|
|
||||||
|
|
||||||
Picasso.get().load(rssData.thumbnailUrl().replace("&", "&").toUri())
|
Picasso.get().load(rssData.thumbnailUrl().replace("&", "&").toUri())
|
||||||
.error(rssData.category().getResId())
|
.error(rssData.category().getResId())
|
||||||
.into(holder.view.circlePreview,object : Callback {
|
.into(holder.view.circlePreview,object : Callback {
|
||||||
@ -230,7 +225,7 @@ internal class RssItemAdapter (
|
|||||||
true
|
true
|
||||||
) == true || event.device.name?.equals("J06", true) == true)
|
) == true || event.device.name?.equals("J06", true) == true)
|
||||||
) {
|
) {
|
||||||
Blog.LOGE("event.device.name >>> ${event.device.name}")
|
|
||||||
return true//mSimpleFingerGestures.onTouch(v,event)
|
return true//mSimpleFingerGestures.onTouch(v,event)
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@ -50,17 +50,16 @@ class NLService : NotificationListenerService() {
|
|||||||
if (sbn.packageName.contains("bums.lunatic.launcher") == false) {
|
if (sbn.packageName.contains("bums.lunatic.launcher") == false) {
|
||||||
val notification = sbn.notification
|
val notification = sbn.notification
|
||||||
val extras = notification.extras
|
val extras = notification.extras
|
||||||
val title = extras.getString(Notification.EXTRA_TITLE) ?: ""
|
|
||||||
|
val title = extras.getCharSequence(Notification.EXTRA_TITLE)?.toString() ?: ""
|
||||||
val text = extras.getCharSequence(Notification.EXTRA_TEXT)?.toString() ?: ""
|
val text = extras.getCharSequence(Notification.EXTRA_TEXT)?.toString() ?: ""
|
||||||
val bigText = extras.getCharSequence(Notification.EXTRA_BIG_TEXT)?.toString() ?: ""
|
val bigText = extras.getCharSequence(Notification.EXTRA_BIG_TEXT)?.toString() ?: ""
|
||||||
val extraInfo = extras.getCharSequence(Notification.EXTRA_INFO_TEXT)?.toString() ?: ""
|
val extraInfo = extras.getCharSequence(Notification.EXTRA_INFO_TEXT)?.toString() ?: ""
|
||||||
val subText = extras.getCharSequence(Notification.EXTRA_SUB_TEXT)?.toString() ?: ""
|
val subText = extras.getCharSequence(Notification.EXTRA_SUB_TEXT)?.toString() ?: ""
|
||||||
val conversationTitle =
|
val conversationTitle = extras.getCharSequence(Notification.EXTRA_CONVERSATION_TITLE)?.toString() ?: ""
|
||||||
extras.getCharSequence(Notification.EXTRA_CONVERSATION_TITLE)?.toString() ?: ""
|
val summaryText = extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT)?.toString() ?: ""
|
||||||
val summaryText =
|
val verificationText = extras.getCharSequence(Notification.EXTRA_VERIFICATION_TEXT)?.toString() ?: ""
|
||||||
extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT)?.toString() ?: ""
|
|
||||||
val verificationText =
|
|
||||||
extras.getCharSequence(Notification.EXTRA_VERIFICATION_TEXT)?.toString() ?: ""
|
|
||||||
val stringBuffer = StringBuffer()
|
val stringBuffer = StringBuffer()
|
||||||
stringBuffer.append(title).append("\n")
|
stringBuffer.append(title).append("\n")
|
||||||
stringBuffer.append(text).append("\n")
|
stringBuffer.append(text).append("\n")
|
||||||
|
|||||||
@ -52,9 +52,9 @@ class CustomOkHttpGlideModule : AppGlideModule() {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
|
// Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
|
||||||
val response = chain.proceed(newRequestBuilder.build())
|
val response = chain.proceed(newRequestBuilder.build())
|
||||||
Blog.LOGE("응답 코드: ${response.code}:${response.message}")
|
// Blog.LOGE("응답 코드: ${response.code}:${response.message}")
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
.addInterceptor(logging)
|
.addInterceptor(logging)
|
||||||
|
|||||||
@ -46,7 +46,6 @@ class ContactInfoGetter(context: Context) : BaseGetter(context) {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
Blog.LOGE("ContactInfoGetter >>> ${temp.size}")
|
|
||||||
return temp
|
return temp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,12 +44,10 @@ class LocationUpdateService : Service(), LocationListener {
|
|||||||
var latitude: Double = 0.0
|
var latitude: Double = 0.0
|
||||||
fun pushLocation(context: Context, lat :Double, long : Double) {
|
fun pushLocation(context: Context, lat :Double, long : Double) {
|
||||||
try {
|
try {
|
||||||
Blog.LOGE("Location >>> ${lat},${long}")
|
|
||||||
val geocoder = Geocoder(context, Locale.getDefault())
|
val geocoder = Geocoder(context, Locale.getDefault())
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
geocoder.getFromLocation(lat, long, 1) { addresses ->
|
geocoder.getFromLocation(lat, long, 1) { addresses ->
|
||||||
addresses.first()?.let {
|
addresses.first()?.let {
|
||||||
Blog.LOGE("Location >>> ${it}")
|
|
||||||
WorkersDb.getRealm()?.apply {
|
WorkersDb.getRealm()?.apply {
|
||||||
LocationLog().let { loc ->
|
LocationLog().let { loc ->
|
||||||
loc.fillData(it)
|
loc.fillData(it)
|
||||||
@ -63,48 +61,44 @@ class LocationUpdateService : Service(), LocationListener {
|
|||||||
copyToRealm(loc)
|
copyToRealm(loc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Blog.LOGE("Location >>> ${post}")
|
|
||||||
// post = true
|
// post = true
|
||||||
// post.letTrue {
|
// post.letTrue {
|
||||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||||
try {
|
try {
|
||||||
Blog.LOGE("Location >>> schedule")
|
val url = PrefString.locationApi.get()
|
||||||
val url = PrefString.locationApi.get()
|
if (url.length > 10) {
|
||||||
Blog.LOGE("Location >>> ${url}")
|
val client = OkHttpClient.Builder()
|
||||||
if (url.length > 10) {
|
.connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
|
||||||
val client = OkHttpClient.Builder()
|
.build()
|
||||||
.connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
|
|
||||||
.build()
|
|
||||||
|
|
||||||
// GET 요청 객체 생성
|
// GET 요청 객체 생성
|
||||||
val builder: Request.Builder = Request.Builder().url(url)
|
val builder: Request.Builder = Request.Builder().url(url)
|
||||||
.addHeader("Content-Type", "application/json").get()
|
.addHeader("Content-Type", "application/json").get()
|
||||||
builder.method(
|
builder.method(
|
||||||
"POST", RequestBody.create(
|
"POST", RequestBody.create(
|
||||||
"application/text".toMediaTypeOrNull(),
|
"application/text".toMediaTypeOrNull(),
|
||||||
Base64.getEncoder().encode(
|
Base64.getEncoder().encode(
|
||||||
Gson().toJson(loc).toByteArray()
|
Gson().toJson(loc).toByteArray()
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
val request: Request = builder.build()
|
)
|
||||||
|
val request: Request = builder.build()
|
||||||
|
|
||||||
// Blog.LOGE("telegram before request ")
|
// Blog.LOGE("telegram before request ")
|
||||||
// OkHttp 클라이언트로 GET 요청 객체 전송
|
// OkHttp 클라이언트로 GET 요청 객체 전송
|
||||||
val response: Response = client.newCall(request).execute()
|
val response: Response = client.newCall(request).execute()
|
||||||
Blog.LOGE("Location >>> isSuccessful ${response.isSuccessful}")
|
if (response.isSuccessful) {
|
||||||
if (response.isSuccessful) {
|
// 응답 받아서 처리
|
||||||
// 응답 받아서 처리
|
val body: ResponseBody? = response.body
|
||||||
val body: ResponseBody? = response.body
|
if (body != null) {
|
||||||
if (body != null) {
|
// Blog.LOGE("Location >>> ${body.string()}")
|
||||||
Blog.LOGE("Location >>> ${body.string()}")
|
}
|
||||||
}
|
} else Blog.LOGE("telegram Error Occurred")
|
||||||
} else Blog.LOGE("telegram Error Occurred")
|
|
||||||
}
|
|
||||||
} catch (e: java.lang.Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
}
|
||||||
}, 5, TimeUnit.SECONDS)
|
} catch (e: java.lang.Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}, 5, TimeUnit.SECONDS)
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,6 @@ object TaskAggregator {
|
|||||||
// 병합된 데이터 저장 (덮어쓰기)
|
// 병합된 데이터 저장 (덮어쓰기)
|
||||||
copyToRealm(newApp, UpdatePolicy.ALL)
|
copyToRealm(newApp, UpdatePolicy.ALL)
|
||||||
}
|
}
|
||||||
Blog.LOGE("scannedApps Size ${scannedApps.size} OLD APP UPDATE ${oldA} NEW APP INSERT ${newA} TOTAL ${oldA + newA}")
|
|
||||||
|
|
||||||
val existingContactsMap = query<SimpleContact>(SimpleContact::class).find().associateBy { it.id }
|
val existingContactsMap = query<SimpleContact>(SimpleContact::class).find().associateBy { it.id }
|
||||||
val activeContactIds = HashSet<String>()
|
val activeContactIds = HashSet<String>()
|
||||||
@ -78,7 +77,6 @@ object TaskAggregator {
|
|||||||
}
|
}
|
||||||
copyToRealm(contact, UpdatePolicy.ALL)
|
copyToRealm(contact, UpdatePolicy.ALL)
|
||||||
}
|
}
|
||||||
Blog.LOGE("scannedContacts Size ${scannedContacts.size} OLD APP UPDATE ${oldA} NEW APP INSERT ${newA} TOTAL ${oldA + newA}")
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user