Android :: Multiple Broadcast Messages With Less Data Or Less Broadcast Messages With More Data
Oct 5, 2009
I am developing an application which is communicating with the server. Tha application can perform log-in and get different parameters from server.
The application consists of a RESTful client (custom class for making requests), Communication Service (the service which runs in the background) and the main activity.
For now I created multiple broadcast messages and multiple broadcast receivers in the main activity so when the application performs login operation a receiver (loginBroadcastReceiver) in the main activity receives a message and when another parameter is received from the server different message is broadcasted and another receiver handles the message.
This way however the application performance is poor but I am not sure whether it is due to multiple broadcast receivers.
Does anyone know what is the best way to exchange data between service and main activity - is it better to create a single broadcast receiver and retrieve all parameters from message or is it better to initialize multiple broadcast receivers for multiple parameters?
View 1 Replies
Jun 13, 2009
I created a BroadcastReceiver and configured it with an android.provider.Telephony.SMS_RECEIVED action filter so it is called everytime the phone receives a text.Is there some event/action or other way for my application to be notified whenever the phone sends a text (preferably independent of the application that sends it)?So far the only option I see is to poll the content provider for content://sms/sent which doesn't even give me all sent texts because applications can choose not to put it there.
View 1 Replies
View Related
May 15, 2009
I create an application where i get the various data from net (say for example i am getting the temperature information of particular city and another data is the information of stock value of a particular company) now i want to broadcast that various data to all application. I create a registration process for diff application for diff data (EX app A is registrar for temp of city). so application is registrar for particular data will get that data.
How can i broadcast the information to all application which are registrar .
View 2 Replies
View Related
Jul 2, 2010
I'd like to maintain a hash table in a broadcast receiver. If I understand BroadcastReceiver's life cycle currently it could get killed wiping out my member variables. What would be the ideal strategy for retrieving a hash table from a previous run of onReceive in the BroadcastReceiver?
View 3 Replies
View Related
Mar 25, 2010
I am writing an application to listen the SMS inbox in android with one activity and one BroadcastReceiver. Once the SMS comes the Receiver is showing alert message. But I want to send the message information from Receiver to Activity. I don't know how to achieve this.
View 2 Replies
View Related
May 27, 2010
I know that the apps receive a ACTION_SHUTDOWN broadcast event when the device is shutting down.
When an application receives the shutdown, is there still an opportunity to send data packets out, or does android block such attempts(or does the platform tear down the network stack before it can go out).
View 1 Replies
View Related
Sep 16, 2010
I am adding some basic alarm functionality to my program via the use of AlarmManager and a BroadcastReceiver class (named AReceiver.java). My problem is that the data I add to the bundle attached to the Intent creating the PendingIntent appears to be lost. The only bundle data I can access in the AReceiver class is a android.intent.extra.ALARM_COUNT=1. Here is the basic code in the main activity class creating the Intent, PendingIntent and the AlarmManager: [Code in main activity - Notepadv3]
Intent intent = new Intent(Notepadv3.this, AReceiver.class);
intent.putExtra("teststring","hello, passed string in Extra");
PendingIntent alarmIntent = PendingIntent.getBroadcast(this, pendingPeriodIntentId, intent, 0);
AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP, timeOfNextPeriod.getTimeInMillis(), alarmIntent);..................
View 1 Replies
View Related
Aug 13, 2010
I'm trying to figure out if a system event broadcast is broadcasted using ordered broadcast or normal.The event is EVENT_REMINDER and in the source for the calendarprovider i noticed it sets up a alarmmanager to sent the broadcast. I can't find how the alarmmanager sends it. My guess would be as a normal broadcast , But while i was trying some things i noticed i could delay the system's notification (tried up to 10 sec) by building a sleep in my broadcastreceiver. This would indicate that they are handled ordered , and the systems receiver is only called when mine has finished. But can i be sure of this behavour?? (in all 1.5> sdk versions) the docs state that in some cases normal broadcasts are also handled ordered..due to spare of resources.
View 1 Replies
View Related
Sep 28, 2009
trying to create a broadcast receiver which responds to system events and change system settings. I don't need any interaction from the user so I don't need an activity and have been trying to do everything through the manifest file. I've put a log event into my onReceive method but it never logs anything so I'm presuming my method is never called. I've tried this with both the 1.5 and 1.6 SDKs. I was hoping somebody could have a look at my code please and let me know if there are any problems.
View 2 Replies
View Related
Jul 22, 2010
How to set a priority for multiple Broadcast Receivers when dealing with ordered intent broadcast?
View 7 Replies
View Related
Oct 25, 2010
I'm working on a project where I need to run the BroadcastReceiver for a third party library for a specific Intent. I also want to run some of my own code when the Intent is broadcast. If I supply my own BroadcastReceiver for the same Intent, it seems that only, one or the other runs, but not both, depending on which appears first in the AndroidManifest.xml file. Is it possible to register multiple BroadcastReceivers for the same Intent in the same application and have them all run? AndroidManifest.xml snippet
View 4 Replies
View Related
Aug 24, 2010
I'm working on an application using the SMS apis for android. The receiving end is an embedded unit that only supports 7-bit encoded SMS and the string I'm sending consists only of symbols from this particular alphabet which makes you think that Android is going to send it encoded as 7 bit. But that is not the case.Therefore I'm searching for a way to specify what encoding to use. See below for what my code looks like today. The method gsm7BitPackedToString turns a byte-array to a 7-bit string, i.e. the string only consists of 7-bit compatible characters and is copied from the internal android api. Code...
View 2 Replies
View Related
Feb 15, 2009
Is there already functionality similar to the push registry or wireless messaging API in J2ME implemented in Android? Or at least plans to do so?I have been looking at this issue for a while, because in a corporate environment it is essential to be able to push information out, or trigger actions via SMS or other connections.I have successfully sent an SMS between emulator instances, and successfully received an SMS by using a BroadcastReceiver on another emulator instance. I have also been able to use SmsManager. sendDataMessage to send a data message to a port on another emulator instance, but in this case the BroadcastReceiver is never triggered. This seems to be the closest the API's get to what I'm looking for.
View 3 Replies
View Related
Feb 22, 2010
I want to design a mobile application/tool for recovering deleted messages/pictures/files from the phone. I have the choice to do that using Android or Symbian. what do you think is more easier provided that I have to use some operating system concepts to solve the problem and recover deleted messages. Also what are the concepts that I can use for recovery ?
View 3 Replies
View Related
Mar 23, 2010
I have been having problem with the carrier, they use to say I have called many numbers and have sent many SMSs I didn't really call or send.
So I was wondering if there is an app which will record all the calls' duration, SMSs sent and 3G/Edge usage.
So I could have a report later and compare it to my phone bill.
View 2 Replies
View Related
Apr 23, 2013
so my phone battery is terrible, so i have an app that shuts off the network in certain situations.. my question is this: i know that when the network is off, i am not capable of receiving pix. but when the network comes back, will i eventually get the pictures i was sent? ive heard of some ppl getting my pix hours after i send them, so i hope i should at least get the pics.. if so, is there a way to speed up the process?
View 2 Replies
View Related
Jun 15, 2010
So I rooted a week or so ago. Didn't flash any new ROMs or anything, just deleted some bloatware and set up wireless tethering. Right away I noticed the data connection going up and down a lot. Then a few days ago I started periodically getting a black popup with this: When I get it, I just hit "dismiss" and so far, everything goes back to working normally at that point. Still, it's a little disconcerting. Anyone else gotten this popup or had their data connection messed with by rooting?
View 3 Replies
View Related
Aug 16, 2010
I will be traveling to Canada in the near future. I don't want to have to worry about paying excessive roaming fees, etc. How to I set up my EVO such that it will only send/receive phone calls and text messages to avoid data fees? Btw, is there a way to do this, and still turn on WiFi so I can access the web/email at my location without paying data fees?
View 7 Replies
View Related
Sep 21, 2010
I've found a few tutorials on how to send/receive text SMS messages, but none on how to send/receive data SMS messages. I have a very small amount of data I would like the users of my app to be able to share.
I am able to send, but my BroadcastReceiver doesn't ever get called. It seems this is a known issue (http://code.google.com/p/android/issues/detail?id=1576) but has anyone figured out how to do this yet?
I tried sending/receiving a text SMS and that works fine, the thing is, I need to specify a port so only my app can listen for the SMS.
View 1 Replies
View Related
May 5, 2010
Does anybody know what data structures are used to the store messages in an SMS client app, and whether there is an existing API for this.I was perhaps looking at implementing a link list for the purpose but if the work has already been done in an API then perhaps it would be unnecessary to commit time to the task that could be spent programming other parts.
View 2 Replies
View Related
Jun 16, 2010
I've had my Incredible since 4/28, and everything has been working smoothly up until about last Thursday night when it just restarted out of the blue while I was listening to music. Then right after it booted up, it restarted again, then again about seven more times. I got fed up and took out the SD card and it seemed to stop after that, so I haven't put the SD card back in since then.
Just now, Wednesday, about a week later, I was browsing around on the internet and all of a sudden, it restarted, and then again, and again, and again. I've read that it is because of poor signal strength or something like that so I had just enough time to put it in airplane mode before it restarted again.
Side note, that theory about it being caused by poor signal seems to make sense because the first time it happened to me I was out of town in a city that gets very bad coverage with Verizon, and now today when it started happening again was at my house where for some reason I get very bad service with the incredible, my old phone worked perfectly fine in my house but the incredible gets terrible service, and so does my brother's Droid. In fact, about two weeks ago I got my first dropped call on Verizon in about three years, and it was in my house.
So anyways, I decided to put it in airplane mode, and just after I put it in airplane mode it restarted again. Then when it booted back up my Helix Launcher 2 home screen went back to the standard Helix Launcher 2 icons, I go into my messages and everything is gone, my contacts are all gone, everything is gone. I go to the app menu and all my apps are still there, but when I start up an app, all the custom settings are default now. I went into the settings and my accounts are all still there. I click on internet and I get a terms of service agreement, it's as if I am booting it up for the first time, but for some reason my apps and accounts are all still there.
I turn airplane mode off thinking it might have something to do with it not being connected to my google account, and I restart it again and everything is still gone. I don't know what to do, has this happened to anyone before? I feel like there should be a way for me to get this stuff back since my apps are still there and my accounts are still synced, but random things are missing like my contacts and messages etc. This is really starting to get annoying, I have insurance and everything, but I really don't want to exchange it for another one because I've read that other people who have had there phones replaced have still had the same rebooting problem, even after going through multiple replacements.
View 2 Replies
View Related
Jun 10, 2010
Using the stock email app, how can I select multiple messages at once to mark as read? I haven't found a way to select messages of any kind in a list in a highlight many or select all kind of way with this touch screen.
View 1 Replies
View Related
Mar 4, 2010
I'm making an Android Java app game (although this question applies to all languages really) and hope to release the first version soon. I'm nervous about how I save data in my game. My problem is that, if in a later update, I decide to store more data or store the same data in a different way, I need to be careful I don't lose or corrupt data for users that upgrade (i.e. I want users to be able to use data created by an old version in the new version, like their high scores from before).For example, say I want to save high scores in version 1.
View 3 Replies
View Related
Dec 4, 2009
Just switching to the Eris Droid phone and like it for the most part...what I don't like is it's email client. The GMail one works nicely, however, the Mail that comes on the phone doesn't allow you to select multiple messages and delete them..like outlook or the versamail client on a Palm device.
View 2 Replies
View Related
Apr 23, 2013
I want to delete a bunch messages from one thread and keep the others, I don't want to delete the whole thread. The messaging app I'm using is stock JB 4.2.2.
Questions:
1. Is it possible to do it without other apps?
2. If not which messaging app do you recommend? I prefer something close to stock and light.
3. Are AOKP or CM10 using stock SMS app or they do have their own?
4. If they use their app, are they have the option I mentioned?
View 3 Replies
View Related
Oct 30, 2010
I have an IntentService that broadcasts an Intent each time if finishes some work. Each broadcast Intent is identical except that it contains a Bundle with some result information from the IntentService. Evidently, having different data in the Bundle is not enough for Android to think it's a different Intent. If the IntentService broadcasts two of these Intents back-to-back, the second one is dropped as a duplicate.
I know I've read about this behavior in this forum in the past but I can't find in the documentation where this duplicate elimination logic is described in detail. Mostly, I just want to differentiate the Intents enough that they are not considered duplicates. Any pointers would be appreciated.
View 13 Replies
View Related
Jul 19, 2010
I'm pretty sure no one but me is using UDP broadcasts but in the rare chance that someone is - has any experienced this? I use UDP broadcast to do LAN multiplayer games - it's how clients discover hosts of games.The EVO can't ever see the games when all my other phones can.
View 4 Replies
View Related
Sep 9, 2009
I had one question: Is it feasible to use a BroadcastReceiver as a glue layer between the user interface and the underlying business logic ? Example use case: Suppose i am maintaining the state of a call, and providing callbacks to the UI by invoking sendBroadcast with the relevant intent. Similarly, my underlying business logic can send broadcasts to the activity that has registered for receiving it on certain events ( like call connected, connecting, timed out etc).
View 4 Replies
View Related
Dec 30, 2009
Is it possible to use just a broadcast receiver without any activities? I just want to run some sample code only when the phone receives a call and nothing more. I use Log.d to write out but I don't see anything in the log. Am I missing something here? I also have permissions set in the androidmanifest.xml to allow for these type of intents.
View 3 Replies
View Related
Jul 1, 2010
is there any way to be notified (using a broadcast receiver) after a sms is sent? i want to get notified when a sms is sent and carry on with my program.
View 7 Replies
View Related