My dream Android device

I have been using Motorola Droid one and two because of the keyboard. I am writing emails, posts and massive amount of messaging and keyboard is simply superior to virtual keyboard, even with Swype.

I would really cherish a large (4.3 inch), flat phone with a usable slide out keyboard like Motorola Droid2.

I would also love if that device had:
1) keyboard (mentioned)
2) large 4.x screen (mentioned)
3) NFC chip
4) ADK libraries
5) clean Google Android OS, no manufacturer add ons
6) HDMI out

Failed to install *.apk on device *: timeout


Of all the devices I own, Samsung Galaxy Tab 7 (Sprint) gives me this error frequently:

[2011-07-27 17:05:17 - DemoKit] Failed to install DemoKit.apk on device '35321XYZ': timeout
[2011-07-27 17:05:17 - DemoKit] Launch canceled!





[2011-07-27 17:10:22 - DemoKit] Uploading DemoKit.apk onto device '35321XYZ'
[2011-07-27 17:10:23 - DemoKit] Installing DemoKit.apk...
[2011-07-27 17:10:28 - DemoKit] Success!

Yes, QR codes can be a beautiful part of the overal design



Mashable posted some great examples of beautifully designed QR codes.

Android device sizes and resolutions

I use the following 4 sizes:


  1. drawable-small: ignored, hardly anyone uses phones like that
  2. drawable-normal-mdpi: older phones with about 3 inch screens, 480x320px resolution, e.g. MyTouch
  3. drawable-normal-hdpi: most phones with 3 to 4.3 inch phones with 480 wide screens: Droids, Nexus, etc.
  4. drawable-large: 5 and 7 inch tablets: Samsung Galaxy Tab 7
  5. drawable-xlarge: 8 to 10 inch tablets, eg. Motorola Xoom, Samsung Galaxy 8.9 and 10.1



Corresponding folders are created for layout, e.g. layout-mormal-mdpi and so on.

The distinction between normal-mdpi and normal-hdpi is very important as these phones have totally different sizes.

In the picture below you can see these sizes being tested with the same content.

Arduino Mega 2560 - use of pins


pins 2 to 13: Provide 8-bit pulse width modulation (PWM) output with the analogWrite(pin, value) function where value is between 0 (off) and 255 (full on). Used to light a LED at varying brightnesses or drive a motor at various speeds.The frequency of the PWM signal is approximately 490 Hz.


int ledPin = 9; // LED connected to digital pin 9
int analogPin = 3; // potentiometer connected to analog pin 3
int val = 0; // variable to store the read value
void setup()
{
   pinMode(ledPin, OUTPUT); // sets the pin as output
}
void loop()
{
   val = analogRead(analogPin); // read the input pin
   analogWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values    from 0 to 255
}

Electronic Components




  • Positive DC terminal (higher voltage)
  • Thermistor (temperature dependent resistor)
  • Potentiometer (variable resistor)
  • LDR (light dependent resistor)
  • Resistor
  • Ground (lower voltage)












  • pin 13 of Arduino board
  • PWV (pulse modulated voltage)
  • isolating resistor
  • NPN transistor
  • ground (low voltage, not Arduino)
  • motor
  • battery +9V
  • voltage spike safety circuit
  • capacitor to store excess voltage
  • diode (one way flow) to drain excess voltage


Eclipse emulating Android Galaxy Tab 7

Step 1

Install "Available Packages" from "third party Add-ons" for Galaxy Tab by Samsung.
I found only API 8 level, not 10.


Step 2

Select "Target:" Galaxy Tab..
SD Card: Size 2048 Mib
New.. Device ram size 512

The rest will be default.



Step 3

Click Start...
select Scale display to real size
Screen Size (in): 11
On MacBook Pro is makes the emulator about the right size.

Eclipse - Galaxy Tab 7 with Android 2.3.4 not showing in Devices

Problem:

The Tablet is not showing in the "Devices" view.
Settings > Applications > Development > USB debugging is grayed out and not available to select.


The fix to the problem was simple, however it took several days to figure out as I always connect USB as a first thing:
  1. unplug the USB cable
  2. the "USB debugging" checkbox becomes available
  3. select (check) "USB debugging"
  4. re-connect the USB and it should show in devices



While investigating my options I updated from "Available Packages"
GALAXY Tab by Samsung Electronics., Android API 8, revision 1




You can also file-transfer APK to your device:






Google ADK - running DemoKit Android application

Set up of Eclipse and Arduino is necessary prior to following this tutorial.

Step ..
Eclipse > File > New Project > Android > Android Project



The source code for the DemoKit app is in:
~/Documents/Arduino/ADK_release_0512/app/AndroidManifest.xml


For Build Target, select Google APIs (Platform 2.3.3, API Level 10).

Step..



Possible problems:


Problem 1: Android 3.0 NOT 3.1

[2011-07-19 22:39:02 - DemoKit] Performing com.google.android.DemoKit.DemoKitLaunch activity launch
[2011-07-19 22:39:06 - DemoKit] Uploading DemoKit.apk onto device '380624742017317'
[2011-07-19 22:39:08 - DemoKit] Installing DemoKit.apk...
[2011-07-19 22:39:09 - DemoKit] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2011-07-19 22:39:09 - DemoKit] Please check logcat output for more details.
[2011-07-19 22:39:09 - DemoKit] Launch canceled!

[2011-07-19 22:40:49 - DemoKit] ERROR: Application requires API version 12. Device API version is 11 (Android 3.0.1).
[2011-07-19 22:40:49 - DemoKit] Launch canceled!




Solution (partial):
Samsung Galaxy Tab 10.1 is NOT 3.1, but 3.0.1 as of this writing therefore the libraries are missing.  Update the device to current 3.1 in the 
Settings > About tablet > System Updates > Update


Problem 2: Missing UsbManager

07-20 06:29:53.880: ERROR/AndroidRuntime(7879): FATAL EXCEPTION: main
07-20 06:29:53.880: ERROR/AndroidRuntime(7879): java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager
07-20 06:29:53.880: ERROR/AndroidRuntime(7879):     at com.google.android.DemoKit.DemoKitActivity.onCreate(DemoKitActivity.java:152)

Solution: TBD

Answer from Samsung on StockOverflow

Accessory mode currently doesn't work with the Samsung Galaxy Tab 10.1. Samsung is aware of the issue and is working on resolving it. When the device does support accessory mode you should be able to use the com.android.future.usb.* APIs which will make it easier for you to write an app that works both with Android 3.1 and 2.3.4.





Google ADK - Arduino setup

This tutorial explains how to set up Android ADK / Arduino environment based on the official instructions

Step ..
Copy directories from:
~/Documents/Arduino/ADK_release_0512/firmware/arduino_libs
copy to:
~/Documents/Arduino/libraries


Step ..
Create directory:
~/Documents/Arduino/libraries/CapSense

Step ..
Copy .. 
~/Documents/Arduino/libraries/CapSense $ ls
CapSense.cpp CapSense.h


Step ..
Installing the Google APIs Add-On (instructions
Install "Third party Add-ons" -  Google APIs 10 revision 2









Apple iOS distribution building nightmare with XCode 4

I have been trying to post an iOS app that has been ready and tested for a while now. The app runs fine on iPhone and iPad. I already went thru the 12 hour nightmare-effort of certificates and provisioning profiles. The app has also passed the verification by apple iTunes Connect, too... yet, as I am reading the posts of people having similar problems to mine I realize Apple makes it purposely a NIGHTMARE. For me that is UNNECESSARY waste of time and honestly makes me not want to make Apple native application anymore.

Here are some of the COMMENTS I found on the bulletin boards:


Btw, I've never heard of anyone getting this process right on the first try. It's not meant to be easy. Consider it to be an examination. I.e. to place your app in the store, it's not sufficient to have simply learned how to develop the software.

--

Strange as these steps may seem, they worked for me last time I had your problem (e.g. why delete all the build directories if you already cleaned all targets? And why re-enter the exact code-signing identity you just deleted??Just do it!).

--

On my first try I filled in the wrong line, and it took all night to find the problem.

--

Xcode 4 has made my life miserable. I am very familiar with Xcode 3.2.6 and have built and submitted several applications to the iTunes but now I am stopped at a very basic task. How to build the release version, find and compress the built iPhone bundle, and submit it to the AppStore with this X#2&% ?