Android :: Deleting SQLite Rows Automatically / Periodically
Mar 29, 2010
i have a application that displays tasks and i created an option in the Settings menu that lets you choose in how many days all (Never, 10 days, 20 days or 30 days) these tasks should be automatically deleted. So when i open up the app there will be a method that will be called and check if theres any tasks to be deleted. I did that to challenge myself, but i'm hitting the wall with my head and i cant come up with something. So here i am in need of help! A little more information: i was trying to do something with java/android code, but from past searches i saw people dealing with it using SQL functions. Is it better?
View 4 Replies
Nov 19, 2010
I am trying to insert rows into my database, but nothing gets persisted. Here is my helper class:
package com.android.cancertrials;
import java.util.Calendar;
import java.util.GregorianCalendar;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;..................
View 1 Replies
View Related
Jun 24, 2010
I've got a query, (I'm using rawQuery())
SELECT * FROM <table>
I'm then storing what it returns using a cursor. From their what I want to do is, start at the first row so.. cursor.moveToFirst() then take each column , column by column and store its particular value in a variable. I then want to move onto the next row and do the same. So I guess my question is How would I get cursor to deal with multiple columns?
View 2 Replies
View Related
Apr 18, 2013
I'm developing an android application wherein I can add, view and delete data from SQLite. I'm already done with add and view and my problem is the deleting, I want it to be like this:
so when I go to View all, a "DELETE" button will be shown beside the data, and clicking the button will remove the data from Android's SQLite
View 2 Replies
View Related
Jun 14, 2010
My Roadrunner account is setup on my EVO and receives email, sends email, no problems there. Issue is that emails that I've already downloaded to my pc Outlook are still showing up in my inbox on my EVO. I've looked through all of the settings and cannot find one similar to what I had for my Windows Mobile mail, which deleted mail that it didn't see was on the mail server anymore. Is this a possible bug or maybe an intentional design, or am I missing a setting?
View 6 Replies
View Related
May 17, 2010
I downloaded an emulator, and was told i could put games on my phone. in the process of trying i must have hacked my phone. ask me how i have no idea. my android has been deleting the contacts off my phone and when i try to import them they never stay on my phone. its pretty annoying. if some one could point me in the right direction, i am new to the forum and i just want my phone to be back to normal and stop running slow.
View 1 Replies
View Related
May 9, 2010
An application I'm developing requires that the app main a local list of things, let's say books, in a local "library." Users can access their local library of books and search for books using a remote web service. The app will be aware of other users of the app through this web service, and users can browse other users' lists of books in their library. Each book is identified by a unique bookId (represented as an int). When viewing books returned through a search result or when viewing another user's book library, the individual list row cells need to visually represent if the book is in the user's local library or not. A user can have at most 5,000 books in the library, stored in SQLite on the device (and synchronized with the remote web service). My question is, to determine if the book shown in the list row is in the user's library, would it be better to directly ask SQLite (via SELECT COUNT(*)...) or to maintain, in-memory, a List or int[] array of some sort containing the unique bookIds.
So, on each row display do I query SQLite or check if the List or int[] array contains the unique bookId? Because the user can have at most 5,000 books, each bookId occupies 4 bytes so at most this would use ~ 20kB. In thinking about this, and in typing this out, it seems obvious to me that it would be far better for performance if I maintained a list or int[] array of in-library bookIds vs. querying SQLite (the only caveat to maintaining an int[] array is that if books are added or removed I'll need to grow or shrink the array by hand, so with this option I'll most likely use an ArrayList or Vector, though I'm not sure of the additional memory overhead of using Integer objects as opposed to primitives).
View 2 Replies
View Related
Aug 3, 2013
I wanted to show a picture to a friend of mine. Opened my gallery > ehm, what is going on here? > there were no photos images anymore.
First I thought that the gallery app got some problemes, rebooted my phone, still the same. Looked up the folders with Solid Explorer, well ... all files got definitely deleted.
I searched for this here on xda and google. Well, all I found out was that it could be ROM related, or that it could have something to do with RomManager (haven't installed it though). The curious thing is that the *.jpg and *.mp4 files got deleted from all folders and subfolders, not only from DCIM and even from the sd card.I'm not here for any recovery attempts, have done this already
Well this is not all. I've got some *.avi files on my phone (internal and external storage). Theses files were deleted too. BUT not at the same day as the other media files (*.jpg and *.mp4).
So this is the pre story. Now I wanted to know what can I do to discover what is causing this problem, because what's next? Is my phone deleting all my files in a few days?For me it seems like a script that is searching the whole device for media files and deleting them. (malicious?)My thoughts were:to smali all applications and try to find out if a app is causing this to analyze logcats.Well, These options seems to be very long-lasting,
I haven't isntalled any apps or updates the last two weeks so I think there are no problems with apps and therefore will not list them. phone is deleting media files two days ago it deleted *jpg and *.mp4 files from internal and external storage and from all folders (not only DCIM) today it deleted *.avi files from internal and external storage could it be a malicious script that is crawling my phone for those files?
View 1 Replies
View Related
Sep 19, 2010
I recently synced my Facebook contact to my phone so that I could have their Facebook pic as the pic on my phone. I do not want to have all my Facebook contacts in my Phone. I tried deleting them from my phone but it says that I have to delete them from Facebook in order to do so.
View 7 Replies
View Related
Jul 25, 2010
I have successfully been getting GPS data through the registerLocationListener() and onLocationChanged() methods. The only problem with this is that the speed reading of my app freezes if there is no more GPS data (e.g. when I go indoors, enter a tunnel, etc). The behavior I want for my app is that the user is somehow notified that the speed reading is probably not accurate due to a lack of fresh data (set speed to zero, blink the speed reading, etc). How can I do that? I though of checking periodically whether the GPS unit was detecting any satellites, but I'm not sure how to force periodic checks.
View 1 Replies
View Related
Sep 1, 2010
I am getting data from the server using AsyncTask. I need to update the data periodically.
View 3 Replies
View Related
May 26, 2010
I'm developing sort of a wireless scanner, so I need to scan every X seconds. I know I should use WifiManager and startScan() to get the networks and then register a receiver to receive the event once the scan has finished. However I'm having problems when trying to figure out how to scan periodically. It's more like a design problem. My solution so far has been to create a Service which takes care of the scanning, besides the main Activity.
I think this is correct. So, how could I tell this Service to scan every X seconds? I've thought it may have a Thread object, call its Scan method during tart_services() and then take it to sleep. Also I thought I could just get rid of the Service and run the Thread from the main Activity, but then I guess it would die whenever the Activity is not visible. None of then seem like a really good solution to me, and I think there must be an easier way to do this.
View 6 Replies
View Related
Jun 16, 2010
We have a very patchy wi-fi network here. The wi-fi router's pretty old and I tend to need to switch it off and on every couple of days. Is there an app I can use that will - perhaps in conjunction with Locale so it only runs when I'm in the office - periodically check if our wi-fi connection is up and running?
View 1 Replies
View Related
Dec 18, 2009
I currently use SMS Backup & Restore, but that has two drawbacks I see
-I have to manually initiate the backup
-It only stores and restores one file, so I have to overwrite and rename
I just lost my texts and only had a two day old backup. I'd love to see the same thing but that can do it with a timestamped file such as backup_2009-12-18-15-08.xml (pickable when restoring) and can run at a preset time each day or each half day.
View 1 Replies
View Related
Sep 13, 2010
I have one activity. OnCreate the activity gets the source (html) of a web page to a string and presents the result (after parsing it a bit) in a textview. I would like the activity to reload/refresh periodically to always present the latest information.
View 1 Replies
View Related
Dec 18, 2009
If I want to upload a text file containing some game stats to a web server for testing purpose, which approach is the best? Do I write a service along with my application and then upload the log file once it reaches a specific size? Or do I embed the logic into my application and then do it during idle times?
View 3 Replies
View Related
Feb 4, 2010
I never got this working in a straightforward manner. Sorry if I'm being a little vague. I'll try to elaborate on what I'm trying to do. I am trying to build a listview that grabs its data from a webservice. Once I initialize a listview, I want to keep polling the webserver periodically and update the contents of the listview. For this I am doing something like this:
public class SampleAutoUpdateList extends Activity {
//Autoupdate handler
private Handler handler = new Handler();
private Runnable updater = new Runnable() {
public void run() {
/*
* Update the list
*/..................................
View 1 Replies
View Related
Jul 19, 2010
I am building an indoor application which continuously scans the bluetooth dongles located at different locations in a place like a mall or library.As I move in the mall with android phone in my hand I should be able to get the nearest dongle which I can connect to(Stupid Idea but I want to do something else with this).For this I should be able to continuously scan for the bluetooth devices.
View 2 Replies
View Related
Aug 26, 2010
I have an app that needs to send a periodic heart beat to a server, but when the phone goes into standby mode the background heartbeat thread dies. Is there anyway to wake the phone from standby, send the heartbeat and then go back to sleep programmatically? I want to avoid using PARTIAL_WAKE_LOCK if possible.
View 1 Replies
View Related
Sep 28, 2010
I'm coding an audio player where a thread updates the TextView representing the track's elapsed time, every 250 milliseconds. The display looks like this:
1:30/2:30<-----Progress Bar----->
TextView 1 is 1:30/ and TextView 2 is 2:30.
Both are set to wrap_content for width.
What happens is that on every 250 millisecond cycle, the thread checks the current time and updates TextView 1. For this brief moment, TextView 2 and the progress bar get pushed momentarily to the right by about 2-4 pixels. Then they come back to place until the same thing happens during the next cycle. I don't know what's happening. There are no trailing space characters, etc and everything should, theoretically, be working smoothly but it's not.
View 1 Replies
View Related
Aug 31, 2010
I working on the app where I get the data from the server using rest call and add it to the view. I get all the initial data correctly. I use AsyncTask for doing it. Now I want to periodically (say 2 mins) fetch the new data from the server and add it to view.Periodically fetching data (polling) from the server in Android.
View 2 Replies
View Related
Jan 25, 2010
I have an android application that I am supporting and after calling one of the activities numerous time, it throws a stackoverflowerror when trying to get the extras from the intent. Here is the the stack trace from when it crashes. Any ideas as to why after calling the activity at least 4 times the next time throws StackOverflowError when getting the extras from the intent?
The code used to build the intent is and contains String, String, boolean, Object:
CODE:....................
And the code that is throwing the StackOverflowError is:
CODE:.........................
View 2 Replies
View Related
Jul 30, 2009
How to create a service that will post messages to an activity periodically using timer?
View 2 Replies
View Related
Sep 4, 2010
I have a Desire on Vodafone in the UK. Upgraded to Froyo using the official method the other week. Not sure if it is since then, but it's happened a lot the last few days, and it definitely didn't do this before the upgrade, but it seems that my Desire is now turning on GPS every few minutes - the icon flashes away in the notification bar. I have no idea why. Any idea what's happening, and how I can work out what app is causing this?
View 4 Replies
View Related
Feb 11, 2013
How I can change Textview periodically?I want to check a web page for a change.
View 1 Replies
View Related
Aug 24, 2010
It seems like every couple of months I lose my address book, subsequently I cant answer messages unless I can recognise the number and I end up having to wipe the fone and start again - which means downloading all the Apps again - its done it once again today, any ideas of a way round - I would prefer not to wipe as I lose my msg inbox etc
View 6 Replies
View Related
Aug 5, 2010
I have two email accounts linked to the Droid X. The primary is set to receive new emails every 15mins. Is this option available to secondary email accounts? My gmail account is hooked up to the Droid but it will not tell me if there are any messages without hitting the refresh button. Is there a way to receive emails periodically? I am having the same issue with sending. I can send an email on my gmail but it wont send until i hit refresh.
View 7 Replies
View Related
May 6, 2010
This has probably already been discussed, but I couldn't find anything. Do we need to periodically drain the battery completely to maintain it, or is it alright to charge it every chance I get?
View 6 Replies
View Related
Oct 8, 2010
Finally got Velocity installed and setup the way I like it. It's a tremendous improvement in overall performance compared to the stock. Kudos to Trident for taking the time to put this together for all of us. I only have one problem with it that I hope I can do something about or I may end up back on the stock ROM. Velocity comes with the latest Google maps version, which I hate because you can't clear the data so over time the app builds up more and more used space. Since I use the Google Maps Navigation pretty much everyday for work, that's going to be a small problem. Does anyone know if there is an app out there that allows you to clear the map data periodically? Or is there a way I can push the stock Map app into Velocity and do what I did before and simply ignore the update notices? I know I can just keep uninstalling it and reinstalling it periodically and i may end up doing that if there is no way to clear the data because I would really like to keep Velocity. I hope this doesn't come across as a knock on Velocity because it's not meant to be. I think it's a tremendous upgrade to the Ally and if it wasn't for my unique situation of using Google Maps so much, I wouldn't even be asking.
View 16 Replies
View Related
Nov 2, 2010
I have my email settings to retrieve every 5 minutes, sometimes when I reply to a email I get the unable to send mail then I check the account settings and it says unable to communicate with the driod outoutgoing server, I restart my phone then it will work but this is not a solution long term. Sprint has restarted my phone too.
View 1 Replies
View Related