Is there a way to intercept an SMS with BroadcastReceiver as for example here
but without showing any notifications to the user and immediately deleting the message that contains for example some keyword
EDIT:
What I need is to have some communication between android phones, one to one, and I thought that sending SMS messages would solve the problem, but the SMS notification are not needed for that, maybe the WAP PUSH messages would better for that but I have no idea how to send them from android phone.
If someone has any idea that would help, please put it here :)
Some guys from the Ericsson lab presented their push solution during the droidcon this year (with some additional reasoning why push is good).
Here's the link to their site:
https://labs.ericsson.com/apis/mobile-java-push/blog/push-android-droidpush-droidcamp
I would recommend PUSH or a web service to do the task your requesting.
WAP is a SMS message with a URL, it's goal is to allow users to download content from the web, kinda like a MMS message but for phones without MMS capability. Usually it's a premium message (Meaning the end user pays for these).
As for SMS, I don't think you can delete these from the phone without the knowledge of the user. Think legal on this. Would you want to receive and send SMS messages without your knowledge? SMS can also bill your phone so I'm thinking legally I would recommend avoiding this.
Another note if you're going to use SMS is that you would need a short code and a aggragator. Even if you have the short code and aggragator you still need the users permission to send reoccurring messages to their phone via application/phone.
I would recommend these links for reading:
Android Push Notification
http://www.anddev.org/calling_a_web_service_from_android-t348.html
Web Services
Yes, you could intercept Android SMS without notification icon.
Here is the solution: Can we delete an SMS in Android before it reaches the inbox?
check out Xtify - similar to C2D for Froyo with the ability to push intents but, Xtify does a lot more and does it across Android, iPhone and Blackberry.
xtify uses an SDK for easy implementation and has a web console and web service to configure messages to one, some or all of your users.
you can create rules that determine when a message gets sent – you can even push notifications using location as the trigger as the SDK runs in the background and provides access to persistent location.
reach out with questions to business#xtify.com
Related
I'm trying to send Text messages to different contacts in a bulk. The contacts are several hundred and i'm reading them from a text file. Now when my app tries to send messages , A Dialog Appears telling
App is sending too much messages => Allow , Deny
I've studied several forums that it's a restriction introduced in JellyBean to prevent malicious activity and it can't be undone without rooting your device and running some weird scripts. Is there a fix to this problem? if there isn't any fix , then can we Programatically click Allow button on that message dialog within our app?
Thanks in advance.
Is there a fix to this problem?
Send fewer messages.
Or, send the messages at a slower rate.
Or, use some sort of online SMS gateway to send the messages, perhaps through a serve of yours, rather than sending them through Android's SmsManager. You can find some of these by searching for online sms gateway on your favorite search engine.
can we Programatically click Allow button on that message dialog within our app?
No. The point behind the block is so that the user gets a vote as to whether your app can spend quite so much money (or SMS allotment from a post-paid plan) on the user's behalf. Bulk SMS is not designed to be done from Android, but rather from an online SMS gateway.
I am creating a app in android 4.0.3 i.e ICS version, which connects to the server when client gets login into the app.I am trying to get status of an client when he gets online or offline through server & seen onto the app screen.I am unable to proceed. Can anyone say me:
Is it possible to get the status of an user through server?
1-- How to proceed for first step...?
2-- How should I get a response from the server that the client is connected & viewed to other client example - when we login into skype our status shows available with green radio button, In same way how can I get it.?
It ll be very help full, If anybody guide me.
Many Thanks..
I'm assuming you're trying to develop a chat app ?
If this is the case, try using an XMPP library. XMPP is widely used for chat apps, including Facebook chat (and Google talk I think) and there are plenty of open source libraries available.
Otherwise, if you only want real-time notifications as a part of a bigger picture, try using push notifications. Google supports Cloud to Device Messaging (C2DM) for android. It allows to have push notifications to a specific device without you having to deal with persistent connections, battery and CPU use .etc.
C2DM approach comes down to this. When a client connects to your server, get a list of his friends and their 'C2DM IDs' and fire a C2DM push to their devices. This push is delivered to your app, and you can respond to it by firing a notification, or update UI .etc. (Your app doesn't necessarily have to be running. Push notification is delivered via a specific broadcast, and your app can register a receiver for it to wake up.)
Keep in mind that there is a quota for C2DM messages per device, per app and also a limit for the payload per message. So you're not supposed to send massive files via this. Just a notification to your app, so it can call your server and get an updated list, instead of polling.
You can get more info on C2DM and code samples here. https://developers.google.com/android/c2dm/
Hope this helps.
You may have moved on, but I'm posting for anyone who would run into this one in the future.
Firebase is a good solution to use in this scenario, if the app is always running when you want communication to happen. (It will not wake up your app as C2DM/CDM does, unless you have a service running all the time and still wouldn't wake up if the device is asleep... AFAIK)
It may be useful for some scenarios, but may be not for a chat app as you want the device to wake up when a message arrives.
Note that they have limitations on the free subscription though.
Is it possible to send push notifications to an android application without using Google server: C2DM?
So, I would like to have my own server which sends notifications directly to the app, but I'm not sure how are the notifications perceived by the device, because the device needs to receive notifications even if the app is not running and the notifications should appear in the notification center.
I think that the guys from www.airpush.com have managed to this, but I'm not sure how.
Can anyone help me with this please?
UPDATE:
Also I would like to know how to display the notifications in the notification center if I don't use C2DM? And if it is possible to configure the notification center to receive notifications from my server even if the user deletes the application developed by us, application which registered that device to receive notifications.
I want to send 3-4 notifications a day, but these notifications need to appear in the notification center and they should go only through our server. How can I configure the notification center within the app to make requests on my server for push notifications.
Thank You!
There is a solution from UrbanAirship called Helium push. According documentation Helium:
Works on Android 1.6 and higher
Does not require a Google Account
No default pushes per day limit
No default pushes per minute limit
Works on Amazon devices (e.g., Kindle Fire)
End to end Urban Airship support (i.e., API to to device)
Best throughput
The problem is that you need development app key for using this one.
Take a look at MQTT:
MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks.
It can be used (and was used in some applications) to implement custom server push solutions. One of the most well known applications using MQTT is Facebook Messanger.
You can easily find more information on MQTT in the Internet, e.g. in this SO question or in this blog post.
According to the FAQ on airpush.com, they're not using real push notifications but rather polling the server a few times per day. One reason I think this is a viable solution for you as well is that Android's C2DM apparently makes use of the Google Play Store, so it won't work on devices distributed outside of the Google eco-system. With over 5 Million Kindle Fires having sold already, that is worth thinking about.
From Airpush FAQ:
When executed once from the main activity of an Androidâ„¢ application, the Airpush client utilizes Androidâ„¢ OS's AlarmManager framework to schedule ongoing server polling events a few times per day. If an ad is polled from the server it is cached until optimal display time, which is algorithmically determined by the server.
Without using C2DM there's not option for a "real push notification". Because (afaik, correct me if I'm wrong) an android device registers at google (they can still deinstall malware from your phone via remote) and with this ip they are able to do a push notification. All other solutions could tend to be a "register at a server, keep the connection alive and wait for requests" or something and tend to be more battery-inefficient.
Parse has an excellent push notification service for Android, very easy to setup. More info here: Parse Android Notification Doc
If you want the user to only receive 3-4 messages per day and your messages are not bound to specific arrival times, you don't need pushing mechanisms.
Just create a service in your app that checks your own web service 5-10 times a day. If there is new data, make your app display it in the notification center.
If you don't want to have a service running all the time (like many messaging apps do), you can set up alarms (using the Android AlarmManager framework) that wake your app up regularily to check for new messages to display.
And if it is possible to configure the notification center to receive
notifications from my server even if the user deletes the application
developed by us, application which registered that device to receive
notifications.
That sounds like you want to write a virus or root kit ;-) You could use e-mails for your messages instead.
UPDATE 2013-12-30:
As just noted in my comment, rebuilding what GCM does is not a nice approach. It's enough when Google Services already load the device with this functionality. If your goal is just that Google does not see what messages you send to your users, you might aswell encrypt them. For Google not being able to actually read your messages, the client app should generate a key and send it to your server. All messages you send via GCM can then be encrypted using that key.
If you just want to circumvent Google's restriction on the amount of messages sent to users, you could pack multiple messages into one GCM notification and show them one after the other. But then again, we are back at some kind of polling solution as described before, with the exception that the user does not need to have internet access when you want to show the messages as they are cached on the device.
I want to remotely change few SharedPreference settings on my App.
I have been able to achieve this using SMS messages and corresponding broadcast listeners.
Now I want to use my app web server to do the same over the internet.
My question is, is google's C2DM the right choice for this task or it it an overkill or may be even unreliable for this job?
The objective is very simple. Send some kind of notification to the app that triggers a broadcast receiver. Parse the message received and based on the keyword in the message take some action(change SharedPreference settings in this case).
Any pointers?
C2DM does have its quirks, but for this purpose, I personally think c2dm is a good idea.
However you mentioned "unreliable" - one of c2dm's major drawback.
In this introduction, it's clearly mentioned that:
C2DM makes no guarantees about delivery or the order of messages.
Although for the "overkill" part, i can guarantee that using android's c2dm architecture is way more simpler than implementing your own push notification implementation over persistent tcp/ip (check out this article).
C2DM is used for notifying really small messages like new offers,update version released etc. C2DM is loosely based for just updating app from market(now Google play), as far the reliability matters, it will not be the best choice to do it cos you have to sync your app with user's Google account, ultimately what your app server will do is, it will send message first to C2DM server and then C2DM will send the message to you and C2DM is the central for all other apps too like you, So it may happen that your message can not reach to mobile if something goes wrong to C2DM server. So its better not rely on C2DM and find your own way for push notification of your app such as when application starts it searches for any update or anything via service and do needful on based of service's response
I am writing an Android app that talks to a server. The server has information that is updated irregularly, and the app must be informed of each update. My current solution is to have the app query the server at regular intervals to see if the information has been updated.
Is there any way to have the server initiate the interaction (say, only when the information is actually updated)? I have heard about "Remote Intents" which simulate this behavior, but I have not been able to find any information on them. Does anyone have any advice on how to make this work?
Read up on Cloud To Device Messaging. This is designed to do exactly what you're looking for.
You could have the server send out an SMS message, and the application checks for a certain pattern (perhaps starts with something known). The data is extracted from the message and the notification is raised.
This question deals with how to analyze incoming messages:
How to analyze incoming SMS on Android?