Skip to content Skip to sidebar Skip to footer

Android Application Force Close

Trying to send a text message more than 100 times, is there any way to override the SMSDispatcher text limitation? Here's the error: 08-02 03:34:07.927: WARN/dalvikvm(1199): thread

Solution 1:

You can't compare string with == try this

if (TxtCount.getText().toString().equals(""))
{
    Toast.makeText(getApplicationContext(), "Please enter a number of times to nuke!", Toast.LENGTH_SHORT).show();
}
else if (num.queals(""))
{
    Toast.makeText(getApplicationContext(), "Please enter a phone number to nuke!", Toast.LENGTH_SHORT).show();
}
else if (msg.equals(""))
{
    Toast.makeText(getApplicationContext(), "Please enter a message!", Toast.LENGTH_SHORT).show();
}

while (count <= max) 
{                  
    sendSMS(""+num,""+ msg);
    count++;
};

Like this

elseif (num.equals(""))
{
    Toast.makeText(getApplicationContext(), "Please enter a phone number to nuke!", Toast.LENGTH_SHORT).show();
    return;
}

Post a Comment for "Android Application Force Close"