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

smartStorage Demo Application #12

Merged
merged 21 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1606bc7
PR Template Added.
amitsid1408 Apr 11, 2024
0ea75fd
Added Store function for Android OS Version 10-14.
harshilpadsala88 Apr 11, 2024
249717f
Minor Change
harshilpadsala88 Apr 11, 2024
81ddb94
Added Permissions, and Storage Access Framework Support
harshilpadsala88 Apr 15, 2024
ca7d461
Merge remote-tracking branch 'origin/development' into development
harshilpadsala88 Apr 19, 2024
0d93fcf
PermissionManager class added
DhruviChotai Apr 23, 2024
89d6ea5
redundant code removed in PermissionManager class
DhruviChotai Apr 23, 2024
a8458b8
PermissionManager class added
DhruviChotai Apr 23, 2024
fd0231a
redundant code removed in PermissionManager class
DhruviChotai Apr 23, 2024
a8affee
Merge remote-tracking branch 'origin/refactor/permission-manager' int…
harshilpadsala88 Apr 25, 2024
d4fc926
Suggested-Changes-In-The-PR-done
harshilpadsala88 Apr 29, 2024
bff0ffa
Solar-Lint-Checks-Passed
harshilpadsala88 Apr 29, 2024
c01d333
Gitignore updated and removed sonarlint folder from idea folder.
harshilpadsala88 Apr 29, 2024
067d0a1
Gitignore updated and removed .idea
harshilpadsala88 Apr 29, 2024
5638116
Removed unused things from gitignore
harshilpadsala88 Apr 29, 2024
bc06e3b
Changed git ignote
DhruviChotai May 9, 2024
ba37fe2
Added sample app to check the app features.
DhruviChotai May 10, 2024
69ce1b5
Sonarlint issue resolved
DhruviChotai May 10, 2024
36a79bb
Sonarlint issue resolved
DhruviChotai May 10, 2024
75c3968
Companion object replaced with object properties with value
DhruviChotai May 10, 2024
4aa082a
Removed unnecessary dependencies from library gradle file.
amitsid1408 May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
git *.iml
.gradle
.idea
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/sonarlint
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
Expand Down
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

20 changes: 0 additions & 20 deletions .idea/gradle.xml

This file was deleted.

41 changes: 0 additions & 41 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/migrations.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/misc.xml

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.CAMERA"/>

<application
Expand All @@ -24,7 +26,6 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.SmartStorage">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
20 changes: 10 additions & 10 deletions app/src/main/java/com/ss/smartstorage/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ss.smartstorage

import android.annotation.SuppressLint
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
Expand All @@ -8,12 +9,11 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import com.ss.smart_storage.SmartStorage
import com.ss.smart_storage.util.SmartDirectory
import com.ss.smart_storage.util.SmartFileType
import com.ss.smartstorage.ui.theme.SmartStorageTheme

class MainActivity : ComponentActivity() {

@SuppressLint("NewApi")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand All @@ -27,14 +27,14 @@ class MainActivity : ComponentActivity() {
color = MaterialTheme.colorScheme.background
) {
SmartStorageSample(
onStoreTap = {
smartStorage.store(
location = SmartDirectory.CUSTOM,
fileName = "interstellar",
fileType = SmartFileType.txt,
fileData = "Directed by Christopher Nolan".toByteArray()
)
},
onStoreTap = { fileName, fileType, location ->
smartStorage.store(
location = location,
fileType = fileType,
fileName = fileName,
fileData = "This is a sample txt file.".toByteArray()
)
}
)
}
}
Expand Down
Loading
Loading