General

1. How to delete app and create again with same name?

Once your app is created it cannot be deleted however you can enable or disable your app from AppHQ console under AppManager -> Apps option.

2. I am getting Unauthorized Exception in my client code. What is wrong with it?

Unauthorized Exception comes due to two main reasons. One, your API Key/Secret Key is wrong or time settings of your device is not correct.

3. Why do I need to set correct time settings on my device to run my app?

This is required to have replay attack protection on your app, however if you don’t have much security concern regarding your app data, you can disable it from AppHQ console under AppManager -> Settings option.

4. Do I need to register app user with App42 to access other APIs like Scoreboard, Reward, File Storage, Push etc.?

No, you can use all App42 service APIs in isolation and they are not dependent on each other. In all APIs username is unique identifier for fetching your data and not dependent on App42 User Service. If you are planning to have full user management in your app which includes registration, login, search, update, password policy etc., it is beneficial to use App42 User Service.

5. How my app data is secured in App42?

Data generated by an app is sandboxed and cannot be accessed by other apps. App42 uses HTTPS protocol to securely transmit data from client to App42 cloud.

6. My Api Key and Secret Key can be seen by anyone as it resides on client side and any potential programmer can access it. How to deal with this scenario?

It is advisable to use ACL enabled apps and use custom keys for restricted access only. Please see Securing Your App for more details.

7. What is the difference between Mobile Cloud API App, Web Cloud API App and Multiplayer Warp Cloud App?

App type information does not have any significance while using it. It is just a meta information for apps and being used to organize your app while you are managing it on AppHQ console.

8. What is difference b/w ACL and Non ACL app?

ACL app are more secure in the way that one app user (For Example A) cannot access data of another user (For Example B) until user A gives permission to access it. In Non-ACL app any user can access data of another user. Please see Securing Your App for more details.

9. What is default Permission meant for while creating ACL enabled app?

Default permission is used to give default access to PUBLIC (all users of app) at the time of data creation for a given user. For example if user A has created a JSON object, and default permission is set to PULIC READ, all app users would be able to access to his JSON object.

10. How can I save and retrieve Non English characters while making API call?

You have to encode your Non English character before you are going to save/update. For fetching this record back you have to decode back this encoded data.
Below is the snippet to encoding/decoding username parameter, if you want to save Non English username character in App42 API

  • create User Api for Android
  • create User Api for J2ME
  • create User Api for Android
  • create User Api for iOS
  • create User Api for Java
  • create User Api for .NET
  • create User Api for Unity
  • create User Api for Ruby
  • create User Api for Rest
  •  create User Api for WP7/WP8
  • create User Api for Flash
String userName = "Himanshu";
String encodedBytes = Base64.encodeBytes(userName.getBytes());
System.out.println("Encoded String is : " + new String(encodedBytes)); 
byte[] decodeBytes = Base64.decode(encodedBytes);
System.out.println("Decoded String is " +new String(decodeBytes));		
NSString *userName = @"Himanshu";
NSData *data = [userName dataUsingEncoding:NSUTF8StringEncoding];
NSString *encodedBytes = [data base64EncodedStringWithOptions:kNilOptions];
NSData *decodeddata = [[NSData alloc] initWithBase64EncodedString:encodedBytes options:kNilOptions];
NSString *decodeBytes = [[NSString alloc] initWithData:decodeddata encoding:NSUTF8StringEncoding];
String userName = "Himanshu";
String encodedBytes = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(userName));
Console.WriteLine("Encoded String is : " + encodedBytes);
String decodedString = System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(encodedBytes),0,9);
Console.WriteLine("Decoded String is : " + decodedString);
Coming Soon
var userName  = "Himanshu"
var encodedString = Base64.encode(userName);
console.log("Encoded String is : " + encodedString)
var decodedString = Base64.decode(encodedString)
console.log("Decoded String is : " + decodedString)
String userName = "Himanshu";
String encodedBytes = Base64.encodeBytes(userName.getBytes());
System.out.println("Encoded String is : " + new String(encodedBytes)); 
byte[] decodeBytes = Base64.decode(encodedBytes);
System.out.println("Decoded String is " +new String(decodeBytes));		
String userName = "Himanshu";
String encodedBytes = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes (userName)); 
Debug.Log("Encoded String is : " + encodedBytes);
String decodedString  = System.Text.Encoding.UTF8.GetString (System.Convert.FromBase64String (encodedBytes));
Debug.Log("Decoded String is : " + decodedString)
String userName = "Himanshu";
String encodedBytes = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes (userName)); 
Console.WriteLine("Encoded String is : " + encodedBytes);
String decodedString  = System.Text.Encoding.UTF8.GetString (System.Convert.FromBase64String (encodedBytes));
Console.WriteLine("Decoded String is : " + decodedString)
$userName = "Himanshu"
$encodedBytes = base64_encode($userName);
$decodedBytes = base64_decode($encodedBytes);
Coming Soon
var userName:String  = "Himanshu";
var encoded:Base64Encoder = new Base64Encoder();
encoded.encodeUTFBytes(userName);
trace("Encoded String is : +encoded.toString());
var decode:Base64Decoder = new Base64Decoder();
decode.decode(encoded.toString());
var decodeString:String  = decode.toByteArray().toString()
trace("Decoded String is : " + decodeString)
Coming Soon 
11. Best practices to write custom code?

Ans: Please have a look at this link for more details.

User Service

1. How can I reset password of my app user from AppHQ console?

Login to AppHQ console -> User -> App42 -> Select Your App-> Select user from list -> Click on Manage -> Click Reset Password button.

2. I created a user and deleted it after that however now I am not able to create user with same name. What is the issue here?

Once app user is deleted, by default they remain in our database with deleted flag until you do a permanent delete (Hard Deletion) from AppHQ console or through API. To reuse the same name, user must be permanently deleted from our system.

3. What is Soft/Hard Delete in AppHA User management console?

Soft delete means deleted user will remain in our database with deleted flag on and you would not be able to create user with same name again in your app. If user is deleted through Hard Delete option, they are permanently removed from the system and you can create same username again in your app.

Storage

1. How many DB can I create for my app?

You are allowed to create one DB per app.

2. What is collection meant for in Storage?

Collection is like table in your RDBMS schema and JSON saved inside it like a row of it.

3. Do I need to create any schema/relation to save JSON objects in Storage?

App42 Storage Service works on NoSQL stack and you are not required to create any schema/relation for the same. You can simply store any JSON object inside given collection.

4. Can I delete my database in storage service?

You cannot delete database. However, you can delete all your collections from AppHQ console.

Push Notification

1. I am getting Message Sent Successfully while sending message from AppHQ console. However message is not being delivered to my app. What is wrong here with my app settings?

Message being send to device in async mode. At sending time you will see this message however if it is not being delivered on your device, you can check Logs option under Unified Notification >> Push tab to check the cause of it.

2. How can I send Non English characters in push notification?

Please see here for details.