bounswe / bounswe2015group7

Sculture, The Software Project of Future
6 stars 4 forks source link

[ANDROID] Create story activity #82

Closed fthdgn closed 8 years ago

fthdgn commented 8 years ago

We should implement an activity to create new stories.

The story creation API can be called like that

HashMap<String, Object> param = new HashMap<String, Object>();
param.put("title", "Winter on Canada");
param.put("content", "It was a cold winder");
ArrayList<String> tags = new ArrayList<String>();
tags.add("Canada");
tags.add("winter");
tags.add("snow");
param.put("tags", tags);

ParseCloud.callFunctionInBackground("story_create", param, new FunctionCallback<ParseObject>() {
    @Override
    public void done(ParseObject object, ParseException e) {
        if(e ==null) {
            Toast.makeText(getApplicationContext(), object.getString("title"), Toast.LENGTH_SHORT).show();

        }
        else
            Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_SHORT).show();
    }
}
);
fthdgn commented 8 years ago

I have added base story create activity 0c6ede84310db141dbbd652e211e8c7471a35254 . The UI should be improved. AAlso a better tag field is required.

fthdgn commented 8 years ago

The UI of this activity should be improved. Tag field should be support more than 2 tags. Also the new REST API integration should be implemented.

fthdgn commented 8 years ago

Closed via 1770cb937fedcf7269494790e3741042e2e41a62