Skip to content

Commit 0854a69

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # GeoTagImage/src/androidTest/java/com/dangiashish/geotagimage/ExampleInstrumentedTest.kt # GeoTagImage/src/main/java/com/dangiashish/GeoTagImage.kt # GeoTagImage/src/main/res/layout/camera_layout.xml # app/src/androidTest/java/com/dangiashish/geotagimage/demo/ExampleInstrumentedTest.kt # app/src/main/java/com/dangiashish/geotagimage/demo/MainActivity.kt # app/src/test/java/com/dangiashish/geotagimage/demo/ExampleUnitTest.kt
2 parents 5c1107b + cf7934b commit 0854a69

18 files changed

Lines changed: 1038 additions & 88 deletions

File tree

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GeoTagImage/build.gradle

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
plugins {
22
id 'com.android.library'
33
id 'org.jetbrains.kotlin.android'
4+
id 'maven-publish'
45
}
56

67
android {
7-
namespace 'com.codebyashish.geotagimage'
8+
namespace 'com.dangiashish.geotagimage'
89
compileSdk = 36
910

1011
defaultConfig {
11-
minSdkVersion 23
12+
minSdk = 23
1213
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1314
consumerProguardFiles "consumer-rules.pro"
1415
}
1516

1617
buildTypes {
1718
release {
1819
minifyEnabled false
19-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
20+
proguardFiles getDefaultProguardFile(
21+
'proguard-android-optimize.txt'
22+
), 'proguard-rules.pro'
2023
}
2124
}
2225

@@ -41,27 +44,25 @@ android {
4144
}
4245
}
4346

44-
45-
4647
dependencies {
4748
implementation 'androidx.appcompat:appcompat:1.7.1'
4849
implementation 'com.google.android.material:material:1.13.0'
4950
implementation 'com.google.android.gms:play-services-location:21.3.0'
5051
implementation 'androidx.core:core-ktx:1.17.0'
51-
implementation 'androidx.exifinterface:exifinterface:1.4.1'
52+
implementation 'androidx.exifinterface:exifinterface:1.4.2'
5253

53-
testImplementation 'junit:junit:4.13.2'
54-
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
55-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
54+
def camerax_version = "1.5.2"
55+
implementation "androidx.camera:camera-core:$camerax_version"
56+
implementation "androidx.camera:camera-camera2:$camerax_version"
57+
implementation "androidx.camera:camera-lifecycle:$camerax_version"
58+
implementation "androidx.camera:camera-video:$camerax_version"
59+
implementation "androidx.camera:camera-view:$camerax_version"
60+
implementation "androidx.camera:camera-extensions:$camerax_version"
5661

57-
def camerax_version = "1.5.1"
58-
implementation "androidx.camera:camera-core:${camerax_version}"
59-
implementation "androidx.camera:camera-camera2:${camerax_version}"
60-
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
61-
implementation "androidx.camera:camera-video:${camerax_version}"
62-
implementation "androidx.camera:camera-view:${camerax_version}"
63-
implementation "androidx.camera:camera-extensions:${camerax_version}"
62+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0'
63+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0'
6464

65-
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.9.4'
66-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4'
65+
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
66+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
67+
implementation "org.jetbrains.kotlin:kotlin-test:2.3.0"
6768
}

GeoTagImage/src/androidTest/java/com/codebyashish/geotagimage/ExampleInstrumentedTest.kt renamed to GeoTagImage/src/androidTest/java/com/dangiashish/geotagimage/ExampleInstrumentedTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
package com.codebyashish.geotagimage
24+
package com.dangiashish.geotagimage
2525

2626
import androidx.test.ext.junit.runners.AndroidJUnit4
2727
import androidx.test.platform.app.InstrumentationRegistry
@@ -40,6 +40,6 @@ class ExampleInstrumentedTest {
4040
fun useAppContext() {
4141
// Context of the app under test.
4242
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
43-
Assert.assertEquals("com.codebyashish.geotagimage.test", appContext.packageName)
43+
Assert.assertEquals("com.dangiashish.geotagimage.test", appContext.packageName)
4444
}
4545
}

GeoTagImage/src/main/java/com/dangiashish/GeoTagImage.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ class GeoTagImage(
263263
// UI zoom 1x to 10x
264264
val uiZoom = 1f + (progress / 10f)
265265

266-
val cameraZoom = minZoom + ((uiZoom - 1f) / 9f) * (maxZoom - minZoom)
266+
zoomSeekBar.max = 100
267+
zoomSeekBar.progress = 0
267268

268269
camera?.cameraControl?.setZoomRatio(cameraZoom)
269270
currentZoomRatio = cameraZoom
@@ -634,6 +635,7 @@ class GeoTagImage(
634635
val bitmap = loadImageFromUrl(imageUrl)
635636
if (bitmap != null) {
636637
mapBitmap = bitmap
638+
processCapturedImage()
637639
}
638640
} catch (e: Exception) {
639641
e.printStackTrace()

GeoTagImage/src/test/java/com/codebyashish/geotagimage/ExampleUnitTest.kt

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Key Features :
3535
- Control the features of GTI.
3636
- Set text size.
3737
- Image File GeoTagging
38+
- Camera Aspect Ratio Customization
39+
- Camera Flash Customization
40+
- Camera Zoom Customization
3841
```
3942

4043
### Gradle
@@ -94,7 +97,7 @@ Add dependency in your `build.gradle` (module-level) file :
9497
```groovy
9598
dependencies{
9699
97-
implementation 'com.github.dangiashish:GeoTagImage:1.2.1'
100+
implementation 'com.github.dangiashish:GeoTagImage:1.2.2'
98101
}
99102
```
100103
#### OR
@@ -103,7 +106,7 @@ Add dependency in your `build.gradle.kts` (module-level) file :
103106
```groovy
104107
dependencies{
105108
106-
implementation("com.github.dangiashish:GeoTagImage:1.2.1")
109+
implementation("com.github.dangiashish:GeoTagImage:1.2.2")
107110
}
108111
```
109112

@@ -217,6 +220,7 @@ geoTagImage.showAppName(true)
217220
geoTagImage.setImageQuality(ImageQuality.LOW) // Deprecated
218221
geoTagImage.setImageExtension(PNG)
219222
geoTagImage.setLabel("Clicked By") // Upload By || Author || Captured By
223+
geoTagImage.setCameraAspectRatio(GeoTagImage.Ratio_4X3)
220224

221225
```
222226

app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
plugins {
22
id 'com.android.application'
33
id 'org.jetbrains.kotlin.android'
4+
id 'maven-publish'
45
}
56

67
android {
7-
namespace 'com.codebyashish.geotagimage.demo'
8+
namespace 'com.dangiashish.geotagimage.demo'
89
compileSdk = 36
910

1011
defaultConfig {
1112
applicationId "com.codebyashish.geotagimage.demo"
1213
minSdk 23
1314
targetSdk 36
14-
versionCode 120
15-
versionName "1.2.0"
15+
versionCode 1
16+
versionName "1"
1617

1718
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1819
}
@@ -42,7 +43,7 @@ dependencies {
4243
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
4344
implementation project(path: ':GeoTagImage')
4445
implementation 'androidx.core:core-ktx:1.17.0'
45-
implementation 'androidx.activity:activity-ktx:1.11.0'
46+
implementation 'androidx.activity:activity-ktx:1.12.2'
4647
testImplementation 'junit:junit:4.13.2'
4748
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
4849
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'

app/src/androidTest/java/com/codebyashish/geotagimage/demo/ExampleInstrumentedTest.kt renamed to app/src/androidTest/java/com/dangiashish/geotagimage/demo/ExampleInstrumentedTest.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24+
package com.codebyashish.geotagimage
2425

25-
package com.codebyashish.geotagimage.demo
26-
27-
import androidx.test.ext.junit.runners.AndroidJUnit4
28-
import androidx.test.platform.app.InstrumentationRegistry
29-
import org.junit.Assert
30-
import org.junit.Test
31-
import org.junit.runner.RunWith
26+
@Deprecated("geotagimage/PermissionCallback is deprecated")
27+
interface PermissionCallback {
28+
fun onPermissionGranted()
29+
fun onPermissionDenied()
30+
}
3231

3332
/**
3433
* Instrumented test, which will execute on an Android device.

app/src/main/java/com/codebyashish/geotagimage/demo/BlankFragment.kt renamed to app/src/main/java/com/dangiashish/geotagimage/demo/BlankFragment.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.codebyashish.geotagimage.demo
1+
package com.dangiashish.geotagimage.demo
22
/*
33
* MIT License
44
*
@@ -41,7 +41,7 @@ import androidx.activity.result.contract.ActivityResultContracts
4141
import androidx.appcompat.app.AppCompatActivity
4242
import androidx.core.content.FileProvider
4343
import androidx.fragment.app.FragmentActivity
44-
import com.codebyashish.geotagimage.demo.databinding.FragmentBlankBinding
44+
import com.dangiashish.geotagimage.demo.databinding.FragmentBlankBinding
4545
import com.dangiashish.PermissionCallback
4646
import com.dangiashish.GeoTagImage
4747
import java.io.File
@@ -93,7 +93,10 @@ class BlankFragment : Fragment(), PermissionCallback {
9393
// initialize the GeoTagImage class object with context and callback
9494
geoTagImage = GeoTagImage(mContext as AppCompatActivity, permissionLauncher, cameraLauncher)
9595
geoTagImage.requestCameraAndLocationPermissions()
96-
geoTagImage.enableCameraX(false)
96+
97+
98+
99+
97100

98101
binding.ivCamera.setOnClickListener {
99102
geoTagImage.launchCamera(

0 commit comments

Comments
 (0)