Google Play/Mobile Services

Hello,

I’m the developer of SMS Backup+ (already in F-Droid, package). What’s the deal with Google Play/Mobile Services? I’m in the process of adding a dependency to firebase-jobdispatcher to perform more reliable scheduling of background jobs. The job dispatcher library is open source, but Google Play Services obviously not.

So if the device does not run Google Play Services the job dispatcher won’t be used (the app will still work though).

But it looks like even the code to check if Google Play Services are installed is proprietary (com.google.android.gms:play-services-base, API docs), I can’t find the source code.

Am I right in thinking that including the base dependency would then prevent the inclusion in F-Droid?

Jan

Did you think about using reflection+check for that? to dodge the mentioned
API.

Hi,

firebase-jobdispatcher and all the com.google.android.gms:* stuff is non-free. F-Droid can’t build apps that include those libraries.

Do you use AlarmManager now?

firebase-jobdispatcher and all the com.google.android.gms:* stuff is non-free. F-Droid can’t build apps that include those libraries.

firebase-jobdispatcher itself is licensed under APL 2.0 (link) so should be OK. It’s basically an open source interface to proprietary code installed on the device.

My question was mostly around the base-dependency which includes the availability check. I decompiled the class in question (thereby probably already violating the SDK license :slight_smile: ) and it does something like

PackageManager.getPackageInfo("com.google.android.gms")

It should be possible to reproduce this without pulling in the non-free dependency.

Do you use AlarmManager now?

Yes. The plan is to keep the alarm manager code as a fallback for devices which don’t have Google Play Services.

firebase-jobdispatcher itself is licensed under APL 2.0 (link) so should be OK.

Apache 2.0 allows linking against non-free code, so one needs to dig deeper.

It’s basically an open source interface to proprietary code installed on the device.

The key question is whether this library can be built without non-free software or not. I’ve looked through the code and it appears that firebase-jobdispatcher only uses IPC to communicate with non-free stuff. Thus, I was wrong, it’s free software.

My question was mostly around the base-dependency which includes the availability check.

com.google.android.gms:play-services-base is proprietary, no surprise you couldn’t find the source code. :slight_smile: And yes, adding it as a dependency will exclude new versions of an app from F-Droid.

Alright, thanks for checking. I’ll see if I can work around the non-free dependencies.

There is another API that might work: https://gitlab.com/fdroid/fdroidclient/merge_requests/416#note_44719829

1 Like

You mean the Evernote one? Unfortunately it’s API level 14+.

Bumping this thread, since I’m getting closer to releasing a new version. I avoided the play-services-base dependency but still have a dependency to firebase-jobdispatcher (which is not used when running on devices without Google Play Services). As discussed above, firebase-jobdispatcher is APL-2.0.

I’ve just tried to build this version locally with fdroid build and got:

BUILD SUCCESSFUL in 10s
1 actionable task: 1 executed
INFO: Scanning source for common problems...
ERROR: Found usual supect 'firebase' at line 59 at app/build.gradle
INFO: Removing gradle-wrapper.jar at gradle/wrapper/gradle-wrapper.jar
ERROR: Could not build app com.zegoggles.smssync: Can't build due to 1 error while scanning
INFO: Finished
INFO: 1 build failed

what gives?

Seems like the firebase checks haven’t been updated since some of them have been open sourced. You can add a scanignore= line or run with fdroid build --skip-scan. If you can point to documentation of the licenses of those things, then please file an issue so we can fix that.

alright, thanks. I’ll go through the dependencies, there are likely some which are still non-free. maybe these checks could be done in a more maintainable way (fetch license information via pom metadata or similar).