-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: app specific directory storage #559
feat: app specific directory storage #559
Conversation
@adityastic please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to use context.getExternalFilesDir().
@adityastic changed one. |
@@ -19,12 +19,12 @@ import org.fossasia.badgemagic.data.fragments.CONF_SPEED | |||
import org.fossasia.badgemagic.data.fragments.ConfigInfo | |||
import org.json.JSONObject | |||
|
|||
object StorageUtils { | |||
class StorageUtils(val context: Context) { | |||
private val EXTERNAL_STORAGE_DIRECTORY = "${Environment.getExternalStorageDirectory() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to change Environment.getExternalStorageDirectory to app specific directory code now
@adityastic changed the Environment.getExternalStorageDirectory to app-specific directory code :) |
@refactor-droidyy yes, you need to pass the object in the async task |
@adityastic everything is working fine now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job mate, hope you learned a lot from this Pull Request 🔥 👍 . Keep up the good work :)
@adityastic once again thank you very much I didn't know much about injecting dependency managing singletons and its vast use. But now with this PR and your guidance I really learned a lot. :) |
Fixes #544 Shift to App-Specific Directory for storing Badge and Clipart's