[android-developers] Re: some questions about using gdbserver and JNI libraries

2009-11-05 Thread fadden
On Nov 5, 5:50 am, Michael Ambrus michael.amb...@gmail.com wrote:
 Setting breakpoints and running works, but when gdb starts up it also
 prints out:

 gdb: Unable to get location for thread creation breakpoint: requested
 event is not supported

 Is there a problem with gdb thread support in 1.6?

I don't know.  The debugging process is a dance between gcc, gdb,
gdbserver, libc pthreads, the Linux kernel, etc.  Getting it all right
is something of an art form.

arm-eabi-gdb is version 6.6 which is a bit behind the times.
http://android.git.kernel.org/ just recently got a handful of
toolchain directories added, so it should be easier to track changes
in the AOSP going forward.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Not sure where to find out how to do this - the Busy spinning icon

2009-11-05 Thread furby
I have been doing searches for this on Google but I am obviously using
the wrong words to look for it. How does one go about showing the icon
that spins in the upper right hand corner of the screen while
something else is going on?

I was trying to call it a Spinner but that is not exactly what it's
called in Android... and then I tried Busy Icon and nothing useful
pops up... I tried a few other things but for some reason I am drawing
a blank as to what the real term for it is...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] select inbox message rows with buttons

2009-11-05 Thread Carlos Pérez
Hi, I know the title it doesn't explain my problem exactily. It's
better explain it with an example.
I want put up-down arrows over inbox activity. I can select each row
in the inbox message list pressing up or down arrow.

I'd tried it showing two activities at time starting a new thread, but
I can't get it. However, if I could put my arrows another problem
appears: how can I tell inbox activity focus his rows?

Then, I thought maybe I resolve my problem installing NDK, but I have
a lot of problems installing it.

Finally, you could think, another solution could be manage myself
inbox message list; but this is not an scalable solution for me.

I expect somebody can help me. Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Social Intents

2009-11-05 Thread Mark Murphy

 I am interested--as I'm sure many of you are--in posting text to a
 facebook profile, a twitter status or some other social forum of the
 user's picking.  As a game developer, I think this would be  nice for
 users to brag about high scores.  I was hoping that with 2.0's new
 sync and saved social profiles that there might be a simple intent for
 this--something like the ACTION_SEND does for sending data to a
 contact.  Ideally, I would just have a simple intent, let's say
 ACTION_POST with some data (either text or a stream) with a MIME-TYPE
 set and the Android OS or MotoBlur, or someone who actually holds on
 to the user's social account information would handle a post.  I don't
 mind if someone catches my intent and prompts the user to approve it
 first.  I just want to give them the option.

 Can anyone tell me if anything like this exists?

ACTION_SEND. You do not need to specify a target address. Twidroid, for
example, responds to ACTION_SEND and lets you post to Twitter.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Urgent: unable to get rid of the memory issues for graphics apps

2009-11-05 Thread fadden
On Nov 4, 9:39 pm, manoj manojkumar.m...@gmail.com wrote:
 I have taken simple example AlphaBitmap given in api demos.
[...]
 From the below log I am not understanding where I am doing wrong. And
 one thing clearly notifying is that there is a memory problem.

Looks like a native crash in the Skia graphics library:

pid: 749, tid: 767   com.myapp 
signal 11 (SIGSEGV), fault addr 3f80001c
  r0 0180  r1 454f76e8  r2 0074  r3 0180
  r4 0080  r5 fff4  r6 beab6144  r7 0180
  r8 001f34c8  r9 ff80  10 beab6144  fp 0200
  ip 3f80  sp 454f7698  lr ac03e01c  pc ac043db0

Stack Trace:
  RELADDR
FUNCTION
FILE:LINE
  v--
ClampX_ClampY_nofilter_scale
  /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkBitmapProcState_matrix.h:28
  00043db0  ClampX_ClampY_nofilter_scale(SkBitmapProcState const,
unsigned int*, int, int, int)  /usr/local/
google/buildbot/buildroot/device/external/skia/src/core/
SkBitmapProcState_matrix.h:28
  0003e018  SkBitmapProcShader::shadeSpan(int, int, unsigned int*,
int)   /usr/local/
google/buildbot/buildroot/device/external/skia/src/core/
SkBitmapProcShader.cpp:141
  0004e910  SkARGB32_Shader_Blitter::blitH(int, int,
int) /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkBlitter_ARGB32.cpp:381
  00047e4c  SkBlitter::blitRect(int, int, int,
int)   /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkBlitter.cpp:65
  v--
antifillrect
  /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkScan_Antihair.cpp:540
  00075d64  antifillrect(SkIRect const,
SkBlitter*) 
 /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkScan_Antihair.cpp:540
  v--
antifillrect
  /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkScan_Antihair.cpp:600
  000767d4  SkScan::AntiFillRect(SkRect const, SkRegion const*,
SkBlitter*)  /usr/
local/google/buildbot/buildroot/device/external/skia/src/core/
SkScan_Antihair.cpp:600
  0005b3e8  SkDraw::drawRect(SkRect const, SkPaint const)
const /usr/
local/google/buildbot/buildroot/device/external/skia/src/core/
SkDraw.cpp:705
  00054b80  SkCanvas::drawRect(SkRect const, SkPaint
const) /
usr/local/google/buildbot/buildroot/device/external/skia/src/core/
SkCanvas.cpp:1058
  00052204  SkCanvas::drawRectCoords(float, float, float, float,
SkPaint const)  /usr/
local/google/buildbot/buildroot/device/external/skia/src/core/
SkCanvas.cpp:1299
  0003e388  android::SkCanvasGlue::drawRect__Paint(_JNIEnv*,
_jobject*, SkCanvas*, float, float, float, float, SkPaint*)  /usr/
local/google/buildbot/buildroot/device/frameworks/base/core/jni/
android/graphics/Canvas.cpp:404
  e3b4
dvmPlatformInvoke   
  /
usr/local/google/buildbot/buildroot/device/dalvik/vm/arch/arm/
CallEABI.S:242


If you have an APK that reliably reproduces this crash, please file a
bug on b.android.com and attach it.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Managing receiving/making calls with MediaPlayer

2009-11-05 Thread brooke
Hey everyone,

I'm sure this is a topic already, but I can't find it.  I've got a
streaming audio application that needs to pause when a call comes in
or is made, and resume on completion.  I found some logic that does
this in the Music player.

What I found sets up a PhoneStateListener and listens for changes in
the phone state and adjusts accordingly.

Do I need to implement this code or is there some new fangled approach
I should use?

Thanks,
Brooke


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How many people do you know that uses a cellphone?

2009-11-05 Thread edmel...@live.nl
How many people do you know that uses a cellphone?

Figure this one out!
How many people have a cellphone?
Let's say there are millions of them
How can i make money from this?
Simple, just put up an ad on every phone.
People click on your ad and see what you are selling.
If they want it, they buy it = Money in your bankaccount.

Is this simple or what?

http://www.youtube.com/watch?v=b2tFiAimieQ

Last month i made more then all of 2008 together.

Greatings,
Eddie M.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] consume sms msg

2009-11-05 Thread David Fire
hi
i am able to read incoming sms but i need to delete it, if it has some text
on it, and dosent be stored in the sms inbox.
how can i do that?
thanks
David

-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
()_()signature to help him gain world domination.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] ScrollView Layout/Gravity Problem

2009-11-05 Thread Romain Guy
fill_parent is meaningless inside a ScrollView. What you want is to
use wrap_content and add android:fillViewport=true on the
ScrollView.

On Wed, Nov 4, 2009 at 6:45 PM, droid_does bjkr...@gmail.com wrote:

 I would like to have a scrollable layout with some buttons at the
 bottom.  Getting the buttons to the bottom when using a Linear Layout
 works, however once I add a ScrollView it doesn't.  Below is an
 example demonstrating my problem (I know there isn't enough content to
 benefit from scrolling)

 ?xml version=1.0 encoding=utf-8?
 ScrollView xmlns:android=http://schemas.android.com/apk/res/android;
        android:layout_width=fill_parent
 android:layout_height=fill_parent
        android:background=#FF

 LinearLayout
    android:orientation=vertical android:layout_width=fill_parent
    android:layout_height=fill_parent

        TextView
        android:layout_width=wrap_content
 android:layout_height=wrap_content
        android:text=@string/hello /

    LinearLayout
        android:layout_width=fill_parent
 android:layout_height=fill_parent
        android:orientation=horizontal android:gravity=bottom

        Button
            android:text=Something android:id=@+id/btn2
            android:layout_width=0dip
 android:layout_height=wrap_content
            android:layout_weight=1 /

        Button
            android:text=Something Else android:id=@+id/btn1
            android:layout_width=0dip
 android:layout_height=wrap_content
            android:layout_weight=1 /

    /LinearLayout

 /LinearLayout

 /ScrollView

 Changing the gravity(=bottom) will push the Linear Layout containing
 the buttons to the bottom of the outer Linear Layout container, but
 that isn't at the bottom of the layout.  Why when there is a
 ScrollView involved does it prevent layout_height=fill_parent from
 filling the entire layout?

 I found a post on same problem but there were never any answers.

 http://markmail.org/message/ftiyzo7mvr45qv3g

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Is this true?

2009-11-05 Thread luckyboy31
I received an email from a friend containing a link.
This link: http://919422kew6qdoe7ghqibu8tvam.hop.clickbank.net/

I joined him and to my surprise everything seems ok.
This guy says he makes about $ 2 000 000 per year.
What you say about this thing?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android developer contest - win over $15,000 and a trip to Mobile World Congress

2009-11-05 Thread AM
Hi all,

My company, Motally, is sponsoring a contest for application
developers with over $15,000 in prizes including a trip to Mobile
World Congress in Barcelona.

All you have to do is integrate the Motally analytics API into your
app to be eligible to win. Our API helps developers monitor usage of
apps so you can learn more about your users and their behavior as well
as improve your product offering.

More details on the contest are online at www.motally.com/contest

Thanks,

AM

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Social Intents

2009-11-05 Thread mcgowen007
I am interested--as I'm sure many of you are--in posting text to a
facebook profile, a twitter status or some other social forum of the
user's picking.  As a game developer, I think this would be  nice for
users to brag about high scores.  I was hoping that with 2.0's new
sync and saved social profiles that there might be a simple intent for
this--something like the ACTION_SEND does for sending data to a
contact.  Ideally, I would just have a simple intent, let's say
ACTION_POST with some data (either text or a stream) with a MIME-TYPE
set and the Android OS or MotoBlur, or someone who actually holds on
to the user's social account information would handle a post.  I don't
mind if someone catches my intent and prompts the user to approve it
first.  I just want to give them the option.

Can anyone tell me if anything like this exists?  If not, what is the
simplest way to post something to a facebook profile (feed or status),
twitter status or some other social media?  I have no desire to
recapture the user's login info, as they've already done this, and why
should they trust a 3rd party app to handle it properly?  Thanks.

-Graham

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: trouble running app on 2.0 emulator

2009-11-05 Thread cvance383
when i extract the apk, in the lib/arch/darwin_ppc/ is a file:
MD5.jnilib . In my project the files in my lib folder are commons-
httpclient-3.1.jar ,  fast-md5.jar, gson-1.2.3.jar . Is this where my
problem is stemming from?

O Nov 4, 8:44 pm, Xavier Ducrohet x...@android.com wrote:
 what is all that lib/arch/darwin_ppc/ stuff?

 It looks like you're putting native code compiled for
 mac/linux/windows in your apk?

 It works on 1.5 because the package manager back then didn't check for
 native code.
 Starting with 1.6, it only accepts an apk if the native code packaged
 in the apk match the device. The emulator emulates a basic ARMv5
 device and expects native code to be in lib/armeabi/libfoo.so

 Do you happen to have a libs folder in your project that contains this
 arch folder (and subfolders)?

 Xav





 On Wed, Nov 4, 2009 at 5:08 PM, cvance383 cvance...@yahoo.com wrote:
  correction it works fine on 1.5, but not 1.6 or 2.0 , im thinking this
  is an sdk issue, but i still dont know. any help is greatly
  appreciated.

  On Nov 4, 7:51 pm, cvance383 cvance...@yahoo.com wrote:
  it prints out all the drawable files and this

   2540  2009-11-03 19:26   AndroidManifest.xml
      61100  2009-11-03 18:57   resources.arsc
     719304  2009-11-03 19:26   classes.dex
        453  2009-11-03 19:26   assembly-descriptor.xml
      12580  2009-11-03 19:26   lib/arch/darwin_ppc/MD5.jnilib
       9040  2009-11-03 19:26   lib/arch/darwin_x86/MD5.jnilib
       7346  2009-11-03 19:26   lib/arch/linux_x86/MD5.so
      13312  2009-11-03 19:26   lib/arch/win32_x86/MD5.dll
      25714  2009-11-03 19:26   META-INF/MANIFEST.MF
      25767  2009-11-03 19:26   META-INF/CERT.SF
        980  2009-11-03 19:26   META-INF/CERT.RSA
  -                     ---
    1955356                     303 files

  ... btw this is the first time i have had a problem installing the
  apk, if i switch back to 1.5 or 1.6, there isnt any issues.

  On Nov 4, 7:09 pm, David Turner di...@android.com wrote:

   hmm, can you tell us the content of your .apk, i.e. what does running 
   unzip
   -l yourapplication.apk prints out ?
   (feel free to obfuscate names if needed, but the first four characters of
   each line are important).

   thanks in advance

   On Wed, Nov 4, 2009 at 3:17 PM, cvance383 cvance...@yahoo.com wrote:
downloaded the new 2.0 sdk the other day, and tried testing my app on
2.0 via the emulator. I am using eclipse, and when i click run, the
new emulator runs with my 2.0 avd. but when eclipse tries to install
it i get this in the console...

Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
Please check logcat output for more details.

the log has this
11-04 18:16:01.818: ERROR/PackageManager(53): Package com.
(package).android has mismatched uid: 10025 on disk, 10026 in
settings; read messages:
11-04 18:16:01.818: ERROR/PackageManager(53): Read completed
successfully: 41 packages, 6 shared uids

11-04 18:16:01.906: WARN/PackageManager(53): Install failed: .apk has
native code but none for arch armeabi
11-04 18:16:01.932: WARN/PackageManager(53): Package couldn't be
installed in /data/app/com.(packagename).android.apk

I can not figure out why it does this. I have searched aimlessly for
answer and this is one of my last resorts. Thanks for any help

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 
android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.

 Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Loading Activity Darkens Screen/Loading Screen

2009-11-05 Thread matt parker
Hello,

I've looked through the documentation and I can't seem to figure out
how to have the screen blured/greyed when I select an activity that
may take a while to load.

This seems to be an Android standard (both the Camera app and the
Camcorder app do it when first selected), but I don't see any
documentation on it.  I even tried looking through the source of these
apps on git, but couldn't seem to find it.

Any advice?

Thanks,
Matt

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ScrollView Layout/Gravity Problem

2009-11-05 Thread droid_does

I would like to have a scrollable layout with some buttons at the
bottom.  Getting the buttons to the bottom when using a Linear Layout
works, however once I add a ScrollView it doesn't.  Below is an
example demonstrating my problem (I know there isn't enough content to
benefit from scrolling)

?xml version=1.0 encoding=utf-8?
ScrollView xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#FF

LinearLayout
android:orientation=vertical android:layout_width=fill_parent
android:layout_height=fill_parent

TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/hello /

LinearLayout
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=horizontal android:gravity=bottom

Button
android:text=Something android:id=@+id/btn2
android:layout_width=0dip
android:layout_height=wrap_content
android:layout_weight=1 /

Button
android:text=Something Else android:id=@+id/btn1
android:layout_width=0dip
android:layout_height=wrap_content
android:layout_weight=1 /

/LinearLayout

/LinearLayout

/ScrollView

Changing the gravity(=bottom) will push the Linear Layout containing
the buttons to the bottom of the outer Linear Layout container, but
that isn't at the bottom of the layout.  Why when there is a
ScrollView involved does it prevent layout_height=fill_parent from
filling the entire layout?

I found a post on same problem but there were never any answers.

http://markmail.org/message/ftiyzo7mvr45qv3g

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: android screen locked, service stop?

2009-11-05 Thread EEMT
I'm having the same issue.. Can someone help us? :(:(

On Sep 17, 11:38 pm, mwyzq mw...@126.com wrote:
 Hello:
      I had the program I wrote a service, and in service has written a timer, 
 change the timer for one minute cycle time, but why the program in the phone 
 standby (screen lock) were time, I have the timer will be stop running, when 
 I click the menu, get back to normal mode when the timer will automatically 
 have to run?
      What is the reason, how to solve? This problem has troubled me a long 
 time, hoping you so help me, thank you!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Eclair install choked with errors about locks and died horribly leaving corrupted install

2009-11-05 Thread Call Me Paul
Hello,

I am having the same issue, can someone post the steps to solve this?
I got v1.1 working on eclipse (still not sure why) for for the rest I
get the warning temp error.

Thanks!


On Nov 5, 12:07 am, ekwang ekwa...@gmail.com wrote:
 When I try to upgrade Android SDK Tools, revision 3, by SDK Setup.exe
 I meet same problem.
 I think it has obvious problem.
 Because SDK Setup.exe running with some files on /tools. (maybe
 android.bat and some lib files)
 So When SDK Setup try to rename old toolsfoldername after download
 complete, this issue is happen.
 Actually I checked java process handling /toolsfolderwhen SDK Setup
 running.

 On Oct 28, 6:31 am, Jim Showalter jamesleeshowal...@gmail.com wrote:

  Followed the instructions 
  inhttp://developer.android.com/sdk/adding-components.htmlforadding 2.0 as
  components to an existing 1.6 SDK, from within Eclipse.

  It didn't work. Not by a long shot. Instead, it got partway through and then
  said that C:\android-sdk-windows-1.6_r1\
  temp\DocPackage.new01 couldn't be copied because of a lock, and similarly
  for PlatformPackage.new01.

  It said to shut down running programs, but the only program running was
  Eclipse, which was needed to do the upgrade.

  The cancel button was disabled, and the close box didn't work. Shutting down
  Eclipse killed it, but left C:\android-sdk-windows-1.6_r1 in a corrupted
  state. Restarting Eclipse showed the Android projects with errors, no SDK,
  and a disabled Android SDK and AVD Manager (which means no ability to rerun
  the install).

  Shutting down Eclipse, renaming the corrupted SDK directory, unzipping 1.6
  again into C:, and restarting Eclipse made it as if nothing had ever
  happened, which is good. But it is not possible to complete the install from
  Eclipse, which is bad.

  The dialog says:

 Failedto rename directory
  C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to
  C:\android-sdk-windows-1.6_r1\docs
  -= Warning ! =-
  Afolderfailedto berenamedormoved. On Windows this typically means that
  a program is using thatfolder(for example Windows Explorer.) Please close
  all running programs that may be locking the directory
  'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again.

 Failedto rename directory
  C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to
  C:\android-sdk-windows-1.6_r1\docs
  -= Warning ! =-
  Afolderfailedto berenamedormoved. On Windows this typically means that
  a program is using thatfolder(for example Windows Explorer.) Please close
  all running programs that may be locking the directory
  'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again.
  Installed: SDK Platform Android 2.0, API 5 (tools rev: 3)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] SDK installation problems on Vista

2009-11-05 Thread Call Me Paul
Hello, I am having troubles installation the SDK on vista. I get a
warning telling me that it could't move data from a /temp directory to
its final destination under /platform/androidxx and that I should
check if any program was using windows explorer or that folder.

I tried several times, I tried doing it as the first and only thing I
do when my computer stats but no luck.

Is anyone experiencing the same problem? Can you help me?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Clear Activity stack?

2009-11-05 Thread Carlos Pérez
you can use activityB.finish(); for each activity you want remove.

On 3 nov, 18:00, Mark Wyszomierski mar...@gmail.com wrote:
 Hi,

 Is there a way to clear our Activity stack? For example, a user in my
 app progresses through these activities, one is launched from the
 previous activity:

  ActivityA -
  ActivityB -
  ActivityC

 if the user is now looking at ActivityC, and they hit the back button,
 they will go back to ActivityB.

 Is it possible to add a menu to ActivityC where the user can clear
 their activity stack, and then launch a new instance of ActivityA?
 This would be so the user can jump to a particular activity in my
 application without getting confused with the back button + history,

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread Dmitri Plotnikov
This line:

context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
null);

attempts to change ALL data rows that have RAW_CONTACT_ID == personId, which
includes the photo, but also phone numbers, emails etc.  You will need to
find the specific row before updating it. The condition should say: Data._ID
+ = + dataId.  Alternatively, you can construct a specific URI:
ContentUris.withAppendedId(Data.CONTENT_URI, dataId)

I hope this helps.
- Dmitri

On Thu, Nov 5, 2009 at 9:05 AM, jarkman jark...@gmail.com wrote:

 Dmitri - I wasn't, but I am now - thanks for the tip.

 It doesn't fix the problem, though. It seems as though I can set the
 photo once on a brand-new contact, but I can never set it again on
 that contact.

 Do I perhaps need to do something with
 ContactsContract.Data.PHOTO_ID ?

 Here's code:

 ContentValues values = new ContentValues();
 values.put(ContactsContract.Data.RAW_CONTACT_ID, personId);
 values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
 values.put(ContactsContract.CommonDataKinds.Photo.PHOTO,
 bytes.toByteArray());
 values.put(ContactsContract.Data.MIMETYPE,
 ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );

 context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
 values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
 null);


 And here's a stack:

 11-05 17:03:36.781: ERROR/DatabaseUtils(103): Writing exception to
 parcel
 11-05 17:03:36.781: ERROR/DatabaseUtils(103):
 android.database.sqlite.SQLiteException: unknown error: Unable to
 convert BLOB to string
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 android.database.CursorWindow.getString_native(Native Method)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 android.database.CursorWindow.getString(CursorWindow.java:329)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 android.database.AbstractWindowedCursor.getString
 (AbstractWindowedCursor.java:49)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at

 com.android.providers.contacts.ContactsProvider2$DataRowHandler.getAugmentedValues
 (ContactsProvider2.java:1038)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at

 com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.update
 (ContactsProvider2.java:1225)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 com.android.providers.contacts.ContactsProvider2$PhoneDataRowHandler.update
 (ContactsProvider2.java:1445)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 com.android.providers.contacts.ContactsProvider2.updateData
 (ContactsProvider2.java:3091)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 com.android.providers.contacts.ContactsProvider2.updateData
 (ContactsProvider2.java:3075)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 com.android.providers.contacts.ContactsProvider2.updateInTransaction
 (ContactsProvider2.java:2854)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 com.android.providers.contacts.SQLiteContentProvider.update
 (SQLiteContentProvider.java:139)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 com.android.providers.contacts.ContactsProvider2.update
 (ContactsProvider2.java:1923)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 android.content.ContentProvider$Transport.update(ContentProvider.java:
 180)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 android.content.ContentProviderNative.onTransact
 (ContentProviderNative.java:195)
 11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 android.os.Binder.execTransact(Binder.java:287)


 On Nov 5, 4:41 pm, Dmitri Plotnikov dplotni...@google.com wrote:
  Hi Richard,
 
  Regarding photos: are you setting the IS_SUPER_PRIMARY flag on your Photo
  row?  The notion of super-primary has to do with multiple accounts.
  You
  can have only one super-primary photo for an entire aggregated contact.
 
  Cheers,
  - Dmitri
 
  On Thu, Nov 5, 2009 at 1:51 AM, jarkman jark...@gmail.com wrote:
   Jake - no, you are not the only one who suffers that frustration with
   the ContactsContract documentation.
 
   I've spent a lot of time writing frankly experimental code because I
   couldn't work out from the docs how the various URIs and string
   constants had to be knitted together to actually work. I think the
   docs really need a lot more tiny examples, to make the context clear
   for each definition.
 
   I still can't work out how to set contact photos reliably. I thought I
   had a fix yesterday, but it fails in some cases. Tiem for more
   experiments...
 
   Richard
 
   On Nov 5, 2:11 am, jak. koda...@gmail.com wrote:
Thank you Dmitri,
 
Your response was very helpful. Along with that, and the sample you
posted on another thread about using both Contact Apis from one app,
I've gotten most of the way there. It is much appreciated.
 
I'm still however having some problems that I'm hard pressed to find
 a
solution for.
I'd be 

[android-developers] Non-conventional Android Programming in Rome

2009-11-05 Thread jesty
During this talk at Rome Spring Meeting I have explain how you can
develop for mobile devices like Android using HTML, CSS and Javascript
and how you can use Spring Framework in mobile environment.
http://www.slideshare.net/jesty/non-conventional-android-programming-en-2418941
Any feedback is appreciated.
bye,
Davide

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ScrollView scrolling.

2009-11-05 Thread rash
Hi

I am trying to detect the scrolling of a ScrollView.
Is it possible to do so ?
Can anybody help me with this.


Thanks

Rash

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Urgent: unable to get rid of the memory issues for graphics apps

2009-11-05 Thread Tom Gibara
Just a couple of other pointers:

1) It's really easy to produce a native crash in Skia by unleashing two
concurrent threads onto a single Bitmap.
2) There are some significant defects in the general bitmap functions
associated with ALPHA_8 bitmaps

Further to (2) see these for examples:
http://code.google.com/p/android/issues/detail?id=2463
http://code.google.com/p/android/issues/detail?id=2421

(I'm hoping that 2.0 will have addressed these, but I haven't had time to
check.)

Tom.

2009/11/5 fadden fad...@android.com

 On Nov 4, 9:39 pm, manoj manojkumar.m...@gmail.com wrote:
  I have taken simple example AlphaBitmap given in api demos.
 [...]
  From the below log I am not understanding where I am doing wrong. And
  one thing clearly notifying is that there is a memory problem.

 Looks like a native crash in the Skia graphics library:

 pid: 749, tid: 767   com.myapp 
 signal 11 (SIGSEGV), fault addr 3f80001c
   r0 0180  r1 454f76e8  r2 0074  r3 0180
   r4 0080  r5 fff4  r6 beab6144  r7 0180
   r8 001f34c8  r9 ff80  10 beab6144  fp 0200
   ip 3f80  sp 454f7698  lr ac03e01c  pc ac043db0

 Stack Trace:
  RELADDR
 FUNCTION
 FILE:LINE
  v--
 ClampX_ClampY_nofilter_scale
/
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkBitmapProcState_matrix.h:28
  00043db0  ClampX_ClampY_nofilter_scale(SkBitmapProcState const,
 unsigned int*, int, int, int)  /usr/local/
 google/buildbot/buildroot/device/external/skia/src/core/
 SkBitmapProcState_matrix.h:28
  0003e018  SkBitmapProcShader::shadeSpan(int, int, unsigned int*,
 int)   /usr/local/
 google/buildbot/buildroot/device/external/skia/src/core/
 SkBitmapProcShader.cpp:141
  0004e910  SkARGB32_Shader_Blitter::blitH(int, int,
 int) /
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkBlitter_ARGB32.cpp:381
  00047e4c  SkBlitter::blitRect(int, int, int,
 int)
 /
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkBlitter.cpp:65
  v--
 antifillrect
/
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkScan_Antihair.cpp:540
  00075d64  antifillrect(SkIRect const,
 SkBlitter*)
  /
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkScan_Antihair.cpp:540
  v--
 antifillrect
/
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkScan_Antihair.cpp:600
  000767d4  SkScan::AntiFillRect(SkRect const, SkRegion const*,
 SkBlitter*)  /usr/
 local/google/buildbot/buildroot/device/external/skia/src/core/
 SkScan_Antihair.cpp:600
  0005b3e8  SkDraw::drawRect(SkRect const, SkPaint const)
 const /usr/
 local/google/buildbot/buildroot/device/external/skia/src/core/
 SkDraw.cpp:705
  00054b80  SkCanvas::drawRect(SkRect const, SkPaint
 const) /
 usr/local/google/buildbot/buildroot/device/external/skia/src/core/
 SkCanvas.cpp:1058
  00052204  SkCanvas::drawRectCoords(float, float, float, float,
 SkPaint const)  /usr/
 local/google/buildbot/buildroot/device/external/skia/src/core/
 SkCanvas.cpp:1299
  0003e388  android::SkCanvasGlue::drawRect__Paint(_JNIEnv*,
 _jobject*, SkCanvas*, float, float, float, float, SkPaint*)  /usr/
 local/google/buildbot/buildroot/device/frameworks/base/core/jni/
 android/graphics/Canvas.cpp:404
  e3b4
 dvmPlatformInvoke
   /
 usr/local/google/buildbot/buildroot/device/dalvik/vm/arch/arm/
 CallEABI.S:242


 If you have an APK that reliably reproduces this crash, please file a
 bug on b.android.com and attach it.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Which Flavour of Linux

2009-11-05 Thread Brian Conrad
Miguel Paraz wrote:
 On Nov 5, 6:10 pm, Bytes toyvenu.t...@gmail.com wrote:
   
 During my very short time experience with Android, I found that Linux
 is most suitable environment for development compared to Windows.
 Please correct me if I'm too inexperienced.

 My question is,

 Which version of the Linux is best suitable. [Redhat/Fedora/Ubuntu..]

 Please let me know.

 Is Linux version really matters ?
 

 Hi,
 Ubuntu is the best documented - I believe it's what some of the
 Android developers use.

   
It also has the largest distribution so that's why it gets supported 
first.  I'm using 9.04.

-Brian


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] merging columns of cursor

2009-11-05 Thread Kartik Bansal
hi..

I am making an app where I need to filter the contacts as user types..
I m using autoTextView and I am able to successfully query the
contacts db for either tel number or name..
However while displaying I can either display name or tel number only
as simple cursor only lets me match one list view with one column..
How do I merge the name and tel number column of the cursor so that
both of them can be shown in one list view..

Thanks!!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread jarkman
Oops! I see what you mean. Perhaps that update was a little
bold... :-)

So I need to search out the right row (with the right contact ID and
the photo's MIME type) in the Data table with a query, then update
that row ?

If there isn't a pre-existing photo, do I also need to update
ContactsContract.Data.PHOTO_ID on the contact after I have added a
photo ?

Thanks!

R.


On Nov 5, 7:09 pm, Dmitri Plotnikov dplotni...@google.com wrote:
 This line:

 context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
 values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
 null);

 attempts to change ALL data rows that have RAW_CONTACT_ID == personId, which
 includes the photo, but also phone numbers, emails etc.  You will need to
 find the specific row before updating it. The condition should say: Data._ID
 + = + dataId.  Alternatively, you can construct a specific URI:
 ContentUris.withAppendedId(Data.CONTENT_URI, dataId)

 I hope this helps.
 - Dmitri

 On Thu, Nov 5, 2009 at 9:05 AM, jarkman jark...@gmail.com wrote:
  Dmitri - I wasn't, but I am now - thanks for the tip.

  It doesn't fix the problem, though. It seems as though I can set the
  photo once on a brand-new contact, but I can never set it again on
  that contact.

  Do I perhaps need to do something with
  ContactsContract.Data.PHOTO_ID ?

  Here's code:

  ContentValues values = new ContentValues();
  values.put(ContactsContract.Data.RAW_CONTACT_ID, personId);
  values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
  values.put(ContactsContract.CommonDataKinds.Photo.PHOTO,
  bytes.toByteArray());
  values.put(ContactsContract.Data.MIMETYPE,
  ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );

  context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
  values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
  null);

  And here's a stack:

  11-05 17:03:36.781: ERROR/DatabaseUtils(103): Writing exception to
  parcel
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):
  android.database.sqlite.SQLiteException: unknown error: Unable to
  convert BLOB to string
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  android.database.CursorWindow.getString_native(Native Method)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  android.database.CursorWindow.getString(CursorWindow.java:329)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  android.database.AbstractWindowedCursor.getString
  (AbstractWindowedCursor.java:49)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at

  com.android.providers.contacts.ContactsProvider2$DataRowHandler.getAugmentedValues
  (ContactsProvider2.java:1038)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at

  com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.update
  (ContactsProvider2.java:1225)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  com.android.providers.contacts.ContactsProvider2$PhoneDataRowHandler.update
  (ContactsProvider2.java:1445)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  com.android.providers.contacts.ContactsProvider2.updateData
  (ContactsProvider2.java:3091)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  com.android.providers.contacts.ContactsProvider2.updateData
  (ContactsProvider2.java:3075)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  com.android.providers.contacts.ContactsProvider2.updateInTransaction
  (ContactsProvider2.java:2854)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  com.android.providers.contacts.SQLiteContentProvider.update
  (SQLiteContentProvider.java:139)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  com.android.providers.contacts.ContactsProvider2.update
  (ContactsProvider2.java:1923)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  android.content.ContentProvider$Transport.update(ContentProvider.java:
  180)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  android.content.ContentProviderNative.onTransact
  (ContentProviderNative.java:195)
  11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
  android.os.Binder.execTransact(Binder.java:287)

  On Nov 5, 4:41 pm, Dmitri Plotnikov dplotni...@google.com wrote:
   Hi Richard,

   Regarding photos: are you setting the IS_SUPER_PRIMARY flag on your Photo
   row?  The notion of super-primary has to do with multiple accounts.
   You
   can have only one super-primary photo for an entire aggregated contact.

   Cheers,
   - Dmitri

   On Thu, Nov 5, 2009 at 1:51 AM, jarkman jark...@gmail.com wrote:
Jake - no, you are not the only one who suffers that frustration with
the ContactsContract documentation.

I've spent a lot of time writing frankly experimental code because I
couldn't work out from the docs how the various URIs and string
constants had to be knitted together to actually work. I think the
docs really need a lot more tiny examples, to make the context clear
for each definition.

I still can't work out how to set contact 

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread Dmitri Plotnikov
Right.

Setting the new photo to super-primary should take care of the PHOTO_ID
reference.  You should not need to worry about resetting the super-primary
flag on other photos for the same contact - that's also automatic.

Cheers,
- Dmitri

On Thu, Nov 5, 2009 at 12:04 PM, jarkman jark...@gmail.com wrote:

 Oops! I see what you mean. Perhaps that update was a little
 bold... :-)

 So I need to search out the right row (with the right contact ID and
 the photo's MIME type) in the Data table with a query, then update
 that row ?

 If there isn't a pre-existing photo, do I also need to update
 ContactsContract.Data.PHOTO_ID on the contact after I have added a
 photo ?

 Thanks!

 R.


 On Nov 5, 7:09 pm, Dmitri Plotnikov dplotni...@google.com wrote:
  This line:
 
  context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
  values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
  null);
 
  attempts to change ALL data rows that have RAW_CONTACT_ID == personId,
 which
  includes the photo, but also phone numbers, emails etc.  You will need to
  find the specific row before updating it. The condition should say:
 Data._ID
  + = + dataId.  Alternatively, you can construct a specific URI:
  ContentUris.withAppendedId(Data.CONTENT_URI, dataId)
 
  I hope this helps.
  - Dmitri
 
  On Thu, Nov 5, 2009 at 9:05 AM, jarkman jark...@gmail.com wrote:
   Dmitri - I wasn't, but I am now - thanks for the tip.
 
   It doesn't fix the problem, though. It seems as though I can set the
   photo once on a brand-new contact, but I can never set it again on
   that contact.
 
   Do I perhaps need to do something with
   ContactsContract.Data.PHOTO_ID ?
 
   Here's code:
 
   ContentValues values = new ContentValues();
   values.put(ContactsContract.Data.RAW_CONTACT_ID, personId);
   values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
   values.put(ContactsContract.CommonDataKinds.Photo.PHOTO,
   bytes.toByteArray());
   values.put(ContactsContract.Data.MIMETYPE,
   ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );
 
   context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
   values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
   null);
 
   And here's a stack:
 
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): Writing exception to
   parcel
   11-05 17:03:36.781: ERROR/DatabaseUtils(103):
   android.database.sqlite.SQLiteException: unknown error: Unable to
   convert BLOB to string
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   android.database.CursorWindow.getString_native(Native Method)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   android.database.CursorWindow.getString(CursorWindow.java:329)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   android.database.AbstractWindowedCursor.getString
   (AbstractWindowedCursor.java:49)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 
  
 com.android.providers.contacts.ContactsProvider2$DataRowHandler.getAugmentedValues
   (ContactsProvider2.java:1038)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
 
  
 com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.update
   (ContactsProvider2.java:1225)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
  
 com.android.providers.contacts.ContactsProvider2$PhoneDataRowHandler.update
   (ContactsProvider2.java:1445)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   com.android.providers.contacts.ContactsProvider2.updateData
   (ContactsProvider2.java:3091)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   com.android.providers.contacts.ContactsProvider2.updateData
   (ContactsProvider2.java:3075)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   com.android.providers.contacts.ContactsProvider2.updateInTransaction
   (ContactsProvider2.java:2854)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   com.android.providers.contacts.SQLiteContentProvider.update
   (SQLiteContentProvider.java:139)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   com.android.providers.contacts.ContactsProvider2.update
   (ContactsProvider2.java:1923)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   android.content.ContentProvider$Transport.update(ContentProvider.java:
   180)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   android.content.ContentProviderNative.onTransact
   (ContentProviderNative.java:195)
   11-05 17:03:36.781: ERROR/DatabaseUtils(103): at
   android.os.Binder.execTransact(Binder.java:287)
 
   On Nov 5, 4:41 pm, Dmitri Plotnikov dplotni...@google.com wrote:
Hi Richard,
 
Regarding photos: are you setting the IS_SUPER_PRIMARY flag on your
 Photo
row?  The notion of super-primary has to do with multiple accounts.
You
can have only one super-primary photo for an entire aggregated
 contact.
 
Cheers,
- Dmitri
 
On Thu, Nov 5, 2009 at 1:51 AM, jarkman jark...@gmail.com wrote:
 Jake - no, you are not the only one who 

Re: [android-developers] merging columns of cursor

2009-11-05 Thread Mark Murphy

 hi..

 I am making an app where I need to filter the contacts as user types..
 I m using autoTextView and I am able to successfully query the
 contacts db for either tel number or name..
 However while displaying I can either display name or tel number only
 as simple cursor only lets me match one list view with one column..
 How do I merge the name and tel number column of the cursor so that
 both of them can be shown in one list view..

Merge them in the layout. Instead of supplying
android.R.layout.simple_dropdown_item_1line or something like that to your
layout constructor, create a layout of your own design that has the name
and telephone number. Depending on how you do this, this might require
creating a custom adapter.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ADC2 Results Post

2009-11-05 Thread GodsMoon
Since the Android Challenge Group seems to be closed I'll post here.
What results did you get from Google?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] ADC2 Results Post

2009-11-05 Thread Nikolay Ananiev
Negative. They said my app was one of the top 25%, but did not make it.
My app is Bebbled (currently one of the top free casual games).



On Thu, Nov 5, 2009 at 10:28 PM, GodsMoon godsm...@gmail.com wrote:

 Since the Android Challenge Group seems to be closed I'll post here.
 What results did you get from Google?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ADC2 Results Post

2009-11-05 Thread ander...@phdgaming.com
I got an email saying my application Mystic Maggie Story (
http://www.phdgaming.com/general_media/mm/ ) was ranked in the bottom
50%. As it was top 20 from each category that moved on, I assume that
means it was in the bottom 50% for education.

Really thought I would have at least made top 20 in the education
category. :/ Oh well.

On Nov 5, 3:28 pm, GodsMoon godsm...@gmail.com wrote:
 Since the Android Challenge Group seems to be closed I'll post here.
 What results did you get from Google?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] CheckBox blocks ExpandableListView.OnGroupClickListener

2009-11-05 Thread droidin.net
I'm trying to put a checkbox into ExpandableListView. I noticed that
doing that disables basic functionality of displaying child list when
group row is clicked. Furthermore when I click outside of checkbox the
click is detected by nether checkbox nor by OnGroupClickListener. Can
someone help me to resolve this?
The CheckBox works fine though including detecting clicks when
clicking directly on the box

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread Piotr
According to the scores submitted by users, your application
'TripComputer' ranked in the top 50% of all applications submitted. We
appreciate your taking the time to develop and enter your
application...

And like in ADC1 - again the same thing: no real ranking, no real
numbers, only percentable scores.

Liars.

I do not believe you anymore, Google.

http://www.tripcomputer.pl/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread Alex
I've voted all 5s but 4 for polish for your app in round 1, really
liked your app.

Ours (vivify picture) also failed to make it to top 20 education
titles, being in bottom 50% too. I think that's for all apps, not just
education category.

When judging, I've seen about 5 original apps in the category
inclucing yours, and everything else were just quizes. So proabbly in
education 20 quiz apps will be competing with each other in round 2.

On Nov 5, 9:46 pm, ander...@phdgaming.com ander...@phdgaming.com
wrote:
 I got an email saying my application Mystic Maggie Story 
 (http://www.phdgaming.com/general_media/mm/) was ranked in the bottom
 50%. As it was top 20 from each category that moved on, I assume that
 means it was in the bottom 50% for education.

 Really thought I would have at least made top 20 in the education
 category. :/ Oh well.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: trouble running app on 2.0 emulator

2009-11-05 Thread Xavier Ducrohet
ah I understand now.

Here's what happens:

fast-md5.jar is not 100% java and has a native component to it. That
native component is in multiple form for different os
(linux/mac/windows) and architectures (x86/ppc).

Just this is going to not make it work. You would have to make sure to
recompile the native library with our NDK, and make sure it's packaged
properly with the apk (NDK does this for you) and make sure the java
code of the jar loads it like other NDK libraries.

The problem that you are seeing is that packaging 3rd party jar files
has 2 steps:
- take the .class files inside the jar file and dex them into
classes.dex with the other code from the project (or other jar files)
- take the non .class files from the java and put them into the apk
(which is a zip file like jar files), with the same folder structure
so that Java code accessing resources through
Class.getResourceAsStream() (or similar) can find and load those
resources

So it looks like fast-MD5.jar contains lib/arch/darwin_x86/MD5.jnilib
and other libraries. The problem is that this conflicts with where the
NDK libraries are supposed to be and the package manager on the device
complains.

Note that in 1.5 this check is not there but the app will only work if
it doesn't call into method of this jar file that uses native
implementation.

On our side we should definitively check this during packaging and
generate a warning/error when we detect a potential conflict.

Xav



On Thu, Nov 5, 2009 at 10:54 AM, cvance383 cvance...@yahoo.com wrote:
 when i extract the apk, in the lib/arch/darwin_ppc/ is a file:
 MD5.jnilib . In my project the files in my lib folder are commons-
 httpclient-3.1.jar ,  fast-md5.jar, gson-1.2.3.jar . Is this where my
 problem is stemming from?

 O Nov 4, 8:44 pm, Xavier Ducrohet x...@android.com wrote:
 what is all that lib/arch/darwin_ppc/ stuff?

 It looks like you're putting native code compiled for
 mac/linux/windows in your apk?

 It works on 1.5 because the package manager back then didn't check for
 native code.
 Starting with 1.6, it only accepts an apk if the native code packaged
 in the apk match the device. The emulator emulates a basic ARMv5
 device and expects native code to be in lib/armeabi/libfoo.so

 Do you happen to have a libs folder in your project that contains this
 arch folder (and subfolders)?

 Xav





 On Wed, Nov 4, 2009 at 5:08 PM, cvance383 cvance...@yahoo.com wrote:
  correction it works fine on 1.5, but not 1.6 or 2.0 , im thinking this
  is an sdk issue, but i still dont know. any help is greatly
  appreciated.

  On Nov 4, 7:51 pm, cvance383 cvance...@yahoo.com wrote:
  it prints out all the drawable files and this

   2540  2009-11-03 19:26   AndroidManifest.xml
      61100  2009-11-03 18:57   resources.arsc
     719304  2009-11-03 19:26   classes.dex
        453  2009-11-03 19:26   assembly-descriptor.xml
      12580  2009-11-03 19:26   lib/arch/darwin_ppc/MD5.jnilib
       9040  2009-11-03 19:26   lib/arch/darwin_x86/MD5.jnilib
       7346  2009-11-03 19:26   lib/arch/linux_x86/MD5.so
      13312  2009-11-03 19:26   lib/arch/win32_x86/MD5.dll
      25714  2009-11-03 19:26   META-INF/MANIFEST.MF
      25767  2009-11-03 19:26   META-INF/CERT.SF
        980  2009-11-03 19:26   META-INF/CERT.RSA
  -                     ---
    1955356                     303 files

  ... btw this is the first time i have had a problem installing the
  apk, if i switch back to 1.5 or 1.6, there isnt any issues.

  On Nov 4, 7:09 pm, David Turner di...@android.com wrote:

   hmm, can you tell us the content of your .apk, i.e. what does running 
   unzip
   -l yourapplication.apk prints out ?
   (feel free to obfuscate names if needed, but the first four characters 
   of
   each line are important).

   thanks in advance

   On Wed, Nov 4, 2009 at 3:17 PM, cvance383 cvance...@yahoo.com wrote:
downloaded the new 2.0 sdk the other day, and tried testing my app on
2.0 via the emulator. I am using eclipse, and when i click run, the
new emulator runs with my 2.0 avd. but when eclipse tries to install
it i get this in the console...

Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
Please check logcat output for more details.

the log has this
11-04 18:16:01.818: ERROR/PackageManager(53): Package com.
(package).android has mismatched uid: 10025 on disk, 10026 in
settings; read messages:
11-04 18:16:01.818: ERROR/PackageManager(53): Read completed
successfully: 41 packages, 6 shared uids

11-04 18:16:01.906: WARN/PackageManager(53): Install failed: .apk has
native code but none for arch armeabi
11-04 18:16:01.932: WARN/PackageManager(53): Package couldn't be
installed in /data/app/com.(packagename).android.apk

I can not figure out why it does this. I have searched aimlessly for
answer and this is one of my last resorts. Thanks for any help

--
You received this message because you are subscribed to the Google

[android-developers] Re: Reverse geocoding

2009-11-05 Thread Mike
I was playing around with this very concept a while back.  Turns out
at the time (I haven't checked recently) that you had to do one
location at a time.  It would be nice if you could pass the geocoder
multiple points and get multiple results back.

So, I ended up doing what you did - pick a center location and
calculate several other points within a specified radius and then
passing each one to the geocoder.  It was really slow.

On Nov 4, 1:08 pm, Nymann per.nymann.joergen...@gmail.com wrote:
 Hi

 I'm using the geocoder in the android map api, this work relatively
 good, my problem though is that i want to be able to get a number of
 addresses near a geopoint !

 Anyone have any experience creating or using such a service, does one
 exist on the net?

 I thought about calculating different geopoint near the a center
 geopoint, but what about the cost of calling the reverse geocoder
 multiple times etc.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How does GoogleLoginService store user's account/passwd?

2009-11-05 Thread Joes
In my G1 phone, Once I setup the gmail account, after some time, maybe
one hour. Reboot the phone, then I will never be able to login gmail
again, I always get the log:


11-05 11:22:31.935: DEBUG/gmail-ls(257): Authentication error, token
invalidated, retrying
11-05 11:22:31.935: VERBOSE/WindowManager(104): Status bar:
mDockBottom=320 mContentBottom=320 mCurBottom=320
11-05 11:22:31.945: DEBUG/GoogleLoginService(257): no password stored
for [x...@gmail.com]
11-05 11:22:31.945: VERBOSE/WindowManager(104): Compute frame
com.google.android.gm/com.google.android.gm.ConversationListActivity:
sim=#110 pf=[0,0][480,320] df=[0,0][480,320] cf=[0,25][480,320] vf=
[0,25][480,320]


I just wonder who know the mechanism of googleloginservice to store
the account/passwd?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread newbyca
we submitted Wheel of Yum (under shopping I think?) ... from the
email:

Unfortunately, your application was not
selected by Android users as one of the top 20 in its category.

According to the scores submitted by users, your application 'Wheel of
Yum!' ranked in the top 50% of all applications submitted

no other stats, just like the rest of you. but i should note that we
submitted an app to Facebook's fbFund in 2008 and got absolutely NO
response from anyone. disappointing to not be in top 20, but at least
we got an email this time :)


On Nov 5, 3:28 pm, GodsMoon godsm...@gmail.com wrote:
 Since the Android Challenge Group seems to be closed I'll post here.
 What results did you get from Google?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] How does GoogleLoginService store user's account/passwd?

2009-11-05 Thread Jason Proctor
i don't know whether this is your problem, but i'm finding that gmail 
is expiring POP/IMAP auths and requiring captchas more often.

the specific case for me is that i can't log in via POP until i go to 
the website and satisfy the captcha. it's happened twice this week so 
far and i am confused as to why it should be necessary. the account 
to which this happens most often is the one i exclusively use for the 
android lists.

try logging all the way out with your desktop, login again, once the 
web side is satisfied, try the phone.

hth



In my G1 phone, Once I setup the gmail account, after some time, maybe
one hour. Reboot the phone, then I will never be able to login gmail
again, I always get the log:


11-05 11:22:31.935: DEBUG/gmail-ls(257): Authentication error, token
invalidated, retrying
11-05 11:22:31.935: VERBOSE/WindowManager(104): Status bar:
mDockBottom=320 mContentBottom=320 mCurBottom=320
11-05 11:22:31.945: DEBUG/GoogleLoginService(257): no password stored
for [x...@gmail.com]
11-05 11:22:31.945: VERBOSE/WindowManager(104): Compute frame
com.google.android.gm/com.google.android.gm.ConversationListActivity:
sim=#110 pf=[0,0][480,320] df=[0,0][480,320] cf=[0,25][480,320] vf=
[0,25][480,320]


I just wonder who know the mechanism of googleloginservice to store
the account/passwd?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


-- 
jason.vp.engineering.particle

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread nuno
I submitted 3 apps and only received emails about 2 of them. Does it
mean that the other one passed?


On Nov 5, 9:09 pm, newbyca newb...@gmail.com wrote:
 we submitted Wheel of Yum (under shopping I think?) ... from the
 email:

 Unfortunately, your application was not
 selected by Android users as one of the top 20 in its category.

 According to the scores submitted by users, your application 'Wheel of
 Yum!' ranked in the top 50% of all applications submitted

 no other stats, just like the rest of you. but i should note that we
 submitted an app to Facebook's fbFund in 2008 and got absolutely NO
 response from anyone. disappointing to not be in top 20, but at least
 we got an email this time :)

 On Nov 5, 3:28 pm, GodsMoon godsm...@gmail.com wrote:



  Since the Android Challenge Group seems to be closed I'll post here.
  What results did you get from Google?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] custom ArrayAdapter compile error

2009-11-05 Thread tatman
I'm trying to create my own ArrayAdapter.  I'm missing something.  I
cannot get the code to compile.  The documentation says I need to
override getView.  But the compiler isn't seeing getView as a method
defined in the super class.   What am I missing?

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.TextView;


public class Stock
{
   // etc
}


public class StockAdapter extends ArrayAdapterStock
{

// 
//
public StockAdapter(Context context, int textViewResourceId, Stock[]
objects)
{
super(context, textViewResourceId, objects);
}

@Override
public View getView(int position, View convertView, ViewGroup
parent)
{
}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] MEDIA BUTTON

2009-11-05 Thread moa
How to I simulate the Media Button (the button on the wired headset)
that starts the media player, being pressed in the emulator?

I've looked and looked... can't see it :(

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread jak.
Hi Dmitri  Jarkman,
Hope everyone's having a good day.

I'm also working on adding photo's for a contact. Based on your
discussion I came up with this method.
It's seems to do the job, but I'm not entirely confident that I'm
doing things in the best way.
Can you please review it and let me know If I am fully grasping the
concept. I'm a little confused about when to use CONTACT_ID vs.
RAW_CONTACT_ID etc.

Code below. Thanks a bunch!
Jake

---

public static void setPhoto(Uri personUri, byte[] photo, Context
context) {
ContentValues values = new ContentValues();
int photoRow = -1;
String where = ContactsContract.Data.RAW_CONTACT_ID +  ==  +
ContentUris.parseId(personUri) +  AND  + Data.MIMETYPE + ==' +
ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE + ';
Cursor cursor = context.getContentResolver().query
(ContactsContract.Data.CONTENT_URI, null, where, null, null);
int idIdx = cursor.getColumnIndexOrThrow
(ContactsContract.Data._ID);
if(cursor.moveToFirst()){
photoRow = cursor.getInt(idIdx);
}
cursor.close();

values.put(ContactsContract.Data.RAW_CONTACT_ID,
ContentUris.parseId(personUri));
values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
values.put(ContactsContract.CommonDataKinds.Photo.PHOTO, photo);
values.put(ContactsContract.Data.MIMETYPE,
ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);

if(photoRow = 0){
context.getContentResolver().update
(ContactsContract.Data.CONTENT_URI, values, ContactsContract.Data._ID
+  =  + photoRow, null);
} else {
context.getContentResolver().insert
(ContactsContract.Data.CONTENT_URI, values);
}
}

On Nov 5, 12:17 pm, Dmitri Plotnikov dplotni...@google.com wrote:
 Right.

 Setting the new photo to super-primary should take care of the PHOTO_ID
 reference.  You should not need to worry about resetting the super-primary
 flag on other photos for the same contact - that's also automatic.

 Cheers,
 - Dmitri



 On Thu, Nov 5, 2009 at 12:04 PM, jarkman jark...@gmail.com wrote:
  Oops! I see what you mean. Perhaps that update was a little
  bold... :-)

  So I need to search out the right row (with the right contact ID and
  the photo's MIME type) in the Data table with a query, then update
  that row ?

  If there isn't a pre-existing photo, do I also need to update
  ContactsContract.Data.PHOTO_ID on the contact after I have added a
  photo ?

  Thanks!

  R.

  On Nov 5, 7:09 pm, Dmitri Plotnikov dplotni...@google.com wrote:
   This line:

   context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
   values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
   null);

   attempts to change ALL data rows that have RAW_CONTACT_ID == personId,
  which
   includes the photo, but also phone numbers, emails etc.  You will need to
   find the specific row before updating it. The condition should say:
  Data._ID
   + = + dataId.  Alternatively, you can construct a specific URI:
   ContentUris.withAppendedId(Data.CONTENT_URI, dataId)

   I hope this helps.
   - Dmitri

   On Thu, Nov 5, 2009 at 9:05 AM, jarkman jark...@gmail.com wrote:
Dmitri - I wasn't, but I am now - thanks for the tip.

It doesn't fix the problem, though. It seems as though I can set the
photo once on a brand-new contact, but I can never set it again on
that contact.

Do I perhaps need to do something with
ContactsContract.Data.PHOTO_ID ?

Here's code:

ContentValues values = new ContentValues();
values.put(ContactsContract.Data.RAW_CONTACT_ID, personId);
values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
values.put(ContactsContract.CommonDataKinds.Photo.PHOTO,
bytes.toByteArray());
values.put(ContactsContract.Data.MIMETYPE,
ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );

context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
values, ContactsContract.Data.RAW_CONTACT_ID +  =  + personId,
null);

And here's a stack:

11-05 17:03:36.781: ERROR/DatabaseUtils(103): Writing exception to
parcel
11-05 17:03:36.781: ERROR/DatabaseUtils(103):
android.database.sqlite.SQLiteException: unknown error: Unable to
convert BLOB to string
11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
android.database.CursorWindow.getString_native(Native Method)
11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
android.database.CursorWindow.getString(CursorWindow.java:329)
11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
android.database.AbstractWindowedCursor.getString
(AbstractWindowedCursor.java:49)
11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at

  com.android.providers.contacts.ContactsProvider2$DataRowHandler.getAugmente 
  dValues
(ContactsProvider2.java:1038)
11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at

  com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.updat 
  e
(ContactsProvider2.java:1225)

[android-developers] Re: ADC2 Results Post

2009-11-05 Thread Derek
Same here: Top 50% but did not make it.
WorldTime has been published on Market (as WorldWideTime) in
September. It has reached rank #9 in Travel category in 3 weeks
according to http://androidstats.com/ranking/application/13459 but
it's not in top 20 of ADC2 travel category.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread ander...@phdgaming.com
Alex - thanks for the positive note, appreciate it. :) Indeed I has
the same experience as to the competition in the Education category -
hence why I figured that Mystic Maggie would at least make top 20.
Very surprised Vivify Picture didn't make it either - indeed does seem
that voters must have preferred what they have seen before over
originality.

On a side note, Google just sent me a *second* rejection email
identical to the first one 4 minutes ago for the same application?
Anyone else have that happen?

On Nov 5, 3:56 pm, Alex iiiypu...@gmail.com wrote:
 I've voted all 5s but 4 for polish for your app in round 1, really
 liked your app.

 Ours (vivify picture) also failed to make it to top 20 education
 titles, being in bottom 50% too. I think that's for all apps, not just
 education category.

 When judging, I've seen about 5 original apps in the category
 inclucing yours, and everything else were just quizes. So proabbly in
 education 20 quiz apps will be competing with each other in round 2.

 On Nov 5, 9:46 pm, ander...@phdgaming.com ander...@phdgaming.com
 wrote:



  I got an email saying my application Mystic Maggie Story 
  (http://www.phdgaming.com/general_media/mm/) was ranked in the bottom
  50%. As it was top 20 from each category that moved on, I assume that
  means it was in the bottom 50% for education.

  Really thought I would have at least made top 20 in the education
  category. :/ Oh well.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread Derek
Yes, 2 identical emails received too.

On Nov 5, 10:21 pm, ander...@phdgaming.com ander...@phdgaming.com
wrote:
 Alex - thanks for the positive note, appreciate it. :) Indeed I has
 the same experience as to the competition in the Education category -
 hence why I figured that Mystic Maggie would at least make top 20.
 Very surprised Vivify Picture didn't make it either - indeed does seem
 that voters must have preferred what they have seen before over
 originality.

 On a side note, Google just sent me a *second* rejection email
 identical to the first one 4 minutes ago for the same application?
 Anyone else have that happen?

 On Nov 5, 3:56 pm, Alex iiiypu...@gmail.com wrote:

  I've voted all 5s but 4 for polish for your app in round 1, really
  liked your app.

  Ours (vivify picture) also failed to make it to top 20 education
  titles, being in bottom 50% too. I think that's for all apps, not just
  education category.

  When judging, I've seen about 5 original apps in the category
  inclucing yours, and everything else were just quizes. So proabbly in
  education 20 quiz apps will be competing with each other in round 2.

  On Nov 5, 9:46 pm, ander...@phdgaming.com ander...@phdgaming.com
  wrote:

   I got an email saying my application Mystic Maggie Story 
   (http://www.phdgaming.com/general_media/mm/) was ranked in the bottom
   50%. As it was top 20 from each category that moved on, I assume that
   means it was in the bottom 50% for education.

   Really thought I would have at least made top 20 in the education
   category. :/ Oh well.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to set the unlock pattern?

2009-11-05 Thread Tomas Sjöberg
How to set the unlock pattern?
Is that an intent?
BR /Tomas

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Eclair install choked with errors about locks and died horribly leaving corrupted install

2009-11-05 Thread izam
Hi
I had the same problem with eclipse + vista home. Running android.bat
(double click from explorer) seems to work for me. Hope it helps.

On Nov 5, 11:07 am, ekwang ekwa...@gmail.com wrote:
 When I try to upgrade Android SDK Tools, revision 3, by SDK Setup.exe
 I meet same problem.
 I think it has obvious problem.
 Because SDK Setup.exe running with some files on /tools. (maybe
 android.bat and some lib files)
 So When SDK Setup try to rename old tools folder name after download
 complete, this issue is happen.
 Actually I checked java process handling /tools folder when SDK Setup
 running.

 On Oct 28, 6:31 am, Jim Showalter jamesleeshowal...@gmail.com wrote:

  Followed the instructions 
  inhttp://developer.android.com/sdk/adding-components.htmlforadding 2.0 as
  components to an existing 1.6 SDK, from within Eclipse.

  It didn't work. Not by a long shot. Instead, it got partway through and then
  said that C:\android-sdk-windows-1.6_r1\
  temp\DocPackage.new01 couldn't be copied because of a lock, and similarly
  for PlatformPackage.new01.

  It said to shut down running programs, but the only program running was
  Eclipse, which was needed to do the upgrade.

  The cancel button was disabled, and the close box didn't work. Shutting down
  Eclipse killed it, but left C:\android-sdk-windows-1.6_r1 in a corrupted
  state. Restarting Eclipse showed the Android projects with errors, no SDK,
  and a disabled Android SDK and AVD Manager (which means no ability to rerun
  the install).

  Shutting down Eclipse, renaming the corrupted SDK directory, unzipping 1.6
  again into C:, and restarting Eclipse made it as if nothing had ever
  happened, which is good. But it is not possible to complete the install from
  Eclipse, which is bad.

  The dialog says:

  Failed to rename directory
  C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to
  C:\android-sdk-windows-1.6_r1\docs
  -= Warning ! =-
  A folder failed to be renamed or moved. On Windows this typically means that
  a program is using that folder (for example Windows Explorer.) Please close
  all running programs that may be locking the directory
  'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again.

  Failed to rename directory
  C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to
  C:\android-sdk-windows-1.6_r1\docs
  -= Warning ! =-
  A folder failed to be renamed or moved. On Windows this typically means that
  a program is using that folder (for example Windows Explorer.) Please close
  all running programs that may be locking the directory
  'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again.
  Installed: SDK Platform Android 2.0, API 5 (tools rev: 3)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Moving to 2.0 from 1.6 - error reported of a violation of a core library class that doesn't exist in app

2009-11-05 Thread vachudj
Hi,
I had the same problem.
I solved it by removing 1.6 library and appending 2.0 library.
The just changing the 2.0's android.jar file instead of 1.6 library is
not sufficient.
The android.jar file must be represented in project as new library.

Hopefully it helps... .

On Oct 30, 5:01 am, JP joachim.pfeif...@gmail.com wrote:
 OK fixed.
 I've toyed around a little more and, in Eclipse, applied Android Tools Fix 
 Project Properties.

 That created a single Google APIs [Android 2.0] entry in Libraries, as
 opposed to the two individual entries android.jar and maps.jar
 For future reference. Hope this helps someone else.

 On Oct 29, 7:51 pm, JP joachim.pfeif...@gmail.com wrote:



  After getting comfy with the Android 2.0 environment and emulator (for
  the most part), I took the next step to bind myapp against the
  latest Android 2.0 jars: android.jar and maps.jar

  The existing code (working in Android 1.6) did not need any changes to
  compile, but the app doesn't build due to a weird error message that
  prevents the build. See snippet below, drawn from the Eclipse
  Console.
  I have no aspirations to run up against any core library classes, and
  I am not aware I do. In other words, I am not implementing
  SealedObject (or any other core class that I am aware of) that would
  run up against Dalvik. Not in the javax, java or any other namespace.
  Anybody got any pointers what's going on here?

  - Snippet 

  [2009-10-29 19:37:42 - myapp]
  trouble processing javax/crypto/SealedObject.class:
  [2009-10-29 19:37:42 - myapp]
  Attempt to include a core class (java.* or javax.*) in something other
  than a core library. It is likely that you have attempted to include
  in an application the core library (or a part thereof) from a desktop
  virtual machine. This will most assuredly not work. At a minimum, it
  jeopardizes the compatibility of your app with future versions of the
  platform. It is also often of questionable legality.

  If you really intend to build a core library -- which is only
  appropriate as part of creating a full virtual machine distribution,
  as opposed to compiling an application -- then use the
  --core-library option to suppress this error message.

  If you go ahead and use --core-library but are in fact building an
  application, then be forewarned that your application will still fail
  to build or run, at some point. Please be prepared for angry customers
  who find, for example, that your application ceases to function once
  they upgrade their operating system. You will be to blame for this
  problem.

  If you are legitimately using some code that happens to be in a core
  package, then the easiest safe alternative you have is to repackage
  that code. That is, move the classes in question into your own package
  namespace. This means that they will never be in conflict with core
  system classes. If you find that you cannot do this, then that is an
  indication that the path you are on will ultimately lead to pain,
  suffering, grief, and lamentation.

  [2009-10-29 19:37:42 - myapp]1 error; aborting
  [2009-10-29 19:37:42 - myapp]Conversion to Dalvik format failed with
  error 1

  --- Snippet 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to preselect an uri in musicpicker

2009-11-05 Thread Tomas Sjöberg
 Hi, I am using the builtin musicpicker via the intent  
 ACTION_GET_CONTENT and the type audio/*.
 How do I preselect a song based on the content uri the user picked  
 the last time he was in the musicpicker?
 I have the uri but dont know where/how to set it.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Error when try to compile Voidroid project(http://android.wooyd.org/)

2009-11-05 Thread buntee
Hi All

I am trying to use the Voidroid project (http://android.wooyd.org/)
but I got some error during the compilation process.

When I tried the step 6
[Download the build-voidroid script and run it to build the VoiDroid
package:
build-voidroid --android-dir ${ANDROID_DIR} --pjsip-dir ${PJSIP_DIR} --
voidroid-dir ${VOIDROID_DIR}
]

After command: ./configure --host=arm-eabi, got following error:

aconfigure: WARNING: If you wanted to set the --build type, don't use
--host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-eabi
checking target system type... arm-unknown-eabi
checking for arm-eabi-gcc... arm-eabi-gcc
checking for C compiler default output file name... aconfigure: error:
C compiler cannot create executables
See `config.log' for more details.

Config.log file shows:

## --- ##
## Core tests. ##
## --- ##

aconfigure:1377: checking build system type
aconfigure:1395: result: i686-pc-linux-gnu
aconfigure:1403: checking host system type
aconfigure:1417: result: arm-unknown-eabi
aconfigure:1425: checking target system type
aconfigure:1439: result: arm-unknown-eabi
aconfigure:1475: checking for arm-eabi-gcc
aconfigure:1501: result: arm-eabi-gcc
aconfigure:1783: checking for C compiler version
aconfigure:1786: arm-eabi-gcc --version /dev/null 5
./aconfigure: line 1787: arm-eabi-gcc: command not found
aconfigure:1789: $? = 127
aconfigure:1791: arm-eabi-gcc -v /dev/null 5
./aconfigure: line 1792: arm-eabi-gcc: command not found
aconfigure:1794: $? = 127
aconfigure:1796: arm-eabi-gcc -V /dev/null 5
./aconfigure: line 1797: arm-eabi-gcc: command not found
aconfigure:1799: $? = 127
aconfigure:1822: checking for C compiler default output file name
aconfigure:1825: arm-eabi-gcc -g  -nostdlib -Bdynamic -Wl,-T,android-
sdk-linux_x86-1.1_r1/build/core/armelf.x

-Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-
z,nocopyreloc -Wl,--no-undefined

-Wl,-rpath-link=android-sdk-linux_x86-1.1_r1/out/target/product/
generic/obj/lib

-Landroid-sdk-linux_x86-1.1_r1/out/target/product/generic/obj/lib

android-sdk-linux_x86-1.1_r1/out/target/product/generic/obj/lib/
crtend_android.o

android-sdk-linux_x86-1.1_r1/out/target/product/generic/obj/lib/
crtbegin_dynamic.o

android-sdk-linux_x86-1.1_r1/prebuilt/linux-x86/toolchain/arm-
eabi-4.2.1/lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a -lc -lm

-lm  -lssl -lcrypto -lmedia conftest.c  5
./aconfigure: line 1826: arm-eabi-gcc: command not found
aconfigure:1828: $? = 127
aconfigure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME pjproject
| #define PACKAGE_TARNAME pjproject
| #define PACKAGE_VERSION 1.0
| #define PACKAGE_STRING pjproject 1.0
| #define PACKAGE_BUGREPORT 
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
aconfigure:1867: error: C compiler cannot create executables
See `config.log' for more details.


How can I resolve this particular issue.If some have any solution then
please suggest me to remove this issue.

Thanks in advance.

Regards
buntee

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] cannot set proxy when download sdk

2009-11-05 Thread Michael Liao
Hi

i downloaded Android SDK Tools, and when i use the tools to download
other packages, there is no way to set proxy.

how can i download via proxy? thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Obfuscation of Android project

2009-11-05 Thread GDroid
Hi,
I'm new to Java, eclipse and android so please understand if I'm
asking some stupid questions.

I already have an Android Project created with eclipse and the
android plug-in.
I would like to make my apk file obfuscate.

I search google a lot and found out:
1. ProGuard is an open-source obfuscation application.
2. Some of you already managed to obfuscate your applications using
ProGuard.
3.I have a good configuration for Proguard (Example at the bottom)
and managed to run it manually on my *.class files in my projects
bin folder.

However, when running the ProGuard manually I'm running it on the
class files and creating new class files but I am not changing my apk.
If I'm correct during the build eclipse create one .dex file (how?)
and then packs it with all the projects resources into an *.apk.

How can I get inside this process? Is the only way to run ProGuard and
later packing the *.apk file is using Ant and an Build.xml file.
If yes, what's the best way to do that?

Waiting for your help,
Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to preselect an uri in musicpicker

2009-11-05 Thread Tomas
Hi, I am using the builtin musicpicker via the intent
ACTION_GET_CONTENT and the type audio/*.
How do I preselect a song based on the content uri the user picked the
last time he was in the musicpicker?
I have the uri but dont know where/how to set it.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Eclair install choked with errors about locks and died horribly leaving corrupted install

2009-11-05 Thread PHdP
I managed to avoid the folder lock problem by stopping Norton
Antivirus during installation. But I am still getting a SSL peer shut
down incorrectly error every time I try to install the 2.0 platform
and upgrade the 1.5 platform.

On Nov 2, 7:44 pm, Chuan Lee chuanv...@gmail.com wrote:
 I'm new to this group. Has anyone got an answer to the problem?
 I read through the posts and I can say I've tried most of the way I can
 think of.

 First of all, I'm pretty sure it's 'SDK Setup.exe' that is locking up the
 directory. So after it unpacks the platforms and addons to 'temp' directory,
 it can't move the subdirs under 'temp' to 'platforms' and 'add-ons'. I
 confirmed the lock because I couldn't delete any directory when 'SDK Setup'
 was running.

 Manually, you CAN move the subdirs under 'temp' yourself by following error
 log telling you failed to move directory from temp... to platforms
 The problem is the subdirs under 'temp' are empty directories. So your
 manual tasks will be done in vain. I tried 3 times!

 I tried to trick 'SDK Setup' by moving to Windows DeskTop. But it wouldn't
 run from there! Sigh.

 I tried to install it from eclipse. Same error.

 There must be an easier way to install the Android SDK 1.6 or 2.0. The
 previous versions that have pre-expanded directories work fine. So you just
 unzip the file and drap-and-drop the whole folder to wherever you want.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] USB Communications

2009-11-05 Thread Murray
I am looking for information on the Andriod USB communications.

Does Andriod OS provide any way for the PC Host to communicate to a
application on the device (TCP or simlar)?

Can the Andriod application communicate to a PC host via the USB
connection?

Can the PC host control charging on the device?

Can a device application turn off charging while connected to a USB
Host?

Any information would be great.

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Draw GLSurfaceView to a Bitmap

2009-11-05 Thread Vladimir
I ran across this yesterday:
http://www.anddev.org/opengl_performance_question-t751.html
It's an old thread, but the 2nd post might be helpful.

On Nov 4, 7:32 pm, yammada adam.h...@gmail.com wrote:
 I have an application that uses GLSurfaceView to draw OpenGL ES
 graphics.  This is all working (mostly) how I would expect.

 Now, I would like to implement a screenshot feature.  For normal
 views, it seems that the standard practice is to create a new Canvas
 with a Bitmap and then draw to that Canvas using View.onDraw(Canvas).

 I've tried using SurfaceView.draw(Canvas) in a similar fashion, but it
 always results in a blank (black) image.

 I've also tried using the drawing cache with the exact same result.

 Any ideas?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Pushing Several Files onto the Emulator at Once

2009-11-05 Thread Heather
Hi everyone,

Is there a way to push several files / a folder of files onto the
emulator at once? The only way I can push files successfully to the
emulator is using the command line, if I try to push files in eclipse
I get an error message:

Failed to push the items: An existing connection was forcibly closed
by the remote host

I'm happy using the command line, but if there's a way to push several
files at once I'd love to know.

Thanks in advance,

Heather

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread Vettey
Hi Dmitri,

Thanks for introducing the database structure and the sample on how to
insert contact with 2.0 API.

I'd like to know how to manage Contacts, RawContacts, and Data
table when deleting contacts.
Any better way to delete a contact with specific name from database?

- Vettey

On Nov 5, 10:47 am, Dmitri Plotnikov dplotni...@google.com wrote:
 Hi Jake,

 The database structure is actually extremely straightforward:

 Contacts represents an aggregated contact
 RawContacts represents a contact as it was inserted by the sync adapter.
  RawContact has a CONTACT_ID field that binds it to a Contact.
 Data represents everything about a RawContact: emails, phone numbers,
 notes, birthday, high school graduation year, you name it.  Data has a
 RAW_CONTACT_ID field that binds it a  RawContact.  The other important field
 is MIMETYPE.  That's what determines the kind of data stored in a Data row.
  Everything else is just convenience API.

 So here's the most common way of inserting a data row:

 values.put(Data.RAW_CONTACT_ID, rawContactId);
 values.put(Data.MIMETYPE, Note.CONTENT_ITEM_TYPE);
 values.put(Note.NOTE, Blah blah blah);
 resolver.insert(Data.CONTENT_URI, null, values);

 I hope this helps.

 - Dmitri

 On Wed, Nov 4, 2009 at 6:11 PM, jak. koda...@gmail.com wrote:
  Thank you Dmitri,

  Your response was very helpful. Along with that, and the sample you
  posted on another thread about using both Contact Apis from one app,
  I've gotten most of the way there. It is much appreciated.

  I'm still however having some problems that I'm hard pressed to find a
  solution for.
  I'd be grateful if anyone could help me.

  The biggest challenge I'm  having with this API is that it's hard for
  me to picture how the tables are laid out so I know which URI to query
  to get the parts of the contact that I'm interested in.
  I found to get the email address for a contact I'm looking at I can
  query the uri:ContactsContract.CommonDataKinds.Email.CONTENT_URI,
  looking at rows of the contact id i'm interested in.

  However to get the note from the same contact I can't use a similar
  pattern, because there is no
  ContactsContract.CommonDataKinds.Note.CONTENT_URI
  The Note type exists in CommonDataKinds but it doesn't have an
  associated CONTENT_URI.

  I'm finding it very frustrating to use this API because every time I
  go to try to pull out another piece of data from the contact, the
  method to access it seems to change (as I can't find a consistent way
  to get a given field from a contact). And the documentation never
  describes how these keys, tables, and URIs are related. Basically the
  ContactsContract documentation just gives you a giant list of Objects
  containing constants that describe indexes into some database that is
  basically a black box without some basic documentation.

  I'm I the only one that finds this frustrating?

  Thanks again for your help.

  -Jake

  On Nov 2, 5:24 pm, Dmitri Plotnikov dplotni...@google.com wrote:
   You can always delegate contact creation to the Contacts app using the
   ContactsContract.Intents.UI.Insert intent with extras. This will show the
   edit UI.

   If you want to explicitly create the contact by yourself, that's now a
  bit
   tricky because Android 2.0 support multiple accounts.

   First of all, you will need to figure out which account you want to
  create
   the contact in. Get a list of all available accounts from AccountManager:

   AccountManager am = AccountManager.get(getContext());
   Account[] accounts = am.getAccounts();

   Also, get a list of all sync adapters and find the ones that support
   contacts:

   SyncAdapterType[] syncs
   = ContentResolver.getContentService().getSyncAdapterTypes();

   for (SyncAdapterType sync : syncs) {
        if (ContactsContract.AUTHORITY.equals(sync.authority) 
   sync.supportsUploading()) {
             contactAccountTypes.add(sync.accountType);
        }

   }

   Now you have a list of all accounts and a list of account types that
  support
   contacts.  So here's your account list:

   for (Account acct: accounts) {
      if (contactAccountTypes.contains(acct.type)) {
         contactAccounts.add(account);
      }

   }

   If the contactAccounts list contains nothing - use accountType = null and
   accountName = null
   If it contains exactly one account, use it.
   If it contains multiple accounts, build a dialog and ask the user which
   account to use.

   From here on it gets easier.

   Let's start with a more traditional method.  Insert a raw contact first:

   ContentValues values = new ContentValues();
   values.put(RawContacts.ACCOUNT_TYPE, accountType);
   values.put(RawContacts.ACCOUNT_NAME, accountName);
   Uri rawContactUri = getContentResolver().insert(RawContacts.CONTENT_URI,
   values);
   long rawContactId = ContentUris.parseId(rawContactUri);

   Then insert the name:

   values.clear();
   values.put(Data.RAW_CONTACT_ID, rawContactId);
   values.put(Data.MIMETYPE, 

[android-developers] Can't run or debug my app on Eclipse

2009-11-05 Thread Mr. P
This is the error that eclipse gives with the latest Android SDK:

!ENTRY org.eclipse.core.jobs 4 2 2009-11-05 11:18:45.061
!MESSAGE An internal error occurred during: Launching android.
!STACK 0
java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launch
(Unknown Source)
at
com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.doLaunch
(Unknown Source)
at
com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch
(Unknown Source)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch
(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch
(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch
(DebugUIPlugin.java:866)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run
(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Environment:

Linux myubuntu 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:24
UTC 2009 i686 GNU/Linux

java version 1.6.0_13
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

Any clues on how to solve this error?

Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Need an invitation to google Wave?

2009-11-05 Thread Blue_key
Hey, it will be grea tif someone can send me an invitation ! -
swissto...@gmail.com. Thanks !!

On Nov 3, 2:01 pm, ferly sky ferly...@gmail.com wrote:
 Hi, I want to get an invitation, thanks.

 2009/11/3 Tamas Jozsa tjo...@gmail.com



  Hi,

  Please invite me to.

  Thanks,
  Tamas

  2009/11/3 Toz tozc...@gmail.com

  So kind of you! Please invite me once! Thanks!

  On 11月1日, 下午2时20分, Auguste Lunang legraphi...@gmail.com wrote:
   Hi,
   i have some google wave. invits to share. tell me if u want ..
   thx

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

   --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: window.requestFeature(Window.FEATURE_RIGHT_ICON) does not work correctly

2009-11-05 Thread Jörn A .
Hi Asif,

i've got the same problem, the icon is showed on the left side. Did
you find any solution for this?

Kind regards,
J

On 7 Okt., 12:07, Asif k asifk1...@gmail.com wrote:
 Hi all,

   i want to keep cancel button in the title bar at the right side, for
 that I had used following code,

 window.requestFeature(Window.FEATURE_RIGHT_ICON);
 window.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
 R.drawable.cancel);

 but i am getting the icon at the left side of title bar.

 Is this a bug or something else is required to accomplish this?

 Thanks,

 Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml

2009-11-05 Thread Andrew Pollock
On Oct 27, 2:58 pm, garycode garyma...@hotmail.com wrote:
 Hi,
 I'm trying to install a platform but when I type android the manager
 loads then I click Available Software then select 
 thehttps://dl-ssl.google.com/android/repository/repository.xmlrepository
 I get this error.,

 Failed to fetch 
 URLhttps://dl-ssl.google.com/android/repository/repository.xml,
 reason: HTTPS SSL error. You might want to force download through HTTP
 in the settings.

 So I click the settings tab and select the force through http then
 click apply and save then nothing happens it doesn't save it because
 if i then close it and reload it the checkbox is unticked so it's not
 even using the force through http method. I get the same error if i go
 straight back to available software.

 I'm using Fedora and wget can download the xml file using ssl so I
 don't know why it's getting this https ssl error.

So I've just managed to solve this problem on my Debian Lenny (5.0)
system.

Aside from needing to force HTTP instead of HTTPS, it turned out that
while I had the sun-java6-bin package installed, the alternatives
system was making /usr/bin/java point to the GNU Java bytecode
interpreter. Once I did a sudo update-alternatives --config java and
selected the Sun Java instead, everything started to work properly.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] DDMS Heap debug

2009-11-05 Thread Guilherme Daher
Can anyone please help me to know what do the following mean in the
Heap view of *DDMS*:

1) Data Object

2) Class Object

3) 1,2,4,8-byte *array* : which arrays are we talking about here??

4) non- Java object

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ADC2 Results Post

2009-11-05 Thread Steeler
Whoa... how were you contacted? I didn't get anything.

On Nov 5, 2:56 pm, Alex iiiypu...@gmail.com wrote:
 I've voted all 5s but 4 for polish for your app in round 1, really
 liked your app.

 Ours (vivify picture) also failed to make it to top 20 education
 titles, being in bottom 50% too. I think that's for all apps, not just
 education category.

 When judging, I've seen about 5 original apps in the category
 inclucing yours, and everything else were just quizes. So proabbly in
 education 20 quiz apps will be competing with each other in round 2.

 On Nov 5, 9:46 pm, ander...@phdgaming.com ander...@phdgaming.com
 wrote:



  I got an email saying my application Mystic Maggie Story 
  (http://www.phdgaming.com/general_media/mm/) was ranked in the bottom
  50%. As it was top 20 from each category that moved on, I assume that
  means it was in the bottom 50% for education.

  Really thought I would have at least made top 20 in the education
  category. :/ Oh well.- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Extract text at coordinate of the Touch event in EditText

2009-11-05 Thread Artem
I require the following function:

I have a view completely filled by a single EditText.  When a user
hits on a spot in the text by using single tap touch, I want the
program to extract the character at that position.

I get the coordinates of the touch easily using onTouchEvent, but I'm
unable to figure out how to convert screen coordinates into position
in the text.

Is there an easy and efficient way of doing that?

I considered implementing my conversion from pixel coordinates to text
coordinates, but I'm not sure how to account for things like word
wrap.

The basic set up is more or less exactly like the notepad example,
except I want to extract the character under touch.  (This is useful
to me for a language reader that looks up words on touch).

Thank you!

Artem

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android 2.0 (eclair) source

2009-11-05 Thread Eric
I'm having the same issue. It used to say that there were no eclair
branch. Fair enough. However now there is an eclair branch, only repo
fails to get it with the ugly error message outlined by Doug.

Eric

On Oct 28, 8:50 pm, tu tuqh...@163.com wrote:
 Yes, I also entered the same error message, some body can help us
 ASAP? thanks and best regards.

 On 10月29日, 上午2时53分, Doug dougforp...@gmail.com wrote:

  Any idea when theeclairsourcewill be available via git?
  If I try to init a repo with -beclair I get an error stating that
  the manifest is missing.
  If I init a repo to head there doesn't seem to be much/anyeclaircode
  in there.

  Why do I ask?  Well, the docs looks like they're still in the process
  of being updated (fair enough) but certain methods that have now been
  deprecated don't seem to have been replaced with ones that perform
  similar tasks - I need to browse thesourceso I can find out how to
  get my application working against this new build.

  (I got the following init command fromhttp://source.android.com/download)

  $ repo init -u git://android.git.kernel.org/platform/manifest.git -beclair
  Getting repo ...
     from git://android.git.kernel.org/tools/repo.git
  remote: Counting objects: 945, done.
  remote: Compressing objects: 100% (372/372), done.
  remote: Total 945 (delta 592), reused 894 (delta 553)
  Receiving objects: 100% (945/945), 282.14 KiB, done.
  Resolving deltas: 100% (592/592), done.
  .
  .
  .
   * [new branch]      eclair    - origin/eclair
  .
  .
  .
  From git://android.git.kernel.org/platform/manifest
   * [new tag]        android-1.0 -android-1.0
  fatal: manifest 'default.xml' not available
  fatal: manifest default.xml not found



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [Android 2.0] New Contacts API

2009-11-05 Thread jefduncan
Hi all,

This is my first post to this group (any group), but I wanted to share
my experience with the new Contacts API so far. I had a little
application which accessed a contact's notes via
Contacts.People.CONTENT_URI, accessing the NOTES field with
cursor.getString(cursor.getColumnIndex(People.Notes)). Simple enough.

Then, along comes the new API with it's ContactsContract and
ContactsContract.CommonDataKinds.xxx. Oh my gosh! It took me forever
to figure out how to find the contents of a note. Maybe I'm just
dense! :) As it turns out, a note (along with many other data items)
is stored in the 'data' directory of the contact available through
ContactsContract.Data.CONTENT_URI. The note's mime-type is specified
as ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE, and the
column containing the note is
ContactsContract.CommonDataKinds.Note.NOTE. So, here's how I
constructed my new getNote(long contactId) method:

private String getNote(long contactId) {
Log.d(LOGGING_TAG, getNote for contactId:  + contactId);
String rv = null;
String[] projection = new String[]
{ ContactsContract.CommonDataKinds.Note.NOTE };
String whereClause = ContactsContract.Data.RAW_CONTACT_ID +  = ? AND
 + ContactsContract.Data.MIMETYPE +  = ?;
String[] whereParams = new String[]{Long.toString(contactId),
ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE};
Cursor c = getContentResolver().query
(ContactsContract.Data.CONTENT_URI, projection, whereClause,
whereParams, null);
if (c.moveToFirst()) {
rv = c.getString(0);
}
c.close();
Log.d(LOGGING_TAG, getNote returning  + rv);
return rv;
}

There are other, easier means for accessing some of the other 'data'
items (for example, ContactsContract.CommonDataKinds.Phone has it's
own CONTENT_URI), but this was the only way I could find to access a
note. I hope it's helpful to someone else.

Peace,
Jef

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Is there any Intent to pick file for attachment?

2009-11-05 Thread Tatyana Ulyanova
Hi, friends!

In application i'm developing i need to open some standard dialog to
browse files on the phone. After picking one file i'll attach it to
the message.
In Android Dev Guide i found such way to solve my problem:

Intent intentBrowseFiles = new Intent
(Intent.ACTION_GET_CONTENT);
intentBrowseFiles.setType(*/*);
intentBrowseFiles.addCategory
(Intent.CATEGORY_ALTERNATIVE);
MyActivity.this.startActivityForResult
(intentBrowseFiles, PICK_FILE);

But in that dialog, when i'm trying to pick sound file, i start to
playback. And one more problem - using that dialog i can see only
gallery and music tracks.

Is there any other way to display such kind of dialog? Or maybe stop
to playback the music?

Thanks :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Red square on android Google map

2009-11-05 Thread Matthieu Cornillault
Hello,

I have written a simple map application using the google API. I have
the apikey set and the map displays properly on the android phone.
However, there is always a red square on the bottom left of the map,
that I don't know how to get rid off.
Here is the URL of the snapshot:
http://picasaweb.google.com/mcornill/Screenshots#5399362615931619762
The java code is pasted below.
Any help is appreciated.
Thanks

Matt

import android.*;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;
import android.location.Address;
import android.location.Geocoder;
import android.view.*;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.google.android.maps.*;
import com.google.android.maps.MapView.LayoutParams;
import android.os.Bundle;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
public class MapsActivity extends MapActivity
{
   static MapView mapView;
   MapController mc;
   GeoPoint p;

   /** Called when the activity is first created. */
  �...@override
   public void onCreate(Bundle savedInstanceState)
   {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
       // Allow zooming
       mapView = (MapView) findViewById(R.id.mapView);
       mapView.setSatellite(true);
       mapView.setBuiltInZoomControls(true);
       mc = mapView.getController();
       Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
       try {
           ListAddress addresses = geoCoder.getFromLocationName(
               Palo Alto, CA, 5);
           String add = ;
           if (addresses.size()  0) {
               p = new GeoPoint(
                       (int) (addresses.get(0).getLatitude() * 1E6),
                       (int) (addresses.get(0).getLongitude() *
1E6));
           }
       } catch (IOException e) {
           e.printStackTrace();
       }
       mc.animateTo(p);
       mc.setZoom(17);
       mapView.invalidate();
   }
  �...@override
   protected boolean isRouteDisplayed() {
       return false;
   }
}


and here is main.xml:
?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
   android:layout_width=fill_parent
   android:layout_height=fill_parent

   com.google.android.maps.MapView
       android:id=@+id/mapView
       android:layout_width=fill_parent
       android:layout_height=fill_parent
       android:enabled=true
       android:clickable=true
       android:apiKey=0oWLKpz0iuwLIE5KcYgcqCL0TPkzQOeWEOiUWOg
       /

   LinearLayout android:id=@+id/zoom
       android:layout_width=wrap_content
       android:layout_height=wrap_content
       android:layout_alignParentBottom=true
       android:layout_centerHorizontal=true
       /
/RelativeLayout

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Communication between PC and Android device

2009-11-05 Thread axcdnt
 Hi everyone,

 I've been looking for an answer but couldn't find it yet. The thread
is:

 Given a device, how could an application communicate with this
device? Simplifying: something like a cellphone. You plug it in your
computer and the driver recognizes it. After that you may obtain
access the device.
I'm studying API but couldn't find nothing related. All I know is that
the API allows an abstraction of the device, like: folders, UI, etc.

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How can I receive cell location updates?

2009-11-05 Thread Bryan
Hi,

I'm trying to receive cell location updates in a background process,
but I've only found very power inefficient ways of doing so.

PhoneStateListeners stops listening when the phone sleeps, and require
a period wake up.

The broadcast intent android.intent.action.SIG_STR, doesn't appear
to be broadcasting.

LocationManager isn't quite the right fit, and I suspect it fails the
same way that the phonestatelister fails, being built with a listener.

The broadcast intent PHONE_STATE_CHANGED_ACTION, isn't appropriate.

I'd rather not wake up the phone periodically when it may not have
moved an inch for hours, such as overnight. The trigger should be a
cell, not time, based.

Is there any way of doing this, such as a gsm broadcast or something
like that?

Thank you,
Bryan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] listening on TCP sockets in android emulator problem

2009-11-05 Thread satish_mulay
Hi ,
I am running java server socket code on 4747 port on my machine .
and running client socket code in android emulator on different
machine .

now client code on android emulator also created tcp socket on which
server socket on my machine will send respose.client is listening on
4748.

when i run client it sends message to my server and i get it in server
but when server tries to connect to client socket its giving me
connect refused exception.

my machines behind firewall in our LAN , adb forword worked for me
when i ran both programs on localhost . but for 2 diffrent machines
its not working.

I also tried stcppipe.exe but maybe as i dont have public ip , its not
working.
I can see client listening on port 4748 using netstat -a but my
server cant connect to that port in client's machine .

i have tried with direct machines IP address(10.11.X.X ) while
creating sockets .
even tried giving emulators  10.0.2.2  or 10.0.2.15  address in
client program. but nothing worked.
anybody has got solution to this problem ? any pointers will be really
helpful.

-satish


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] TCP socket network problem

2009-11-05 Thread ud
I have made one client application for android. This application sends
tcp data to another machine on a particular port. I am able to get the
data on that machine. But when i am sending the tcp data from that
machine back to the emulator, i am not able to get any data. I get
Connection refused exception.  I am listening on server socket in
android application. I have tried out the adb forward but i am still
facing the problem. If any one have faced the same problem and found
some solution for it, then kindly reply.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Roadmap for localisation / new languages and locales

2009-11-05 Thread Anders
Hey,

does anyone know if there are plans for adding Scandinavian languages
and locales to future releases of android - and how soon? Or do you
know how to find out?

I am developing an app for both English-language users and
Scandinavian users, but without Scandinavian locales I have to make a
separate package for each country to get local UI language. It would
be nice to know if this will be a permanent situation, or if we can
expect more languages soon!

Cheers,
Anders

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Interrupt Progress Dialog

2009-11-05 Thread Vimana
Hi,

How can I interrupt the progress dialog box as it is waiting for a
process to complete in the background?
What I want to do is the following:
I have an activity which has a set of buttons on the top and a webview
under it. Once i click on of the buttons it loads something in the
webview but pops up the progress dialog box while waiting for the web
page to finish loading. But now I want to be able to click on another
button while i'm waiting for the page to load (which is displaying the
progress dialog box). Clicking on the button will stop the current
page from loading.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Geolocation in Browser

2009-11-05 Thread Steve DC
I just tried the HTC Hero (Sprint) with Android 1.5 and was not able
to access my location through the browser. Getting location
coordinates from Javascript works on the iPhone and in Firefox 3.5+ on
my desktop. Is Geolocation being added to the Android browser or is
this a phone specific issue that it does not work on the Hero?

Thanks,
Steve

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: custom ArrayAdapter compile error

2009-11-05 Thread tatman
btw Im missing an import in the post:  import android.view.ViewGroup;

That fixes the override error.

I now have different compile error.   It says getSystemService is
undefined.

Any thoughts?

On Nov 5, 4:17 pm, tatman matt.raf...@gmail.com wrote:
 I'm trying to create my own ArrayAdapter.  I'm missing something.  I
 cannot get the code to compile.  The documentation says I need to
 override getView.  But the compiler isn't seeing getView as a method
 defined in the super class.   What am I missing?

 import android.content.Context;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ArrayAdapter;
 import android.widget.TextView;

 public class Stock
 {
    // etc

 }

 public class StockAdapter extends ArrayAdapterStock
 {

         // 
         //
         public StockAdapter(Context context, int textViewResourceId, Stock[]
 objects)
         {
                 super(context, textViewResourceId, objects);
         }

         @Override
         public View getView(int position, View convertView, ViewGroup
 parent)
         {
         }

 }

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: ADC2 Results Post

2009-11-05 Thread Nikolay Ananiev
also have 2


On Thu, Nov 5, 2009 at 11:21 PM, ander...@phdgaming.com 
ander...@phdgaming.com wrote:

 Alex - thanks for the positive note, appreciate it. :) Indeed I has
 the same experience as to the competition in the Education category -
 hence why I figured that Mystic Maggie would at least make top 20.
 Very surprised Vivify Picture didn't make it either - indeed does seem
 that voters must have preferred what they have seen before over
 originality.

 On a side note, Google just sent me a *second* rejection email
 identical to the first one 4 minutes ago for the same application?
 Anyone else have that happen?

 On Nov 5, 3:56 pm, Alex iiiypu...@gmail.com wrote:
  I've voted all 5s but 4 for polish for your app in round 1, really
  liked your app.
 
  Ours (vivify picture) also failed to make it to top 20 education
  titles, being in bottom 50% too. I think that's for all apps, not just
  education category.
 
  When judging, I've seen about 5 original apps in the category
  inclucing yours, and everything else were just quizes. So proabbly in
  education 20 quiz apps will be competing with each other in round 2.
 
  On Nov 5, 9:46 pm, ander...@phdgaming.com ander...@phdgaming.com
  wrote:
 
 
 
   I got an email saying my application Mystic Maggie Story (
 http://www.phdgaming.com/general_media/mm/) was ranked in the bottom
   50%. As it was top 20 from each category that moved on, I assume that
   means it was in the bottom 50% for education.
 
   Really thought I would have at least made top 20 in the education
   category. :/ Oh well.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Accessing the toast queue? is it possible

2009-11-05 Thread matskn
Hi!

I would like to know when a toast has been shown on the screen, for
instance when i fire away 4 toasts i want to know when for instance
toast #3 has been shown. First I thought i just would register a
listener to a toast, but to my knowledge this isnt possible :-/

So im wondering if its is possible for me to access the toast enqueue
by myself? and to check wheter my toast is in there..

Best Regards

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Where put file with data?

2009-11-05 Thread sangorys
I have a similar question. I just want to add a .txt file in my
program. Where can I put it ?


Thanks


On 4 nov, 20:20, WoodManEXP woodman...@gmail.com wrote:
 /sdcard/ works well.

 On Nov 2, 1:01 pm, Wojciech Topolski wojciech.topol...@gmail.com
 wrote: Hi

  I have a problem with files. I would like to add file with database inserts
  to my app. Where should I put this file? In res/then? This file will have 5
  MB, so after operation I would like to remove it from system. I know about
  /res/raw/file, but this file is only readably by InputStream importSql =
  res.openRawResource(R.raw.import_sql);

  Best regards.

  --
  ===
  Wojciech Topolski
  wojciech.topol...@gmail.com
  ===

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Need an invitation to google Wave?

2009-11-05 Thread Yan Hong
I would like to have one. Thanks~

On Nov 1, 7:20 am, Auguste Lunang legraphi...@gmail.com wrote:
 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] finishActivity doesnt work

2009-11-05 Thread Bob Cai
Hello,

In main Activity, I called startActivityForResult(intentB, 100) to start a
new activity B, then in B, I called startActivity(intentC) to start another
activity C. Lastly I wanted to call finishActivity(100) in C to close
activity B, but seemed it was not successfully destoried(I can use BACK key
to see it's still there.).

Anyone can give advice of this?

Thanks,
Bob

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: WebView - new frame closes my app and starts system web browser?

2009-11-05 Thread Mark Wyszomierski
Hi Mark,

Yeah the setSupportMultipleWindows() call has no effect. I tried this:

  mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
  mWebView.loadUrl(url);
  return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap
favicon) {
  Log.d(@@@, start loading page);
}
@Override
public void onPageFinished(WebView view, String url) {
  Log.d(@@@, finish loading page);
}
  });

in an attempt to force any url loading to happen within the same
webview instance. It seems to work, but it seems odd to have to do
this, I thought this would be more like the default behavior of
WebView.

The onPageFinished() override is called, the onPageStarted override is
not, which is also confusing,

Thanks



On Nov 5, 10:09 am, Mark Murphy mmur...@commonsware.com wrote:
 Mark Wyszomierski wrote:
  I have a WebView inside my app. It looks like an html link which wants
  to open a page in a new frame actually pushes my app to the background
  and opens the system web browser to show the new page.

 That's to be expected, just like a redirect will trigger Browser.

  Is there a way to force new pages to simply open right in my own
  WebView? Not sure if one of these do it?:

      mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically
  (false);
      mWebView.getSettings().setSupportMultipleWindows(true);

 You could try the multiple-windows one. If that does not work, you
 probably need to attach a WebViewClient, intercept the request for the
 new frame, and arrange to display it however you wish.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_
 Version 1.2 Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread ander...@phdgaming.com
I now have 3 in my inbox, all of which are identical.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] DalvikVM could not find field after ProGuard Obfuscation

2009-11-05 Thread GDroid
I've been trying obfuscate my application for the last 2 days.
I must add that I'm new to Java, Eclipse, Ant and Android as well.

Currently I've managed to build the correct build.xml file and run
ProGuard 4.4. However, every time I install my apk I get multiple
errors from the dalvikvm such as Found field 'e' but sig is 'J' not
'B' or .. sig is 'Lc' not '[c' (Which has something to do with
arrays and enums).

This is my current proguard configuration:
target name=obfuscate depends=compile
jar basedir=${out-classes} destfile=temp.jar/
java jar=C:\onefone\proguard4.4\lib\proguard.jar 
fork=true
failonerror=true
jvmarg 
value=-Dmaximum.inlined.code.length=32/
arg value=-injars temp.jar/
arg value=-outjars optimized.jar/
arg value=-libraryjars 
${android-jar}/
arg value=-dontpreverify/
!-- arg value=-dontoptimize/ --
arg 
value=-dontusemixedcaseclassnames/
arg value=-repackageclasses ''/
arg value=-printmapping 
mappings.txt/
arg value=-allowaccessmodification/
arg value=-overloadaggressively/
arg 
value=-useuniqueclassmembernames/
arg value=-dontshrink/
arg value=-keep public class * 
extends android.app.Activity/
arg value=-keep public class * 
extends android.app.Service/
arg value=-keep public class * extends
android.content.BroadcastReceiver/
arg value=-keep public class * extends
android.content.ContentProvider/
arg value=-keep public class * 
extends android.view.View/

arg value=-keep interface * /
arg value=-keepclassmembernames class 
* { java.lang.Class class$
(java.lang.String); java.lang.Class class$(java.lang.String,
boolean); }/
arg value=-keepclassmembernames class
com.GCompany.GCompanyStart/
arg value=-keep enum * /
arg value=-microedition /
arg value=-keepclassmembers public 
enum * /
arg value=-keepclassmembers enum * { 
public static **[] values
(); public static ** valueOf(java.lang.String); static **[] $VALUES;}
/
arg value=-optimizations 
!code/simplification/arithmetic/
arg value=-adaptresourcefilenames
**.properties,**.gif,**.jpg/
arg value=-adaptresourcefilecontents 
**.properties,META-INF/
MANIFEST.MF/
arg value=-optimizationpasses 1/
arg value=-printseeds seeds.txt/
arg value=-keepattributes
Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod/

arg value=-verbose/
/java
delete file=temp.jar/
delete dir=${out-classes}/
mkdir dir=${out-classes}/
unzip src=optimized.jar dest=${out-classes}/
delete file=optimized.jar/
/target

When I look at the mapping.txt file I see duplicate members changing
to the same name like:

com.GCompany.WiFiLocker - ba:
android.net.wifi.WifiManager wifiManager - a
android.net.wifi.WifiManager$WifiLock wifiLock - a

I'm not sure if this is bad or not.

After installing my application I get these errors:
11-04 15:59:15.323: INFO/PackageManager(564): /data/app/vmdl68172.tmp
changed; unpacking
11-04 15:59:15.414: DEBUG/installd(543): DexInv: --- BEGIN '/data/app/
vmdl68172.tmp'
---11-04 15:59:16.445: WARN/dalvikvm(1444): Found field 'a', but sig
is 'Landroid/net/wifi/WifiManager$WifiLock;' not 'Landroid/net/wifi/
WifiManager;'
11-04 15:59:16.455: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.564: WARN/dalvikvm(1444): Found field 'a', but sig is
'Lcom/OF/GCompany/Logger/ILogger;' not '[I'
11-04 15:59:16.574: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.584: WARN/dalvikvm(1444): Found field 'a', but sig is
'Lcom/OF/GCompany/Logger/ILogger;' not 'S'
11-04 15:59:16.595: DEBUG/dalvikvm(1444): DexOpt: 

[android-developers] C++ Shared Library

2009-11-05 Thread zenoname
Hello,

I'm trying to create a simple project with the Android NDK.
I created a jni library which is calling a function from a shared C*
library.
I make it work with a C library but as soon as I try with a C++
library it crashes (when calling the c++ function)
As many posts I read I suspect a name mangling problem but whatever I
tried it doesn't change the problem

Here is a summary of what I've done : I created a jni library linking
two simple libs (jnilib my jni interface with java, libtoto.so my c
library, libtotocpp.so my cpp lib). The c* libs simply export a
function returning a int. If I call GetNumber() form the C lib no
problem. If I call the GetNumberCPP() from my C++ lib it crashes

Here are the code and compilation stuffs.

If anyone could tell me what's wrong that would be very very cool :)

Thanks.


- jnilib.c (arm-eabi-gcc -shared jnilib.c -o libjnilib.so  libtoto.so
libtotocpp.so -nostdlib -Bdynamic)
Here if I don't call GetNumberCPP() all works

 #include toto.h
 #include toto.hpp

 #ifdef _cplusplus
 extern C
 {
 #endif
 jstring Java_amob_jnscapi_jnscapi_initserver  (JNIEnv* env,
jobject thiz )
 {
 char version[50];
 sprintf(version,%d %d,GetNumberC(),GetNumberCPP());
 return (*env)-NewStringUTF(env, version);
 }
 #ifdef _cplusplus
 }


- libtoto.so  (arm-eabi-gcc -shared toto.c -o libtoto.so -nostdlib -
Bdynamic)

#include toto.h
int GetNumberC()
{
return 33;
}

- libtotocpp.so (arm-eabi-g++ -shared toto.cpp -o libtotocpp.so -
nostdlib -Bdynamic)

 #include toto.hpp
 #ifdef _cplusplus
 extern C
{
#endif
int GetNumberCPP()
{
  return 56;
 }
#ifdef _cplusplus
}
#endif

- In my java class I tried to load all libs ...

System.loadLibrary(totocpp);
System.loadLibrary(toto);
System.loadLibrary(jnilib);

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Parse Error during installation of application.

2009-11-05 Thread d_nn_s
Hey everyone,

I've been writing an application for the Android using Eclipse and the
required plugins.
There's either a problem with the phone I'm testing the application
on, or the application itself.

The error I'm getting (when I try to install it) is as follows:

Parse Error: There is a problem parsing the package.

It works fine when I run it on the emulator. I don't know what the
error really means though.
There's very little information (none at all) about error codes
either.
The application itself is very simple, with few lines of code and I'm
very sure the error isn't in there.
The phone I'm testing on: Samsung GT-i7500.
I wrote the application for Android 1.5.

Hope you can help me with this.
If you need more information, let me know and I'll provide.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Running native executable from java application.

2009-11-05 Thread Mina Shokry
Hello,
I am trying to run a native executable from inside an android java
application.
The native executable exists in my assets. At start of activity, I
copy it from assets to my application cache dir. then I use
ProcessBuilder to run it.

here is a code snippet
private void startEngine(File executableFile) throws IOException {
ProcessBuilder processBuilder = new ProcessBuilder
(executableFile.getPath()).directory(executableFile.getParentFile());
Process process = processBuilder.start();
}

I get an IOException when I try to run this code and here is a snippet
of the stacktrace

java.io.IOException: Error running exec(). Commands: [/data/data/
my.package.name/cache/my_executable_file] Working Directory: /data/
data/my.package.name/cache Environment: [LD_LIBRARY_PATH=/system/
lib, ANDROID_ROOT=/system, ANDROID_ASSETS=/system/app,
ANDROID_SOCKET_zygote=10, PATH=/sbin:/system/sbin:/system/bin:/system/
xbin, EXTERNAL_STORAGE=/sdcard, ANDROID_DATA=/data,
ANDROID_PROPERTY_WORKSPACE=9,32768, BOOTCLASSPATH=/system/framework/
core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/
system/framework/android.policy.jar:/system/framework/services.jar,
ANDROID_BOOTLOGO=1]

at java.lang.ProcessManager.exec(ProcessManager.java:196)

at java.lang.Runtime.exec(Runtime.java:225)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:219)

at my.package.name.engine.EngineInterface.startEngine()
...
...
Caused by: java.io.IOException: Permission denied

at java.lang.ProcessManager.exec(Native Method)

at java.lang.ProcessManager.exec(ProcessManager.java:194)

... 18 more

I tried to run chmod 777 on the file and on cache directory
containing it and I ensured permissions are granted using adb shell.
but I still get this permission exception.
Can anyone help?

thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] java.io.exception in streaming media player...

2009-11-05 Thread sdphil
i have a very simple test app (see below), that simply tries to play a
streamed audio file below over and over.

after running for about half an hour (the file itself is only like 3.5
minutes or so), I get the following error:

11-05 12:16:07.625: DEBUG/PlayerDriver(554): buffering (15)
11-05 12:16:07.635: DEBUG/PlayerDriver(554): buffering (16)
11-05 12:16:07.644: DEBUG/PlayerDriver(554): buffering (17)
11-05 12:16:07.654: DEBUG/PlayerDriver(554): buffering (18)
11-05 12:16:07.654: DEBUG/PlayerDriver(554): buffering (19)
11-05 12:16:07.724: ERROR/PlayerDriver(554): Command PLAYER_PREPARE
completed with an error or info PVMFErrResource
11-05 12:16:07.724: ERROR/MediaPlayer(897): error (1, -17)
11-05 12:16:07.734: WARN/System.err(897): java.io.IOException: Prepare
failed.: status=0x1
11-05 12:16:07.744: WARN/PlayerDriver(554):
PVMFInfoErrorHandlingComplete
11-05 12:16:07.744: WARN/System.err(897): at
android.media.MediaPlayer.prepare(Native Method)
11-05 12:16:07.744: WARN/System.err(897): at
com.test.TestPlayer.onCompletion(TestPlayer.java:61)
11-05 12:16:07.754: WARN/System.err(897): at
android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:
958)
11-05 12:16:07.754: WARN/System.err(897): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-05 12:16:07.754: WARN/System.err(897): at android.os.Looper.loop
(Looper.java:123)
11-05 12:16:07.754: WARN/System.err(897): at
android.app.ActivityThread.main(ActivityThread.java:4203)
11-05 12:16:07.765: WARN/System.err(897): at
java.lang.reflect.Method.invokeNative(Native Method)
11-05 12:16:07.765: WARN/System.err(897): at
java.lang.reflect.Method.invoke(Method.java:521)
11-05 12:16:07.765: WARN/System.err(897): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:791)
11-05 12:16:07.775: WARN/System.err(897): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-05 12:16:07.775: WARN/System.err(897): at
dalvik.system.NativeStart.main(Native Method)
11-05 12:28:34.884: DEBUG/dalvikvm(622): GC freed 9170 objects /
524208 bytes in 79ms
11-05 12:43:32.385: DEBUG/dalvikvm(576): GC freed 18161 objects /
795040 bytes in 126ms
11-05 12:43:36.334: DEBUG/dalvikvm(622): GC freed 9171 objects /
524248 bytes in 76ms

It almost seems like some kind of resource leak or something.  Does
anyone have any ideas on what could be the problem?  I am getting this
in the simulator btw, so it's not like a dropped OTA signal.

tia.

 cut here 

package com.test;

import java.io.IOException;

import android.app.Activity;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnBufferingUpdateListener;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.os.Bundle;
import android.util.Log;

public class TestPlayer extends Activity implements OnErrorListener,
OnBufferingUpdateListener, OnCompletionListener {
private MediaPlayer mp = new MediaPlayer();

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

try {
mp = new MediaPlayer();
mp.reset();
mp.setDataSource(http://blahblah.com/test.m4a;);
mp.prepare();
mp.start();
mp.setOnErrorListener(this);
mp.setOnBufferingUpdateListener(this);
mp.setOnCompletionListener(this);

} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
Log.e(test, onError: what:  + what + , extra:  + extra);
return false;
}

@Override
public void onBufferingUpdate(MediaPlayer mp, int percent) {
Log.i(test, onBufferingUpdate: percent:  + percent);
}

@Override
public void onCompletion(MediaPlayer mp) {
try {
mp.reset();
mp.release();
mp = null;

mp = new MediaPlayer();
mp.reset();
mp.setDataSource(http://blahblah.com/test.m4a;);
mp.prepare();
mp.start();
mp.setOnErrorListener(this);

[android-developers] Re: ADC2 Results Post

2009-11-05 Thread tansaku
I have 2 emails too.   Was disappointed not to make it into top 20 in
education.  However the voice recognition component in my study
dictionary didn't work outside the US, so I think I probably suffered
in the ratings there:

http://linklens.blogspot.com/2009/10/smartfm-mobile-study-dictionary-upgrade.html

I have a video too:

http://lilt.ics.hawaii.edu/%7Esrjoseph/video/SmartFmMobileStudyDictionary.mov

On Nov 5, 11:35 am, ander...@phdgaming.com ander...@phdgaming.com
wrote:
 I now have 3 in my inbox, all of which are identical.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADC2 Results Post

2009-11-05 Thread polyclefsoftware
Got a your app was in the top 25%, but didn't make the cut email for
my casual/puzzle game Relativia:

http://polyclefsoftware.com/relativia.html

Ah well.

On Nov 5, 2:28 pm, GodsMoon godsm...@gmail.com wrote:
 Since the Android Challenge Group seems to be closed I'll post here.
 What results did you get from Google?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] DDMS Heap debug

2009-11-05 Thread Guilherme
Does anybody can explain me exactaly which meaning the words Class
Objects, Data Objects, Non-Java Objects, 1-byte array: byte, boolean,
2-byte array: char, short, 4-byte array: float, int and 8-byte array:
double, long in DDMS Heap debug.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Using MediaPlayer best practices?

2009-11-05 Thread Alexey Krasnoriadtsev
You can register the buffering listener and save the current buffering
position.
You can also poll for current position say every second (using your ui
handler), and if current position did not change since last poll, show ui
message (or dialog).

Alexey Krasnoriadtsev
Agile Fusion Corp


On Wed, Nov 4, 2009 at 9:23 AM, Moto medicalsou...@gmail.com wrote:

 Thanks Alex!

 When you say peek at the MediaPlaybackService you mean android
 framework code?

 I was afraid that MediaPlayer would somehow end in an invalid state if
 the internal server died or something but I guess reset() cleans it
 up...  As of now I just use Reset() to stop playback.. :P seems to be
 faster than Stop() plus it cleans the MediaPlayer to be ready for
 another SetDataSource() and Prepare()...

 Something I don't like about MediaPlayer is that you can't get the
 audio status!  Say it's progressively playing a file from the internet
 and  all the sudden audio stops because it doesn't have enough
 data...  I want to know when that happens and there is no information
 for that...  Any ideas on this part?

 Thanks,
 -Moto

 On Nov 4, 3:34 am, Alexey Krasnoriadtsev ale...@agilefusion.com
 wrote:
  Preparing a mediaPlayer is the most expensive operation.
  calling stop() or pause() and then start() works best for me. You can
  also peek at the MediaPlaybackService for inspiration.
 
  Why do you think it will get into the bad state?
 
  On Nov 3, 7:14 pm, Moto medicalsou...@gmail.com wrote:
 
   What is the best way to use the MediaPlayer when needed multiple
   times?
 
   Reuse the instantiated MediaPlayer throughout the session?  Or
   constantly stop() release() and instantiate a new MediaPlayer() ?
 
   If I reuse I'm afraid the player could be in a bad state?
   What about performance wise? what's better? reuse or renew?
 
   Note: This is for using as a music player so one audio be present at
   one given time...
 
   Thank!
   -Moto!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Multiple Layouts in a ListView

2009-11-05 Thread Loki117
Hey Guys,

I am looking for some help around ListViews. I would like to use a
ListView to hold a number of rows of data however in between some of
these rows of data may appear a header indicating a new section of
data types. Can someone tell me have they implemented a ListView that
uses multiple layout types and if so how do you determine which layout
type is being passed back in the convertView in order to make sure you
do not try to recast it to the wrong type.

Tom

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Setting RFCOMM/SPP Bluetooth Baud rate

2009-11-05 Thread Aakash Patel
Oh, so it's kind of auto-detects the baud rate that the remote device
is using?

Aakash

On Nov 5, 12:58 am, Nick Pelly npe...@google.com wrote:
 You should try and set the baud rate at the physical RS232 interface
 on the remote device. It's a strange legacy feature that RFCOMM lets
 you do this over the BT link, since it does not affect the BT link
 speed at all.

 Nick

 On Tue, Nov 3, 2009 at 6:56 PM, Aakash Patel aakashbpa...@gmail.com wrote:
  A better question would be, is there a default baud rate that Android
  uses or something?

  On Nov 3, 8:36 pm, Aakash Patel aakashbpa...@gmail.com wrote:
  Then how are we supposed to initiate communications with a serial
  Bluetooth device?

  On Nov 3, 8:16 pm, Nick Pelly npe...@google.com wrote:

   On Thu, Oct 29, 2009 at 12:23 PM, Aakash Patel aakashbpa...@gmail.com 
   wrote:

Hello,

I am making an app that utilizes the BlutoothSocket API and am trying
to create a serial connection over Bluetooth with RFCOMM/SPP profile.

I do not see how I set the baud rate for the connection, how would I
set it?

   You cannot set the SPP baud rate with the current API.

Thanks,
Aakash Patel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 
android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] [Android 2.0] New Contacts API

2009-11-05 Thread Dmitri Plotnikov
Very nice!

It's important to clarify, that this code will find a note for a _raw_
contact, but not for an aggregate contact.  If the id here is contactId, not
rawContactId, then the selection should say ContactsContract.Data.CONTACT_ID
+ =?...

Cheers,
- Dmitri

On Thu, Nov 5, 2009 at 1:22 PM, jefduncan jef.dun...@topnotchgeek.comwrote:

 Hi all,

 This is my first post to this group (any group), but I wanted to share
 my experience with the new Contacts API so far. I had a little
 application which accessed a contact's notes via
 Contacts.People.CONTENT_URI, accessing the NOTES field with
 cursor.getString(cursor.getColumnIndex(People.Notes)). Simple enough.

 Then, along comes the new API with it's ContactsContract and
 ContactsContract.CommonDataKinds.xxx. Oh my gosh! It took me forever
 to figure out how to find the contents of a note. Maybe I'm just
 dense! :) As it turns out, a note (along with many other data items)
 is stored in the 'data' directory of the contact available through
 ContactsContract.Data.CONTENT_URI. The note's mime-type is specified
 as ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE, and the
 column containing the note is
 ContactsContract.CommonDataKinds.Note.NOTE. So, here's how I
 constructed my new getNote(long contactId) method:

 private String getNote(long contactId) {
Log.d(LOGGING_TAG, getNote for contactId:  + contactId);
String rv = null;
String[] projection = new String[]
 { ContactsContract.CommonDataKinds.Note.NOTE };
String whereClause = ContactsContract.Data.RAW_CONTACT_ID +  = ?
 AND
  + ContactsContract.Data.MIMETYPE +  = ?;
String[] whereParams = new String[]{Long.toString(contactId),
 ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE};
Cursor c = getContentResolver().query
 (ContactsContract.Data.CONTENT_URI, projection, whereClause,
 whereParams, null);
if (c.moveToFirst()) {
rv = c.getString(0);
}
c.close();
Log.d(LOGGING_TAG, getNote returning  + rv);
return rv;
 }

 There are other, easier means for accessing some of the other 'data'
 items (for example, ContactsContract.CommonDataKinds.Phone has it's
 own CONTENT_URI), but this was the only way I could find to access a
 note. I hope it's helpful to someone else.

 Peace,
 Jef

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Socket connection timeout while disable Wi-Fi

2009-11-05 Thread bruce
Hi Guys
My application use socket to connect a remote sever to get data.
In my handset, both Wi-Fi and Mobile network data connection are
enabled, by default device will
choose using Wi-Fi connection. In this case, all network access can
process normally

However, when I turn off Wi-Fi in system setting page and switch back
to my application to start a new session for network access, I found
that socket could not setup.
Here is the trace:
11-02 15:04:42.617: WARN/System.err(5516): java.net.SocketException:
The operation timed out
11-02 15:04:42.645: WARN/System.err(5516): at
org.apache.harmony.luni.platform.OSNetworkSystem.connectSocketImpl
(Native Method)
11-02 15:04:42.645: WARN/System.err(5516): at
org.apache.harmony.luni.platform.OSNetworkSystem.connect
(OSNetworkSystem.java:125)
11-02 15:04:42.645: WARN/System.err(5516): at
org.apache.harmony.luni.net.PlainSocketImpl.connect
(PlainSocketImpl.java:227)
11-02 15:04:42.645: WARN/System.err(5516): at
org.apache.harmony.luni.net.PlainSocketImpl.connect
(PlainSocketImpl.java:199)
11-02 15:04:42.645: WARN/System.err(5516): at
java.net.Socket.startupSocket(Socket.java:734)

Afterwards I close my application and restart it to do the same
operation(at this time, Wi-Fi are disabled), network access becomes
normal again


Does anyone come across this problem and any suggestion from your
sides?

Many thanks


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] WVGA Question

2009-11-05 Thread admin.androidsl...@googlemail.com
What is the standard behavior for displaying an app in WVGA - using a
custom drawn view (usually 480 x 320).

I have tried on the emulator and see one of 2 behaviors. Either :
- app takes up small window at top center measuring 480 x 320 leaving
most of the screen empty
- app scales up to 720 x 480 but misses the strip on the right (80
pixels wide)

Obviously neither is correct and needs work but which of these will
Moto Droid users see?

Alex

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Need an invitation to google Wave?

2009-11-05 Thread sjaubert
Très intéressé ! Thank !

On Nov 3, 7:19 am, eris23 jdkat...@gmail.com wrote:
 I could use one.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


  1   2   3   >