App42CallBack return type void but i want to another return type like JSONObject!

0 votes

 

JSONObject jsonResponseSummonHeroInfo;

storageService.insertJSONDocument(MyCustomCode.dbName, "Hero", jsonInsertHero, new App42CallBack() {  

    public void onSuccess(Object response)   

    {  

       -----> I want to return type  JSONObject!!!!!

      

                jsonResponseSummonHeroInfo.put("HeroObjID", StrHeroDocID);

               return  jsonResponseSummonHeroInfo;

              but App42CallBack return type void!!  have any idea return  JSONObject inside  App42CallBack() ?

 

   

   

 

}

asked Feb 13, 2016 in Android by zetcrusader (13 points)
recategorized Mar 8, 2016 by shepAdmin

1 Answer

0 votes

Hi,

The response which you get in App42CallBack.OnSuccess method is object type which need to cast in Storage object. Please have a look at this link for the code snippet which helps you for the same and Let me know if you still face any issue. 

Also, please download the sample from here for your reference. 

Regards,

Himanshu Sharma

answered Feb 13, 2016 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
...