hi there,
I have an app on iOS and currently beta testing on Android. I am using backendless for a series of common operations (creating users, data objects, updating such entities, etc.). I have also implemented certain mechanisms using permissions and ACL to ensure the app is secure.
On Android I’m having issues with granting permissions to specific users. In particular, I have a routine in which I upload an object (create) or update an object, such object is an HashMap as the mapping to class was not working for me. Right now I am looking at the update routine, so I first fetch the HashMap representing my object using BackendlessDataQuery, and Backendless.Persistence.of( “MyClassOnBackendless” ).find(dataQuery, new AsyncCallback<BackendlessCollection<Map>>() - once I updated the fields in this HashMap, I push it online again with Backendless.Persistence.of( “MyClassOnBackendless” ).save( summaryToStore, new AsyncCallback<Map>(), and everything works correctly, so obviously the HashMap includes all the information it needs to include.
However, when I call DataPermission.FIND.grantForUser(object_id_of_the_user, my_hash_map, grantForUserResponder); it doesnt work. In particular, I get “Object id is null 8011”, which doesnt make much sense as the object my_hash_map can be updated using the save function shown above, and I also checked that it contains an objectId and it does, so it is not null (same for object_id_of_the_user, which is a String of the correct objectId for the user to whom I want to grant permission).
Any ideas? The same exact logic in terms of sequence of operations, creating/updating objects and granting permissions works fine on iOS, where however there are no hashmaps, which I think might be the problem here.
The way I retrieve the HashMap is public void handleResponse( BackendlessCollection<Map> myHashMap ) and then I do List<Map> curr_page = (List<Map>) myHashMap.getCurrentPage() and finally I loop over it and get the object as HashMap my_hash_map = (HashMap) myHashMap.getCurrentPage().get(i);
Thank you for your help.
Marco