Bug #4304
closedAndroidSqlite3Pib should be used when create jndn-Android jar file
0%
Description
On Android platform, PibSqlite3 should be replaced with AndroidSqlite3Pib.
For example, here (https://github.com/named-data/jndn/blob/master/src/net/named_data/jndn/security/KeyChain.java#L2028-L2032) and here (https://github.com/named-data/jndn/blob/master/src/net/named_data/jndn/security/KeyChain.java#L225)
Updated by Anonymous about 7 years ago
These are for the SQLite file in the default ~/.ndn folder which doesn't exist on Android. It is necessary to supply the file location to the AndroidSqlite3Pib constructor. Can you use the KeyChain constructor which takes a AndroidSqlite3Pib instance?
https://github.com/named-data/jndn/blob/master/src/net/named_data/jndn/security/KeyChain.java#L166
Updated by Haitao Zhang about 7 years ago
Sure, thank you for the explanation.
By the way, if it is possible, could you please add note in comment for each method to illustrate whether a method should or should not be used on Android platform? It's hard to pick the right one given that there are so many constructors.
Updated by Anonymous over 6 years ago
The default KeyChain constructor says "To create a security v2 KeyChain on android, you must use the KeyChain constructor to provide AndroidSqlite3Pib and TpmBackEndFile objects which are initialized with the explicit directory for the Android filesDir."