Skip to content

Commit

Permalink
Remove all Firebase libraries except for those required for messaging
Browse files Browse the repository at this point in the history
Add Firebase installation ID to "About" section of app
Update privacy policy
  • Loading branch information
michaelkourlas committed Jan 28, 2025
1 parent 8015f9c commit 270ba05
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 0.6.30 ###

* Remove all Firebase libraries except for those required for messaging
* Add Firebase installation ID to "About" section of app
* Update privacy policy

### 0.6.29 ###

* Update dependencies
Expand Down
88 changes: 77 additions & 11 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,77 @@
No data leaves your Android device through VoIP.ms SMS except in the following cases:
* Your VoIP.ms SMS credentials, DIDs, and messages are sent to or retrieved from
VoIP.ms.
* If you have push notifications enabled, VoIP.ms SMS uses Firebase Cloud
Messaging and a Cloudflare Worker maintained by me to forward VoIP.ms URL
callbacks to your device. This callback is configured to only contain your DID
and no other information, such as the text of your messages. This does not
apply to the F-Droid version of the app.
* VoIP.ms SMS collects some non-personally identifiable information through
Firebase services which is used for troubleshooting and to improve the app.
This does not apply to the F-Droid version of the app.
# Privacy Policy

This privacy policy is in reference to:

* the app "VoIP.ms SMS", hosted on the Google Play and F-Droid app stores; and
* the developer "Michael Kourlas".

The purpose of this policy is to comprehensively disclose how the app accesses,
collects, uses, and shares user data.

### Data collected to implement core app functionality

The app collects and uses:

* your VoIP.ms credentials;
* the DIDs in your VoIP.ms account;
* SMS/MMS messages sent or received using VoIP.ms; and
* metadata associated with each such SMS/MMS message, including the ID
assigned to each message by VoIP.ms, the date and time the message was sent,
and the source and destination phone numbers.

The app stores this data on your device using the standard mechanisms provided
by Android for storing app data. You can delete all data stored by the app on
your device at any time by simply deleting the app.

By using the app, you direct the app to share this data with
[VoIP.ms](https://voip.ms/), which accesses, collects, uses, and shares this
data in accordance with its
own [privacy policy](https://voip.ms/privacy-policy).

The collection, usage, storage, and sharing of this data as described in this
section is essential to implement the app's core functionality.

### Data collected to implement push notifications

This section only applies to the Google Play version of the app, not the
F-Droid version of the app.

If you enable push notifications, the app automatically configures your VoIP.ms
account to
ping [a web service hosted by Michael Kourlas](https://voipmssms-notify.kourlas.com)
(the "Push Notification Service") every time you receive an SMS/MMS message.

The Push Notification Service is implemented as a Cloudflare Worker with source
code [available here](https://github.com/michaelkourlas/voipms-sms-push-notifications).
The Push Notification Service also uses Firebase Cloud Messaging, a service
provided by Google.

The app registers all configured DIDs with Firebase Cloud Messaging. These DIDs
are associated with
an [installation ID](https://firebase.google.com/docs/projects/manage-installations)
that is unique to every installed instance of the app.

When you receive an SMS/MMS message, the Push Notification Service provides
your DID to Firebase Cloud Messaging, which uses it to forward the ping to your
device. This allows the app to request the new message from VoIP.ms and display
a notification for it.

The callback URL configured by the app only includes your DID and no other
information, such as the text of your SMS/MMS messages. The ping simply tells
the app to check for new messages.

The Push Notification Service does not itself store your DID for longer than
required to forward the DID to Firebase Cloud Messaging.

Firebase Cloud Messaging will maintain the registration of a DID and its
association with an installation ID indefinitely. To delete this registration
and the installation ID, collect the installation ID from the "About" section
of the app and contact Michael Kourlas for assistance.

The collection, usage, storage, and sharing of your DID as described in this
section is essential to implement the app's support for push notifications.

## Contact information

If you have any questions or concerns about this policy, please contact
Michael Kourlas at [email protected].
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ buildscript {

// fdroid-remove-start
classpath("com.google.gms:google-services:4.4.2")
classpath("com.google.firebase:firebase-crashlytics-gradle:3.0.2")
// fdroid-remove-end
}
}
Expand Down
4 changes: 4 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/151.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.6.30
• Remove all Firebase libraries except for those required for messaging
• Add Firebase installation ID to "About" section of app
• Update privacy policy
10 changes: 4 additions & 6 deletions voipms-sms/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ plugins {

// fdroid-remove-start
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
// fdroid-remove-end
}

Expand All @@ -19,8 +18,8 @@ android {
applicationId = "net.kourlas.voipms_sms"
minSdk = 21
targetSdk = 35
versionCode = 150
versionName = "0.6.29"
versionCode = 151
versionName = "0.6.30"

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
Expand Down Expand Up @@ -127,10 +126,9 @@ dependencies {

// fdroid-remove-start

// Firebase libraries
// Google and Firebase libraries
"primaryImplementation"("com.google.android.gms:play-services-base:18.5.0")
"primaryImplementation"(platform("com.google.firebase:firebase-bom:33.8.0"))
"primaryImplementation"("com.google.firebase:firebase-analytics-ktx")
"primaryImplementation"("com.google.firebase:firebase-crashlytics-ktx")
"primaryImplementation"("com.google.firebase:firebase-messaging-ktx")

// fdroid-remove-end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ package net.kourlas.voipms_sms.utils
import android.content.Context
import androidx.fragment.app.FragmentActivity

/**
* Stub for F-Droid builds.
*/
fun getInstallationId() {
return "Not supported"
}

/**
* Stub for F-Droid builds.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
package net.kourlas.voipms_sms.preferences.fragments

import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import androidx.preference.PreferenceFragmentCompat
import kotlinx.coroutines.launch
import net.kourlas.voipms_sms.R
import net.kourlas.voipms_sms.utils.getInstallationId
import net.kourlas.voipms_sms.utils.preferences

class AboutPreferencesFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(
Expand All @@ -29,4 +33,17 @@ class AboutPreferencesFragment : PreferenceFragmentCompat() {
// Add preferences
addPreferencesFromResource(R.xml.preferences_about)
}
override fun onResume() {
super.onResume()

lifecycleScope.launch {
val firebaseInstallationId = getInstallationId()

for (preference in preferenceScreen.preferences) {
if (preference.key == getString(R.string.preferences_about_firebase_installation_id_key)) {
preference.summary = firebaseInstallationId
}
}
}
}
}
6 changes: 4 additions & 2 deletions voipms-sms/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
<string name="preferences_about_privacy_title">Privacy</string>
<string name="preferences_about_third_party_embedded_title">Third-party notices (embedded code)</string>
<string name="preferences_about_third_party_packages_title">Third-party notices (packages)</string>
<string name="preferences_about_firebase_installation_id_title">Firebase installation ID</string>
<string name="preferences_about_firebase_installation_id_key" translatable="false">installation_id</string>

<!-- Markdown -->
<string name="preferences_markdown_extra">net.kourlas.voipms_sms.MARKDOWN_DOCUMENT_TYPE</string>
Expand Down Expand Up @@ -400,7 +402,7 @@

<!-- MISCELLANEOUS -->
<string name="app_name">VoIP.ms SMS</string>
<string name="copyright">Copyright © 2015–2024 Michael Kourlas</string>
<string name="version">Version 0.6.29</string>
<string name="copyright">Copyright © 2015–2025 Michael Kourlas</string>
<string name="version">Version 0.6.30</string>
<string name="toast_error">Error: %1$s</string>
</resources>
3 changes: 3 additions & 0 deletions voipms-sms/src/main/res/xml/preferences_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@
android:value="PACKAGE_LICENSES" />
</intent>
</androidx.preference.Preference>
<androidx.preference.Preference
android:key="@string/preferences_about_firebase_installation_id_key"
android:title="@string/preferences_about_firebase_installation_id_title" />
</androidx.preference.PreferenceScreen>
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@
package net.kourlas.voipms_sms.utils

import android.util.Log
import com.google.firebase.crashlytics.FirebaseCrashlytics

/**
* Log the specified exception.
*/
fun logException(e: Exception) {
// Log the exception locally
Log.e("logException", "exception", e)

// Log the exception remotely as well using Crashlytics
FirebaseCrashlytics.getInstance().recordException(e)
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import android.content.Context
import androidx.fragment.app.FragmentActivity
import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.GoogleApiAvailability
import com.google.firebase.installations.FirebaseInstallations
import com.google.firebase.messaging.FirebaseMessaging
import kotlinx.coroutines.tasks.await
import net.kourlas.voipms_sms.BuildConfig
import net.kourlas.voipms_sms.R
import net.kourlas.voipms_sms.notifications.Notifications
Expand All @@ -30,6 +32,13 @@ import net.kourlas.voipms_sms.preferences.didsConfigured
import net.kourlas.voipms_sms.preferences.getDids
import net.kourlas.voipms_sms.preferences.setSetupCompletedForVersion

/**
* Retrieves the Firebase installation ID.
*/
suspend fun getInstallationId(): String {
return FirebaseInstallations.getInstance().id.await()
}

/**
* Subscribes to FCM topics corresponding to the currently configured DIDs.
*/
Expand Down

0 comments on commit 270ba05

Please sign in to comment.