コード例 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.conversations);

    conversations = (ListView) findViewById(R.id.conversations_list);

    new GetConversationsRequest(this, String.valueOf(App.get().getUserId()));
  }
コード例 #2
0
  @Override
  protected void onPostExecute(JSONObject result) {
    super.onPostExecute(result);

    if (result != null) {
      try {
        App.get().setUserId(Integer.valueOf(result.getString("customer_id")));
        context.startActivity(new Intent(context, Menu.class));
      } catch (NumberFormatException e) {
        e.printStackTrace();
      } catch (JSONException e) {
        e.printStackTrace();
      }
    }
  }