Monday, October 24, 2011

ADB Android Driver

  1. Plug the device into a USB port of your computer. Windows informs you that it cannot find the driver.

  2. Using the Windows Device Manager, open the Details tab of the device properties.

  3. Select the Hardware IDs property to view the hardware ID.

  4. Open android_winusb.inf in a text editor. Find android_winusb.inf at the following location:

    C:\IBM\android\android-sdk_r05-windows\android-sdk-windows\usb_driver\android_winusb.inf
  5. Note the listings in the file that apply to your architecture, either [Google.NTx86] or [Google.NTamd64]. The listings contain a descriptive comment and one or more lines with the hardware ID, as shown here:

    . . .  [Google.NTx86]  ; HTC Dream  %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01  . . . 
  6. Copy and paste a comment and hardware listing. For the device driver you want to add, edit the listing as follows:

    1. For the comment, specify the name of the device.

    2. Replace the hardware ID with the hardware ID identified in Step 3 above.

    For example:

    . . .  [Google.NTx86]  ; NEW ANDROID DEVICE  %CompositeAdbInterface%     = USB_Install, NEW HARDWARE ID  . . .

example, Motorola Droid Bionic
; Motorola Droid Bionic
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_42F7
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_42F7&MI_01
;
; Motorola Droid Bionic2
%SingleAdbInterface% = USB_Install, USB\VID_22B&PID_42F7&REV_0216
%CompositeAdbInterface% = USB_Install, USB\VID_22B&PID_42F7&REV_0216&MI_01

Tuesday, September 6, 2011

Dojo Build error [exec] release: ********** Not Copied: ../../dojo/

If you see this:

[exec] release: ********** Not Copied: ../../dojo/widgetname

make sure custom-dojo-build.xml has an entry to copy over the widget:



Tuesday, December 14, 2010

WebSphere Role Override


The other day I was having issues with my WebSphere security role definitions. It didn't matter what I did or how I updated the WebSphere role mappings, it wouldn't let my authorized user access some protected resources. I tried setting the special mapping to ALl_AUTHENTICATED, I mapped 3 different groups that I knew the user was in, and then I even added the user to the role. No luck. Turns out the problem was fixed by looking at my ibm-applicatoin-bnd.xml file. If that file even references the security-role it will fail and no overriding on the websphere admin console will work. Removing that reference and all my mapping worked perfectly.


Monday, July 12, 2010

Friday, July 2, 2010

Android Setting TextColor

You can't do something like this:

inststatus.setTextColor(R.color.white);

instead do:

inststatus.setTextColor(getResources().getColor(R.color.white);

Wednesday, June 30, 2010

Java Dynamically adding Android Views android:Layout_toRightOf

I found this post really useful today:
http://stackoverflow.com/questions/2305395/laying-out-views-in-relativelayout-programmatically

ex.
RelativeLayout layout = new RelativeLayout(this);
TextView tv1 = new TextView(this);
tv1
.setText("A");
tv1.setId(23);

TextView tv2 = new TextView(this);
tv2
.setText("B");
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.FILL_PARENT);
lp
.addRule(RelativeLayout.RIGHT_OF, tv1.getId());

layout
.addView(tv1);
layout
.addView(tv2, lp);



******
you need to provide id's to your child views: tv1.setId(1); tv2.setId(2); Parent views do not automatically assign child views an Id, and the default value for an Id is NO_ID. Id's don't have to be unique in a view hiearchy - so 1, 2, 3, etc are all fine values to use - and you must use them for relative anchoring to work in RelativeLayout

Tuesday, May 18, 2010

Android screen capture

I found out how to use Eclipse to grab a screen capture of my android device. REALLY cool. No market app necessary.

  1. Connect your phone to your computer
  2. Open Eclipse
  3. Click on the DDMS Perspective
  4. Look at the Devices view
  5. Click on your phone
  6. Use the Menu Icon to Select > Screen Capture.


  7. You'll see something like this:



  8. Save your screen capture