Re: [android-developers] Re: Application wake up
Hi Prill, How to send binary SMS to the specific port on the phone, can we do the test on emulator? Thanks 2010/5/11 Timo Prill timo.pr...@googlemail.com Send binary SMS to the specific port on the phone, they won't be shown in the inbox.. (except the HTC Tattoo sometimes shows binary SMS in the inbox.. seems to be a device-specific bug) cheers Am 11.05.2010 15:36, schrieb SAM: Hi, Has anyone found any solution for Port directed SMS OR App directed SMS in android? Although the Inbox SMS hook is working but I am still unable to delete this SMS from Inbox. I dont want user to see this SMS notification. Thanks Sam On Apr 16, 5:04 pm, SAMgulati...@gmail.com wrote: Thanks Guys. Its working now. So the process goes like this: 1. In your manifest file, make a activity and a receiver. Mention your receiver class name here. 2. Make a entry foruses-permission android:name = android.permission.RECEIVE_SMS 3. To test on emulator, test by DDMS perspective view. 4. You application will receive SMS while its dead too. in Onreceive(), read the SMS and do whatever you want. you can also start your activity from here. Thanks sam On Mar 19, 7:56 am, Andreasandreas.bex...@gmail.com wrote: Hi, Please note that there is no longer any class called IntentReceiver. It is now called BroadcastReceiver. Also, to get this to work, you need to register the receiver in the AndroidManifest.xml like this: receiver android:name=.RespToSMS intent-filter action android:name=android.provider.Telephony.SMS_RECEIVED / /intent-filter /receiver Regards, Andreas On Mar 18, 2:50 pm, Vaibhav Kulkarnivaibhavkul...@gmail.com wrote: Hi Sam, I think you should create a service for that!!! You can use Intent for SMS in following way public class RespToSMS extends IntentReceiver { /* package name for Intent */ static final String ACTION = android.provider.Telephony.SMS_RECEIVED; public void onReceiveIntent(Context context, Intent intent) { if (intent.getAction().equals(ACTION)) { StringBuilder buf = new StringBuilder(); Bundle bundle = intent.getExtras(); if (bundle != null) { SmsMessage[] messages = Telephony.Sms.Intents.getMessagesFromIntent(intent); for (int i = 0; ilt; messages.length; i++) { SmsMessage message = messages[i]; buf.append(message.getDisplayMessageBody()); /* Check your SMS format and respond here... */ } } NotificationManager nm = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE); nm.notifyWithText(123, buf.toString(), NotificationManager.LENGTH_LONG, null); } } } Thanks, Vaibhav On Thu, Mar 18, 2010 at 10:33 AM, SAMgulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs限cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- 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.comandroid-developers%2bunsubscr...@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
[android-developers] Re: Application wake up
Hi, Has anyone found any solution for Port directed SMS OR App directed SMS in android? Although the Inbox SMS hook is working but I am still unable to delete this SMS from Inbox. I dont want user to see this SMS notification. Thanks Sam On Apr 16, 5:04 pm, SAM gulati...@gmail.com wrote: Thanks Guys. Its working now. So the process goes like this: 1. In your manifest file, make a activity and a receiver. Mention your receiver class name here. 2. Make a entry for uses-permission android:name = android.permission.RECEIVE_SMS 3. To test on emulator, test by DDMS perspective view. 4. You application will receive SMS while its dead too. in Onreceive(), read the SMS and do whatever you want. you can also start your activity from here. Thanks sam On Mar 19, 7:56 am, Andreas andreas.bex...@gmail.com wrote: Hi, Please note that there is no longer any class called IntentReceiver. It is now called BroadcastReceiver. Also, to get this to work, you need to register the receiver in the AndroidManifest.xml like this: receiver android:name=.RespToSMS intent-filter action android:name=android.provider.Telephony.SMS_RECEIVED / /intent-filter /receiver Regards, Andreas On Mar 18, 2:50 pm, Vaibhav Kulkarni vaibhavkul...@gmail.com wrote: Hi Sam, I think you should create a service for that!!! You can use Intent for SMS in following way public class RespToSMS extends IntentReceiver { /* package name for Intent */ static final String ACTION = android.provider.Telephony.SMS_RECEIVED; public void onReceiveIntent(Context context, Intent intent) { if (intent.getAction().equals(ACTION)) { StringBuilder buf = new StringBuilder(); Bundle bundle = intent.getExtras(); if (bundle != null) { SmsMessage[] messages = Telephony.Sms.Intents.getMessagesFromIntent(intent); for (int i = 0; i lt; messages.length; i++) { SmsMessage message = messages[i]; buf.append(message.getDisplayMessageBody()); /* Check your SMS format and respond here... */ } } NotificationManager nm = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE); nm.notifyWithText(123, buf.toString(), NotificationManager.LENGTH_LONG, null); } } } Thanks, Vaibhav On Thu, Mar 18, 2010 at 10:33 AM, SAM gulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- 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 athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- 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] Re: Application wake up
Send binary SMS to the specific port on the phone, they won't be shown in the inbox.. (except the HTC Tattoo sometimes shows binary SMS in the inbox.. seems to be a device-specific bug) cheers Am 11.05.2010 15:36, schrieb SAM: Hi, Has anyone found any solution for Port directed SMS OR App directed SMS in android? Although the Inbox SMS hook is working but I am still unable to delete this SMS from Inbox. I dont want user to see this SMS notification. Thanks Sam On Apr 16, 5:04 pm, SAMgulati...@gmail.com wrote: Thanks Guys. Its working now. So the process goes like this: 1. In your manifest file, make a activity and a receiver. Mention your receiver class name here. 2. Make a entry foruses-permission android:name = android.permission.RECEIVE_SMS 3. To test on emulator, test by DDMS perspective view. 4. You application will receive SMS while its dead too. in Onreceive(), read the SMS and do whatever you want. you can also start your activity from here. Thanks sam On Mar 19, 7:56 am, Andreasandreas.bex...@gmail.com wrote: Hi, Please note that there is no longer any class called IntentReceiver. It is now called BroadcastReceiver. Also, to get this to work, you need to register the receiver in the AndroidManifest.xml like this: receiver android:name=.RespToSMS intent-filter action android:name=android.provider.Telephony.SMS_RECEIVED / /intent-filter /receiver Regards, Andreas On Mar 18, 2:50 pm, Vaibhav Kulkarnivaibhavkul...@gmail.com wrote: Hi Sam, I think you should create a service for that!!! You can use Intent for SMS in following way public class RespToSMS extends IntentReceiver { /* package name for Intent */ static final String ACTION = android.provider.Telephony.SMS_RECEIVED; public void onReceiveIntent(Context context, Intent intent) { if (intent.getAction().equals(ACTION)) { StringBuilder buf = new StringBuilder(); Bundle bundle = intent.getExtras(); if (bundle != null) { SmsMessage[] messages = Telephony.Sms.Intents.getMessagesFromIntent(intent); for (int i = 0; ilt; messages.length; i++) { SmsMessage message = messages[i]; buf.append(message.getDisplayMessageBody()); /* Check your SMS format and respond here... */ } } NotificationManager nm = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE); nm.notifyWithText(123, buf.toString(), NotificationManager.LENGTH_LONG, null); } } } Thanks, Vaibhav On Thu, Mar 18, 2010 at 10:33 AM, SAMgulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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.comandroid-developers%2bunsubs限cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- 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 athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- 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] Re: Application wake up
Thanks Guys. Its working now. So the process goes like this: 1. In your manifest file, make a activity and a receiver. Mention your receiver class name here. 2. Make a entry for uses-permission android:name = android.permission.RECEIVE_SMS 3. To test on emulator, test by DDMS perspective view. 4. You application will receive SMS while its dead too. in Onreceive(), read the SMS and do whatever you want. you can also start your activity from here. Thanks sam On Mar 19, 7:56 am, Andreas andreas.bex...@gmail.com wrote: Hi, Please note that there is no longer any class called IntentReceiver. It is now called BroadcastReceiver. Also, to get this to work, you need to register the receiver in the AndroidManifest.xml like this: receiver android:name=.RespToSMS intent-filter action android:name=android.provider.Telephony.SMS_RECEIVED / /intent-filter /receiver Regards, Andreas On Mar 18, 2:50 pm, Vaibhav Kulkarni vaibhavkul...@gmail.com wrote: Hi Sam, I think you should create a service for that!!! You can use Intent for SMS in following way public class RespToSMS extends IntentReceiver { /* package name for Intent */ static final String ACTION = android.provider.Telephony.SMS_RECEIVED; public void onReceiveIntent(Context context, Intent intent) { if (intent.getAction().equals(ACTION)) { StringBuilder buf = new StringBuilder(); Bundle bundle = intent.getExtras(); if (bundle != null) { SmsMessage[] messages = Telephony.Sms.Intents.getMessagesFromIntent(intent); for (int i = 0; i lt; messages.length; i++) { SmsMessage message = messages[i]; buf.append(message.getDisplayMessageBody()); /* Check your SMS format and respond here... */ } } NotificationManager nm = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE); nm.notifyWithText(123, buf.toString(), NotificationManager.LENGTH_LONG, null); } } } Thanks, Vaibhav On Thu, Mar 18, 2010 at 10:33 AM, SAM gulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- 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] Re: Application wake up
Hi, No, if you register a broadcast reciever in the manifest, it will be started if the intent matches. From there you can either implement your functionality, or start a service or an activity. Best regards, Andreas On Mar 18, 2:49 pm, SAM gulati...@gmail.com wrote: hi, I found a link:http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-s... But to recieve the SMS, my application need not be runnning. Can I receive SMS when my app is not running. Moreover after scanning the SMS prefix eg: 'MyAppID':XYZ, I also also want to start the application through code. Thanks Sameer On Mar 18, 10:03 am, SAM gulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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] Re: Application wake up
Hi SAM, As per the link that gives the sample application of handling the SMS, you registers your application to the Android OS by mentioning in the manifest file, the intended receiver on any incoming SMS message. So your application need not be active for this. The moment device receives an SMS, your application will get the notification at onReceive. Regards, Raj On Mar 18, 10:49 am, SAM gulati...@gmail.com wrote: hi, I found a link:http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-s... But to recieve the SMS, my application need not be runnning. Can I receive SMS when my app is not running. Moreover after scanning the SMS prefix eg: 'MyAppID':XYZ, I also also want to start the application through code. Thanks Sameer On Mar 18, 10:03 am, SAM gulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam- Hide quoted text - - Show quoted text - -- 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] Re: Application wake up
Hi, Please note that there is no longer any class called IntentReceiver. It is now called BroadcastReceiver. Also, to get this to work, you need to register the receiver in the AndroidManifest.xml like this: receiver android:name=.RespToSMS intent-filter action android:name=android.provider.Telephony.SMS_RECEIVED / /intent-filter /receiver Regards, Andreas On Mar 18, 2:50 pm, Vaibhav Kulkarni vaibhavkul...@gmail.com wrote: Hi Sam, I think you should create a service for that!!! You can use Intent for SMS in following way public class RespToSMS extends IntentReceiver { /* package name for Intent */ static final String ACTION = android.provider.Telephony.SMS_RECEIVED; public void onReceiveIntent(Context context, Intent intent) { if (intent.getAction().equals(ACTION)) { StringBuilder buf = new StringBuilder(); Bundle bundle = intent.getExtras(); if (bundle != null) { SmsMessage[] messages = Telephony.Sms.Intents.getMessagesFromIntent(intent); for (int i = 0; i lt; messages.length; i++) { SmsMessage message = messages[i]; buf.append(message.getDisplayMessageBody()); /* Check your SMS format and respond here... */ } } NotificationManager nm = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE); nm.notifyWithText(123, buf.toString(), NotificationManager.LENGTH_LONG, null); } } } Thanks, Vaibhav On Thu, Mar 18, 2010 at 10:33 AM, SAM gulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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.comandroid-developers%2bunsubscr...@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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Re: Application wake up
hi, I found a link: http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/ But to recieve the SMS, my application need not be runnning. Can I receive SMS when my app is not running. Moreover after scanning the SMS prefix eg: 'MyAppID':XYZ, I also also want to start the application through code. Thanks Sameer On Mar 18, 10:03 am, SAM gulati...@gmail.com wrote: Hi, I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server. My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application. Its possible in Windows Mobile and BREW. Please let me know if its possible in Android and how. Thanks Sam -- 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