Android 1.5: Reading SMS messages

There is a content provider for accessing SMS messages, but it’s not documented in the public SDK. If you use ContentResolver.query() with a Uri of content://sms you should be able to access these messages. You can find more information on this Google Groups thread or previous questions on stackoverflow.

How do I register a custom filetype in iOS

I hope it’s okay if I dump in that part of my projects info.plist without much further explanation. I think it’s pretty much self-explanatory. <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array> <string>Icon-iPad-doc320.png</string> <string>Icon-iPad-doc.png</string> </array> <key>CFBundleTypeName</key> <string>MyAppName File</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <!– my app supports files with my custom extension (see UTExportedTypeDeclarations) –> <string>com.myurl.myapp.myextension</string> <!– … Read more

Android – Preserve or delete files created by the application on uninstall

Seems like there have been some developments since 2009 :). From the documentation: If you’re using API Level 8 or greater, use getExternalCacheDir() to open a File that represents the external storage directory where you should save cache files. If the user uninstalls your application, these files will be automatically deleted. However, during the life … Read more

Dump a mysql database to a plaintext (CSV) backup from the command line

If you can cope with table-at-a-time, and your data is not binary, use the -B option to the mysql command. With this option it’ll generate TSV (tab separated) files which can import into Excel, etc, quite easily: % echo ‘SELECT * FROM table’ | mysql -B -uxxx -pyyy database Alternatively, if you’ve got direct access … Read more

How to backup sqlite database?

The sqlite3 command line tool features the .backup dot command. You can connect to your database with: sqlite3 my_database.sq3 and run the backup dot command with: .backup backup_file.sq3 Instead of the interactive connection to the database, you can also do the backup and close the connection afterwards with sqlite3 my_database.sq3 “.backup ‘backup_file.sq3′” Either way the … Read more

Export MySQL database using PHP [closed]

Best way to export database using php script. Or add 5th parameter(array) of specific tables: array(“mytable1″,”mytable2″,”mytable3”) for multiple tables <?php //ENTER THE RELEVANT INFO BELOW $mysqlUserName = “Your Username”; $mysqlPassword = “Your Password”; $mysqlHostName = “Your Host”; $DbName = “Your Database Name here”; $backup_name = “mybackup.sql”; $tables = “Your tables”; //or add 5th parameter(array) of … Read more