Karuna chauhan

+ Follow
since Oct 11, 2007
Karuna likes ...
Android Eclipse IDE Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Karuna chauhan

Yes! I updated the ADT, but on update if AVD Manager window is open (i.e. an emulator is running), then any other perspective window is not accessible and I'm not even able to Compile or Run any Project. What should I do to overcome this problem??? Isn't there any way to integrate both the options (SDK and AVD Manager). I even have reinstalled everything...but didn't help anything!

12 years ago
Hi all,

I have Android SDK and AVD managers (Development Tools for Android) as two different menu options in Eclipse. How can I integrate them to one as "Android SDK and AVD Manager" option, like eclipse usually shows?

12 years ago

Thanks for reply Swastik....

Yes! I tried Intent.ACTION_CALL too but that also didn't helped m...actually, I also want to know if only use of 'Intent' will work in SIP application or I should do somthingelse to listen to the other side??

13 years ago

I want write code to register with the Sip server and then to make call on press of 'Back' button.
I already have done with the registration part but not sure how should I proceed to make call from my registered SIP Account!
I tried do it using Intent, it displayed the window calling the number...but without ringing back.

Code that I tried to make call on Back press is here:

Please guide me for the right approach!

13 years ago
I guess you right Jaikiran...because the code was really lengthy to post...now i'll try to make it clear and brief here -

In my application, I am registring with the SIP Server and after registration making an 'Outgoing Call' to any random number on press of 'Back Button'. Registration has been done successfully but not getting any response while calling to the number (except the dialer window is displayed).

Here's my code below for making call on 'Back Press' ...hoping to get the reason and solution for this issue -

Thanks in advance!!
13 years ago

I'm beginner to android, I'm trying to make a small application for making calls (on press of a 'Back button') from my SIP account to mobile number with the help of a "SIP Demo" and documentation provided on "developer.android.com/" website. After following all the necessary steps of registering with the server I'm facing error of "Not Registering" (Error Code is -4 ) and "no data connection" (Error Code -10) alternatively while registration process on a button click.

Kindly correct me for all my mistakes in the code...

Here's the code below:

13 years ago
I'm really sorry ulf that i din't mentioned i'm using my mail server.

As you asked above- my mail server and my code both are on different machines.
I agree with you ulf, but i'm using my mail server. I've written "mail.yahoo.com" jus to illustrate the way i'm putting the name of my mail server.....

Anywayz! friend could you tell me how to test my code on localhost when the address of my localhost is - "http://localhost:6060". Also i want to specify that i'm using Apache Tomcat 5.5 server.
Thanks for your reply paul!

I must consider your suggestion but it would be greatfull if you could give some idea about network configuration nedded for application to be connected to the server.
hi friendz,

I am using Java Mail API to send mail on my mail server but facing some problems. I kept extracted mail.jar and activation.jar files in classes directry of my application. Code generating the error is given below:


<%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*"%>
Properties props = new Properties();
props.put("mail.smtp.host", "mail.yahoo.com");
Session s = Session.getDefaultInstance(props,null);

InternetAddress from = new InternetAddress("sender@yahoo.com");
InternetAddress to = new InternetAddress("reciever@yahoo.com");

MimeMessage message = new MimeMessage(s);
message.addRecipient(Message.RecipientType.TO, to);

message.setSubject("My subject");
message.setText("My Text");
catch(Exception e){

Could not connect to SMTP host: mail.yahoo.com, port: 25


I am using Apache Tomcat 5.5 to deploy and to run my application.
Please guide me for my mistake and all the necessary steps to follow to send text/formatted(Tabular Format) mail.

Thanks in advance
Hi! all,

I am using SQL Server 2000.I am having number of records in table and it might increase in future. Can anybody please tell how to display 10,20...N number of records per page and on click of First, Next ,Previous or Last it should move to the First, Next ,Previous or Last records respectively.

Thanks in advance.
15 years ago
hi! all,

I have four components in my html form(enctype="multipart/form-data").First two components are text fields of "text" type and third one is of "file" type(for file uploading)and a "submission Button".When i am recieving the data of html form on a jsp page using the "request" object, it is giving NULL values for first two fields.I store the recieved data into table "photogallery(photoid,description,photo)" using the database-SQL Server 2000. What could be the probable solution for this? Below is the coding that for jsp file:

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page import="java.io.*,javax.servlet.http.HttpServletRequest,javax.servlet.ServletInputStream" %>
<%@ page import="java.io.FileWriter,java.io.IOException" %>
<%@page import="java.sql.*"%>
<%@page errorPage="error.jsp"%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
int photoid=Integer.parseInt(request.getParameter("txtid"));
String desc=request.getParameter("txtdesc");

String err = "";

String lastFileName = "";

String contentType = request.getContentType();
String boundary = "";
final int BOUNDARY_WORD_SIZE = "boundary=".length();
if(contentType == null || !contentType.startsWith("multipart/form-data")) {
err = "Ilegal ENCTYPE : must be multipart/form-data\n";
err += "ENCTYPE set = " + contentType;
boundary = contentType.substring(contentType.indexOf("boundary=") + BOUNDARY_WORD_SIZE);
boundary = "--" + boundary;
try {
javax.servlet.ServletInputStream sis = request.getInputStream();
byte[] b = new byte[1024];
int x=0;
int state=0;
String name=null,fileName=null,contentType2=null;
java.io.FileOutputStream buffer = null;
while((x=sis.readLine(b,0,1024))>-1) {
String s = new String(b,0,x);
if(s.startsWith(boundary)) {
state = 0;

name = null;
contentType2 = null;
fileName = null;

}else if(s.startsWith("Content-Disposition") && state==0) {
state = 1;
if(s.indexOf("filename=") == -1)
name = s.substring(s.indexOf("name=") + "name=".length(),s.length()-2);
else {
name = s.substring(s.indexOf("name=") + "name=".length(),s.lastIndexOf(";"));
fileName = s.substring(s.indexOf("filename=") + "filename=".length(),s.length()-2);
if(fileName.equals("\"\"")) {
fileName = null;
}else {
String userAgent = request.getHeader("User-Agent");
String userSeparator="/"; // default
if (userAgent.indexOf("Windows")!=-1)
if (userAgent.indexOf("Linux")!=-1)
fileName = fileName.substring(fileName.lastIndexOf(userSeparator)+1,fileName.length()-1);
if(fileName.startsWith( "\""))
fileName = fileName.substring( 1);
name = name.substring(1,name.length()-1);
if (name.equals("file")) {
if (buffer!=null)
lastFileName = fileName;
buffer = new java.io.FileOutputStream("/TestAlumni/web/Upload/"+fileName);
}else if(s.startsWith("Content-Type") && state==1) {
state = 2;
contentType2 = s.substring(s.indexOf(":")+2,s.length()-2);
}else if(s.equals("\r\n") && state != 3) {
state = 3;
}else {
if (name.equals("file"))
}catch(java.io.IOException e) {
err = e.toString();
boolean ok = err.equals("");
if(!ok) {
String fn=lastFileName;

PreparedStatement ps = con.prepareStatement ("Insert into photogallery values(?,?,?)");

<SCRIPT language="javascript">
alert('Uploaded <%=lastFileName%>');


Thanks in advance:)
[ October 26, 2008: Message edited by: Karuna chauhan ]
15 years ago
Why awt is called Abstract?
16 years ago