Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 0 additions & 45 deletions README.md

This file was deleted.

25 changes: 22 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'com.google.gms.google-services'
id 'androidx.navigation.safeargs'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
id 'com.google.protobuf'
}

// (Optional) load local secrets file:
Expand Down Expand Up @@ -32,6 +33,9 @@ android {
"\"${localProperties['OPENPOSITIONING_API_KEY'] ?: ''}\""
buildConfigField "String", "OPENPOSITIONING_MASTER_KEY",
"\"${localProperties['OPENPOSITIONING_MASTER_KEY'] ?: ''}\""

//I ADD
resValue "string", "google_maps_key", localProperties.getProperty("MAPS_API_KEY", "")
}

buildFeatures {
Expand All @@ -57,6 +61,19 @@ android {
}
}

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.21.12'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java { }
}
}
}
}

dependencies {
// Core AndroidX
implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // or stable: 1.6.1
Expand All @@ -73,11 +90,12 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
implementation 'com.google.android.material:material:1.12.0'

implementation 'com.google.protobuf:protobuf-java:3.0.0'
implementation 'com.google.protobuf:protobuf-java:3.21.12'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation "com.google.protobuf:protobuf-java-util:3.0.0"
implementation "com.google.protobuf:protobuf-java-util:3.21.12"
implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava"
implementation 'com.google.android.gms:play-services-maps:19.0.0'
implementation 'org.ejml:ejml-simple:0.43.1'

// Navigation components
def nav_version = "2.8.6"
Expand All @@ -92,4 +110,5 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
implementation 'com.google.android.gms:play-services-location:21.0.1'
}
131 changes: 61 additions & 70 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
If you truly require these sensors, keep `required="true"`. Otherwise,
consider marking them as `required="false"`.
-->
<uses-feature android:name="android.hardware.sensor.stepdetector" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>

<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.accelerometer"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.gyroscope"
android:required="true" />
<!--
2. Permissions.
a) For Android 10 and above, if your app needs to do background location,
Expand All @@ -20,83 +25,69 @@
app-specific directory, you must set `requestLegacyExternalStorage="true"`.
(See the <application> tag below.)
-->

<!-- Wake lock -->
<uses-permission android:name="android.permission.WAKE_LOCK" />

<!-- Physical activity / Step detection (Android 10+ requires runtime permission) -->
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION"/>

<!-- Wi-Fi and network state (note that setWifiEnabled() no longer works on Android 10+ if you target 29+) -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<!-- Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<!-- Internet -->
<uses-permission android:name="android.permission.INTERNET"/>

<!-- Storage - Deprecated in Android 10+ (use scoped storage instead)
<uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- Physical activity / Step detection (Android 10+ requires runtime permission) -->
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" /> <!-- Wi-Fi and network state (note that setWifiEnabled() no longer works on Android 10+ if you target 29+) -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- Internet -->
<uses-permission android:name="android.permission.INTERNET" />
<!--
Storage - Deprecated in Android 10+ (use scoped storage instead)
If you plan to adopt scoped storage fully and store only within your app-specific directories
(or MediaStore for shared media), consider removing READ/WRITE_EXTERNAL_STORAGE eventually.
If you still need broad file access (for example, to migrate existing user data), keep them
short-term but note that starting with Android 11 (API 30), they don’t allow the same broad file access.
-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!-- Required if your app needs to access images or photos that other apps created. -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<!-- Required if your app needs to access videos that other apps created. -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

<!-- Required if your app needs to access audio files that other apps created. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- Required if your app needs to access images or photos that other apps created. -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <!-- Required if your app needs to access videos that other apps created. -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> <!-- Required if your app needs to access audio files that other apps created. -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />


<!--
3. requestLegacyExternalStorage:
- Required on Android 10 if you need to maintain legacy external storage behavior.
- This flag is ignored on Android 11 (API 30) and higher for new app installs,
but it does help in migration scenarios (e.g. for existing user upgrades).
-->

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher_icon_map"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_icon_map_round"
android:supportsRtl="true"
android:theme="@style/Theme.Material3.DayNight.NoActionBar"
android:requestLegacyExternalStorage="true"
>

<activity
android:name=".presentation.activity.ReplayActivity"
android:exported="false" />
<activity
android:name=".presentation.activity.RecordingActivity"
android:exported="false" />

<!-- Google Maps API key metadata -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key"/>

<activity
android:name="com.openpositioning.PositionMe.presentation.activity.MainActivity"
android:exported="true"
android:configChanges="orientation"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
android:theme="@style/Theme.Material3.DayNight.NoActionBar">

<!--
TODO: Before you run your application, you need a Google Maps API key.

To get one, follow the directions here:

https://developers.google.com/maps/documentation/android-sdk/get-api-key

Once you have your API key (it starts with "AIza"), define a new property in your
project's local.properties file (e.g. MAPS_API_KEY=Aiza...), and replace the
"YOUR_API_KEY" string in this file with "${MAPS_API_KEY}".
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />

<activity
android:name=".presentation.activity.ReplayActivity"
android:exported="false" />
<activity
android:name=".presentation.activity.RecordingActivity"
android:exported="false" />
<activity
android:name=".presentation.activity.MainActivity"
android:configChanges="orientation"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Loading