| Note: This blog post is incomplete, and I discontinued posting part 2, as the Widget API and abilities were changing significantly with new releases of Android, at the time of writing. I left this post online, as it has many views, and some useful content. While information on developing App Widgets for the Android home screen is plentiful, much of what's available - including the contents of many books on Android software development - is incomplete, often broken, and leads to improperly functioning App Widgets. One all too common outcome is App Widgets that unnecessarily run users' batteries down. Another frequent fail includes funky App Widget behavior if more than one instance exists on a user's home screen. This post is intended to provide a complete blueprint for folks to follow, to develop their own App Widgets that display dynamic content while consuming minimal device resources, provide standard user input controls, and otherwise work correctly as expected. | Link To This Article |
Showing posts with label HOWTO. Show all posts
Showing posts with label HOWTO. Show all posts
2011-04-26
A Simple, Complete App Widget - Part 1
2011-03-22
HOWTO: Install T-Mobile G2 USB Driver
| While Googling for G2 USB driver does currently lead to some pages that list working instructions for installing the driver on M$ Windows machines to connect to a T-Mobile G2 Android phone through USB with adb, many of the search results were not useful, and this post is small contribution to help direct folks to a solution. (Plus, who knows what will happen to the info pages at tmobile.com, with AT&T acquiring T-Mobile.) | Link To This Article |
After installing the Android SDK, and selecting to install the latest Google USB Driver package with the SDK and AVD Manager, edit the android_winusb.inf file, located in the directory where the Google USB drivers installed (which currently is android-sdk/extras/google/usb_driver), and paste in the following three lines, at the end of the sections labeled "[Google.NTx86]" and "[Google.NTamd64]".
;T-Mobile G2
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C91
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C91&MI_01 Then, connect the G2 to the computer with a USB cable, ensure the phone is in debug mode, and follow the remaining instructions at http://developer.android.com/sdk/win-usb.htmlNote that it's sometimes necessary to repeat this process after downloading and updating the Google USB Driver package, as the updates can clear out the previous custom configuration changes.
2011-03-12
HOWTO: Clone VirtualBox VM (from existing Hard Disk) and Change the UUID
| Currently, Google searching for information on how to clone VirtualBox Virtual Machines or how to move a VirtualBox VM (to a new host directory, host disk, or host machine) leads to a lot of folks stuck with cloning failures, apparent dead ends, outdated information, and VirtualBox features that don't seem to work correctly. While poking around enough leads to working solutions, this blog post is a small contribution to help direct folks towards success. | Link To This Article |
Note: These steps work for me running VirtualBox 4.0.4 r70112 (and with the latest 4.0.6 r71416), on Windows 7 Home Premium x64 SR1. I am new to using VirtualBox and my experience level is yet introductory. Also, the information provided here is listed elsewhere on the internet, and is probably somewhere in the VirtualBox documentation.
Without further ado, to copy a flat (i.e., without snapshots) virtual machine, with the VM not running (i.e., stopped), follow these three steps:
- First, create a copy of the VDI file, using Windows Explorer or a simple copy command:
copy abc.vdi def.vdi - Then, change the UUID of the new VDI file with the command
VBoxManage.exe internalcommands sethduuid def.vdi - And finally, from within the VirtualBox Manager, create a new Virtual Machine, selecting to use the new VDI as an existing Hard Disk.
To simply move the location of an existing VDI file on the host, or to copy or move the VDI file to another host, it does work to delete the VM within the VirtualBox Manager, without actually deleting the VDI file on the host file system (obviously, deleting the VM on the current host is not necessary if moving to a new host), move the VDI file to the new location, and then create a new VM, selecting to use the moved VDI file as an existing Hard Disk.
Alternatively, to move the VDI file on the host without deleting the existing VM, close the VirtualBox Manager and shut down all VM instances. (Shutting down the VMs not associated to the move might not be necessary.) Then, edit *all* of the file paths in the .vbox file associated with the VM to be moved. By default, the .vbox file is in a subdirectory in the host user's home directory (e.g., C:\Users\User1). The .vbox file name should match the name of the VDI file, and be in a subdirectory with a name that also matches the name of the VDI file. The .vbox file is a simple text XML file, easily edited in Windows Notepad. Finally, start the VirtualBox Manager, select the newly moved VM, which should still be listed on the left side, where all of the VMs are listed, and start it.
Note that changing the UUID of the VDI file is not necessary, when simply moving it.
Labels:
clone,
HOWTO,
UUID,
VirtualBox,
VM
2010-11-12
HOWTO: Publish Javadoc on Google Code
| Adding to Eric Burke's identically titled blog entry from three years ago, this entry details how to ensure Javadoc files have the correct svn:mime-type for normal browser viewing, when files are added to Subversion using the command line svn in M$ Windows. For an example of viewing properly published Javadoc in a Google Code project, take a look at http://jgenere.googlecode.com/svn/tags/initial_port_v0.3r2010.1105/jgenere-initial_port/javadoc/index.html | Link To This Article |
As described in the "Properties" section of Version Control with Subversion, Subversion includes subcommands to edit file properties, such as mime-type, with the command line tools. Also, the "Runtime Configuration Area" section, describes setting properties in the Windows registry, or in a "config" file. So, where is this mysterious config file?
The Secret Detail: The config file is in the %appdata%/Subversion directory and it's named simply "config", with no filename extension - at least it is on my computer. Notes: 1. On my system, %appdata% is the /Users/USERNAME/AppData/Roaming directory. 2. The %appdata%/Subversion directory wasn't created on my system after just installing svn tooling. (I'm using Slik SVN.) Instead, the directory was created after the first time I successfully executed a
svn checkout command.In the file named simply "config", just before the [auto-props] section, uncomment (by deleting any # characters in front of it) or add an entry for "enable-auto-props = yes", and then add the following three configurations to the [auto-props] section.
- *.html = svn:mime-type=text/html
- *.css = svn:mime-type=text/css
- *.gif = svn:mime-type=image/gif
After editing and saving the config file, simply execute
svn add and svn commit commands to add the Javadoc to the repository. If the docs were already in the repository before altering the config file, it will be necessary to make changes to them or delete and add them again, in order for the new mime-type properties to be set (or to use the subcommands for editing properties, as previously mentioned).
Labels:
dev,
HOWTO,
java,
javadoc,
subversion
Subscribe to:
Posts (Atom)