Click here to Skip to main content
15,301,716 members
Home / Discussions / Android
   

Android

 
GeneralRe: I would like help wiith an example I cannot get working Pin
turbosupramk322-Aug-14 3:00
Memberturbosupramk322-Aug-14 3:00 
GeneralRe: I would like help wiith an example I cannot get working Pin
Ravi Bhavnani22-Aug-14 4:07
professionalRavi Bhavnani22-Aug-14 4:07 
GeneralRe: I would like help wiith an example I cannot get working Pin
Richard MacCutchan21-Aug-14 22:07
mveRichard MacCutchan21-Aug-14 22:07 
SuggestionRe: I would like help wiith an example I cannot get working Pin
Richard MacCutchan21-Aug-14 23:10
mveRichard MacCutchan21-Aug-14 23:10 
GeneralRe: I would like help wiith an example I cannot get working Pin
turbosupramk322-Aug-14 2:06
Memberturbosupramk322-Aug-14 2:06 
GeneralRe: I would like help wiith an example I cannot get working Pin
Richard MacCutchan22-Aug-14 3:11
mveRichard MacCutchan22-Aug-14 3:11 
AnswerRe: I would like help wiith an example I cannot get working Pin
Dominic Burford15-Sep-14 2:30
professionalDominic Burford15-Sep-14 2:30 
Answerset receiver for Serversocket in android? Pin
Member 1102458520-Aug-14 2:54
MemberMember 1102458520-Aug-14 2:54 
I am working on app in which I am reading data from a specific port of android. Some one send data on port from web back end and i read it on android device.I want to set a receiver for this but i dont know what action is required for this. My code is here.

public class MainActivity extends Activity {

Socket socket;
private ServerSocket serverSocket;
BufferedReader in = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
new Task().execute();

}
private class Task extends AsyncTask
<void, integer,="" void=""> {
@Override
protected Void doInBackground(Void... params) {
try {
serverSocket = new ServerSocket(6066);

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

try {
while (true) {
socket = serverSocket.accept();
try {
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String msg = null;
try {
StringBuilder total = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
total.append(line);
}
msg = total.toString();
Log.d("NETWORK-RECEIVE","Message readed!:"+msg);
} catch (IOException e) {
e.printStackTrace();
Log.d("NETWORK-RECEIVE", "Something goes wrong: IOException");
}
} finally {
socket.close();
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally {
try {
serverSocket.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

return null;
}
}
}

can some one help me in this how i can set out a broadcast receiver for this pupose,and what intent action is required for this?
Questioncreating menu using c# android Pin
Baburc19-Aug-14 7:03
MemberBaburc19-Aug-14 7:03 
AnswerRe: creating menu using c# android Pin
Richard MacCutchan19-Aug-14 7:35
mveRichard MacCutchan19-Aug-14 7:35 
GeneralRe: creating menu using c# android Pin
Baburc20-Aug-14 6:15
MemberBaburc20-Aug-14 6:15 
AnswerRe: creating menu using c# android Pin
Ravi Bhavnani19-Aug-14 11:18
professionalRavi Bhavnani19-Aug-14 11:18 
GeneralRe: creating menu using c# android Pin
Baburc20-Aug-14 6:04
MemberBaburc20-Aug-14 6:04 
AnswerRe: creating menu using c# android Pin
Ravi Bhavnani20-Aug-14 6:16
professionalRavi Bhavnani20-Aug-14 6:16 
GeneralRe: creating menu using c# android Pin
Baburc20-Aug-14 6:26
MemberBaburc20-Aug-14 6:26 
GeneralRe: creating menu using c# android Pin
Ravi Bhavnani20-Aug-14 6:29
professionalRavi Bhavnani20-Aug-14 6:29 
QuestionHow to test an Andriod application with php web services. Pin
pandu web dev19-Aug-14 3:23
Memberpandu web dev19-Aug-14 3:23 
AnswerRe: How to test an Andriod application with php web services. Pin
Richard MacCutchan19-Aug-14 5:07
mveRichard MacCutchan19-Aug-14 5:07 
QuestionHow can I get started developing in Eclipse for Android? Pin
turbosupramk318-Aug-14 4:01
Memberturbosupramk318-Aug-14 4:01 
AnswerRe: How can I get started developing in Eclipse for Android? Pin
Richard MacCutchan18-Aug-14 4:22
mveRichard MacCutchan18-Aug-14 4:22 
GeneralRe: How can I get started developing in Eclipse for Android? Pin
turbosupramk318-Aug-14 6:56
Memberturbosupramk318-Aug-14 6:56 
GeneralRe: How can I get started developing in Eclipse for Android? Pin
Richard MacCutchan18-Aug-14 7:01
mveRichard MacCutchan18-Aug-14 7:01 
GeneralRe: How can I get started developing in Eclipse for Android? Pin
turbosupramk318-Aug-14 7:08
Memberturbosupramk318-Aug-14 7:08 
GeneralRe: How can I get started developing in Eclipse for Android? Pin
Richard MacCutchan18-Aug-14 21:06
mveRichard MacCutchan18-Aug-14 21:06 
GeneralRe: How can I get started developing in Eclipse for Android? Pin
turbosupramk319-Aug-14 4:21
Memberturbosupramk319-Aug-14 4:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.