[Q] Delete data on SQLite - Java for Android App Development

If this is the wrong section, kindly move it. Thanks!
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:
I
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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

junchronick said:
If this is the wrong section, kindly move it. Thanks!
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:
I
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
Click to expand...
Click to collapse
So is the question " what is the command to remove information from the databases " ?
Assuming that you have already tried and met resistance... what is stopping you from have a "delete" button that actually ADDS a null value to to the key,name, and setting ?
I've never made it into a button like you are saying, but having null values replace the undesired has always worked well for me,
Hope that is helpful.

junchronick said:
If this is the wrong section, kindly move it. Thanks!
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:
I
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
Click to expand...
Click to collapse
Your image doesn't show up so I assume its a list view where you will view all entries. In this case in the list view xml put a delete button, and in the activity you have to implement a custom adapter that listens for the button click (Google "custom simplecursoradapter"), and to delete the file it would be dbHelper.delete(Table, id, null) instead of dbHelper.add or dbHelper.query.
hope this helps

Related

Mail-Design -> SMS/Messging (Manila2D)

Good evening,
I cant write english in a good way, so have fun at reading^^
This is my solution to add the Envelope/letter do the messaging-tab.
As you can see the background of the letter in the messaging tab AND in the mail-tab were changed.
SCREENDUMPS:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Included in "Files1" (at Downloads)
Cheated solution for Bug2 (Long messages will be displayed over the envelope) - Included in "Files2" (at Downloads)
INSTRUCTIONS:
1. Go with an explorer to the windows directory and copy the files
hh_email_background.png
hh_email_envelope_down.png
hh_email_envelope_up.png
HTCHomeSettings.xml
to your storage card or anywhere else - THIS will be your backup, IF it doesnt work.
2. Copy the new files on your device. On the device you should copy all of the files in the windows-directory. You will be asked to overwrite the files - If you done task 1 its ok.
3. Restart Manila/Touchflo2D:
Settings -> Home -> System;
Uncheck "TouchFlo" -> Click OK;
Open the Home-Settings a second time -> System
Check "TouchFlo" -> Click OK -> Close Settings
4. There is no 4th Task, youre finished =)
BUGS:
1. If you scroll between your sms the envelope (not the letter) will slide too.
(Its the cause of replacing the line with the letter in the background)
2. Long messages will be displayed over the envelope (UNLIKE the mail-tab; the mails will be displayed correctly there)
(I made a cheated solution, with a white envelope - you can see it in the second picture)
Please notify that the home tab etc. will be changed too!
DOWNLOAD:
(I also uploaded my own created background/wallpaper) (Please dont host the files anywhre else and let the advertisement on uploaded.to opened 10 seconds):
It is VERY impossible to backup your files! (INSTRUCTIONS - Task1)
Files1 (with normal envelope + original files): http://ul.to/uh1way
Files2 (with white envelope + original files): http://ul.to/6t7fyt
Wallpaper: http://ul.to/qa18b1
PS: If you change things, like bugs etc. please post it here
Greetings
Hoamer
will this work in htc home, not manila?
Hm, i dont know. If htc-home is also based on xml-file it is possible - you can try it, but it is VERY impossible to backup your files - then you can try anything^^
If it works please post it here
EDIT: I searched for HTC-Home; no, this will not work with HTC-Home
Greetings
Hoamer

Home screen direct link (TaskMgr) unremovable

My current problem is that the TaskMgr.exe disappears from the start menu, after a soft reset. Is there a reason/fix for this?
The other problem caused by this is, that my shortcut in the home screen becomes a dead link and is not removable. If I go to "menu->remove direct link->mark the task manager shortcut->finish" it simply stays there.
Even if I copy the taskmgr.exe to the start menu and the link is working again it wont be removable.
Is this a known issue and what can I do? Any help is much appreciated.
The whole thing looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thanks in advance,
eivissa
Try
Go to:
Registry Key:
HKLM/Software/Htc/Manila/Home/11
(If I counted correctly, this is the 12th item, and numbering begins with 0)
There should be some Values specifying the IconPath
and ProgramPath
They usually point to some *.lnk file
See if this file exists,
and if the Lnk file exists, see if the program it points to also exists.
(I dont remember how to check where a .LNK file point too,
maybe Edit would do)
Edit:
Oh, Yes, see if the Value
IsSet (under the same key) is set to 1.
Thanks very much,
editing programm path and link path did the trick that now the Icon is back there and the link works even after a soft reset.
Though I still cant delete the link from the home screeen. There is no error message or anything. The Icon just stays there after clicking "Finish" to delete it.
EDIT: IsSet is set to 1.
Well . . .
eivissa said:
Thanks very much,
editing programm path and link path did the trick that now the Icon is back there and the link works even after a soft reset.
Though I still cant delete the link from the home screeen. There is no error message or anything. The Icon just stays there after clicking "Finish" to delete it.
EDIT: IsSet is set to 1.
Click to expand...
Click to collapse
I had a problem deleting element after playing a bit with the registry, and leaving an item all set, but with "IsSet" set to 0.
In that case - everything showed, but I could not delete the element.
(There is another value there - I think "IsExist"
maybe that has something to do with it as well,
or maybe - just play a bit with the other values in theis key, and compare them to values in keys (like 0,1,2 . . .), and see if something changed
Or -
As some say
If it works (for your needs) - dont touch it)

[Q] Duplicate files a pictures and music

Hello, everyone!
1. I have duplicated all the pics (in the stock Gallery) and music (in the stock app "Music").
BUT in app Quickpics - all right. In PowerAmp - are also fine, no repeats files.
Please see the screenshot 2. This is the stock Gallery.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. In addition, I see an unusual … something in the folder sdcard (mount point)
Please see the screenshot 1.
What is it? It is normal for LG? I never see the same on Smasung.
I think that these two bags/feature related.
Please tell me how I can fix it.
Advance - thank you
lorddm said:
Hello, everyone!
1. I have duplicated all the pics (in the stock Gallery) and music (in the stock app "Music").
BUT in app Quickpics - all right. In PowerAmp - are also fine, no repeats files.
Please see the screenshot 2. This is the stock Gallery.
2. In addition, I see an unusual … something in the folder sdcard (mount point)
Please see the screenshot 1.
What is it? It is normal for LG? I never see the same on Smasung.
I think that these two bags/feature related.
Please tell me how I can fix it.
Advance - thank you
Click to expand...
Click to collapse
same here, i bought a g2 and i have all my photos and music dublicated on my memory, not all files but just something that i copied from pc to phone storage. looking at gallery info details it find some photos to /0/ and dublicates to /legacy/ if i delete one also the "clone" is deleted, why? and anyone can help me please
i find a similar problem here http://forum.xda-developers.com/showthread.php?t=2523323 but i cant find a solution
Solved!!
Setting>app>all
Clear data of gallery and media scanner
Reboot!!
After reboot wait 4/5 minutes and cache will be created again
No file will be deleted, and clones disappear

[Guide] About cannot click into Developer Options - Solution

There are some ROMs cannot click into Developer Options and then the app stops responding.
These ROMs have been updated for several times but the problem still not be solved.
Here is one of the solutions for you:
1. Download the ROM you want.
2. Double click it and click into "system".
3. Copy "Build.prop" to desktop or another folder you prefer.
4. Open "Build.prop" you copied with "notepad.exe", find and delete the following words and then save the file:
"ro.frp.pst=/dev/block/bootdevice/by-name/config"
5. Replace the original file "Build.prop" with the one you revised just now.
6. Flash the new ROM as normal, finally you will find that you can go into Developer Options successfully !
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Or you could just edit build.prop right from your devic without a root enabled file browser. And instead of deleting the string you can put a # between so#ro and reboot and the problem is solved and it's much simpler.
se7ensde said:
Or you could just edit build.prop right from your devic without a root enabled file browser. And instead of deleting the string you can put a # between so#ro and reboot and the problem is solved and it's much simpler.
Click to expand...
Click to collapse
Could you tell me which app can revise dev without root? Thanks~
Use Something like "Build Prop Editor", its 57.45 times easier
Im_Mattgame said:
Use Something like "Build Prop Editor", its 57.45 times easier
Click to expand...
Click to collapse
“Build Prop Editor” also needs to use after root.
It seems that no apps can edit build.prop without root.
adrian2015 said:
“Build Prop Editor” also needs to use after root.
It seems that no apps can edit build.prop without root.
Click to expand...
Click to collapse
I think it was a typo & he meant "with a root editor".

[APP] Security button - revolutionary panic button!

Hi xda, i`m noob in this forum but i think, i made an useful tool for all privacy lovers!
I made a new panic button - Security Button!
What it can do:
Spoiler: Features
Main functions:
- Delete && Clean applications (log out of accounts)
-Reboot after uninstall
-Switchable warning
-Auto delete
-Delete selected folders and files
Delete via sms!
Label:
-Put your name
-Put your icon
-Specify which application to open when clicked
SMS features:
-Write any message, word, numbers or all together, anything (Register is important)
To start, write in your SMS your message with same register, it can be only one word or 1000 words, if app will find secret word or combination it will start delete!
Spoiler: Example
Secret words: buy bread
It will works:
buy bread
Hi buy bread please
i need you to buy breads
...100 words, buy breaddddsss ....
It will not works:
BuY BrEaD
Buy bread
bread
-Specify which numbers to respond to:
You can write at least a thousand, comma separated, a space, or even 100 spaces, it doesn't matter. (Write in international format! The app will not works to less than 8 digits!)
That's all for now I'll update the source code in the evening
Spoiler: About bugs
I think it app have bugs for androids <P, or some special roms like miui(but i tested it ok)
So if you found any bug contact me or open issues at github! Or you have any ideas or code improvements, you are welcome!
Important - you need allow autorun option in settings to use sms function!
I hope my application will be useful to someone. While looking for ideas for updates)
Github link: https://github.com/huntmix/secbutton/
Youtube demo:
Spoiler: Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download:
Doublepost ... Sorry..
Hi Huntmix,
You made a very cool tool ! Thanks for this!
May i make a wish ?
I would love to start this tool just from the lockscreen by just using a Fingerprint (which is not used for anything else) . Beside a Fingerprint (of a diffent Finger) that i use for "normal" unlocks !
That would be the perfect Privacy App for me.
Usecase:
When someone will force me to unlock the phone i just take the "Security finger" to start your wonderful privacy-tool!
Would something like that be possible ?

Categories

Resources