Android Cell Id Location Example Essay

Is Tess in ‘Tess of the d'Urbervilles' portrayed as being responsible for her own demise? [pdf 40 KB]

Yours is a beautifully clear essay. You write very well, and your prose is delightful to read. You've also done your research and it shows. There is a remarkable lack of vagary about society or feminism in your piece, and you've picked canny quotes from your secondary sources that elucidate and situate your arguments.

You've also located some wonderfully specific quotations from your primary source to support your argument that Hardy's narrator sympathises with Tess. Some of your close readings are wonderfully astute, as when you point out that Tess implores Angel, rather than commanding him. Slightly less persuasive is your assertion that Tess is the victim of Alec's eyes; I suspect you might have found better quotations, descriptions, or incidents denouncing Alec's gaze.

You are clearly very good at pursuing and proving an argument. I encourage you to be a bit more experimental in your next essay; perhaps choose a less straightforward topic and see where it takes you.

Please see penciled notes throughout on shortening sentences and watching for comma splices (please look this term up in a style manual if it is unfamiliar).

packagecom.example.convertinggsmcelllocation;

 

import org.apache.http.HttpResponse;

import org.apache.http.client.HttpClient;

import org.apache.http.client.methods.HttpGet;

import org.apache.http.impl.client.DefaultHttpClient;

import org.apache.http.util.EntityUtils;

 

import android.app.Activity;

import android.content.Context;

import android.os.Bundle;

import android.telephony.TelephonyManager;

import android.telephony.gsm.GsmCellLocation;

import android.widget.TextView;

 

publicclassConvertingGSMCellLocationextendsActivity{

 

publicclassOpenCellID{

Stringmcc;//Mobile Country Code

Stringmnc;//mobile network code

Stringcellid;//Cell ID

Stringlac;//Location Area Code

 

Booleanerror;

StringstrURLSent;

StringGetOpenCellID_fullresult;

 

Stringlatitude;

Stringlongitude;

 

publicBooleanisError(){

returnerror;

}

 

publicvoidsetMcc(Stringvalue){

mcc=value;

}

 

publicvoidsetMnc(Stringvalue){

mnc=value;

}

 

publicvoidsetCallID(intvalue){

cellid=String.valueOf(value);

}

 

publicvoidsetCallLac(intvalue){

lac=String.valueOf(value);

}

 

publicStringgetLocation(){

return(latitude+" : "+longitude);

}

 

publicvoidgroupURLSent(){

strURLSent=

"http://www.opencellid.org/cell/get?mcc="+mcc

+"&mnc="+mnc

+"&cellid="+cellid

+"&lac="+lac

+"&fmt=txt";

}

 

publicStringgetstrURLSent(){

returnstrURLSent;

}

 

publicStringgetGetOpenCellID_fullresult(){

returnGetOpenCellID_fullresult;

}

 

publicvoidGetOpenCellID()throwsException{

groupURLSent();

HttpClient client=newDefaultHttpClient();

HttpGet request=newHttpGet(strURLSent);

HttpResponse response=client.execute(request);

GetOpenCellID_fullresult=EntityUtils.toString(response.getEntity());

spliteResult();

}

 

privatevoidspliteResult(){

if(GetOpenCellID_fullresult.equalsIgnoreCase("err")){

error=true;

}else{

error=false;

String[]tResult=GetOpenCellID_fullresult.split(",");

latitude=tResult[0];

longitude=tResult[1];

}

}

}

 

intmyLatitude,myLongitude;

OpenCellID openCellID;

/** Called when the activity is first created. */

@Override

publicvoidonCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

TextView textGsmCellLocation=(TextView)findViewById(R.id.gsmcelllocation);

TextView textMCC=(TextView)findViewById(R.id.mcc);

TextView textMNC=(TextView)findViewById(R.id.mnc);

TextView textCID=(TextView)findViewById(R.id.cid);

TextView textLAC=(TextView)findViewById(R.id.lac);

TextView textGeo=(TextView)findViewById(R.id.geo);

TextView textRemark=(TextView)findViewById(R.id.remark);

 

//retrieve a reference to an instance of TelephonyManager

TelephonyManager telephonyManager=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);

GsmCellLocation cellLocation=(GsmCellLocation)telephonyManager.getCellLocation();

 

StringnetworkOperator=telephonyManager.getNetworkOperator();

Stringmcc=networkOperator.substring(0,3);

Stringmnc=networkOperator.substring(3);

textMCC.setText("mcc: "+mcc);

textMNC.setText("mnc: "+mnc);

 

intcid=cellLocation.getCid();

intlac=cellLocation.getLac();

textGsmCellLocation.setText(cellLocation.toString());

textCID.setText("gsm cell id: "+String.valueOf(cid));

textLAC.setText("gsm location area code: "+String.valueOf(lac));

 

openCellID=newOpenCellID();

 

openCellID.setMcc(mcc);

openCellID.setMnc(mnc);

openCellID.setCallID(cid);

openCellID.setCallLac(lac);

try{

openCellID.GetOpenCellID();

 

if(!openCellID.isError()){

textGeo.setText(openCellID.getLocation());

textRemark.setText("nn"

+"URL sent: n"+openCellID.getstrURLSent()+"nn"

+"response: n"+openCellID.GetOpenCellID_fullresult);

}else{

textGeo.setText("Error");

}

}catch(Exceptione){

// TODO Auto-generated catch block

e.printStackTrace();

textGeo.setText("Exception: "+e.toString());

}

}

}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *