add package name dynamically in provider
This commit is contained in:
@@ -156,9 +156,10 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
||||
val file = File(getExternalFilesDir("Updates"), "update.apk")
|
||||
file.setReadable(true, false) // Ensure the file is readable
|
||||
|
||||
val pInfo = baseContext.packageManager.getPackageInfo(baseContext.packageName, 0)
|
||||
val uri: Uri = FileProvider.getUriForFile(
|
||||
this,
|
||||
"com.example.hpostesting.fileprovider",
|
||||
"${pInfo}.fileprovider",
|
||||
file
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user