Skip to content
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

Merged
merged 4 commits into from
Dec 18, 2019
Merged

feat: app specific directory storage #559

merged 4 commits into from
Dec 18, 2019

Conversation

refactor-droidyy
Copy link
Member

Fixes #544 Shift to App-Specific Directory for storing Badge and Clipart's

@auto-label auto-label bot added the feature label Dec 15, 2019
@refactor-droidyy
Copy link
Member Author

@adityastic please review.

Copy link
Collaborator

@adityastic adityastic left a 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().

@refactor-droidyy
Copy link
Member Author

@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()
Copy link
Collaborator

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

@refactor-droidyy
Copy link
Member Author

refactor-droidyy commented Dec 17, 2019

@adityastic changed the Environment.getExternalStorageDirectory to app-specific directory code :)
but unable to build successfully, due to this error in EditbadgeActivity.

new onrw

@adityastic
Copy link
Collaborator

@refactor-droidyy yes, you need to pass the object in the async task

@refactor-droidyy
Copy link
Member Author

@adityastic everything is working fine now.

@adityastic adityastic changed the title feat: App Specific Directory feat: app specific directory storage Dec 18, 2019
Copy link
Collaborator

@adityastic adityastic left a 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 adityastic merged commit 054de08 into fossasia:development Dec 18, 2019
@refactor-droidyy
Copy link
Member Author

@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. :)

@refactor-droidyy refactor-droidyy deleted the appspecific branch December 18, 2019 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shift to App Specific Directory for storing Badge and Clipart's
3 participants