Error in sending and receving sms

by Analdin Judy » Tue, 20 May 2008 07:20:43 GMT


Sponsored Links
 ere is the code i got from group to send and receiving message


a)I want to know what is actualy in the "main.xml"
b)How can i test this program?

package com.northvortex.sms;

import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentReceiver;
import android.os.Bundle;
import android.provider.Telephony;
import android.telephony.gsm.SmsMessage;
import android.util.Log;

/public class SMSReceiver
extends IntentReceiver
{
private static final String TAG_LOG = "SMSReceiver";

private static final int ID_NOTIFICACION = 0x1221;

private static final String ACCION =
"android.provider.Telephony.SMS_RECEIVED";

@Override
public void onReceiveIntent(Context parContext, Intent parIntent)
{
NotificationManager elNotificador =
(NotificationManager)parContext.getSystemService(Context.NOTIFICATION_SERVICE);


if (parIntent.getAction().equals(ACCION) ==
true)
{
StringBuilder elContenido =
new StringBuilder();

Bundle losDatosExtras =
parIntent.getExtras();
if (losDatosExtras != null)
{
.
SmsMessage[] losMensajesSMS =
Telephony.Sms.Intents.getMessagesFromIntent(parIntent);

for (SmsMessage unMensaje : losMensajesSMS)
{
elContenido.append("Mensajes
SMS\n");
elContenido.append("enviado por:");

elContenido.append(unMensaje.getDisplayOriginatingAddress()
+
"\n");
elContenido.append("Mensaje:\n");


elContenido.append(unMensaje.getDisplayMessageBody());
}
}

// Registramos en la bitacora el evento.
Log.i(TAG_LOG, "onReceiveIntent: " + elContenido);

// Mostramos el mensaje utilizando el administrador
de
notificaciones
elNotificador.notifyWithText(ID_NOTIFICACION,
elContenido.toString(),
NotificationManager.LENGTH_LONG, null);

// Consumimos este Intent, de esa forma ninguna otra
aplicacion lo
notara.
this.abortBroadcast();

// Ahora intentamos gatillar una actividad
adicional.
Intent elIntento = new Intent(parContext,
SMSActivity.class);
elIntento.setLaunchFlags(Intent.NEW_TASK_LAUNCH);
parContext.startActivity(elIntento);
}
return;
}

}


package com.northvortex.sms;

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

public class SMSActivity
extends Activity
{
/**
* Esta clase es llamada la vez que la actividad es creada.
*/
@Override
public void onCreate(Bundle parICicle)
{
super.onCreate(parICicle);

setContentView(R.layout.ma



Error in sending and receving sms

by Justin (Google Employee) » Wed, 21 May 2008 21:27:46 GMT


 here is this sample from?

Cheers,
Justin
Android Team @ Google

On May 20, 12:20 am, "Analdin Judy" <[EMAIL PROTECTED]> wrote:
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Error in sending and receving sms

by Analdin Judy » Thu, 22 May 2008 05:23:30 GMT


 >From the below link i got the sample,




Other Threads

1. VLC on Android

Hi,

I'm newbie on Android development, but I have a complex task: support media
in Windows Media formats and stream (WMV, WMA, MMS protocol, ASX ...).

I think that port libVLC <http://wiki.videolan.org/Libvlc> (C++) to Android
is the short way. Anybody already have tried to do this? Is it possible?

I'm reading about binding it to Java using
VLCJ<http://code.google.com/p/vlcj/>,
but no success on apply it to Android yet.

Regards,

Enas Gesing

-- 

2. Users marking down free apps because missing paid app features

I recently released a pro (paid) version of my app which included a
couple of extra features as incentive to purchase. The free app
remained unchanged.

However, I've now received a couple of comments down-rating the free
app on the basis that it did not also get upgraded with the extra
features. One commented that they would give 5 stars (to the free app)
if the pro version was free! They have not purchased the paid app,
AFAICT.

What do people think about this? Maybe its a valid point, that a free
app becomes (relatively) worse once there exists a better paid
alternative elsewhere...

-- 

3. Rooting @ Spica 2.1

4. Lock an .apk to a given (and physical) device

5. Ada yang tau Tutorial APP2SD di HTC Magic 32A ga?HELP...

6. adding and updating key rows dynamically

7. Speed yang aneh