..
This commit is contained in:
parent
e75aa2eaa9
commit
0ffc476b25
@ -320,7 +320,7 @@ internal class AppDrawer : Fragment() {
|
|||||||
|
|
||||||
openSearch()
|
openSearch()
|
||||||
registCancelSearch()
|
registCancelSearch()
|
||||||
BLog.LOGE("onResume after chechHandler.postDelayed(cancelSearch, 3000L)")
|
// BLog.LOGE("onResume after chechHandler.postDelayed(cancelSearch, 3000L)")
|
||||||
}
|
}
|
||||||
|
|
||||||
val chechHandler = Handler(Looper.getMainLooper())
|
val chechHandler = Handler(Looper.getMainLooper())
|
||||||
@ -328,7 +328,7 @@ internal class AppDrawer : Fragment() {
|
|||||||
val cancelSearch = Runnable { lActivity?.viewPager?.currentItem = 1 }
|
val cancelSearch = Runnable { lActivity?.viewPager?.currentItem = 1 }
|
||||||
|
|
||||||
fun registCancelSearch() {
|
fun registCancelSearch() {
|
||||||
BLog.LOGE("Called registCancelSearch")
|
// BLog.LOGE("Called registCancelSearch")
|
||||||
chechHandler.removeCallbacks(cancelSearch)
|
chechHandler.removeCallbacks(cancelSearch)
|
||||||
chechHandler.postDelayed(cancelSearch, 8000L)
|
chechHandler.postDelayed(cancelSearch, 8000L)
|
||||||
}
|
}
|
||||||
@ -383,7 +383,7 @@ internal class AppDrawer : Fragment() {
|
|||||||
WorkersDb.getRealm().apply {
|
WorkersDb.getRealm().apply {
|
||||||
packageList.clear()
|
packageList.clear()
|
||||||
packageList.addAll(copyFromRealm(it))
|
packageList.addAll(copyFromRealm(it))
|
||||||
BLog.LOGE("packageList >>> ${packageList.size}")
|
// BLog.LOGE("packageList >>> ${packageList.size}")
|
||||||
binding.appsList.post { if (packageList.size > 0) {
|
binding.appsList.post { if (packageList.size > 0) {
|
||||||
appsAdapter?.updateData(packageList)
|
appsAdapter?.updateData(packageList)
|
||||||
} }
|
} }
|
||||||
@ -422,7 +422,7 @@ internal class AppDrawer : Fragment() {
|
|||||||
WorkersDb.getRealm().apply {
|
WorkersDb.getRealm().apply {
|
||||||
contactList.clear()
|
contactList.clear()
|
||||||
contactList.addAll(copyFromRealm(it).toList())
|
contactList.addAll(copyFromRealm(it).toList())
|
||||||
BLog.LOGE("packageList >>> ${contactList.size}")
|
// BLog.LOGE("packageList >>> ${contactList.size}")
|
||||||
binding.contactList.post { if (contactList.size > 0) {
|
binding.contactList.post { if (contactList.size > 0) {
|
||||||
contactAdapter?.updateData(contactList)
|
contactAdapter?.updateData(contactList)
|
||||||
} }
|
} }
|
||||||
@ -469,8 +469,8 @@ internal class AppDrawer : Fragment() {
|
|||||||
if(appHangulName?.length ?: 0 > 0) {
|
if(appHangulName?.length ?: 0 > 0) {
|
||||||
info.appNameChosung = JamoUtils.split(appHangulName).joinToString("")
|
info.appNameChosung = JamoUtils.split(appHangulName).joinToString("")
|
||||||
info.koreanName = appHangulName
|
info.koreanName = appHangulName
|
||||||
BLog.LOGE("appHangulName >>> $appHangulName")
|
// BLog.LOGE("appHangulName >>> $appHangulName")
|
||||||
BLog.LOGE("appHangulName >>> ${info.appNameChosung}")
|
// BLog.LOGE("appHangulName >>> ${info.appNameChosung}")
|
||||||
WorkersDb.update(info)
|
WorkersDb.update(info)
|
||||||
getHangule()
|
getHangule()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -242,14 +242,14 @@ binding.totalTouch.setOnClickListener { update() }
|
|||||||
} else {
|
} else {
|
||||||
packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES)
|
packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES)
|
||||||
}
|
}
|
||||||
BLog.LOGE("activity. >>>>> ${Gson().toJson(activityInfo)}")
|
// BLog.LOGE("activity. >>>>> ${Gson().toJson(activityInfo)}")
|
||||||
/* show activity list */
|
/* show activity list */
|
||||||
val activityAdapter: ArrayAdapter<String> =
|
val activityAdapter: ArrayAdapter<String> =
|
||||||
ArrayAdapter(requireContext(), R.layout.list_item, R.id.itemText, ArrayList())
|
ArrayAdapter(requireContext(), R.layout.list_item, R.id.itemText, ArrayList())
|
||||||
if (activityInfo.activities.isNotEmpty()) {
|
if (activityInfo.activities.isNotEmpty()) {
|
||||||
for (activity in activityInfo.activities) {
|
for (activity in activityInfo.activities) {
|
||||||
if (packageName.contains("com.kakao") == true) {
|
if (packageName.contains("com.kakao") == true) {
|
||||||
BLog.LOGE("activity. >>>>> ${Gson().toJson(activity)}")
|
// BLog.LOGE("activity. >>>>> ${Gson().toJson(activity)}")
|
||||||
}
|
}
|
||||||
activityAdapter.add(
|
activityAdapter.add(
|
||||||
activity.toString().split(" ").toTypedArray()[1].replace("}", "")
|
activity.toString().split(" ").toTypedArray()[1].replace("}", "")
|
||||||
|
|||||||
@ -69,12 +69,12 @@ internal class IconPackManager {
|
|||||||
val appFilterId = iconPackRes!!.getIdentifier("appfilter", "xml", packageName)
|
val appFilterId = iconPackRes!!.getIdentifier("appfilter", "xml", packageName)
|
||||||
if (appFilterId > 0) {
|
if (appFilterId > 0) {
|
||||||
xpp = iconPackRes!!.getXml(appFilterId)
|
xpp = iconPackRes!!.getXml(appFilterId)
|
||||||
BLog.LOGE("packageName >>> ${packageName}")
|
// BLog.LOGE("packageName >>> ${packageName}")
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
xpp = XmlPullParserFactory.newInstance().apply { isNamespaceAware = true }
|
xpp = XmlPullParserFactory.newInstance().apply { isNamespaceAware = true }
|
||||||
.newPullParser().apply {
|
.newPullParser().apply {
|
||||||
BLog.LOGE("packageName >>> ${packageName}")
|
// BLog.LOGE("packageName >>> ${packageName}")
|
||||||
setInput(iconPackRes!!.assets.open("appfilter.xml"), "utf-8")
|
setInput(iconPackRes!!.assets.open("appfilter.xml"), "utf-8")
|
||||||
}
|
}
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
|
|||||||
@ -178,7 +178,7 @@ internal class Feeds : Fragment() , CommadCallabck {
|
|||||||
binding.consoleLog.text = str
|
binding.consoleLog.text = str
|
||||||
}
|
}
|
||||||
mMainHandler.postDelayed(hideConsole,10000L)
|
mMainHandler.postDelayed(hideConsole,10000L)
|
||||||
BLog.LOGE("consoleLog >>>> ${str}")
|
// BLog.LOGE("consoleLog >>>> ${str}")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ internal class Feeds : Fragment() , CommadCallabck {
|
|||||||
builder.setPositiveButton(android.R.string.ok,
|
builder.setPositiveButton(android.R.string.ok,
|
||||||
DialogInterface.OnClickListener { dialog, which ->
|
DialogInterface.OnClickListener { dialog, which ->
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
BLog.LOGE("input.text.toString() >>>> ${input.text.toString()}")
|
// BLog.LOGE("input.text.toString() >>>> ${input.text.toString()}")
|
||||||
if (input.text.toString().trim().contains(" ")) {
|
if (input.text.toString().trim().contains(" ")) {
|
||||||
val cmd = input.text.toString().trim().split(" ")
|
val cmd = input.text.toString().trim().split(" ")
|
||||||
when(cmd[0]) {
|
when(cmd[0]) {
|
||||||
@ -284,9 +284,9 @@ internal class Feeds : Fragment() , CommadCallabck {
|
|||||||
when (input.text.toString()) {
|
when (input.text.toString()) {
|
||||||
"so" -> GlobalScope.launch {
|
"so" -> GlobalScope.launch {
|
||||||
"https://kr69.sogirl.so".getJ().let { doc ->
|
"https://kr69.sogirl.so".getJ().let { doc ->
|
||||||
BLog.LOGE("ogirl >>> ${doc.title()}")
|
// BLog.LOGE("ogirl >>> ${doc.title()}")
|
||||||
doc.getElementsByTag("article").forEach { article ->
|
doc.getElementsByTag("article").forEach { article ->
|
||||||
BLog.LOGE("ogirl article >>> ${article.text()}")
|
// BLog.LOGE("ogirl article >>> ${article.text()}")
|
||||||
val title = article.getElementsByTag("a").get(0).attr("title")
|
val title = article.getElementsByTag("a").get(0).attr("title")
|
||||||
val href = article.getElementsByTag("a").get(0).attr("href")
|
val href = article.getElementsByTag("a").get(0).attr("href")
|
||||||
val img = article.getElementsByTag("img").get(0).attr("data-src")
|
val img = article.getElementsByTag("img").get(0).attr("data-src")
|
||||||
|
|||||||
@ -61,11 +61,11 @@ class NLService : NotificationListenerService() {
|
|||||||
val skips = arrayListOf("com.wssyncmldm")
|
val skips = arrayListOf("com.wssyncmldm")
|
||||||
@RequiresApi(Build.VERSION_CODES.S)
|
@RequiresApi(Build.VERSION_CODES.S)
|
||||||
override fun onNotificationPosted(sbn: StatusBarNotification) {
|
override fun onNotificationPosted(sbn: StatusBarNotification) {
|
||||||
BLog.LOGE("NLService********** onNotificationPosted")
|
// BLog.LOGE("NLService********** onNotificationPosted")
|
||||||
BLog.LOGE("NLServiceID :" + sbn.id + "\t${sbn.notification.tickerText}\t" + sbn.packageName)
|
// BLog.LOGE("NLServiceID :" + sbn.id + "\t${sbn.notification.tickerText}\t" + sbn.packageName)
|
||||||
sbn.notification.extras.keySet().forEach {
|
// sbn.notification.extras.keySet().forEach {
|
||||||
BLog.LOGE("NLService********** keySet >> ${it} ${sbn.notification.extras.get(it)}")
|
// BLog.LOGE("NLService********** keySet >> ${it} ${sbn.notification.extras.get(it)}")
|
||||||
}
|
// }
|
||||||
if (sbn.id != 0 && (sbn.packageName.contains(".") || sbn.packageName.contains("android")) && sbn.packageName.length > 0) {
|
if (sbn.id != 0 && (sbn.packageName.contains(".") || sbn.packageName.contains("android")) && sbn.packageName.length > 0) {
|
||||||
NotificationItem().apply {
|
NotificationItem().apply {
|
||||||
notiId = sbn.id
|
notiId = sbn.id
|
||||||
@ -77,24 +77,15 @@ class NLService : NotificationListenerService() {
|
|||||||
postTime = sbn.postTime
|
postTime = sbn.postTime
|
||||||
var uniq = title ?: subtext ?: selfDisplayName ?: tikerMsg ?: ""
|
var uniq = title ?: subtext ?: selfDisplayName ?: tikerMsg ?: ""
|
||||||
uniq_id = "${sbn.id}_${sbn.packageName}_${if (uniq.length > 3) uniq.substring(0,3) else uniq}"
|
uniq_id = "${sbn.id}_${sbn.packageName}_${if (uniq.length > 3) uniq.substring(0,3) else uniq}"
|
||||||
BLog.LOGE("NLService********** enqueue TelegramBotGetter ${true == "bumssavor".equals(title)}")
|
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ${true == "bumssavor".equals(title)}")
|
||||||
BLog.LOGE("NLService********** enqueue TelegramBotGetter ${(true == "org.telegram.messenger".equals(pkgName))}")
|
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ${(true == "org.telegram.messenger".equals(pkgName))}")
|
||||||
BLog.LOGE("NLService********** enqueue TelegramBotGetter ${sbn.notification?.extras?.getString("android.text")?.startsWith("/") == true}")
|
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ${sbn.notification?.extras?.getString("android.text")?.startsWith("/") == true}")
|
||||||
if ((title?.contains("성희") == true) && (true == "org.telegram.messenger".equals(pkgName)) &&
|
|
||||||
tikerMsg?.contains("어디") == true) {
|
|
||||||
getLastLocation(applicationContext)
|
|
||||||
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ")
|
|
||||||
// var mWorkManager = WorkManager.getInstance(applicationContext)
|
|
||||||
// Executors.newSingleThreadScheduledExecutor().schedule({
|
|
||||||
// mWorkManager.enqueue(OneTimeWorkRequest.from(TelegramBotGetter::class.java))
|
|
||||||
// }, 5, TimeUnit.SECONDS)
|
|
||||||
}
|
|
||||||
}.apply {
|
}.apply {
|
||||||
if (skips.contains(pkgName)) {
|
if (skips.contains(pkgName)) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
WorkersDb.insertNoti(this)
|
WorkersDb.insertNoti(this)
|
||||||
BLog.LOGE("NLService********** onNotificationPosted ${Gson().toJson(this)}")
|
// BLog.LOGE("NLService********** onNotificationPosted ${Gson().toJson(this)}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -104,7 +95,7 @@ class NLService : NotificationListenerService() {
|
|||||||
val m = getSystemService<MediaSessionManager>()!!
|
val m = getSystemService<MediaSessionManager>()!!
|
||||||
val component = ComponentName(this, NLService::class.java)
|
val component = ComponentName(this, NLService::class.java)
|
||||||
val sessions = m.getActiveSessions(component)
|
val sessions = m.getActiveSessions(component)
|
||||||
BLog.LOGE("Sessions", "count: ${sessions.size}")
|
// BLog.LOGE("Sessions", "count: ${sessions.size}")
|
||||||
sessions.forEach { session ->
|
sessions.forEach { session ->
|
||||||
WorkersDb.getRealm().writeBlocking {
|
WorkersDb.getRealm().writeBlocking {
|
||||||
if (session.playbackState?.isActive == true) {
|
if (session.playbackState?.isActive == true) {
|
||||||
@ -116,23 +107,23 @@ class NLService : NotificationListenerService() {
|
|||||||
current = CurrentPlayItem()
|
current = CurrentPlayItem()
|
||||||
copyToRealm(current, UpdatePolicy.ALL)
|
copyToRealm(current, UpdatePolicy.ALL)
|
||||||
}
|
}
|
||||||
BLog.LOGE(
|
// BLog.LOGE(
|
||||||
"Sessions",
|
// "Sessions",
|
||||||
"$session -- " + (session.playbackState?.state)
|
// "$session -- " + (session.playbackState?.state)
|
||||||
)
|
// )
|
||||||
BLog.LOGE(
|
// BLog.LOGE(
|
||||||
"Sessions",
|
// "Sessions",
|
||||||
"$session -- " + (session?.metadata?.keySet()?.joinToString())
|
// "$session -- " + (session?.metadata?.keySet()?.joinToString())
|
||||||
)
|
// )
|
||||||
BLog.LOGE(
|
// BLog.LOGE(
|
||||||
"Sessions",
|
// "Sessions",
|
||||||
"$session -- " + (session?.metadata?.getString(MediaMetadata.METADATA_KEY_ARTIST))
|
// "$session -- " + (session?.metadata?.getString(MediaMetadata.METADATA_KEY_ARTIST))
|
||||||
)
|
// )
|
||||||
if (session?.metadata?.containsKey(MediaMetadata.METADATA_KEY_ALBUM_ART) == true) {
|
if (session?.metadata?.containsKey(MediaMetadata.METADATA_KEY_ALBUM_ART) == true) {
|
||||||
BLog.LOGE(
|
// BLog.LOGE(
|
||||||
"Sessions",
|
// "Sessions",
|
||||||
"$session -- " + (session?.metadata?.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART))
|
// "$session -- " + (session?.metadata?.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART))
|
||||||
)
|
// )
|
||||||
current.albumArt = BitmapConverter.BitmapToString(
|
current.albumArt = BitmapConverter.BitmapToString(
|
||||||
session.metadata?.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART)
|
session.metadata?.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART)
|
||||||
)
|
)
|
||||||
@ -160,8 +151,8 @@ class NLService : NotificationListenerService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onNotificationRemoved(sbn: StatusBarNotification) {
|
override fun onNotificationRemoved(sbn: StatusBarNotification) {
|
||||||
BLog.LOGE("NLService********** onNOtificationRemoved")
|
// BLog.LOGE("NLService********** onNOtificationRemoved")
|
||||||
BLog.LOGE("NLService ID :" + sbn.id + "\t" + sbn.notification.tickerText + "\t" + sbn.packageName)
|
// BLog.LOGE("NLService ID :" + sbn.id + "\t" + sbn.notification.tickerText + "\t" + sbn.packageName)
|
||||||
var uniq_id = "${sbn.id}_${sbn.packageName}"
|
var uniq_id = "${sbn.id}_${sbn.packageName}"
|
||||||
try {
|
try {
|
||||||
WorkersDb.getRealm()?.apply {
|
WorkersDb.getRealm()?.apply {
|
||||||
@ -177,7 +168,7 @@ class NLService : NotificationListenerService() {
|
|||||||
|
|
||||||
internal inner class NLServiceReceiver : BroadcastReceiver() {
|
internal inner class NLServiceReceiver : BroadcastReceiver() {
|
||||||
override fun onReceive(context: Context?, intent: Intent) {
|
override fun onReceive(context: Context?, intent: Intent) {
|
||||||
BLog.LOGE("NLService intent >>> ${intent.action}")
|
// BLog.LOGE("NLService intent >>> ${intent.action}")
|
||||||
if (intent.getStringExtra("command") == "clearall") {
|
if (intent.getStringExtra("command") == "clearall") {
|
||||||
this@NLService.cancelAllNotifications()
|
this@NLService.cancelAllNotifications()
|
||||||
} else if (intent.getStringExtra("command") == "list") {
|
} else if (intent.getStringExtra("command") == "list") {
|
||||||
@ -186,7 +177,7 @@ class NLService : NotificationListenerService() {
|
|||||||
// sendBroadcast(i1)
|
// sendBroadcast(i1)
|
||||||
var i = 1
|
var i = 1
|
||||||
for (sbn in this@NLService.activeNotifications) {
|
for (sbn in this@NLService.activeNotifications) {
|
||||||
BLog.LOGE("NLService sbn >>> ${sbn.packageName} , ${Gson().toJson(sbn.notification.extras.keySet())}")
|
// BLog.LOGE("NLService sbn >>> ${sbn.packageName} , ${Gson().toJson(sbn.notification.extras.keySet())}")
|
||||||
// val i2 = Intent("com.kpbird.nlsexample.NOTIFICATION_LISTENER_EXAMPLE")
|
// val i2 = Intent("com.kpbird.nlsexample.NOTIFICATION_LISTENER_EXAMPLE")
|
||||||
// i2.putExtra("notification_event", i.toString() + " " + sbn.packageName + "\n")
|
// i2.putExtra("notification_event", i.toString() + " " + sbn.packageName + "\n")
|
||||||
// sendBroadcast(i2)
|
// sendBroadcast(i2)
|
||||||
@ -203,67 +194,67 @@ class NLService : NotificationListenerService() {
|
|||||||
@SuppressLint("MissingPermission")
|
@SuppressLint("MissingPermission")
|
||||||
private fun getLastLocation(context: Context) {
|
private fun getLastLocation(context: Context) {
|
||||||
fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);
|
fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);
|
||||||
BLog.LOGE("Location getLastLocation")
|
// BLog.LOGE("Location getLastLocation")
|
||||||
fusedLocationProviderClient?.getLastLocation()?.addOnSuccessListener(object :
|
fusedLocationProviderClient?.getLastLocation()?.addOnSuccessListener(object :
|
||||||
OnSuccessListener<Location?> {
|
OnSuccessListener<Location?> {
|
||||||
override fun onSuccess(location: Location?) {
|
override fun onSuccess(location: Location?) {
|
||||||
if (location != null) {
|
// if (location != null) {
|
||||||
// Log the latitude and longitude
|
// // Log the latitude and longitude
|
||||||
BLog.LOGE("Location Latitude: " + location.getLatitude())
|
// BLog.LOGE("Location Latitude: " + location.getLatitude())
|
||||||
BLog.LOGE("Location Longitude: " + location.getLongitude())
|
// BLog.LOGE("Location Longitude: " + location.getLongitude())
|
||||||
|
//
|
||||||
// Use Geocoder to get detailed location information
|
// // Use Geocoder to get detailed location information
|
||||||
try {
|
// try {
|
||||||
val geocoder = Geocoder(context, Locale.getDefault())
|
// val geocoder = Geocoder(context, Locale.getDefault())
|
||||||
val addresses: List<Address>? = geocoder.getFromLocation(
|
// val addresses: List<Address>? = geocoder.getFromLocation(
|
||||||
location.getLatitude(),
|
// location.getLatitude(),
|
||||||
location.getLongitude(),
|
// location.getLongitude(),
|
||||||
1
|
// 1
|
||||||
)
|
// )
|
||||||
|
//
|
||||||
addresses?.first()?.let {
|
// addresses?.first()?.let {
|
||||||
it.getAddressLine(0)?.let {
|
// it.getAddressLine(0)?.let {
|
||||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
// Executors.newSingleThreadScheduledExecutor().schedule({
|
||||||
try {
|
// try {
|
||||||
//////-1002450229641
|
// //////-1002450229641
|
||||||
val url =
|
// val url =
|
||||||
"https://api.telegram.org/bot7934509464:AAE_xUbICxMdywLGnxo7BkeIqA1nVza4P9w/sendMessage?chat_id=83268260&text=남편의현위치는${it}"
|
// "https://api.telegram.org/bot7934509464:AAE_xUbICxMdywLGnxo7BkeIqA1nVza4P9w/sendMessage?chat_id=83268260&text=남편의현위치는${it}"
|
||||||
//7068729507
|
// //7068729507
|
||||||
// OkHttp 클라이언트 객체 생성
|
// // OkHttp 클라이언트 객체 생성
|
||||||
val client = OkHttpClient.Builder()
|
// val client = OkHttpClient.Builder()
|
||||||
.connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
|
// .connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
|
||||||
.build()
|
// .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()
|
||||||
|
//
|
||||||
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()
|
||||||
if (response.isSuccessful()) {
|
// if (response.isSuccessful()) {
|
||||||
// 응답 받아서 처리
|
// // 응답 받아서 처리
|
||||||
val body: ResponseBody? = response.body()
|
// val body: ResponseBody? = response.body()
|
||||||
if (body != null) {
|
// if (body != null) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
} else BLog.LOGE("telegram Error Occurred")
|
// } else BLog.LOGE("telegram Error Occurred")
|
||||||
|
//
|
||||||
} catch (e: java.lang.Exception) {
|
// } catch (e: java.lang.Exception) {
|
||||||
e.printStackTrace()
|
// e.printStackTrace()
|
||||||
}
|
// }
|
||||||
}, 5, TimeUnit.SECONDS)
|
// }, 5, TimeUnit.SECONDS)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// Display location details on UI elements
|
// // Display location details on UI elements
|
||||||
// Log detailed location information
|
// // Log detailed location information
|
||||||
BLog.LOGE("Location Addresses: $addresses")
|
// BLog.LOGE("Location Addresses: $addresses")
|
||||||
} catch (e: IOException) {
|
// } catch (e: IOException) {
|
||||||
e.printStackTrace()
|
// e.printStackTrace()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -482,17 +482,17 @@ class SimpleFingerGestures : OnTouchListener {
|
|||||||
|
|
||||||
|
|
||||||
override fun onTouch(view: View, ev: MotionEvent): Boolean {
|
override fun onTouch(view: View, ev: MotionEvent): Boolean {
|
||||||
if (debug) Log.d(TAG, "onTouch")
|
// if (debug) Log.d(TAG, "onTouch")
|
||||||
when (ev.action and MotionEvent.ACTION_MASK) {
|
when (ev.action and MotionEvent.ACTION_MASK) {
|
||||||
MotionEvent.ACTION_DOWN -> {
|
MotionEvent.ACTION_DOWN -> {
|
||||||
if (debug) Log.d(TAG, "ACTION_DOWN")
|
// if (debug) Log.d(TAG, "ACTION_DOWN")
|
||||||
startTracking(0)
|
startTracking(0)
|
||||||
ga.trackGesture(ev)
|
ga.trackGesture(ev)
|
||||||
return consumeTouchEvents
|
return consumeTouchEvents
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_UP -> {
|
MotionEvent.ACTION_UP -> {
|
||||||
if (debug) Log.d(TAG, "ACTION_UP")
|
// if (debug) Log.d(TAG, "ACTION_UP")
|
||||||
if (tracking[0]) {
|
if (tracking[0]) {
|
||||||
doCallBack(view,ga.getGesture(ev))
|
doCallBack(view,ga.getGesture(ev))
|
||||||
}
|
}
|
||||||
@ -502,14 +502,14 @@ class SimpleFingerGestures : OnTouchListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_POINTER_DOWN -> {
|
MotionEvent.ACTION_POINTER_DOWN -> {
|
||||||
if (debug) Log.d(TAG, "ACTION_POINTER_DOWN" + " " + "num" + ev.pointerCount)
|
// if (debug) Log.d(TAG, "ACTION_POINTER_DOWN" + " " + "num" + ev.pointerCount)
|
||||||
startTracking(ev.pointerCount - 1)
|
startTracking(ev.pointerCount - 1)
|
||||||
ga.trackGesture(ev)
|
ga.trackGesture(ev)
|
||||||
return consumeTouchEvents
|
return consumeTouchEvents
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_POINTER_UP -> {
|
MotionEvent.ACTION_POINTER_UP -> {
|
||||||
if (debug) Log.d(TAG, "ACTION_POINTER_UP" + " " + "num" + ev.pointerCount)
|
// if (debug) Log.d(TAG, "ACTION_POINTER_UP" + " " + "num" + ev.pointerCount)
|
||||||
if (tracking[1]) {
|
if (tracking[1]) {
|
||||||
doCallBack(view,ga.getGesture(ev))
|
doCallBack(view,ga.getGesture(ev))
|
||||||
}
|
}
|
||||||
@ -519,12 +519,12 @@ class SimpleFingerGestures : OnTouchListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_CANCEL -> {
|
MotionEvent.ACTION_CANCEL -> {
|
||||||
if (debug) Log.d(TAG, "ACTION_CANCEL")
|
// if (debug) Log.d(TAG, "ACTION_CANCEL")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_MOVE -> {
|
MotionEvent.ACTION_MOVE -> {
|
||||||
if (debug) Log.d(TAG, "ACTION_MOVE")
|
// if (debug) Log.d(TAG, "ACTION_MOVE")
|
||||||
return consumeTouchEvents
|
return consumeTouchEvents
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class ClienGetter : BaseGetter {
|
|||||||
Jsoup.connect(url)
|
Jsoup.connect(url)
|
||||||
.userAgent(USAGT)
|
.userAgent(USAGT)
|
||||||
.get().let { ruli ->
|
.get().let { ruli ->
|
||||||
BLog.LOGE("test ${url} >> ${ruli.title()}")
|
// BLog.LOGE("test ${url} >> ${ruli.title()}")
|
||||||
ruli.getElementsByClass("list_item symph_row ").forEach { ruli_tr ->
|
ruli.getElementsByClass("list_item symph_row ").forEach { ruli_tr ->
|
||||||
parseClien(ruli_tr)
|
parseClien(ruli_tr)
|
||||||
}
|
}
|
||||||
@ -82,7 +82,6 @@ class ClienGetter : BaseGetter {
|
|||||||
}
|
}
|
||||||
} catch (e:Exception){e.printStackTrace()}
|
} catch (e:Exception){e.printStackTrace()}
|
||||||
return Result.success().apply {
|
return Result.success().apply {
|
||||||
BLog.LOGE("ClienGetter temp >>>> ${temp.size}")
|
|
||||||
WorkersDb.insertBulkData(temp)
|
WorkersDb.insertBulkData(temp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user