prazannag Kumar

Greenhorn
+ Follow
since Feb 25, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prazannag Kumar

I ll explain my problem,
My Input is: "this is my first program"
then I have to split each word and to store on different string . It can be possible with 1D string array. suppose if i need to perform this on 2D string array,how to do? please let me know.
14 years ago
Activity can be closed using the method finish(). In which method is used to exit the application completely.
14 years ago
Hi,

I mess with converting the char array to two dimensional array in android. Anyone can clarify this issue ? Is it possible to do the conversion mentioned below ?

String[][] s = new String[3][3];
static char tmp[5] = "hello";
int r=1,c=1,j;
for( j=0;j<5;j++)
{
s[r][c].charAt(j)=tmp[j];
}
14 years ago
thanks it works great now.
14 years ago
Hi,

I tried the following code to find the string length, but the message shows "FORCE TO CLOSE". let me know what i did wrong.
code:

EditText s1=(EditText)findViewById(R.id.EditText01);
int j = s1.getText().toString().length();


14 years ago
Hi,

I tried the following method but these doesn't works. Can anyone tell me is any other methods available to find the string length. ?
Method:
string.length()
14 years ago
I am facing the new issue now. I can get respose from PHP, when I initialize the values to the parameters which i am going to pass. But the problem is, when I get the input dynamically, the code response nothing. I need to connect with PHP when I press a button, after getting the input from user. So i written a code under Onclick event. I got mess with this issue. Can anyone help me... ?
----
14 years ago
Now the code working fine, I simplified it. Thanks.
14 years ago
I want to send data to PHP as well as receive. For that i tried HttpPost. At the end of execution I got the answer "false". Can anyone tell how to fix this issue. Please check the coding...
--------------

14 years ago
Yes I got it now. I just confused by refer some sample codes. So we have to write those classes. Thanks a lot. Also i have one more doubt in ksoap2. I tried to connect the android application to PHP. But it seems no response. Let me know what I did wrong...
---------
package com.org.WebTest;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class WebTest extends Activity {
/** Called when the activity is first created. */

private static final String SOAP_ACTION = "HelloYou";
private static final String METHOD_NAME = "getHello";
private static final String NAMESPACE = "urn:HelloYou";
private static final String URL = "http://115.240.187.197/mypro/services.php";



private Object resultsRequestSOAP = null;

@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
TextView tv = new TextView(this);
setContentView(R.layout.main);
// final TextView ot=(TextView)findViewById(R.id.tvv);

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);


//SoapObject
request.addProperty("firstname", "prasanna");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);


HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try
{
androidHttpTransport.call(SOAP_ACTION, envelope);
resultsRequestSOAP = envelope.getResponse();
String[] results = (String[]) resultsRequestSOAP;
tv.setText( results[0].toString());


}
catch (Exception aE)
{
aE.printStackTrace ();
tv.setText(aE.toString());
}
}
-----
my PHP code is :

<?php
echo "prasanna";
?>
-------
14 years ago
I need to connect the android application with PHP page. So these classes are needed to perform. I found the android.net.http does not contain any of the classes i mentioned before. Let me know how to fix it..
14 years ago
Hi,

I need to include the following header files but these are can't resolved.

import android.net.http.EventHandler;
import android.net.http.Headers;
import android.net.http.RequestQueue;

I got the Error Message:
"The import android.net.http.RequestQueue cannot be resolved"

Can anyone please tell me, how to fix this issue.
14 years ago