Android :: How To Implement - Undo For SQLite DB Changes
Nov 1, 2010
I am trying to adapt my application from a confirmation model to an undo model. For those of you who don't know, this is where you can delete something with one click but if it was a mistake you can undo it just as easily, as opposed to interrupting the user every time he/she wants to do something to ask the annoying "Are you sure you want to...?" question via dialog.
My app is backed by the Android SQLite DB and I want to be able to undo a limited set of delete and update operations. Also, I only need to be able to undo one sequential change and the information does not have to stick arround for very long.
Everything I read on undo/redo says to use a command model to store the data. My question is how can I store the database changes in a lightweight restorable way?
View 1 Replies
May 5, 2010
I need to store a queue into a DB. I need to be able to insert at the head, and append at the tail. I also need to remove items from the head.
Each item is just a string. I need to maintain a todo list -- high priority items are added to the beginning of the queue. and low priority items are append to the end.
View 2 Replies
View Related
Aug 20, 2010
I am trying to create an application which collects a lot of notes from users. I want to implement full text search on the notes so that the user can get relevant notes from the whole array of notes.
I am looking for a solution for this. Full-text-search(FTS) is actually supported by SQLite, but is it available for Android? Can anybody enlighten me on this?
View 1 Replies
View Related
Apr 30, 2013
Is it not possible to Undo Typing in Android? I cannot tell you how many times I used the auto spell checker to correct a word and it wiped-out an entire sentence instead of the word I was typing and I wanted to through my phone on the floor in frustration! At the very least, there SHOULD be an undo feature ... somewhere!!
View 3 Replies
View Related
Jan 10, 2010
So, I selected "remember this" when I was sending a text to a contact, because it was the mobile number. Turns out, that set the number as "default" for the contact and now I no longer get to choose which number to use when calling. How can I got back to not having a "default" number?
View 4 Replies
View Related
Apr 18, 2010
I'm sure this has been asked before, but how do you undo a saved password on the Samsung Moment for Facebook & Yahoo mail?
View 3 Replies
View Related
Jul 14, 2010
I'm writing a painting/graphics Java application for a mobile phone (so memory is limited). The application state is essentially three 1000x500 bitmaps (i.e. layers of a painting). Loading three bitmaps takes about 2 or 3 seconds.
I'm trying to write an undo engine but I just cannot work out a good way to do it. The typical approaches are:
Use the command pattern: When you undo, you reload the state of the initial file and then playback all the commands processed so far except for the final one. Doing this naively though means waiting 2 or 3 seconds to load the initial state which is too slow. There isn't enough memory to store the initial state in memory either.
Use the memento pattern: When you undo, you replace the part of the current state that was changed with the old state. This means every action needs to save bitmaps of the old state to disk because there just isn't enough memory on a mobile device to store this in memory. As saving bitmaps takes time, how do I cope if the user decides to e.g. paint many brush strokes in quick succession? I cannot make them wait.
View 1 Replies
View Related
Oct 27, 2010
I'm writing a bitmap editor where I use the Command Pattern to represent actions that will transform the document. I keep all the commands executed so far in a list and, to implement undo, I restore the document to its initial state and then replay all but the last command.
I would like my undo/redo system to have the following feature: When the user closes the editor and returns, the document, including the available undo and redo commands, should be restored to the state it was in when the user left.
I'm implementing this for Android where your application can be given very little notice before it will be cleared from memory if e.g. the user gets a phone call. Also, some of my commands are e.g. a list of all the x,y co-ord the user painted on so these might take a few moments to save to disk.
My current idea is as follows:
When a new action is performed, the command object is added to a list S for commands that need to be saved to disk.
A background thread is used that will continually take commands from list S and save them to disk. The postfix of the filenames used will be numbered in sequence. For example, if the user filled the screen then drew 2 circles, the command files might be called FillCommand1.cmd, DrawCircleCommand2.cmd, DrawCircleCommand3.cmd.
Periodically, we save a "checkpoint" command whose purpose is to store the full document state so that, even if one of the .cmd files is corrupted, we can restore a recent version of the document.
When the user exits the app, the background thread attempts to finish up saving all the commands it can (but it might get killed).
On startup, we look for the most recent .cmd file that represents a checkpoint that we can load successfully. All the .cmd files we can load after this (i.e. some files might be corrupt) go in the redo command list, all the .cmd files we can load between the first checkpoint loaded and the oldest checkpoint we can load go in the undo list.
I want the undo limit to be about 20 or 30 commands back so I need extra logic for discarding commands, deleting .cmd files and I've got to worry about multi-threading behaviour. This system seems pretty complex and will need a lot of testing to make sure it doesn't go wrong.
Is there anything in Java or Android than can help make this easier? Am I reinventing the wheel anywhere? Maybe a database would be better?
View 2 Replies
View Related
Sep 15, 2010
Well for work purposes silly ol me decided to do a PC Sync of my Calendar with my Desire.
Well what happened was, the calendar on my phone got cluttered cause there were too many appointments and the worst thing is my phone calendar items got transferred to my work calendar on my PC also.
Which I would rather not have....Is there a way to Undo PC Sync?
View 2 Replies
View Related
Jul 18, 2010
How to unroot the vibrant and go back to normal for warranty purposes?
View 10 Replies
View Related
Sep 22, 2010
The update did not fix GPS and did not improve Media Scan. It DID remove the PC Internet option. How does a complete newbe undo the update? I read that ODIN3 would restore factory settings; but, several people that used ODIN3 warned against using it unless there was no other option.
View 3 Replies
View Related
Oct 8, 2010
I manually installed Froyo on a Motorola Droid from one of the available sites prior to the OTA update. I've experienced some slowness and my phone locking up. Can I revert back to the last good update and then reinstall Froyo via the OTA update option on my phone?
View 4 Replies
View Related
Oct 26, 2010
I used metamorph to change my battery&signal icons but I wanted to go back to the stock vibrant battery/signal icons...I didnt do a back up,silly me =( anyone have a working metamorph zip of those stock icons?
View 1 Replies
View Related
Sep 6, 2010
How do I turn off or undo a theme I applied with metamorph.
View 4 Replies
View Related
Sep 21, 2010
I looked in the market this morning, and saw an update for the OCLF. I installed the update, then opened the app and selected "Undo OneClickLagFix V1+". Afterwards, for good measure, I removed then reinstalled "EXT2 Tools." Every time I've tried to install the V2 lag fix, I get an error (redoing OCLF V1+, however, appears to work fine).
View 7 Replies
View Related
Jun 23, 2010
Is it possible to undo all of this via one of the RUU files or something? No problems yet, just curious in case I ever have a warranty issue or something.
View 9 Replies
View Related
Sep 2, 2010
I received my Froyo update today and it is wreaking havoc on the apps I use most. ESPN radio and MLB atbat. The streaming audio is very choppy. I did not back up and my phone is not rooted. Can I undo this update?
View 3 Replies
View Related
Jun 4, 2010
I've seen this feature on my Hero, but, have never used it. What happens when I do this. How do you UNDO this if you don't like what it does?
View 1 Replies
View Related
Jul 17, 2010
I mistakenly selected one of two email accounts on my X -- as being the "Default"
This was a mistake, as I really should have kept the setting dynamic -- so I could chose to send from either account.
Now I can't undo that default setting -- nor can I even switch the default to the other email account.
Here's how I got to the menu in question:
GUI Messaging Icon > Left Menu Button > Messaging Settings > Email > Default Email Account
Anyone know how I can undo this default setting -- and put myself back in the position of being able to select which account to use dynamically?
View 4 Replies
View Related
Sep 23, 2010
Here's what I've figured out. I tried doing Toast's root method for linux and the directions weren't idiot proof because I screwed them up. I've explained how far I've gotten in other threads. If that's relevant just ask and I'll explain exactly what I did.
Anyway my phone does the basics. It allows me to make phone calls, text, and look at the internet on the phone so this isn't an emergency but it I am worse off than I was before I tried to root because I can no longer use easytether.
I had no problem with easytether prior to the root attempt, and it still works when I hook it up with my wifes untampered evo. with my phone but with my wife's evo, I've never messed with that one, I have no trouble connecting with easy tether.
Some of the things I've noticed about the device since the attmept...
-I can't update to 2.2 via the OTA or any other method, my device says no updates are available.
-Simple root wasn't so simple, the phone never shut off and rebooted into boot screen like the red screen said it would in step 1.
How do I reset the device to the way it was the day it was purchased. I've got everything I need backed up. I'm ready to reset just tell me how.
View 9 Replies
View Related
Oct 10, 2010
I installed OCLF V2+ and all is great. However, one day I turned on the phone and I think it's physically broken. The symptoms are:
- Only half screen image
- Other half screen has strange stripes
- The phone doesn't go past the spash screen
- It will boot in recovery and download mode. Here there's still only half a screen
So what I want to do is undo the lag fix, remove ext2 tools and unroot the phone before I go back to the store. Can anybody help me with this?
I CAN start in recovery mode and use adb shell to go to the phone shell! So I suppose I have to do the above steps from the shell!
View 3 Replies
View Related
Jun 4, 2010
Icouldnt find anything specific on this...i loaded fresh 2.1.2 then loaded this: Quote:
View 7 Replies
View Related
Nov 9, 2009
I accidentally deleted an email I wanted, but couldn't figure out how to "undelete" it. I can see if in the Trash folder, but don't see any menu options to move it back to the Inbox.
I was able to open the message and Forward it to myself, but that seemed overly difficult. Is there any easier way to undo the delete?
View 7 Replies
View Related
Oct 27, 2012
Would it be (easily) possible (for a dev, so not me) to add undo/redo buttons to text editing? This is a HUGE feature missing in Android, soon 2013, five years of android, and still not there...
View 2 Replies
View Related
Oct 18, 2010
I went on settings>basic phone settings>settings download>tesco mobile. not alot changed, well until i realised a little E sometimes G with two arrows appear on the top line of the screen, did not pay much attention to it until i have just gone to use my phone and i have no credit left and i am sure that has something to do wtih it why is this and how do i stop it from running without resetting the phone?
View 2 Replies
View Related
Oct 3, 2010
Was about to flash cognition 2.2 but I wanted to Undo my one click lag fix first. Now I'm stuck on the Galaxy S black screen. No idea what to do, I can't use odin cuz im on a Mac.
View 4 Replies
View Related
Sep 1, 2012
On galaxy phone you can, like on iPhone, copy cut and paste text. However, undo and two is badly missing. So I'm searching for an add-on or app that would fix this.
View 9 Replies
View Related
May 6, 2009
I am seeing the exception in 'adb logcat'.But I don't know if it is caused by my application or android platform.Can you please give me any idea how to troubleshoot this exception?
View 3 Replies
View Related
Jan 29, 2010
Say you accidentally deleted too much text from a note, or an edit field. On my 2004 Windows mobile PDA phone, I could undo by tapping Ctrl+Z. On a 2006 iPhone, you can undo by shaking the phone. Undo is a a very basic and useful feature.
View 5 Replies
View Related
Jun 19, 2010
I currently have a rooted Droid running BB 1.1, but I had an issue with the vibrate motor inside the phone and Verizon is in the process of shipping me a new one fully covered under warranty. However, rooting your phone does in fact VOID the warranty, and when I ship the defective phone back, I am afraid I will have to pay for the replacement. Will a factory reset undo the "rooting", if not is there any way to? Or is this something I shouldn't even be worrying about?
View 4 Replies
View Related