Note that there are some explanatory texts on larger screens.

plurals
  1. POhow do i convert the JSON file that i got to digits so that i can manipulate them on android
    primarykey
    data
    text
    <p>hi im making a currency converter</p> <p>i've made this part... i am getting the JSON file and i can see it on the LOGCAT... now my problem is that how can i get the JSON to convert it to string and parse it to float/double to enable me to manipulate them... </p> <p>here is the code so far</p> <pre><code>import com.actionbarsherlock.app.SherlockActivity; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends SherlockActivity { private static final String API_URL = "my own api"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button btnConvert = (Button)findViewById(R.id.buttonConvert); btnConvert.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { AsyncHttpClient client = new AsyncHttpClient(); client.get(API_URL, new AsyncHttpResponseHandler() { @Override public void onFailure(Throwable arg0, String arg1) { // TODO Auto-generated method stub super.onFailure(arg0, arg1); } @Override public void onFinish() { // TODO Auto-generated method stub super.onFinish(); } @Override public void onStart() { // TODO Auto-generated method stub super.onStart(); } @Override public void onSuccess(String response) { Log.i("CC", response); } }); } }); } } </code></pre> <p>i am really at a lost right now with a deadline coming at my doorstep</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload