Skip to content

Commit

Permalink
Arete floc (#691)
Browse files Browse the repository at this point in the history
* Implement Firebase segmentation SDK device local cache

* [Firebase Segmentation] Add custom installation id cache layer and tests for it.

* Add test for updating cache

* Switch to use SQLiteOpenHelper

* Switch to use SharedPreferences from SQLite.

* Change the cache class to be singleton

* Wrap shared pref commit in a async task.

* Address comments

* Google format fix

* Replace some deprecated code.

* Package refactor

* nit

* nit

* Add the state machine of updating custom installation id in the local
cache and update to Firebase Segmentation backend. CL also contains unit
tests.
(The http client is not implemented yet.)

* minor format fix

* Address comments #1

* Http client in Firebase Segmentation SDK to call backend service.

* Revert unintentional change

* Fix connected device test

* Fix connected device test

* 1. Add a few annotations to make java code Kotlin friendly
2. Some fixes for the http request format

* Fix java format

* Fix API version

* Change the segmentation API implementation to synchronous and put the
entire synchronous code block in async task.

* Fix a async getResult race issue.

* OkHttpClient -> HttpsUrlConnection

* Use gzip for compressing content and fix ourput stream memory leak risk.

* Addressed a few comments

* FirebaseSegmentation SDK
1. Clean up http client response code.
2. When updateCustomInstallationId is called, on non-retryable server errors, the SDK should clean up the local cache. Instead, for retryable errors, SDK can keep the local cache for retrying update later.

* Restrict Firebase API key to Android app package name.

* Explicitly add internet permission
  • Loading branch information
diwu-arete authored Aug 6, 2019
1 parent 33665b2 commit f4ba63c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions firebase-segmentation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.firebase.segmentation">

<uses-permission android:name="android.permission.INTERNET" />
<application>
<service
android:name="com.google.firebase.components.ComponentDiscoveryService"
Expand Down

0 comments on commit f4ba63c

Please sign in to comment.