Difference between 'new ServiceAPI' and 'App42API.Initialize'

0 votes
In sample source code and documentation for Unity, I have seen two ways to initialize App42:

ServiceAPI service= new ServiceAPI(ApiKey,SecretKey);

or

App42API.Initialize(ApiKey, SecretKey);

What's the difference between the two ? Is App42API only a wrapper class with convenience static methods?
asked Oct 1, 2015 in App42 Cloud API-BaaS by dujardin (10 points)

1 Answer

0 votes

Hello.

 

To answer you query, there is only difference between App42API.initialize() & ServiceAPI() is static & non-static function. using App42API, you don't need to initialize your app keys in every frame or every activity class. So you can use App42API.initialize function, if you want to initialize your keys globally. 

 

Let me know if it helps.  

Regards,

Himanshu Sharma

answered Oct 3, 2015 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...