My technology, my musings, my life…
28 Mar
I just published Musical Pro 1.2 with piano scroll locking, computer MIDI input over WIFI, and the ability to switch the upper and lower octaves on the keyboard (as requested this morning by a user). More details about the scroll-locking and the MIDI support are explained in my post Musical Pro Update Preview (MIDI Support) from last week. For now, the Desktop Client (required for MIDI input over WIFI) is in beta, mainly due to the lack of documentation. If you would like a copy of the application, please email me (souvey+androidmusicalpro [at] gmail [dot] com — this address also appears on the Market page for the application) and I will assist you in setting it up. Once a couple people have tested it out, I’ll post a public release to download here on my blog.
21 Mar
One of the things that has always annoyed me with cell phones is that there is no good way to handle multiple people having the same home phone number. Android’s contact manager allows multiple contacts to share the same number (because the database is not indexed by phone number, like on many older phones). This still wasn’t perfect for me, however. When a phone number shared by multiple contacts calls, the first match (sorted alphabetically A-Z) is displayed on the caller ID screen and in the call log. Fortunately, this consistency means we can manipulate the system to display a custom name. The following steps illustrate the technique:
It works almost perfectly for me, but there are few caveats to this method that you should be aware of:
19 Mar
I just finished up the latest update to Musical Pro, which I will hopefully be publishing tomorrow. I just have to finalize the Desktop Client (more on that in a bit). I’ll post a more comprehensive explanation tomorrow, but there are two new features (one minor feature that everyone asked for, and one major feature that almost nobody asked for).
On the minor front, the scrollable piano can now be locked so it doesn’t scroll by accident.
The major feature is that the Piano and Keyboard can now act as MIDI controllers for your computer over WIFI. This means, for example, that you can use the touchscreen to record or input notes into Finale/Sibelius/GarageBand/etc. This will be made possible by a Desktop application that will run in the background and communicate with the G1 over WIFI (although, it is technically possible to use USB as well, but it will require some setup). It will initially (hopefully tomorrow) be released for Windows only, because I don’t have a Mac, but the application is written in Java, so it should (in theory) also work on a Mac. If anyone wants to test it for me, shoot me an email and if it works, I’ll release official Mac support.
The idea for the MIDI support came from a user, so remember, don’t hesitate to email me if there is anything you would like that Musical doesn’t currently have.
UPDATE: The desktop client is available for download here http://www.souvey.com/musical. You must have the latest version of Musical (released on June 18th)
17 Mar
I’ve decided that from now on, along with all my Musical updates, I’m going to post some useful advice/tips/code/etc to help others solve any problems I might have encountered during the development of the update. So, here is the first of hopefully many “Android Development Details”
Today’s One Liner:
Get the current “android:versionCode” from AndroidManifest.xml:
getPackageManager().getPackageInfo(getPackageName(), 0).versionCode
Problem/Solution:
Once a media file has been detected on the SD card by Android’s MediaScanner, it is automatically to the MediaStore. The MediaStore is a SQL database used by all media-based applications instead of directly accessing the file system. Unfortunately, once an item has been added to the MediaStore, it is not immediately automatically removed when you delete the original file off the file system. This has to manually be done in the database. The easiest way I could find to do this is to get access to the Content Provider with getContentResolver() and call the delete() method with the arguments MediaStore.Audio.Media.EXTERNAL_CONTENT_URI (external because it is on the SD card) and a SQL WHERE clause indicating which file to remove. In my case, I needed the WHERE clause to find a specific file based on its path on the file system (since I had just deleted the original based on its path). The unix absolute path is stored in the MediaStore.Audio.Media.DATA (Note: this is a constant not a String–it must be concatenated into the SQL WHERE clause) column in the MediaStore database.
Hopefully these tips are helpful to some other Android developers, and as always, feel free to email me with any questions!
17 Mar
I just pushed out a minor update to both Musical and Musical Pro with 2 small changes.
Firstly, the Piano and Keyboard components now remove all of the temporary files they used to leave behind on the SD card. I don’t use Android’s “Music” application, so i didn’t realize that, much to the annoyance of those who do use it, all media files on the SD card are automatically added to your Media Library. Every note on the piano was being added to this collection and cluttering up the application. The next time you use the Piano or Keyboard, these should all be cleaned up.
Secondly, all future updates will now display a brief list of changes the first time the application is loaded so the people who don’t stay up to date with my blog (aka nearly everyone) will know what I’m up to and what to look for in the new version.