Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
Scan QR Code Barcode Reader
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Scan QR Code Barcode Reader
Commits
d6a1ce42
Commit
d6a1ce42
authored
Jan 10, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用功能广告
parent
bc915c63
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
417 additions
and
85 deletions
+417
-85
ContractCodeActivity.kt
...n/java/com/base/scanqr/ui/contact/ContractCodeActivity.kt
+49
-10
EmailCodeActivity.kt
...c/main/java/com/base/scanqr/ui/email/EmailCodeActivity.kt
+52
-11
EventCodeActivity.kt
...c/main/java/com/base/scanqr/ui/event/EventCodeActivity.kt
+51
-11
MessageCodeActivity.kt
...in/java/com/base/scanqr/ui/message/MessageCodeActivity.kt
+52
-12
ProductCodeActivity.kt
...in/java/com/base/scanqr/ui/product/ProductCodeActivity.kt
+52
-12
TelephoneCodeActivity.kt
...ava/com/base/scanqr/ui/telephone/TelephoneCodeActivity.kt
+61
-8
TextCodeActivity.kt
...src/main/java/com/base/scanqr/ui/text/TextCodeActivity.kt
+51
-12
WebsiteCodeActivity.kt
...in/java/com/base/scanqr/ui/website/WebsiteCodeActivity.kt
+1
-1
WifiCodeActivity.kt
...src/main/java/com/base/scanqr/ui/wifi/WifiCodeActivity.kt
+48
-8
No files found.
app/src/main/java/com/base/scanqr/ui/contact/ContractCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -114,11 +114,22 @@ class ContractCodeActivity : BaseActivity<ActivityContractCodeBinding>(ActivityC
toast
(
"没实现"
)
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -126,13 +137,41 @@ class ContractCodeActivity : BaseActivity<ActivityContractCodeBinding>(ActivityC
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
try
{
val
intent
=
intentWriteContract
(
contractUIBean
)
startActivity
(
intent
)
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the add contract"
,
true
)
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
fun
useSearch
()
{
try
{
val
intent
=
intentWriteContract
(
contractUIBean
)
startActivity
(
intent
)
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the add contract"
,
true
)
}
}
...
...
app/src/main/java/com/base/scanqr/ui/email/EmailCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -96,7 +96,7 @@ class EmailCodeActivity : BaseActivity<ActivityEmailCodeBinding>(ActivityEmailCo
}
})
}
}
else
{
}
else
{
finishToMainTop
()
}
binding
.
flBack
.
setOnClickListener
{
...
...
@@ -113,11 +113,22 @@ class EmailCodeActivity : BaseActivity<ActivityEmailCodeBinding>(ActivityEmailCo
toast
(
"没实现"
)
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -125,12 +136,42 @@ class EmailCodeActivity : BaseActivity<ActivityEmailCodeBinding>(ActivityEmailCo
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
val
intent
=
intentSendEmail
(
email
)
try
{
startActivity
(
intent
)
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the email request"
,
true
)
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
fun
useSearch
()
{
val
intent
=
intentSendEmail
(
email
)
try
{
startActivity
(
intent
)
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the email request"
,
true
)
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqr/ui/event/EventCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -116,11 +116,22 @@ class EventCodeActivity : BaseActivity<ActivityEventCodeBinding>(ActivityEventCo
toast
(
"没实现"
)
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -128,14 +139,43 @@ class EventCodeActivity : BaseActivity<ActivityEventCodeBinding>(ActivityEventCo
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
val
intent
=
intentAddCalendar
(
eventUIBean
)
try
{
startActivity
(
intent
)
finish
()
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the calendar event request"
,
true
)
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
fun
useSearch
()
{
val
intent
=
intentAddCalendar
(
eventUIBean
)
try
{
startActivity
(
intent
)
finish
()
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the calendar event request"
,
true
)
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqr/ui/message/MessageCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -94,7 +94,7 @@ class MessageCodeActivity : BaseActivity<ActivityMessageCodeBinding>(ActivityMes
finishToMainTop
()
}
})
}
else
{
}
else
{
finishToMainTop
()
}
}
...
...
@@ -111,11 +111,22 @@ class MessageCodeActivity : BaseActivity<ActivityMessageCodeBinding>(ActivityMes
toast
(
"没实现"
)
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -123,12 +134,41 @@ class MessageCodeActivity : BaseActivity<ActivityMessageCodeBinding>(ActivityMes
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
val
intent
=
intentSendSms
(
messageUIBean
)
try
{
startActivity
(
intent
)
finish
()
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the send message request"
,
true
)
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
fun
useSearch
()
{
val
intent
=
intentSendSms
(
messageUIBean
)
try
{
startActivity
(
intent
)
finish
()
}
catch
(
e
:
Exception
)
{
toast
(
"No application was found to handle the send message request"
,
true
)
}
}
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
...
...
app/src/main/java/com/base/scanqr/ui/product/ProductCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -114,11 +114,22 @@ class ProductCodeActivity : BaseActivity<ActivityProductCodeBinding>(ActivityPro
}
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
qrString
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -126,17 +137,46 @@ class ProductCodeActivity : BaseActivity<ActivityProductCodeBinding>(ActivityPro
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
)
intent
.
setData
(
Uri
.
parse
(
"https://www.google.com/search?q=${productUIBean.content}"
))
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
try
{
startActivity
(
intent
)
}
catch
(
e
:
ActivityNotFoundException
)
{
toast
(
""
)
Toast
.
makeText
(
this
,
"No application was found to handle the search request"
,
Toast
.
LENGTH_SHORT
).
show
()
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
qrString
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
fun
useSearch
(){
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
)
intent
.
setData
(
Uri
.
parse
(
"https://www.google.com/search?q=${productUIBean.content}"
))
try
{
startActivity
(
intent
)
}
catch
(
e
:
ActivityNotFoundException
)
{
toast
(
""
)
Toast
.
makeText
(
this
,
"No application was found to handle the search request"
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqr/ui/telephone/TelephoneCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -97,7 +97,7 @@ class TelephoneCodeActivity : BaseActivity<ActivityTelephoneCodeBinding>(Activit
finishToMainTop
()
}
})
}
else
{
}
else
{
finishToMainTop
()
}
}
...
...
@@ -111,11 +111,22 @@ class TelephoneCodeActivity : BaseActivity<ActivityTelephoneCodeBinding>(Activit
}
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -126,16 +137,49 @@ class TelephoneCodeActivity : BaseActivity<ActivityTelephoneCodeBinding>(Activit
if
(!
checkCallPhonePermission
())
{
launcher
.
launch
(
arrayOf
(
Manifest
.
permission
.
CALL_PHONE
))
{
if
(
checkCallPhonePermission
())
{
callPhone
()
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
callPhone
()
}
override
fun
failed
(
where
:
Int
)
{
callPhone
()
}
override
fun
googleFailed
(
where
:
Int
)
{
callPhone
()
}
})
}
else
{
callPhone
()
}
}
}
}
else
{
callPhone
()
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
callPhone
()
}
override
fun
failed
(
where
:
Int
)
{
callPhone
()
}
override
fun
googleFailed
(
where
:
Int
)
{
callPhone
()
}
})
}
else
{
callPhone
()
}
}
}
}
private
fun
callPhone
()
{
try
{
val
intent
=
intentCallPhone
(
telephoneUIBean
.
tel
)
startActivity
(
intent
)
...
...
@@ -145,4 +189,13 @@ class TelephoneCodeActivity : BaseActivity<ActivityTelephoneCodeBinding>(Activit
}
private
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqr/ui/text/TextCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -111,11 +111,22 @@ class TextCodeActivity : BaseActivity<ActivityTextCodeBinding>(ActivityTextCodeB
toast
(
"没实现"
)
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -123,18 +134,46 @@ class TextCodeActivity : BaseActivity<ActivityTextCodeBinding>(ActivityTextCodeB
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
)
intent
.
setData
(
Uri
.
parse
(
"https://www.google.com/search?q=${textUIBean.content}"
))
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
try
{
startActivity
(
intent
)
}
catch
(
e
:
ActivityNotFoundException
)
{
toast
(
""
)
Toast
.
makeText
(
this
,
"No application was found to handle the search request"
,
Toast
.
LENGTH_SHORT
).
show
(
)
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
fun
useSearch
()
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
)
intent
.
setData
(
Uri
.
parse
(
"https://www.google.com/search?q=${textUIBean.content}"
))
try
{
startActivity
(
intent
)
}
catch
(
e
:
ActivityNotFoundException
)
{
toast
(
""
)
Toast
.
makeText
(
this
,
"No application was found to handle the search request"
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqr/ui/website/WebsiteCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -81,7 +81,7 @@ class WebsiteCodeActivity : BaseActivity<ActivityWebsiteCodeBinding>(ActivityWeb
super
.
initListener
()
onBackPressedDispatcher
.
addCallback
{
if
(
AdConfigBean
.
adsConfigBean
.
functionBackShowAd
)
{
AdsMgr
.
showInsert
(
this
@WebsiteCodeActivity
,
fals
e
,
object
:
AdsShowCallBack
()
{
AdsMgr
.
showInsert
(
this
@WebsiteCodeActivity
,
tru
e
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
finishToMainTop
()
}
...
...
app/src/main/java/com/base/scanqr/ui/wifi/WifiCodeActivity.kt
View file @
d6a1ce42
...
...
@@ -130,11 +130,22 @@ class WifiCodeActivity : BaseActivity<ActivityWifiCodeBinding>(ActivityWifiCodeB
toast
(
"没有做"
)
}
binding
.
llDownload
.
setOnClickListener
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
)
{
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
useDownload
()
}
override
fun
failed
(
where
:
Int
)
{
useDownload
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useDownload
()
}
})
}
else
{
useDownload
()
}
}
binding
.
llCopy
.
setOnClickListener
{
...
...
@@ -142,9 +153,22 @@ class WifiCodeActivity : BaseActivity<ActivityWifiCodeBinding>(ActivityWifiCodeB
toast
(
"Copied to clipboard"
,
true
)
}
binding
.
flSearch
.
setOnClickListener
{
val
wifiIntent
=
intentWifiSettings
()
kotlin
.
runCatching
{
startActivity
(
wifiIntent
)
if
(
AdConfigBean
.
adsConfigBean
.
functionUseShowAd
){
AdsMgr
.
showInsert
(
this
,
true
,
object
:
AdsShowCallBack
(){
override
fun
close
(
where
:
Int
)
{
useSearch
()
}
override
fun
failed
(
where
:
Int
)
{
useSearch
()
}
override
fun
googleFailed
(
where
:
Int
)
{
useSearch
()
}
})
}
else
{
useSearch
()
}
}
}
...
...
@@ -156,4 +180,20 @@ class WifiCodeActivity : BaseActivity<ActivityWifiCodeBinding>(ActivityWifiCodeB
}
}
fun
useDownload
()
{
kotlin
.
runCatching
{
val
newName
=
File
(
tempImagePath
).
name
showInputNameDialog
(
newName
)
{
name
->
viewModel
.
copyFileToDownloads
(
this
,
name
,
tempImagePath
)
}
}
}
fun
useSearch
()
{
val
wifiIntent
=
intentWifiSettings
()
kotlin
.
runCatching
{
startActivity
(
wifiIntent
)
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment