Re: [android-developers] VerifyError - how can I solve this error?

2010-02-01 Thread aishwarya shukla
Hello Everyone
I am unable to use the sendTextMessage Function of the smsManager class
successfully.
The other emulator is not reporting the message received. No notification
comes on it.
However i am able to send the Text Messages normally using the built in
Messaging App in the Application.

Also i downloaded and tried the SMS tutorials in the mobiforge and other
websites, the tutorial program is crashing.
// Code is as given below


package sms.app;

import android.app.Activity;
import android.telephony.*;
import android.os.Bundle;
import android.widget.Toast;
import android.content.Intent;
import android.app.PendingIntent;
import android.content.Context;
public class smsapplication extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SmsManager s=SmsManager.getDefault();
Intent intent=new Intent();
int requestCode=0;
int flags=0;
PendingIntent si=PendingIntent.getActivity(getApplicationContext(),
requestCode, intent, flags);


   try{
 s.sendTextMessage(5554, null, This is my string, si, null);
}
catch(IllegalArgumentException e)
{
 Toast.makeText(getBaseContext(), Exception caught,
Toast.LENGTH_SHORT).show();
}
finally
{
 Toast.makeText(getBaseContext(), Exception not caught,
Toast.LENGTH_SHORT).show();
}

  final int genfailure=s.RESULT_ERROR_GENERIC_FAILURE;
  if (genfailure==1)
  Toast.makeText(getBaseContext(), GENREIC_FAILURE,
Toast.LENGTH_SHORT).show();
  final int noservice=s.RESULT_ERROR_NO_SERVICE;
  if (noservice==4)
  Toast.makeText(getBaseContext(), NO SERVICE,
Toast.LENGTH_SHORT).show();
  final int nullpdu=s.RESULT_ERROR_NULL_PDU;
  if (nullpdu==3)
  Toast.makeText(getBaseContext(), NULL PDU,
Toast.LENGTH_SHORT).show();
  final int radiooff=s.RESULT_ERROR_RADIO_OFF;
  if (radiooff==2)
  Toast.makeText(getBaseContext(), RADIO OFF,
Toast.LENGTH_SHORT).show();
  final int iccunsent=s.STATUS_ON_ICC_UNSENT;
  if (iccunsent==7)
  Toast.makeText(getBaseContext(), ICC unsent,
Toast.LENGTH_SHORT).show();
  final int iccsent=s.STATUS_ON_ICC_SENT;
  if (iccsent==7)
  Toast.makeText(getBaseContext(), ICC sent,
Toast.LENGTH_SHORT).show();


}
}


Also i have given the SMS_SEND permission in the manifest file.
I tried the same code in different machine too, it doesnt work.
Also most of the tutorials in the net use the deprecated function
android.telephony.gsm.SmsManager and not the new one
android.telephony.SmsManager.

For my project work i have to use a datasms . Can anyone help me with a
working sample app in Android 2.0 or 2.1  which uses data message.
Further how i am not able to figure out how to register my recipent
application to a particular port to which i am sending a data message using
another instance of the emulator.

I need to solve this issue fast. I am stuck at this place for my project,

Any Help would be highly appreciated.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] VerifyError - how can I solve this error?

2010-01-31 Thread brian karlo gutierrez
Hello,

    Im not sure the cause of your VerifyError but in my case before I have 
tried this when Im subclassing the MapActivity...I got this VerifyError saying 
that the class that extends the MapActivity lets just say MyMapActivity.class 
is not found. During compilation no error but during runtime when my 
application calls the MyMapActivity it crashed and got the VerifyError. For the 
solution which most people adviced here is that I need to indicate in the 
Manifest file that the activity which will trigger to launch the MyMapActivity 
lets just call it MyActivity will run on a separate process...below is an 
example of that part declared in the manifest file.

    activity android:name=.MyActivity
  android:label=@string/app_name
  android:process=:PVMyActivity/
    activity android:name=.MyMapActivity
  android:label=@string/app_name/

After declaring that so far I didn't have the VerifyError issue already.

Hope it helps.

-Brian

--- On Sat, 1/30/10, Martin google-gro...@digle.de wrote:

From: Martin google-gro...@digle.de
Subject: [android-developers] VerifyError - how can I solve this error?
To: Android Developers android-developers@googlegroups.com
Date: Saturday, January 30, 2010, 7:16 PM

Hi!

I am analyzing my game with flurry-analytics and some people, who play
my game, receive the Exception java.lang.VerifyError in my Highscore-
Activity.

What do I have to do to solve this error?

Here is the quellcode of my Highscore-Activity:



package digle.de.LeonardFrog;

import android.app.Activity;
//all the imports.

public class AHighscore extends Activity {

    private Highscore highscore;

    private AbsoluteLayout al_highscore;
    private TableLayout tl_highscore;
    private TextView tv_names[];
    private TextView tv_score[];
    private TableRow tr_tablerows[];

    private EditText tv_winnername;
    private int winnerpos;

    public void onStart()
    {
       super.onStart();
       FlurryAgent.onStartSession(this, Global.FlurryId);
    }

    public void onStop()
    {
       super.onStop();
       FlurryAgent.onEndSession(this);
    }

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN );

        setContentView(R.layout.ahighscore);

        ImageButton buttonback = (ImageButton) findViewById
(R.id.buttonback);
        buttonback.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                finish();
            }
        });


//some other stuff ..

    }
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] VerifyError - how can I solve this error?

2010-01-30 Thread Martin
Hi!

I am analyzing my game with flurry-analytics and some people, who play
my game, receive the Exception java.lang.VerifyError in my Highscore-
Activity.

What do I have to do to solve this error?

Here is the quellcode of my Highscore-Activity:



package digle.de.LeonardFrog;

import android.app.Activity;
//all the imports.

public class AHighscore extends Activity {

private Highscore highscore;

private AbsoluteLayout al_highscore;
private TableLayout tl_highscore;
private TextView tv_names[];
private TextView tv_score[];
private TableRow tr_tablerows[];

private EditText tv_winnername;
private int winnerpos;

public void onStart()
{
   super.onStart();
   FlurryAgent.onStartSession(this, Global.FlurryId);
}

public void onStop()
{
   super.onStop();
   FlurryAgent.onEndSession(this);
}

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );

setContentView(R.layout.ahighscore);

ImageButton buttonback = (ImageButton) findViewById
(R.id.buttonback);
buttonback.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
finish();
}
});


//some other stuff ..

}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en