Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue :sad: Initializing the Usage library in 3.0 SP07 (and in the upcoming SP08 release) by passing in an encryption key to the constructor fails on some Android devices because the SQLCipher fails to connect to the encrypted database, and returns an exception to the application similar to:

E/Database(18356): CREATE TABLE android_metadata failed

E/Database(18356): Failed to setLocale() when constructing, closing the database

E/Database(18356): net.sqlcipher.database.SQLiteException: file is encrypted or is not a database 

...

E/AndroidRuntime(18356): FATAL EXCEPTION: pool-1-thread-2

E/AndroidRuntime(18356): net.sqlcipher.database.SQLiteException: file is encrypted or is not a database

Workaround :smile: Until the SQLCipher is stabilized in an upcoming patch/release, use the constructor without the encryption key parameter. The database is used only for temporary data collection, and the content is removed from the local database once data is successfully uploaded.

Example: Initialize the Usage library without encryption:

Usage(Context context, URL url, HttpConversationManager conversationManager);

Instead of:

Usage(Context context, URL url, HttpConversationManager conversationManager, String dataEncryptionKey);

1 Comment