firebase / firebase/firebase-android-sdk
Adding API to enable Firebase to use managed network
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 34
Description
## What feature would you like to see?
We want to be able to specify the NetworkCapabilities of the network that will be used by Firebase Android Sdk (in our case Storage, but other will come) in order to access to OEM managed network
Today, there is no way to use Firebase Storage in Automotive for OEM, means the network that is tagged with capabilities OEM_PAID/OEM_PRIVATE) that is different from default INTERNET.
Android 12 Branch [NetworkCapabilities.java]
(https://cs.android.com/android/platform/superproject/+/android-12.1.0_r27:/packages/modules/Connectivity/core/java/android/net/NetworkCapabilities.java)
Android Master Branch [NetworkCapabilities.java]
https://cs.android.com/android/platform/superproject/+/master:/packages/modules/Connectivity/framework-t/src/android/net/NetworkIdentity.java;bpv=1;bpt=1
About the API, I do not know the best way, but the topic is to access to the object NetworkRequest
- either by getting a callback in the network setup thank to the connectivity manager
- or having a way to provide a http client to be able to overload the capabilities of the NetworkProcess. (exemple with OkHttp: https://gist.github.com/justasm/cc9e252ed581b5a17623e0bc3b6f7e7c)
## How would you use it?
- A concrete is exemple is for using OEM_PAID / OEM_PRIVATE network capabilities with in AAOS (thanks to the RESTRICTED_NETWORK permission)
Today, there is almost no proper and clean way to use Firebase Storage in OEM apps and use the network data that are paid by the OEM.
- But we could also think about other use cases like just using Firebase Storage on Wifi....or with UNMETERED network.
PS: buganizer has been fulfilled for this purpose : https://partnerissuetracker.corp.google.com/issues/289915187
Contributor guide
Research direction
Start with the cited Android 12 NetworkCapabilities.java and the master-branch NetworkIdentity.java, then review the NetworkRequest and ConnectivityManager options described in the issue. Inspect Firebase Storage's networking entry points and the linked OkHttp example. Done means an agreed API supports selected capabilities such as OEM_PAID/OEM_PRIVATE, with behavior and tests defined for those requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, mobile, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100