Android :: How To Get Location Information From Intent Bundle Extras?
Jan 2, 2010
I am trying to use Android's LocationManager requestLocationUpdates. Everything is working until I try to extract the actual location object that in my broadcast receiver. Do I need to specifically define the "extras" to my custom intent so that the Android LocationManager before I pass it to requestLocationUpdates so it knows how to add it into the intent, or will it create the extras-bundle regardless when it passes the fired intent to the broadcast receiver?
View 1 Replies
Sep 16, 2010
I've implemented parcelable on a class of mine per the doc instructions, works fine: code...
but I haven't implemented a copy constructor. However, the createFromParcel() method which I did implement is almost like a copy constructor. I'm wondering if I can use it make a copy, but I can't figure out how to get a Parcel instance from the intent extras:
MyParcelable mp2 = MyParcelable.CREATOR.createFromParcel(getIntent().getExtras().getParcelable("key"));// ? just need a parcel ?
it's not the greatest idea, just wondering if it's possible to avoid making another method for my class which will almost be identical to what's already implemented for the Parcelable interface..
View 2 Replies
View Related
Jan 17, 2010
I'm launching activity from preferences screen. Activity is shared among three preferences.
I wonder if i can set extras for this activity in xml. code...
All i need to do to pass an integer really. I can different actions and check action instead of extras.
View 5 Replies
View Related
May 20, 2009
- Hide quoted text -
View 2 Replies
View Related
Nov 23, 2010
I set an PendingIntent on a Notification (notification.setLatestEventInfo). this intent is actually the same intent used to launch my app, only with a flag that I put in the extra (intent.putExtra(TAB_INDEX_PARAM_NAME, UPDATES_TAB_INDEX)).
So my first activity launches, it queries it's intent's extras and immediately navigates to an Alerts activity rather the normal activity on a regular launch.
The problem: from this point, every activation of my app navigates to this Alerts activity. when debugged, I find that the flag is "stuck" in the intent even though I removed/changed it. it just won't change.
How can change an extra on a giving Intent?
View 2 Replies
View Related
Jun 29, 2010
A few days ago I was struggling to find a way to use custom intents for my alarms. Although I got clear answer that I have to customize the Intents based on some unique ID eg. setAction() still have some problems.This can happen more than once for a contact. And when the second message is generated, the notification is raised well (message is fine there) but the intent when the user actions the notification it uses old data, so previous message is passed and not the brand new message.So someway the intent is caching and reusing previous extras. How can I make it unique per contact and per action?
View 3 Replies
View Related
Mar 4, 2010
I put a notification in the status bar with a PendingIntent (with Extras info) that points to my main app (main activity). When the user clicks the staus bar, the PendingIntent is fired and my app launches and I can read the Extras info in my onCreate() method. So far so good.
But if my app is already running, the PendingIntent simply causes the app to come to the foreground and it does not call any of my methods, so I can't read the content in Extras. What can I do?
View 1 Replies
View Related
Nov 7, 2010
Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored and how can it be deleted from another app or command line on a rooted phone?
I need to delete the user data (username, password) of both the native Facebook app (com.facebook.katana) and the stock browser on Android (com.android.browser) on a rooted phone via command line (which I call from my own app) or elsewhere from my own app.
This is what I'm calling:
rm /data/data/com.android.browser/cache/webviewCache/* rm /data/data/com.android.browser/databases/* killall -9 com.android.browser
rm /data/data/com.facebook.katana/cache/webviewCache/* rm /data/data/com.facebook.katana/databases/* killall -9 com.facebook.katana
After I kill the facebook process, I check the running processesand there is no FB process running anymore. I then restart FB via long-press on home and choosing the FB app. Previous username/password still show on the login screen (= same screen as I left it before I killed the app). When I then press 'back' on the device, and then start the app again via home long-press / select FB, the login screen is empty.
Where do the values for username/password come when I start FB again in the first place? I assume that the login activity still retrieves the savedInstanceState, but how could that be avoided - or else, where are those UI states actually stored, in order to delete them? Shouldn't the restarted app, after all it's processes are killed, already be in a new lifecycle?
Same problem is with the stock browser: if i leave the browser and I'm on the login page of for example gmail.com where the username/password is entered (but form not submitted yet), then killing the browser process, the values (username) entered into the form will still be there after restarting the app again after it's been killed.
View 11 Replies
View Related
Jun 27, 2010
This questions somehow relates to the question when I was looking to get the extras back in startActivityForResult but now I face another challenge.
I have subscribed to receive ProximityAlerts and I have explicitly constructed the Intent to include some Extras. But when I got the service the extras are not there.
After the answers here is the working code:
CODE:..........................
The documentation says param PendingIntent to be sent for each location update.
View 2 Replies
View Related
Oct 5, 2010
I would like to pass a considerable sized amount of data (~1500 bytes) between two applications in Android where performance and resource allocation is a priority. The data is basically key-value pairs. The rate at which it needs to be passed from one application to another can vary from a trickle to ~50 packets within a second. I figure I can either:
Wrap all the data inside a bundle, and pass the bundle via an Intent from one application to another. I worry about the performance implications of allocating and de-allocating all that memory to store the bundles.
Write all the data to a SQLite database and provide it to the other application via a content provider. Here I worry about the performance implications of writing all that data to disk, and then having to read it back from disk when it is requested. So, which is the lesser of two evils?
View 1 Replies
View Related
Oct 6, 2009
Just upgraded my phone firmware to 1.6, and it looks like Location objects don't have satellite counts in them any more:
locMan = (LocationManager)con.getSystemService (Context.LOCATION_SERVICE); Location loc = locMan.getLastKnownLocation (LocationManager.GPS_PROVIDER); Bundle extraBundle = loc.getExtras();
extraBundle is null. So, I can't call
extraBundle.getInt("satellites").
View 5 Replies
View Related
Jul 30, 2009
I have a notification that starts my activity and passes a messages using the intent's putExtra() function. The message is then displayed to the user in the activity's onCreate function. When the application is restarted due to a orientation change, the message is shown again as it is still in the intent's bundled data.
How can I remove the extra data?
I tried the following:
Bundle bundle = getIntent().getExtras();
if (bundle.getBoolean("showMessage")) {
// ... show message that is in bundle.getString("message")
// remove message
bundle.remove("showMessage");
}
But the message will still be shown after the orientation changed, seems like the intent used is not the one I changed, but the original one. The only workaround I found is to save the showMessage additionally in onSaveInstanceState(). Is there another way? Or is this the way to go?
View 2 Replies
View Related
Aug 19, 2010
I am doing one application in which I am fetching the Cell, location ids of the towers. I am able to get cellid, lacid and networkOperator name. I am using the following code. private GsmCellLocation gsmCellLocation; gsmCellLocation = (GsmCellLocation)cellLocation; cellID = gsmCellLocation.getCid(); lacID = gsmCellLocation. getLac() ; String networkOperatorName = telephonyManager.getNetworkOperatorName(); But I need the location name of the tower, like what we get as Cell info display. How is it possible.
View 2 Replies
View Related
May 8, 2010
I have a few questions regarding the usage of localization in android applications: Are there any interfaces available to find out when an application uses location information? Is it possible to know if the application is using coarse or fine grained location information? Is it possible to detect which type of localization is being provided, i.e. gps vs. wifi? And if the answer to any of the above question is yes, how? 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 2 Replies
View Related
Dec 3, 2009
I am new to ANdroid . I am not able to fetch email location and other contacts information in android2.0. Although i m able to fetch contact name and phone number.
View 3 Replies
View Related
Aug 23, 2012
i want to develop an application which send user's location to server. My server is tcp i dont know how to send location from emulator to server and how server receive it
View 1 Replies
View Related
Mar 29, 2010
I just got my phone and the battery might still be stabilizing, and of course I'm fiddling with it a lot and I've installed heaps of apps, but I can't quite work out something. I unplugged my phone at midnight and this morning found my phone at 70% charge. I also got a message from my provider that I'd used up all my data. I checked and found that my phone had used up (sent+received) 30MB overnight. Google Maps was the biggest culprit - it received 700K but it sent almost 8MB. This is while the phone was sitting on my bedside table! And of course, as I'm driving to work (not using the phone at all), Google Maps was transmitting my location information back to it's servers so that the traffic flow is updated on their systems.
That's cool, but there doesn't appear to be any way to disable or turn off this in GM's configuration, or even exit the app. It seems that having My Location services enabled gives Google Maps (and I'm sure other apps like weather, gmail, Contacts, etc.) free reign to send and transmit data all the time. I don't want to have to disable My Location services completely; I want finer control over things on a per-app basis. Having Google Maps transmit 8MB overnight might not seem like a lot, but when the phone is idle, it disables wireless (to save battery) and thus all data is going through 2G/3G and I'm incurring data charges.
View 4 Replies
View Related
Jul 6, 2010
I have found this erroneous behaviour on my phone, please let me know if you have any idea how to resolve it. However, when I open this intent, the gps on the device starts and google maps first displays my location instead of the location in the URI. This happens only the first time you open google maps. If I go back to my app and make the same selection, then the correct position on the map appears.I tried using something like this: geo:0,0?q=*business+near+city, however this doesnt centers the map on a position, but in the nearest address.
View 2 Replies
View Related
Jun 13, 2010
I registered a PendingIntent to requestLocationUpdates(provider, minTime, minDistance, PendingIntent). But when my broadcast receiver receives this intend, how do I remove this request with removeUpdates(PendingIntent)? The receiver doesn't hold a reference to the original PendingIntent.
View 1 Replies
View Related
Jul 7, 2010
I am a Mac user (photographer/ videographer). I also rely heavily on my iPod Touch when mobile (i can often find a wifi signal when i am out and about). I use iCal on the Touch and iCal on my Mac as well as the address book on both everyday and as a Mobile Me user, my two devices sync so everything is mirrored and up to date. I also HATE AT&T for their terrible signal strength and coverage and have been a loyal Verizon customer for many years and this is why I don't have an iPhone. Okay, all that being said, is there an easy way to still use everything I love and rely on with my Mac (the calender and address book, mainly) and easily sync all of my existing information and future info to an Android based device? How easy is it to use an Android device with a Mac? I don't want to have to manually re-enter my entire address book into a new device.
View 8 Replies
View Related
Jul 31, 2010
I am currently on tmobile using a vibrant. The bugs with the vibrant are starting to bug me, and there is no where else to go to for tmobile. I am thinking about going to sprint for the EVO. I will have to figure out a way to get out of my tmobile contract, (hasn't been 14 days) if anyone wants to help me with ideas.
my main question is, is it true that you have to pay an extra $10 a month for the Evo? I don't have 4G in my area, do I still have to pay for it? What kind of deals can I get from sprint for a new contract? Can I keep my same number?
View 30 Replies
View Related
Nov 9, 2010
This is a list of Themes and some Extra's for the Droid X.
The themes are listed by ROM compatibility. One's marked "Verified" will represent the ones the creator verified with me or it states in the creators post. If it does not say "verified" I used my digression. If something is wrong, don't shoot the messenger.
- If you find dead links or anything I am missing, please PM me.
- If a theme is listed under the wrong section PM me.
- If a theme works with other roms other then the section listed in, PM me and I will note it on that theme.
- If you have questions or issues regarding a theme, direct your question to that creators post.
- Updated 12/8/2010
- See my ROM section - HERE
================================================== =======
Themes for 2.2 Froyo 2.3.15 Deodexed Roms(if these themes work on other Roms PM ME and I will note it)
Creator: phimuskapsi
Vanilla Android
BlueSteel
Creator: drewden123 - Verified
Xtreme
Creator: D13 - Verified
NexTheme w/ Teenfaces statusbar
Creator: Webst3r
RedSteel
BrushedSteel
SenseX 2.2
Creator: 928 Droid
Black Glass X
Creator: bad4u6669 - Verified
Red Overload
Royal Blue
Creator: bignadad
BiG Droid X
Creator: Mike919
Purple Passion
Nex-TANG
Creator: Mrbobrowitz - Verified "Themes will work for any Blur/ Non Blur Rom"
Galaxy S
Drop Theme (Red)
Creator: Explodee
Froyo Dynamite
Creator: ULTRALINX
Minimal Matte - gotta pay for it
Creator: Krayzee - Verified
Droid X theme - he needs beta testers
Themes for Blur Roms
Creator: Fabolous - Verified
NexTheme
REVOlution R2
Creator: Team Incognito - Verified
Incognito Blurred Themes
Themes for Blur-less Roms
Creator: BBCrackman - Verified
BBC Dark Status Bar and Clear Lock Screen
Themes for Specific Roms
Creator: javroch - Verified
Black Out for Fission DX
Creator: Many Creators - Verified
Themes for the Fission Rom
Creator: Fabolous - Verified
NexTheme for ApeX
REVOlution for ApeX
Creator: Mrbobrowitz - Verified
Galaxy S for Tranquility
Creator: Bgill55 - Verified
Incognito Color Series For RubiX - link down
Creator: JsinLegacy and Rola - Verified
iX for rubiX Focused
Xpired for rubiX Focused- post#3
Sinful Series for rubiX Focused
Creator: Juicemane - Verified
Black Juice for rubiX Focused (2 color choices)
Blur Based Black Juice Theme for any Deodexed 2.2 rom
Black Juice for rubiX Blurry
Creator: Natemz - Verified
ProDX Red Theme for the Droid X (only tested on Tranquility 2.8)
Creator: BarracudaCM - Verified
Nebraska Theme /ColoredNebraska (Themes for: rubiX, FlyX, Fission, Tranquality and any roms)
Creator: Faber78 - Verified
KangeradeX for Fission
Creator: Joe722 - Verified
X v1.1.4 for Fission 2.0+
Ports By: Bjoe722 - Verified
NexTheme for Fission
Revolution Remix for Fission
Galaxy S for Fission
Revolution for Fission
Kangerade Blue for Fission
Creator: gregtard- Verified
DarkAndroid for rubiX Focused 1.9.3
Blue Droid Theme for rubiX Focused 1.8.6, 1.9.3, & 1.9.0 Leak/Non-Leak
DarkAndroid for Tranquility 3.5 & 3.5.1
Ported By: RoLa
Flavored Ice- Dark Berry Edition by Jairomeo for Rubix Focused
Creator: Team Incognito
Incognito Back bar mod for Ruibx Focused
Creator: ArmyRanger
Simple Black bar Mod For Blur Roms
Creator: Mrbobrowitz - Verified
Blackmodzz 2.0 - for ANY 2.2.1 Rom
Extras
Creator: bad4u6669
Themed Swype / stock keyboard
Creator: WJG
Droid X Modified Gallery
Creator: acidbath5546
Dark Vanilla Lockscreen mods for Droid X - Metamorph needed
View 17 Replies
View Related
Nov 19, 2010
I first want to start by saying I mean zero disrespect. I have the utmost respect for the moderators here and all the people who make this the most user friendly android forum around! With that said is there any way to have the thread ROOTING For Dummies + Extras stickied? This is nearly a request. Mat lock has made a great guide that has been proven to be a great tool. Im sure many people would agree that having it stickied would benefit many users especially the newer users trying to learn. Short and sweet, to the point.
View 4 Replies
View Related
Oct 20, 2010
So many people may be reading this, wondering just what its all about, well, here goes.
As of probably August/September i was new in here, with no idea what to do with the X10 - through the X10 community - nay FAMILY - on this forum, i have developed from someone using basic stock icons, to well, a fully custom layout. HUGE HUGE thanks go out to X10iUser for the guidance in getting my phone here and the late night tutorial tonight lol
and to everyone else in this forum with their thoughts and ideas - whether its on what widget looks nice, or what background - keep them going, cos they bring us to the end results we dream of (well it has done mine lol)
So thats where i came to - i've modded the HTC Keyboard - which CuBz does an awesome job on explaining how to install here How to install HTC keyboard Step-by-step
and then modded with the guide from GIMPSTA at XDA here http://www.gimpsta.com/themer/main.php, the homescreens were taken from advice on widgets and apps in here Show Us Your X10 Homescreen... and the fonts from here Android Fonts... I have imaged a few different screens from my setup here http://androidforums.com/1774631-post41.html
So to close it off - if you feel stupid (trust me, i did), confused or just curious about something, ask the question - after asking the question you have some idea's then share them - after you've shared them and you want to progress further - then i'm sure someone can help
Look where i took mine to from its simple beginnings in a few weeks. And if i haven't laid credit where credit is due then please, let me know and i will reference and update it. Now sod it, its 4am - i'm off to bed
View 8 Replies
View Related
Nov 5, 2010
I have a widget that contains 4 buttons to show 4 stock prices, each of them will launch into the same activity Quote.class to show stock details. In onUpdate(), it will set up the pendingIntent with extras with stock symbol. After I hit button A, it goes to Quote activity that shows stock A. Then I hit the BACK button to the homescreen, Quote activity calls onDestroy() and when I hit button B, stock B will show properly. However, when i hit HOME button after it shows stock A, the Quote activity only calls onStop without calling onDestroy(), then as i hit button B, it will call onStart() and it shows the same instance that shows stock A.
CODE:............
Originally I thought adding a flag in the Intent should solve this problem. But I have tried
i.setFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK or FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_NO_HISTORY), none of them makes any difference.
So is there any ways to make it work? How can i remove the history stack from HOME button? How can I call onCreate in Quote activity and get new extras when i hit button B?
View 4 Replies
View Related
Jan 13, 2010
Is it possible to use bundle and save the data in OnPause() lifecycle method? The scenario is i have 2 edit text and have entered some data i want to retain the data when the activity is killed and started again. his can be achieved using onSaveInstanceState() but as documentation says, this method is not a lifecycle method and hence the callback is not guaranteed. So i wanted to know if there is a way to save it using Bundle in onPause().
View 5 Replies
View Related
Jul 27, 2009
I'm well aware of onSaveInstanceState(Bundle b) and the corresponding onCreate and onRestore. What I want to do is persist the bundle somewhere simple where I'll only ever have one at a time. The functionality is to be able to resume a game from its previously stored state - not to be confused with restoring the activity during its lifecycle. I want to restore it AFTER it's been destroyed (think of turning the phone on and having a button on the game that says, "resume last game". My thoughts are that if I can just persist the bundle that I normally use for the instance state, then I should be able to reload it later upon user request. I don't want to use a provider because they seem way too over the top for what I'm doing.
View 4 Replies
View Related
Apr 8, 2010
I'd like to serialize a Bundle object, but can't seem to find a simple way of doing it. Using Parcel doesn't seem like an option, since I want to store the serialized data to file. Any ideas on ways to do this? The reason I want this is to save and restore the state of my activity, also when it's killed by the user. I already create a Bundle with the state I want to save in onSaveInstanceState. But android only keeps this Bundle when the activity is killed by the SYSTEM. When the user kills the activity, I need to store it myself. Hence I'd like to serialize and store it to file. Of course, if you have any other way of accomplishing the same thing, I'd be thankful for that too.
View 2 Replies
View Related
May 11, 2010
I'm trying to pass a bundle of two values from a started class to my landnav app, but according to the debug nothing is getting passed, does anyone have any ideas why?
View 1 Replies
View Related
Apr 22, 2009
I am implementing notification handler which logs any changes in content provider and it notifies Broadcast Receiver using custom Intent on periodic basis.But problem here is from Provider to Receiver all the values passed through Bundle.
View 2 Replies
View Related