Search code examples
androidparse-platform

How to create different columns like int or string programmatically in parse data browser


I am a newbie to parse and I just started my parse programs and I wonder when I save data like parseobject.add("xyz","abc") the abc gets stored as an array but I want that to be stored as an string, similarly how can I store other types like int,boolean.


Solution

  • You can use

    public boolean isNum(Object obj){
        return obj.class.isAssignableFrom(int.class);
     }
    

    like this you can write methods to check the types and filter the type you want.

    if(isNum(a))
    {
      parseObject.add("a",a);
    }