cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a DataVault in SUP 2.1.2

Krishneel
Participant
0 Kudos

Hi there

I'm trying to create a DataVault in SUP 2.1 ESD #2 with the following line of Java code:

DataVault vault = DataVault.createVault("testDataVault", "password", "salt");

I have installed the SybaseDataProvider.apk package on my Android device, however I continue to get the following exception:

"Context not initialized"

Does anyone know what I might be doing wrong?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

rohith_deraje
Advisor
Advisor
0 Kudos

Hi,

You can try

DataVault.init(getApplicationContext());

DataVault.createVault("testdatavault", "password", "salt");

DataVault vault = DataVault.getVault("testDataVault");

However if you are using SUP-ODP, you can  use the below

LiteDataVault.init(getApplicationContext());

LiteDataVault.createVault("vaultName", "pwd", "salt");

LiteDataVault ltv = LiteDataVault.getVault("vaultName");

regards

Rohith

Krishneel
Participant
0 Kudos

Thanks Rohith thats seemed to do the trick.

Do you know if there are any best practices around getting the SybaseDataProvider.apk file out to  individual devices? Can it be deployed via Afaria?

rohith_deraje
Advisor
Advisor
0 Kudos

Hi Krishneel,

You can do it in one of the below below ways.

1. Through afaria

2. Include the SybaseDataProvider.apk in your android project/app and have a custom code in your app to deploy this when you deploy your app.

3. Upgrade to 2.1.3. In this release it is part of the library and no need to use SybaseDataProvider.apk.

You can use the PrivateDataVault in 2.1.3 as below.

PrivateDataVault.init(getApplicationContext());

PrivateDataVault.createVault("testdatavault", "password", "salt");

PrivateDataVault vault = PrivateDataVault.getVault("testDataVault");

regards

Rohith

Krishneel
Participant
0 Kudos

Thanks Rohith

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes, i agree with Rohith Deraje.

If you need to use Data Vault or if the application mandates the SDK to store the credentials.

you need to have SybaseDataProvider.apk installed in you device before hand.

SybaseDataProvider.apk provides native API's in order to use DataVault.