{ // tread in the background @Override try { if(gcm== null) { gcm = GoogleCloudMessaging.getInstance(context); } regid = gcm.register(SENDER_ID); msg = "Registration was succesfull, ID of your device is " + regid; // now we try with airbop so the this method is commented if(sendRegistrationIdToBackend(regid)) { } else { msg = "something wrong is here"; } { msg = "Error :" + ex.getMessage(); } return msg; } // after tread in the background ends @Override showInfo.setText(msg); serverInfo.setText(serverInfoString); } //Map<String, String> params { // code from techlovejump the notification List<NameValuePair> datapairs = new ArrayList<NameValuePair>(); datapairs.add(new BasicNameValuePair("regid", regid)); DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); try { httpPost.setEntity(new UrlEncodedFormEntity(datapairs)); // TODO Auto-generated catch block e1.printStackTrace(); } try { HttpResponse httpResponse = httpClient.execute(httpPost); serverInfoString = "everything right"; } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); serverInfoString = "CliengProtocolException"; return false; // TODO Auto-generated catch block e.printStackTrace(); serverInfoString = "IOException"; return false; } return true; } }
Standard input is empty
Main.java:1: error: cannot find symbol class RegisterInBackground extends AsyncTask<String,String,String> ^ symbol: class AsyncTask Main.java:43: error: cannot find symbol private boolean sendRegistrationIdToBackend(String regid) throws IOException ^ symbol: class IOException location: class RegisterInBackground Main.java:10: error: cannot find symbol if(gcm== null) ^ symbol: variable gcm location: class RegisterInBackground Main.java:12: error: cannot find symbol gcm = GoogleCloudMessaging.getInstance(context); ^ symbol: variable gcm location: class RegisterInBackground Main.java:12: error: cannot find symbol gcm = GoogleCloudMessaging.getInstance(context); ^ symbol: variable context location: class RegisterInBackground Main.java:12: error: cannot find symbol gcm = GoogleCloudMessaging.getInstance(context); ^ symbol: variable GoogleCloudMessaging location: class RegisterInBackground Main.java:14: error: cannot find symbol regid = gcm.register(SENDER_ID); ^ symbol: variable regid location: class RegisterInBackground Main.java:14: error: cannot find symbol regid = gcm.register(SENDER_ID); ^ symbol: variable SENDER_ID location: class RegisterInBackground Main.java:14: error: cannot find symbol regid = gcm.register(SENDER_ID); ^ symbol: variable gcm location: class RegisterInBackground Main.java:15: error: cannot find symbol msg = "Registration was succesfull, ID of your device is " + regid; ^ symbol: variable regid location: class RegisterInBackground Main.java:19: error: cannot find symbol if(sendRegistrationIdToBackend(regid)) ^ symbol: variable regid location: class RegisterInBackground Main.java:28: error: cannot find symbol } catch(IOException ex) ^ symbol: class IOException location: class RegisterInBackground Main.java:4: error: method does not override or implement a method from a supertype @Override ^ Main.java:37: error: cannot find symbol showInfo.setText(msg); ^ symbol: variable showInfo location: class RegisterInBackground Main.java:38: error: cannot find symbol serverInfo.setText(serverInfoString); ^ symbol: variable serverInfoString location: class RegisterInBackground Main.java:38: error: cannot find symbol serverInfo.setText(serverInfoString); ^ symbol: variable serverInfo location: class RegisterInBackground Main.java:35: error: method does not override or implement a method from a supertype @Override ^ Main.java:48: error: cannot find symbol List<NameValuePair> datapairs = new ArrayList<NameValuePair>(); ^ symbol: class List location: class RegisterInBackground Main.java:48: error: cannot find symbol List<NameValuePair> datapairs = new ArrayList<NameValuePair>(); ^ symbol: class NameValuePair location: class RegisterInBackground Main.java:48: error: cannot find symbol List<NameValuePair> datapairs = new ArrayList<NameValuePair>(); ^ symbol: class ArrayList location: class RegisterInBackground Main.java:48: error: cannot find symbol List<NameValuePair> datapairs = new ArrayList<NameValuePair>(); ^ symbol: class NameValuePair location: class RegisterInBackground Main.java:49: error: cannot find symbol datapairs.add(new BasicNameValuePair("regid", regid)); ^ symbol: class BasicNameValuePair location: class RegisterInBackground Main.java:50: error: cannot find symbol DefaultHttpClient httpClient = new DefaultHttpClient(); ^ symbol: class DefaultHttpClient location: class RegisterInBackground Main.java:50: error: cannot find symbol DefaultHttpClient httpClient = new DefaultHttpClient(); ^ symbol: class DefaultHttpClient location: class RegisterInBackground Main.java:51: error: cannot find symbol HttpPost httpPost = new HttpPost(url); ^ symbol: class HttpPost location: class RegisterInBackground Main.java:51: error: cannot find symbol HttpPost httpPost = new HttpPost(url); ^ symbol: class HttpPost location: class RegisterInBackground Main.java:53: error: cannot find symbol httpPost.setEntity(new UrlEncodedFormEntity(datapairs)); ^ symbol: class UrlEncodedFormEntity location: class RegisterInBackground Main.java:54: error: cannot find symbol } catch (UnsupportedEncodingException e1) { ^ symbol: class UnsupportedEncodingException location: class RegisterInBackground Main.java:60: error: cannot find symbol HttpResponse httpResponse = httpClient.execute(httpPost); ^ symbol: class HttpResponse location: class RegisterInBackground Main.java:61: error: cannot find symbol serverInfoString = "everything right"; ^ symbol: variable serverInfoString location: class RegisterInBackground Main.java:63: error: cannot find symbol } catch (ClientProtocolException e) { ^ symbol: class ClientProtocolException location: class RegisterInBackground Main.java:66: error: cannot find symbol serverInfoString = "CliengProtocolException"; ^ symbol: variable serverInfoString location: class RegisterInBackground Main.java:68: error: cannot find symbol } catch (IOException e) { ^ symbol: class IOException location: class RegisterInBackground Main.java:71: error: cannot find symbol serverInfoString = "IOException"; ^ symbol: variable serverInfoString location: class RegisterInBackground 34 errors
Standard output is empty