Android :: Does Database Get Completely Removed And Recreated Then Updating An App
Aug 28, 2010
I have an app that uses a database. At startup I check to see if my tables are missing and if so I create them. Works great.
I've noticed that if I "adb uninstall" then the next time I run my app the tables are created again (this is what I need), but what about when updating through the marketplace?
I'm in the process of releasing an update, and I've made major changes to the tables. I'd like it if the tables were completely wiped and re-created, in fact my app needs this to happen. If someone updates and has the old tables then there will be a force close. Does anyone know the specifics of this scenario?
My tables are only for lookup, I store no user data so I dont really care about losing data on the updates.
Of course I know an option is to use some type of "version" table and check to see if I need to manually drop and create, but I was wondering if that was even needed.
View 1 Replies
Jan 4, 2010
I update a value in my Database in a Listview using a Context Menu. The code so far seems to be ok. But everything i try to make the update visible in the View failed. Anyone can point me whats wrong there ? I use a ViewBinder to map the Layout for each row.Code...
View 7 Replies
View Related
Jun 24, 2010
I've just started working with SQL and Android and from what I can see, updates and inserts back to the database need to be handled individually?
I can retrieve a Cursor containing multiple records, but if I wanted to apply an update to each record in the cursor, I can only see how to do this individually, using ContentValues and Update(), and then the cursor requires reloading??
Same with if I wish to create multiple new records, these appear to be required to be inserted individually? Can I not create a List and bulk insert?
To me this seems slow and cumbersome, and there has to be something I'm not yet aware of (searching for answers is failing me... likely due to using incorrect terms being new to android/java)
Here's a very simple example of what I basically what I want to achieve, however there must be a better way to achieve this functionality. (I know there are some other bad practises in here, just creating a quick eample)
CODE:.........................
View 1 Replies
View Related
Sep 1, 2010
I have a singleton in an activity. When I end my application (like pressing back button), and start it again after some time, the singleton is not recreated, but is holding previous state. Singleton is not destroyed if the application is destroyed? Do I have to null its static members in onDestroy() to avoid memory leak.
View 1 Replies
View Related
Nov 17, 2010
I have an activity (say activity A) which displays video using a mediaplayer, rendered in a surfaceview.
The use case is to pause the video, start another activity (say activity B), then come back to activity A.
Activity A is stopped but not destroyed when going to B, which is good.
The surface view (since not visibile) IS destroyed (as observed from the notification callbacks). When coming back to activity A, and restarting the mediaplayer using start(), the media player does play back the audio, but video is not seen. Errors like this one are output on Logcat:
CODE;......
Unfortunately, using the new instance of SurfaceHolder as provided by surfaceCreated() doesn't help (i.e. provides the same error).
I have read in various posts a solution would be to reset the mediaplayer and restart it completely, however it is not efficient, as the end user would have to wait for the whole player preparation cycle + seekTo last position within the stream.
As shown with the fact the audio plays back, it should be a matter of plumbing between the the video decoder and the new surfaceholder/view.
What should be the best solution (best = fastest) to resume video playback when resuming the activity?
View 3 Replies
View Related
Sep 30, 2009
I have a flow A->B->C->D where A desires some information that is obtained by D. B, C, and D propagate the data back through the flow using setResult(RESULT_OK, data) and finish(). All intents in A, B, and C are started with startActivityForResult. However, if B is reclaimed by Android and forced to call onCreate again after C finishes onActivityResult in B is never called and the data never makes it back to A. Is there a way I can be sure that onActivityResult will be called?
View 5 Replies
View Related
Jun 13, 2010
In my TabActivity the user may be asked to switch to browser activity for OAuth phase, and if the phase takes too much time, my activity will be killed. After the user switches back to my activity, its onCreate() method is invoked again and tabs are recreated.
So I would like to know if there is any simple way to switch back to previous tab, and keep the tab as what it was. For example, one of the tab views contains a ViewSwitcher child, and I want to switch back to the switched view after recreating the activity.
View 3 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
Jul 24, 2010
Anyone having trouble with widgets stop updating? Like my clock/calendar/weather/news/pretty much any widget i have stops updating after an hour. So i look at my clock widget two hours later and it is an hour behind. Happens to ALL my widgets.Even the quick turn on/off wifi,bt,gps and such. They just stop updating/showing animation.I have ADW launcher installed. I am wondering if it is that. I do not really want to remove it as i hate the stock 3 button interface at the bottom (why do i need a contacts and phone, just use the phone to look thru contacts, wasted space IMO) and am quite keen on keeping the 5 button.Any ideas? If i power off the phone and turn it back on it's fine again for about an hour. SOmetimes randomly thru the day it will start updating and working fine again then randomly stop again.
View 12 Replies
View Related
Nov 8, 2010
ive been looking for a week now i need some help connecting to a remote database...i want my app to get data out of the database and update the database.ive tried this http://www.helloandroid.com/tutorials/connecting-mysql-database but i dont understand it.
View 1 Replies
View Related
Aug 23, 2010
I'm trying to deploy an application with an existing SQLite database.I've been reading though the examples that are posted but they are always missing some part of the class. I feel like I'm trying to bake muffins but no one told me to use baking powder.Can someone post a full database helper class for depoying an SQLite database on Android? Edit : Delete old code because it doesn't work.
View 2 Replies
View Related
Apr 12, 2010
I'm currently developing a Field-Service application that stores data in the local sqlite database on an android device. At some point, usually after completing the data collection rounds, the local sqlite db is to be synchronized to a remote sybase db on the server.Any suggestions as to how this could be achieved or engineered as a solution? Or even better, are there alternatives to synchronizing data in such an application?
View 1 Replies
View Related
Oct 23, 2009
It seems that DrivingDirections have been removed since Android API 1.0
What's the way now to display a map with two points (one of them might be the current location, but can also be any other location) and the direction from one to another in Android 1.6?
View 3 Replies
View Related
Jun 12, 2009
Daniel wrote: > I get this error when compiling. Can anyone else replicate it? It > happens when importing android.app.ProgressDialog on 1.5-r2
CODE:......................
View 2 Replies
View Related
Nov 8, 2010
I seem to be having a problem with Android ListView. I'm trying to delete the selected item from ListView. The delete method is working and will allow me to delete as many items from my list as needed, but whenever I scroll to the bottom of the list (after atleast 1 item has been deleted) I get an Error that closes the Application.
Here is my code:
CODE:.............................
View 2 Replies
View Related
Jan 19, 2010
I've had a one star rating on a new theme I released and as It's the only rating it looks terrible. I would accept it if they just didn't like the theme but they say it force closes and does not work which after thorough testing, I have never been able to replicate, whats even more annoying is that in the listing we have put our email incase anyone gets problems then they can contact us to get them rectified.
View 5 Replies
View Related
Sep 10, 2010
I removed the Android Battery Manager widget by moving it to the trash bin because it was taking up too much room on the home screen. I thought it would still be located in the Adroid Widgets queue, but it is not. Is there a way to retrieve it?
View 1 Replies
View Related
Nov 11, 2009
I'm trying to remove activity icon from launcher panel. I'm using firmware 1.5. But nothing seems to work. I'm not receiving any error but activity icon is not removed.
View 7 Replies
View Related
Nov 12, 2010
My company is looking at upgrading from WinMo Intrepids to possibly Android phones.We are with Sprint so only those phones are being looked at.Couple of questions from an enterprise mind.Android 2.2 updated exchange policy support so some of our concerns are being met.My biggest questions are relating to Sprint ID and the Android Market.One does anyone know if you can totally locked down Sprint ID? As in not allow other ones from being downloaded and installed. Basically to give us a way to lock the phone down with what apps we want.Next big thing is can the Android Market be locked down/Blocked/Removed?Remember these are going to be company phones mainly being used for exchange email, not personal phones to play around with eating up data.Generally just looking at ways to keep the phones secure from all the nasties out there. We are looking at the Optimus S which is why I bring up Sprint ID.For my side of it, I would generally be against this. I own an Evo and love tinkering plus I will be the one developing in house apps for us to use.
View 2 Replies
View Related
Aug 25, 2010
I had Sickipedia but had to restore phone. Now I can't get this app on the Market. Is there any solution for this?
View 1 Replies
View Related
Aug 19, 2010
I removed the pull tab sticker off the back of my Droid X. Does this in ANY way hurt the phone????
I read that they will replace the phone under warranty.... I still have the pull tab and put it back in, is it worth risking getting a refurbished phone?
View 3 Replies
View Related
Sep 27, 2010
I have a ListView. When I click on a ListItem, I set the background of the ListItem (it's view) to another color:
CODE:........
Here is my adapter:
CODE:......
The problem is, if I select multiple rows, then multiple rows have a colored background. I only want the clicked item to have a colored background. So if I click on row 2, I want it to turn red, then if I click row 1, I want row 2 to go back to normal, and row 1 to turn red.
View 2 Replies
View Related
Feb 4, 2010
Why isn't Google playing nice with regards to the Linux Kernel Android code? Greg KH says the Android code is stagnant and as a result got removed recently: http://www.kroah.com/log/linux/android-kernel-problems.html
I know for a fact Greg KH bends over backwards to help Linux Kernel developers maintain their code, so hearing this news about the Android drivers being removed is very troubling. Hearing about all the hardware companies that now cannot get their own Android drivers into the main kernel is the worst of it. Google seems fairly evil lately, but everyone who should care (fellow Android developers, I'm looking at you) seems to just want to put their hands over their ears and sing "la la la la".
Android is not being handled in the true spirit of open source, and Greg KH's assessment of the situation is even more proof of that fact.
View 12 Replies
View Related
Jan 9, 2014
Noticed in Android 4.4, Google removed one of internal functions in class, DexFile:
native private static int openDexFile(byte[] fileContents);
which is capable of performing loading dex from byte-array without going through reading the dex file on disk, which has proven to be very useful
View 1 Replies
View Related
Nov 1, 2009
I want to build my own cloned databases of all or some of the Android native databases like Contacts, Calllogs, Mediastore, Settings, etc. I want to know wheher it is possible and How I can know the database schemas of these databases? Is there any documentation on this?
View 4 Replies
View Related
Oct 25, 2009
I just got a tattoo this week and have had a few problems, and thought I would post what I have seen so that other tattoo users can either add to the list, or respond with solutions or workarounds they have found.
1) many apps from previous android phones are not available (presumably this is because they are "incompatible with the smaller screen resolution, but I suspect that many of them are just incorrectly tagged for 1.5 sdk or earlier, but would likely still work with donut-1.6) but could easily be made available with a tiny bit of tweaking.
2) the HTC Mail widget can't be removed (or moved) from the second screen to the left on the Sense interface. Why even bother with this one over the gmail?)
3) speaking of Gmail - somehow it only accesses the messages which are actually to my gmail address, and not to other addresses which are forwarded to my gmail (and are always in my gmail inbox) do I need to install google gears to get this working (which is not, as I found out quickly "gears for android" as listed in the marketplace) as it does on my laptop?
4) All of this is would be easily solved if someone has just figured out to root this thing... I started along the hero donut instructions I had seen at unlockr, pressing the down volume rocker while turning it on.
View 13 Replies
View Related
Feb 5, 2010
I used the sholes app to root my phone. Didn't work for me. Went back to2.01 but now I don't have voice search. I use it several times a day and want it back.
View 2 Replies
View Related
Oct 7, 2010
I bought Beautiful Widgets, installed them and removed them from my screen. I am deciding how I want my little Zio to look. And no, I am not upset at my little problem. I love and would recommend the program. However, this AM I noticed clouds floating across my email screen after the phone sat idle for an hour or so. I took a look at all running apps (Task Killer, sorry) and nothing seems to be running that would account for the animation. I asked Mr. Google about this and he is as clueless as I am.
View 4 Replies
View Related
Apr 7, 2009
I received a message from google saying that my game "Robotic Space Rock" was pulled from the android market after a request made by a legal firm representing an entity known as Tetris Company. My application was removed from the android market together with Blocks, Cubik, Net Tetris, Netblocks and Tetroid (6 apps in total) under claim that it violates the DMCA and more specifically trademarks and copyrighted material owned by the Tetris Company. However, none of the trademarks or copyrighted material (music, graphics and sound effects) are present in my game. Sound effects and music were created by me specifically for the game. There is no reference to the word tetris in the game. Additionally, all the game code, graphics and sound effects were created by me and published on the code site http://code.google.com/p/monolithandroid
Additionally, I am not aware of a software patent covering the game mechanics of Tetris, so I cannot see how I could violate something that is not protected by a software patent. Also, even if the game was protected by a patent, the patent would have expired, since the original game, Tetris, was created 23 years ago. However game mechanics cannot be covered by patents.
I would also like to point out that my game is available completely free of charge to every user of the android market.
I wrote those concerns to Google and I sent an email to the EFF. The bottom line is that for my application to be restored on the android market, I have to send a DMCA counter-notification. And then the Tetris Company can sue and take the case to Court.
When games were pulled from the iPhone App store, they blamed apple, but it is not hard to see that behind application removals we can find companies like the Tetris Company, that demand application removals claiming copyright infringement and trademarks. However, it is not easy to battle these companies as individual developers. I, for example, am a Greek citizen living in Greece, so it is difficult for me to file a counter-notification, because then the Tetris company will probably sue me and I will have to defend my case in court. Why should I bother? Am I making money out of the game? No! But even if I did you can see how easy it is for corporations to neutralize developers like that. I think that something should be done. Independent developers should get together to battle against such misuse of the law by corporations. And to those that want more facts, you can find more details on my blog: [url]
View 1 Replies
View Related
Mar 16, 2010
I am using Windows and Eclipse. Through a few mis-clicks, I removed the Android library from my project. I am able to add the android.jar file from the specific version I want but that is does not allow me to run.
In eclipse, how do I add an Android library like 1.6 to an existing project?
View 2 Replies
View Related