Re: [android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-22 Thread Mark Murphy
On Wed, Dec 22, 2010 at 2:13 AM, JC j...@oriolesoftware.com wrote:
 thanks mark,

 I am starting service in myactivity::OnDestroy.

That is a bad idea, since onDestroy() is not guaranteed to be called.

 When i am stopping service(2nd time activity get started and service
 running) I require latest value two integers from service.

 How can i get those values in activity from service without waiting
 for service to stop?

Option #1: Bind to the service, call some API method on the binder in
onServiceConnected(), unbind from the service, then call stopService()
in onServiceDisconnected()

Option #2: Call startService() with some custom action string to
indicate please send me the data along with a Messenger tied to your
Handler, have the service send the data to the Handler via the
Messenger, and call stopService() when the data arrives.

Option #3: Consider the data the service is generating to be part of
your data model and store it persistently, having the activity get the
latest data from the persistent store.

There are probably many more options, but those should get you started.

 One more question, In myactivity, i have handler which implements
 handlemessage(), is it possible to receive msg in it from service?

Use a Messenger.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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: Android:: Service::OnDestroy being called late..

2010-12-22 Thread JC
Thanks again Mark.

I am exploring all 3 option one by one by searching examples on
google. I will update here on status.

Thanks
JC



On Dec 22, 1:00 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Dec 22, 2010 at 2:13 AM, JC j...@oriolesoftware.com wrote:
  thanks mark,

  I am starting service in myactivity::OnDestroy.

 That is a bad idea, since onDestroy() is not guaranteed to be called.

  When i am stopping service(2nd time activity get started and service
  running) I require latest value two integers from service.

  How can i get those values in activity from service without waiting
  for service to stop?

 Option #1: Bind to the service, call some API method on the binder in
 onServiceConnected(), unbind from the service, then call stopService()
 in onServiceDisconnected()

 Option #2: Call startService() with some custom action string to
 indicate please send me the data along with a Messenger tied to your
 Handler, have the service send the data to the Handler via the
 Messenger, and call stopService() when the data arrives.

 Option #3: Consider the data the service is generating to be part of
 your data model and store it persistently, having the activity get the
 latest data from the persistent store.

 There are probably many more options, but those should get you started.

  One more question, In myactivity, i have handler which implements
  handlemessage(), is it possible to receive msg in it from service?

 Use a Messenger.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 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] TextSwitcher and/or TranslateAnimation changed in API level 8 and upwards?

2010-12-22 Thread Leif
I am using a TextSwitcher and a TranslateAnimation to create a
slotmachine reel effect.

It works fine on API levels 4 through 7, but on API levels 8 and 9 it
breaks down for some reason.

Any clues as to why this is happening?

The UI structure is like this:

FrameLayout-TextSwitcher-TextViews

Any known changes in TextSwitcher, TextView or TranslateAnimation
since API level 7?

Any pointers appreciated!

Regards,
Leif

-- 
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] TabHost not working in Froyo

2010-12-22 Thread KG
Hi Everyone,

I have a TabHost in my app that works on my test device running
Android 2.1 (and all previous versions via the emulator).  However,
the tabs do not display when Running on Android 2.2 (Froyo) or later.
All there is is the content of the first tab and a blank spot where
the tabs should be.  Here is the code I'm using to create the TabHost:

TabHost
xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@android:id/tabhost
android:layout_height=wrap_content
android:layout_width=wrap_content

RelativeLayout
android:layout_height=fill_parent
android:layout_width=fill_parent

TabWidget
android:divider=#00
android:id=@android:id/tabs
android:layout_alignParentBottom=true
android:layout_height=wrap_content
android:layout_width=fill_parent
/
FrameLayout
android:id=@android:id/tabcontent
android:layout_above=@android:id/tabs
android:layout_height=fill_parent
android:layout_width=fill_parent
/
/RelativeLayout
/TabHost



LogCat provides nothing.

Any input would be greatly appreciated.  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


BLS: [android-developers] TabHost not working in Froyo

2010-12-22 Thread asns.dr...@gmail.com
I have busy with sme problems like your..
Maybe you can edit the xml and also working path

Terkirim dari telepon Nokia saya
-Pesan Asli-
Dari: KG
Terkirim:  22-12-2010 15.44.15
Subjek:  [android-developers] TabHost not working in Froyo

Hi Everyone,

I have a TabHost in my app that works on my test device running
Android 2.1 (and all previous versions via the emulator).  However,
the tabs do not display when Running on Android 2.2 (Froyo) or later.
All there is is the content of the first tab and a blank spot where
the tabs should be.  Here is the code I'm using to create the TabHost:

TabHost
xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@android:id/tabhost
android:layout_height=wrap_content
android:layout_width=wrap_content

RelativeLayout
android:layout_height=fill_parent
android:layout_width=fill_parent

TabWidget
android:divider=#00
android:id=@android:id/tabs
android:layout_alignParentBottom=true
android:layout_height=wrap_content
android:layout_width=fill_parent
/
FrameLayout
android:id=@android:id/tabcontent
android:layout_above=@android:id/tabs
android:layout_height=fill_parent
android:layout_width=fill_parent
/
/RelativeLayout
/TabHost



LogCat provides nothing.

Any input would be greatly appreciated.  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

-- 
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] determine dimensiona of the screen in View's constructor?

2010-12-22 Thread Dianne Hackborn
You mean onSizeChanged()?

Sorry, there is nothing earlier, that is the point where this has been
figured out.

On Tue, Dec 21, 2010 at 11:59 PM, Utumno lkoltun...@gmail.com wrote:

 Hello Android gurus,

 I am aware that when screen dimensions change, I get a call to
 onScreenChanged() and there I can figure out its dimensions, however
 it would be much more convenient if I could figure this out earlier,
 namely in my View's constructor.

 Any tips?

 --
 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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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] Scaling Down

2010-12-22 Thread cuil yahoo
Hello,

I have an offline HTML content, with complete javascript and css embedded in
it. I would like to put that up in android mobile browser, could anyone
please help me with the scaling down ?

Thanks.

Cuil

-- 
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 add button to a listview

2010-12-22 Thread pramod.deore
I have one activity which is extends from ListActivity. Here I am
displaying list of strings . I don't have .xml file I am showing list
using ArrayAdapter. Now what I want is to add 2 buttons to this list.
because I don't have xml file I am confused how to add buttons. Please
help me. 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: Ant not building app properly

2010-12-22 Thread Bob Kerns
I would make sure you're running aapt as part of each and every build.
And also aidl, if you use aidl files. These both need to run *before*
you run javac, because they produce java files that need to be
compiled. If you run them after, you'll always be picking up the
version from your previous build instead of teh current one, and the
resource IDs won't match if you've made changes to the resources.

Also, make sure that your javac task lists as source directories both
your source, and the generated output from aapt and aidl.

This example is a bit outdated, but illustrates:
javac encoding=ascii target=1.5 debug=true extdirs=
destdir=${out.classes.absolute.dir}
bootclasspathref=android.target.classpath
verbose=${verbose} classpath=$
{extensible.classpath}
src path=${source.absolute.dir} /
src path=${gen.absolute.dir} /
classpath
fileset dir=${external.libs.absolute.dir}
includes=*.jar /
/classpath
/javac



On Dec 20, 9:38 am, Brian Olsen brian.ol...@gmail.com wrote:
 Hello,

 I have been building an Android app for some time now, and I decided
 to start using Ant for building instead of through Eclipse. Building
 through Eclipse has always worked flawlessly, but when I started
 building with Ant, the builds (that would install in an emulator)
 would always be unstable. Ant would always build and install the app
 fine, but running the app would cause these serious instability
 issues.

 Here are a few examples that would occur after building with Ant and
 installing the app:

 1. The application would force close because of ClassCastExceptions
 being thrown. The source of these errors would be traced to casts like
 this:

 (LinearLayout)findViewById(R.id.my_layout)

 In this case, R.id.my_layout (or whatever I called it) would point to
 a non-existing resource. Of course, building this in Eclipse would not
 show these errors.

 2. The wrong string resources would be used in an unpredictable way.

 3. Layouts would not load up correctly, also causing random failures
 and force-closes.

 I believe that the source of these issues is related to how it is
 compiling R.java and the way it links it up to resources. I am
 unfamiliar as to how it builds resources into apps, so I am at a loss
 as to why this is occurring in the first place.

 The interesting thing is that if I make some change to the source
 code, and do another 'ant compile' or 'ant install', the problems in
 the previous build disappear and new resource issues pop up.

 After plenty of googling, I could not find anything describing
 something similar to this issue. I am concerned that potentially
 building via Ant might be exposing issues that I am not aware of, so
 besides using Ant, I just want to make sure.

 Is this a known issue? I just want to make sure before I attempt to
 reproduce the problem on a smaller scale.

 My development computer is:

 - Mac OS X 10.6.5
 - from java -version:

 java version 1.6.0_22
 Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
 Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

 I'm just using the default JVM for this.

 - building against Android + Google APIs, API 8 revision 2.

 Thank you very much,
 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] Re: ADB USB Driver for MyTouch 4g

2010-12-22 Thread FrankG

Hello Sarwar,

as this phone supports usb tethering I assume it supports
a composite usb mode or different ones and it will require
a spezialized driver for this.

BTW .. another way to install an app is to download them via
the browser from a provate webseite.

Good luck ! Frank




On 22 Dez., 05:06, Sarwar Erfan erfanonl...@gmail.com wrote:
 Follow Kostya's instructions to install without ADB.

 About connecting device to USB in PC, I have experience with Samsung Galaxy
 S (South Korean version). I could connect and access the internal memory of
 the device using Google's driver. But, I could not connect it via ADB. I
 downloaded usb driver from Samsung website and after installing Samsung's
 driver, I was able to connect with ADB.

 Regards
 Sarwar Erfan

-- 
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: determine dimensiona of the screen in View's constructor?

2010-12-22 Thread Utumno
Yes, I mean onSizeChanged().

Hmm, no way? Even if I have android:screenOrientation=landscape in
my manifest ? This way screen dimensions will ( am I right? ) never
change,  and should be accessible anytime...

Currently I initialize part of my View in its constructor, than I have
to do all kinds of locks to somehow survive without a crash until I
get the onSizeChanged() message and can initialize the rest (which
depends on screen size ) and then I have to ignore subsequent
onSizeChanges() which, for some reason, still sometimes come ( even
though, of course, neither the physical screen size nor orientation
has actually changed ). For example, if I have my app on top, and
screen saver kicks in, and I awake the screen,  then my app gets shown
again and gets ( in my opinion, spurious ) onSizeChanged() message
which needs to be ignored.

Doing the above is feasible, but messy. It would be way more
convenient if I could simply figure out the screen dimensions in
View's constructor, construct everything and do not bother with
onSizeChanged  ( like I do in versions of said app for Symbian and
Blackberry )




On Dec 22, 4:51 pm, Dianne Hackborn hack...@android.com wrote:
 You mean onSizeChanged()?

 Sorry, there is nothing earlier, that is the point where this has been
 figured out.



 On Tue, Dec 21, 2010 at 11:59 PM, Utumno lkoltun...@gmail.com wrote:
  Hello Android gurus,

  I am aware that when screen dimensions change, I get a call to
  onScreenChanged() and there I can figure out its dimensions, however
  it would be much more convenient if I could figure this out earlier,
  namely in my View's constructor.

  Any tips?

  --
  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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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


Re: [android-developers] Re: determine dimensiona of the screen in View's constructor?

2010-12-22 Thread Kostya Vasilyev

onSizeChanged, which gives the size of the view, is one thing.

But you keep saying *screen* dimensions, which is quite another.

If that's what you need, you can use DisplayMetrics:

http://developer.android.com/reference/android/util/DisplayMetrics.html

Check out widthPixels and heightPixels, which give screen size.

-- Kostya

22.12.2010 12:18, Utumno пишет:

Yes, I mean onSizeChanged().

Hmm, no way? Even if I have android:screenOrientation=landscape in
my manifest ? This way screen dimensions will ( am I right? ) never
change,  and should be accessible anytime...

Currently I initialize part of my View in its constructor, than I have
to do all kinds of locks to somehow survive without a crash until I
get the onSizeChanged() message and can initialize the rest (which
depends on screen size ) and then I have to ignore subsequent
onSizeChanges() which, for some reason, still sometimes come ( even
though, of course, neither the physical screen size nor orientation
has actually changed ). For example, if I have my app on top, and
screen saver kicks in, and I awake the screen,  then my app gets shown
again and gets ( in my opinion, spurious ) onSizeChanged() message
which needs to be ignored.

Doing the above is feasible, but messy. It would be way more
convenient if I could simply figure out the screen dimensions in
View's constructor, construct everything and do not bother with
onSizeChanged  ( like I do in versions of said app for Symbian and
Blackberry )




On Dec 22, 4:51 pm, Dianne Hackbornhack...@android.com  wrote:

You mean onSizeChanged()?

Sorry, there is nothing earlier, that is the point where this has been
figured out.



On Tue, Dec 21, 2010 at 11:59 PM, Utumnolkoltun...@gmail.com  wrote:

Hello Android gurus,
I am aware that when screen dimensions change, I get a call to
onScreenChanged() and there I can figure out its dimensions, however
it would be much more convenient if I could figure this out earlier,
namely in my View's constructor.
Any tips?
--
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

--
Dianne Hackborn
Android framework engineer
hack...@android.com

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Ant not building app properly

2010-12-22 Thread Bob Kerns
I should also point out that you can get the 'android' command to set
up ant build files for you, and this is probably a better idea than
doing it yourself.

I have been doing it myself, based on what the android command did,
because when I first did it, there were various serious flaws in how
it did it, including the hardwired use of the 'ascii' encoding (which
is just plain nuts, and is still the default, but can be overridden
now).  But at this point, I plan to replace my android-specific
portion with using theirs, and just handle the build management
(checkout, etc.) with a wrapper that calls theirs to do the actual
build.

See here for how to use the 'android' tool to set this up:

http://developer.android.com/intl/de/guide/developing/other-ide.html


On Dec 22, 1:14 am, Bob Kerns r...@acm.org wrote:
 I would make sure you're running aapt as part of each and every build.
 And also aidl, if you use aidl files. These both need to run *before*
 you run javac, because they produce java files that need to be
 compiled. If you run them after, you'll always be picking up the
 version from your previous build instead of teh current one, and the
 resource IDs won't match if you've made changes to the resources.

 Also, make sure that your javac task lists as source directories both
 your source, and the generated output from aapt and aidl.

 This example is a bit outdated, but illustrates:
         javac encoding=ascii target=1.5 debug=true extdirs=
                 destdir=${out.classes.absolute.dir}
                 bootclasspathref=android.target.classpath
                 verbose=${verbose} classpath=$
 {extensible.classpath}
             src path=${source.absolute.dir} /
             src path=${gen.absolute.dir} /
             classpath
                 fileset dir=${external.libs.absolute.dir}
 includes=*.jar /
             /classpath
         /javac

 On Dec 20, 9:38 am, Brian Olsen brian.ol...@gmail.com wrote:







  Hello,

  I have been building an Android app for some time now, and I decided
  to start using Ant for building instead of through Eclipse. Building
  through Eclipse has always worked flawlessly, but when I started
  building with Ant, the builds (that would install in an emulator)
  would always be unstable. Ant would always build and install the app
  fine, but running the app would cause these serious instability
  issues.

  Here are a few examples that would occur after building with Ant and
  installing the app:

  1. The application would force close because of ClassCastExceptions
  being thrown. The source of these errors would be traced to casts like
  this:

  (LinearLayout)findViewById(R.id.my_layout)

  In this case, R.id.my_layout (or whatever I called it) would point to
  a non-existing resource. Of course, building this in Eclipse would not
  show these errors.

  2. The wrong string resources would be used in an unpredictable way.

  3. Layouts would not load up correctly, also causing random failures
  and force-closes.

  I believe that the source of these issues is related to how it is
  compiling R.java and the way it links it up to resources. I am
  unfamiliar as to how it builds resources into apps, so I am at a loss
  as to why this is occurring in the first place.

  The interesting thing is that if I make some change to the source
  code, and do another 'ant compile' or 'ant install', the problems in
  the previous build disappear and new resource issues pop up.

  After plenty of googling, I could not find anything describing
  something similar to this issue. I am concerned that potentially
  building via Ant might be exposing issues that I am not aware of, so
  besides using Ant, I just want to make sure.

  Is this a known issue? I just want to make sure before I attempt to
  reproduce the problem on a smaller scale.

  My development computer is:

  - Mac OS X 10.6.5
  - from java -version:

  java version 1.6.0_22
  Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
  Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

  I'm just using the default JVM for this.

  - building against Android + Google APIs, API 8 revision 2.

  Thank you very much,
  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


Re: [android-developers] How to add button to a listview

2010-12-22 Thread sujit panda
Hi,
   you have to create a custom ArrayAdapter class which will override the
getView() method and  using this you can pass a XML file to the list and you
can put whatever you want in side list. follow this blog by me

http://sujitdroid.blogspot.com/b/post-preview?token=AegwDy0BAAA.deBFPIcG_E74RiXMbZOKCw.8_azEqda-go3bKkL_v_CwwpostId=1537762072029914236type=POST

Thanks


On Wed, Dec 22, 2010 at 2:43 PM, pramod.deore deore.pramo...@gmail.comwrote:

 I have one activity which is extends from ListActivity. Here I am
 displaying list of strings . I don't have .xml file I am showing list
 using ArrayAdapter. Now what I want is to add 2 buttons to this list.
 because I don't have xml file I am confused how to add buttons. Please
 help me. 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.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] ADB USB Driver for MyTouch 4g

2010-12-22 Thread shareem sharif
useing that will not be usefull cause it can cause your phone to crash
please respond if you want to know more

On Sun, Dec 19, 2010 at 8:32 AM, djb dougbri...@gmail.com wrote:


 All I want to do is install a home grown app to my device, if I can do
 this without ADB  google USB then that would be helpful too..

 Problem... So I installed the: Google Usb Driver package, revision 4
 from Android SDK and AVD Manager, first sign of possible trouble is
 even though I close an reopen the revision 4 package still exists as
 an installable option. Anyway, the package did install to C:\AndroidSDK
 \google-usb_driver and I use this directory to install the driver as
 described by http://developer.android.com/sdk/win-usb.html (for fresh
 installl under windows XP).When the new hardware wizard comes up I
 select the goole_usb directory, but windows informs me that doesnt
 contain a better driver than what is already installed.  Windows seems
 to be assigning this T-Mobile myTouch 4G USB Device  Any
 suggestions, help ,.advise 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.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: determine dimensiona of the screen in View's constructor?

2010-12-22 Thread Utumno
Yes, I actually mean Screen dimensions - the view is fullscreen and
will always be. Will check out, thanks.

On Dec 22, 5:23 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 onSizeChanged, which gives the size of the view, is one thing.

 But you keep saying *screen* dimensions, which is quite another.

 If that's what you need, you can use DisplayMetrics:

 http://developer.android.com/reference/android/util/DisplayMetrics.html

 Check out widthPixels and heightPixels, which give screen size.

 -- Kostya

 22.12.2010 12:18, Utumno пишет:



  Yes, I mean onSizeChanged().

  Hmm, no way? Even if I have android:screenOrientation=landscape in
  my manifest ? This way screen dimensions will ( am I right? ) never
  change,  and should be accessible anytime...

  Currently I initialize part of my View in its constructor, than I have
  to do all kinds of locks to somehow survive without a crash until I
  get the onSizeChanged() message and can initialize the rest (which
  depends on screen size ) and then I have to ignore subsequent
  onSizeChanges() which, for some reason, still sometimes come ( even
  though, of course, neither the physical screen size nor orientation
  has actually changed ). For example, if I have my app on top, and
  screen saver kicks in, and I awake the screen,  then my app gets shown
  again and gets ( in my opinion, spurious ) onSizeChanged() message
  which needs to be ignored.

  Doing the above is feasible, but messy. It would be way more
  convenient if I could simply figure out the screen dimensions in
  View's constructor, construct everything and do not bother with
  onSizeChanged  ( like I do in versions of said app for Symbian and
  Blackberry )

  On Dec 22, 4:51 pm, Dianne Hackbornhack...@android.com  wrote:
  You mean onSizeChanged()?

  Sorry, there is nothing earlier, that is the point where this has been
  figured out.

  On Tue, Dec 21, 2010 at 11:59 PM, Utumnolkoltun...@gmail.com  wrote:
  Hello Android gurus,
  I am aware that when screen dimensions change, I get a call to
  onScreenChanged() and there I can figure out its dimensions, however
  it would be much more convenient if I could figure this out earlier,
  namely in my View's constructor.
  Any tips?
  --
  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
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

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

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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] How to get new input language in to the android? Who decides which new input languages for an IME should be added?

2010-12-22 Thread Lado Kumsiashvili
Hi.
There are a lot of languages but not georgian in android. But I've
implemented also this layout for other IME Projects.
So who decied which new languages could be adopted to the IME of
android? Do someone has an idea?

With Regards,
Lado Kumsiashvili

-- 
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] resultCode in onActivityResult returns 0

2010-12-22 Thread pramod.deore
Hi I have one activity which invoked another activity

roomIntent.putExtra(roomName,roomNM );
roomIntent.setClass(AddScheduler.this,RoomList.class);
startActivityForResult(roomIntent,Room_SELECT);

protected void start(Intent intent)
{
this.startActivityForResult(intent,Room_SELECT);
}

protected void onActivityResult(int requestCode, int resultCode,
Intent data)
{
System.out.println (requestCode);

switch(requestCode)
{
case Room_SELECT:

System.out.println (resultCode);  //here it 
returns 0
 if (resultCode == RESULT_OK)
{
...
//Because result code returns 0 therefore this if conditio does not
execute.
}
}

}

And here is my other activity which returns result.

public class RoomList extends ListActivity
{
super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras();
if(extras !=null)
{
value = extras.getString(roomName);
sw = getSwitchNameArray(value);
}
setListAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_multiple_choice,
sw));
final ListView listView = getListView();
listView.setItemsCanFocus(true);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

listView.setOnItemClickListener(new ListView.OnItemClickListener() {

@Override
public void onItemClick(AdapterView? arg0, View arg1, 
int arg2,
long arg3)
{
// TODO Auto-generated method stub
System.out.println (User checked boxes);

if (listView.isItemChecked(arg2))
{
System.out.println 
(###+listView.getItemAtPosition(arg2));
room = (String) 
listView.getItemAtPosition(arg2);
selectedRooms.add(room);
System.out.println (Size 
is+selectedRooms.size());

}

else
{
String str = (String) 
listView.getItemAtPosition(arg2);
selectedRooms.remove(str);
System.out.println (Size 
is+selectedRooms.size());
}
}


});

@Override
protected void onPause()
{
super.onPause();

System.out.println (User click on back button);

mySwitches = new String[selectedRooms.size()];
selectedRooms.toArray(mySwitches);
int str = mySwitches.length;
System.out.println (!...@#!@#...@#+str);
Intent returnIntent = new Intent();
//returnIntent.putExtra(SelectedSwitches,selectedRooms);
returnIntent.putExtra(SelectedSwitches, str);
setResult(RESULT_OK,returnIntent);
System.out.println (Before calling finish);
finish();
System.out.println (After calling finish);
}

  public String[] getSwitchNameArray(String rn)
{
..returns string array
}

I think in resultCode I get 0 because I write
setResult(RESULT_OK,returnIntent);  inside onPause () method. Or there
is another problem? I had write that inside onPause bacause in this
activity I am calculating name of selected items. And I never knows
when user had finished selecting items. After writing code inside
onPause I know what item user had selected from list and I can pass
them to the calling activity.

I think better approach is to add one button means suppose user click
on save button then selected item will be sent to the calling
activity. Want your opinion? where should write code. If it doesn't
affect write inside onPause() then why I got 0 from resultCode.

-- 
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] resultCode in onActivityResult returns 0

2010-12-22 Thread Kumar Bibek
YEah,

Why are you calling finish from onPause method?  It will finish you
application, even when you would not want it to.

Try this. On a specific event, set the result and just call finish. That
should do.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Dec 22, 2010 at 4:14 PM, pramod.deore deore.pramo...@gmail.comwrote:

 Hi I have one activity which invoked another activity

 roomIntent.putExtra(roomName,roomNM );
 roomIntent.setClass(AddScheduler.this,RoomList.class);
 startActivityForResult(roomIntent,Room_SELECT);

 protected void start(Intent intent)
{
this.startActivityForResult(intent,Room_SELECT);
}

protected void onActivityResult(int requestCode, int resultCode,
 Intent data)
{
System.out.println (requestCode);

switch(requestCode)
{
case Room_SELECT:

System.out.println (resultCode);  //here it
 returns 0
 if (resultCode == RESULT_OK)
{
...
 //Because result code returns 0 therefore this if conditio does not
 execute.
}
}

}

 And here is my other activity which returns result.

 public class RoomList extends ListActivity
 {
 super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras();
if(extras !=null)
{
value = extras.getString(roomName);
sw = getSwitchNameArray(value);
}
setListAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_multiple_choice,
 sw));
final ListView listView = getListView();
listView.setItemsCanFocus(true);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

 listView.setOnItemClickListener(new ListView.OnItemClickListener() {

@Override
public void onItemClick(AdapterView? arg0, View
 arg1, int arg2,
long arg3)
{
// TODO Auto-generated method stub
System.out.println (User checked boxes);

if (listView.isItemChecked(arg2))
{
System.out.println
 (###+listView.getItemAtPosition(arg2));
room = (String)
 listView.getItemAtPosition(arg2);
selectedRooms.add(room);
System.out.println (Size
 is+selectedRooms.size());

}

else
{
String str = (String)
 listView.getItemAtPosition(arg2);
selectedRooms.remove(str);
System.out.println (Size
 is+selectedRooms.size());
}
}


});

 @Override
protected void onPause()
{
super.onPause();

System.out.println (User click on back button);

mySwitches = new String[selectedRooms.size()];
selectedRooms.toArray(mySwitches);
int str = mySwitches.length;
System.out.println (!...@#!@#...@#+str);
Intent returnIntent = new Intent();
//returnIntent.putExtra(SelectedSwitches,selectedRooms);
returnIntent.putExtra(SelectedSwitches, str);
setResult(RESULT_OK,returnIntent);
System.out.println (Before calling finish);
finish();
System.out.println (After calling finish);
}

  public String[] getSwitchNameArray(String rn)
{
 ..returns string array
 }

 I think in resultCode I get 0 because I write
 setResult(RESULT_OK,returnIntent);  inside onPause () method. Or there
 is another problem? I had write that inside onPause bacause in this
 activity I am calculating name of selected items. And I never knows
 when user had finished selecting items. After writing code inside
 onPause I know what item user had selected from list and I can pass
 them to the calling activity.

 I think better approach is to add one button means suppose user click
 on save button then selected item will be sent to the calling
 activity. Want your opinion? where should write code. If it doesn't
 affect write inside onPause() then why I got 0 from resultCode.

 --
 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 

[android-developers] Show Application Version Number with .apk file

2010-12-22 Thread subrat kumar panda
Hello all,
i would like to inform you all that i have been facing problem , that's :
after run the android app, it gives us the ProjectName.apk.

so, the problem is how could i get ProjectName-1.0/anything else
depends upon your Project's version.
if anybody have knowledge about the mentioned problem would be appreciated.

Thanks  Regards
Subrat

-- 
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: resultCode in onActivityResult returns 0

2010-12-22 Thread pramod.deore
Hey Bibek Thanks.
 Try this. On a specific event, set the result and just call finish. That
 should do.

But on what event I call finish? Because here I am just selecting
items from list. And how should I know that user had finished there
selection?

On Dec 22, 3:47 pm, Kumar Bibek coomar@gmail.com wrote:
 YEah,

 Why are you calling finish from onPause method?  It will finish you
 application, even when you would not want it to.

 Try this. On a specific event, set the result and just call finish. That
 should do.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Dec 22, 2010 at 4:14 PM, pramod.deore deore.pramo...@gmail.comwrote:

  Hi I have one activity which invoked another activity

  roomIntent.putExtra(roomName,roomNM );
  roomIntent.setClass(AddScheduler.this,RoomList.class);
  startActivityForResult(roomIntent,Room_SELECT);

  protected void start(Intent intent)
         {
                 this.startActivityForResult(intent,Room_SELECT);
         }

         protected void onActivityResult(int requestCode, int resultCode,
  Intent data)
         {
                 System.out.println (requestCode);

                 switch(requestCode)
                 {
                         case Room_SELECT:

                                 System.out.println (resultCode);  //here it
  returns 0
                                  if (resultCode == RESULT_OK)
                                 {
                                         ...
  //Because result code returns 0 therefore this if conditio does not
  execute.
                                 }
                 }

         }

  And here is my other activity which returns result.

  public class RoomList extends ListActivity
  {
  super.onCreate(savedInstanceState);
         Bundle extras = getIntent().getExtras();
         if(extras !=null)
         {
                 value = extras.getString(roomName);
                 sw = getSwitchNameArray(value);
         }
         setListAdapter(new ArrayAdapterString(this,
                 android.R.layout.simple_list_item_multiple_choice,
  sw));
         final ListView listView = getListView();
         listView.setItemsCanFocus(true);
         listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

  listView.setOnItemClickListener(new ListView.OnItemClickListener() {

                        �...@override
                         public void onItemClick(AdapterView? arg0, View
  arg1, int arg2,
                                         long arg3)
                         {
                                 // TODO Auto-generated method stub
                                 System.out.println (User checked boxes);

                                 if (listView.isItemChecked(arg2))
                                 {
                                         System.out.println
  (###+listView.getItemAtPosition(arg2));
                                         room = (String)
  listView.getItemAtPosition(arg2);
                                         selectedRooms.add(room);
                                         System.out.println (Size
  is+selectedRooms.size());

                                 }

                                 else
                                 {
                                         String str = (String)
  listView.getItemAtPosition(arg2);
                                         selectedRooms.remove(str);
                                         System.out.println (Size
  is+selectedRooms.size());
                                 }
                         }

         });

  @Override
         protected void onPause()
     {
         super.onPause();

         System.out.println (User click on back button);

         mySwitches = new String[selectedRooms.size()];
         selectedRooms.toArray(mySwitches);
         int str = mySwitches.length;
         System.out.println (!...@#!@#...@#+str);
         Intent returnIntent = new Intent();
         //returnIntent.putExtra(SelectedSwitches,selectedRooms);
         returnIntent.putExtra(SelectedSwitches, str);
         setResult(RESULT_OK,returnIntent);
         System.out.println (Before calling finish);
         finish();
         System.out.println (After calling finish);
         }

   public String[] getSwitchNameArray(String rn)
     {
  ..returns string array
  }

  I think in resultCode I get 0 because I write
  setResult(RESULT_OK,returnIntent);  inside onPause () method. Or there
  is another problem? I had write that inside onPause bacause in this
  activity I am calculating name of selected items. And I never knows
  when user had finished selecting items. After writing code inside
  onPause I know what item user had selected from list and I can pass
  them to the calling activity.

  I think better approach is to add one button means suppose user click
  on save button then selected item will be sent to the calling
  activity. Want your opinion? where should write code. If it doesn't

Re: [android-developers] Re: resultCode in onActivityResult returns 0

2010-12-22 Thread Kumar Bibek
If you are using a list view, then try onItemClickListener.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Dec 22, 2010 at 4:23 PM, pramod.deore deore.pramo...@gmail.comwrote:

 Hey Bibek Thanks.
  Try this. On a specific event, set the result and just call finish. That
  should do.

 But on what event I call finish? Because here I am just selecting
 items from list. And how should I know that user had finished there
 selection?

 On Dec 22, 3:47 pm, Kumar Bibek coomar@gmail.com wrote:
  YEah,
 
  Why are you calling finish from onPause method?  It will finish you
  application, even when you would not want it to.
 
  Try this. On a specific event, set the result and just call finish. That
  should do.
 
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
 
  On Wed, Dec 22, 2010 at 4:14 PM, pramod.deore deore.pramo...@gmail.com
 wrote:
 
   Hi I have one activity which invoked another activity
 
   roomIntent.putExtra(roomName,roomNM );
   roomIntent.setClass(AddScheduler.this,RoomList.class);
   startActivityForResult(roomIntent,Room_SELECT);
 
   protected void start(Intent intent)
  {
  this.startActivityForResult(intent,Room_SELECT);
  }
 
  protected void onActivityResult(int requestCode, int resultCode,
   Intent data)
  {
  System.out.println (requestCode);
 
  switch(requestCode)
  {
  case Room_SELECT:
 
  System.out.println (resultCode);  //here
 it
   returns 0
   if (resultCode == RESULT_OK)
  {
  ...
   //Because result code returns 0 therefore this if conditio does not
   execute.
  }
  }
 
  }
 
   And here is my other activity which returns result.
 
   public class RoomList extends ListActivity
   {
   super.onCreate(savedInstanceState);
  Bundle extras = getIntent().getExtras();
  if(extras !=null)
  {
  value = extras.getString(roomName);
  sw = getSwitchNameArray(value);
  }
  setListAdapter(new ArrayAdapterString(this,
  android.R.layout.simple_list_item_multiple_choice,
   sw));
  final ListView listView = getListView();
  listView.setItemsCanFocus(true);
  listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
 
   listView.setOnItemClickListener(new ListView.OnItemClickListener() {
 
  @Override
  public void onItemClick(AdapterView? arg0,
 View
   arg1, int arg2,
  long arg3)
  {
  // TODO Auto-generated method stub
  System.out.println (User checked
 boxes);
 
  if (listView.isItemChecked(arg2))
  {
  System.out.println
   (###+listView.getItemAtPosition(arg2));
  room = (String)
   listView.getItemAtPosition(arg2);
  selectedRooms.add(room);
  System.out.println (Size
   is+selectedRooms.size());
 
  }
 
  else
  {
  String str = (String)
   listView.getItemAtPosition(arg2);
  selectedRooms.remove(str);
  System.out.println (Size
   is+selectedRooms.size());
  }
  }
 
  });
 
   @Override
  protected void onPause()
  {
  super.onPause();
 
  System.out.println (User click on back button);
 
  mySwitches = new String[selectedRooms.size()];
  selectedRooms.toArray(mySwitches);
  int str = mySwitches.length;
  System.out.println (!...@#!@#...@#+str);
  Intent returnIntent = new Intent();
  //returnIntent.putExtra(SelectedSwitches,selectedRooms);
  returnIntent.putExtra(SelectedSwitches, str);
  setResult(RESULT_OK,returnIntent);
  System.out.println (Before calling finish);
  finish();
  System.out.println (After calling finish);
  }
 
public String[] getSwitchNameArray(String rn)
  {
   ..returns string array
   }
 
   I think in resultCode I get 0 because I write
   setResult(RESULT_OK,returnIntent);  inside onPause () method. Or there
   is another problem? I had write that inside onPause bacause in this
   activity I am calculating name of selected items. And I never knows
   when user had finished selecting 

[android-developers] Re: resultCode in onActivityResult returns 0

2010-12-22 Thread pramod.deore
In my list view there are checkboxes and  suppose user want to select
multiple items if suppose he select 3 items then? Is that mean code
execute between activities 3 times?

On Dec 22, 3:54 pm, Kumar Bibek coomar@gmail.com wrote:
 If you are using a list view, then try onItemClickListener.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Dec 22, 2010 at 4:23 PM, pramod.deore deore.pramo...@gmail.comwrote:

  Hey Bibek Thanks.
   Try this. On a specific event, set the result and just call finish. That
   should do.

  But on what event I call finish? Because here I am just selecting
  items from list. And how should I know that user had finished there
  selection?

  On Dec 22, 3:47 pm, Kumar Bibek coomar@gmail.com wrote:
   YEah,

   Why are you calling finish from onPause method?  It will finish you
   application, even when you would not want it to.

   Try this. On a specific event, set the result and just call finish. That
   should do.

   Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

   On Wed, Dec 22, 2010 at 4:14 PM, pramod.deore deore.pramo...@gmail.com
  wrote:

Hi I have one activity which invoked another activity

roomIntent.putExtra(roomName,roomNM );
roomIntent.setClass(AddScheduler.this,RoomList.class);
startActivityForResult(roomIntent,Room_SELECT);

protected void start(Intent intent)
       {
               this.startActivityForResult(intent,Room_SELECT);
       }

       protected void onActivityResult(int requestCode, int resultCode,
Intent data)
       {
               System.out.println (requestCode);

               switch(requestCode)
               {
                       case Room_SELECT:

                               System.out.println (resultCode);  //here
  it
returns 0
                                if (resultCode == RESULT_OK)
                               {
                                       ...
//Because result code returns 0 therefore this if conditio does not
execute.
                               }
               }

       }

And here is my other activity which returns result.

public class RoomList extends ListActivity
{
super.onCreate(savedInstanceState);
       Bundle extras = getIntent().getExtras();
       if(extras !=null)
       {
               value = extras.getString(roomName);
               sw = getSwitchNameArray(value);
       }
       setListAdapter(new ArrayAdapterString(this,
               android.R.layout.simple_list_item_multiple_choice,
sw));
       final ListView listView = getListView();
       listView.setItemsCanFocus(true);
       listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

listView.setOnItemClickListener(new ListView.OnItemClickListener() {

                      �...@override
                       public void onItemClick(AdapterView? arg0,
  View
arg1, int arg2,
                                       long arg3)
                       {
                               // TODO Auto-generated method stub
                               System.out.println (User checked
  boxes);

                               if (listView.isItemChecked(arg2))
                               {
                                       System.out.println
(###+listView.getItemAtPosition(arg2));
                                       room = (String)
listView.getItemAtPosition(arg2);
                                       selectedRooms.add(room);
                                       System.out.println (Size
is+selectedRooms.size());

                               }

                               else
                               {
                                       String str = (String)
listView.getItemAtPosition(arg2);
                                       selectedRooms.remove(str);
                                       System.out.println (Size
is+selectedRooms.size());
                               }
                       }

       });

@Override
       protected void onPause()
   {
       super.onPause();

       System.out.println (User click on back button);

       mySwitches = new String[selectedRooms.size()];
       selectedRooms.toArray(mySwitches);
       int str = mySwitches.length;
       System.out.println (!...@#!@#...@#+str);
       Intent returnIntent = new Intent();
       //returnIntent.putExtra(SelectedSwitches,selectedRooms);
       returnIntent.putExtra(SelectedSwitches, str);
       setResult(RESULT_OK,returnIntent);
       System.out.println (Before calling finish);
       finish();
       System.out.println (After calling finish);
       }

 public String[] getSwitchNameArray(String rn)
   {
..returns 

[android-developers] Re: Hudson and application signing

2010-12-22 Thread ezamur
Ok, I solved this one. It was some stupid typo in the pom.xml.

On Dec 22, 8:21 am, ezamur eza...@gmail.com wrote:
 On Dec 22, 8:15 am, ezamur eza...@gmail.com wrote:

  I am aware the debug store is created automatically, but what is
  strange to me is that Hudson is installed on my local machine, the
  same I am using for development.

 I just realized what I wrote. :)
 I meant to say that it is strange to me why Hudson behaves as it does,
 having in mind that it is using all the same thing I am using for
 development.

-- 
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 disable back button..?

2010-12-22 Thread Abhilash baddam
Hi friends,

  Suppose i have an activity which displays a text like
hello..when the user click on back button i don't want
 to work that key instead i want to display a toast which shows back
button not works here . How can we disable that
key programmatically.

Any suggestions please...



Regards,
Abhilash.B

-- 
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 to disable back button..?

2010-12-22 Thread vikram jain
use back.setVisible(false)

On Wed, Dec 22, 2010 at 5:18 PM, Abhilash baddam 
abhilash.androiddevelo...@gmail.com wrote:

 Hi friends,

   Suppose i have an activity which displays a text like
 hello..when the user click on back button i don't want
  to work that key instead i want to display a toast which shows
 back button not works here . How can we disable that
 key programmatically.

 Any suggestions please...



 Regards,
 Abhilash.B

 --
 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] How to disable back button..?

2010-12-22 Thread Kostya Vasilyev

Starting with API level 5, you can override onBackPressed().

For previous API levels, use something like:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
// your code here
return true;
}
return super.onKeyDown(keyCode, event);
}

Whether this is a good idea is another question.

Also note that the user can still use the Home key to leave the activty, 
and you can't override that.


-- Kostya

22.12.2010 14:49, vikram jain ?:

use back.setVisible(false)

On Wed, Dec 22, 2010 at 5:18 PM, Abhilash baddam 
abhilash.androiddevelo...@gmail.com 
mailto:abhilash.androiddevelo...@gmail.com wrote:


Hi friends,

  Suppose i have an activity which displays a text
like hello..when the user click on back button i don't want
 to work that key instead i want to display a toast which
shows back button not works here . How can we disable that
key programmatically.
Any suggestions please...



Regards,
Abhilash.B
-- 
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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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

Re: [android-developers] How to disable back button..?

2010-12-22 Thread Abhilash baddam
Hi vikram,

  Thanks for the reply...what is the variable back there?

On Wed, Dec 22, 2010 at 5:19 PM, vikram jain vikram.jain.ii...@gmail.comwrote:

 use back.setVisible(false)

 On Wed, Dec 22, 2010 at 5:18 PM, Abhilash baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 Hi friends,

   Suppose i have an activity which displays a text like
 hello..when the user click on back button i don't want
  to work that key instead i want to display a toast which shows
 back button not works here . How can we disable that
 key programmatically.

 Any suggestions please...



 Regards,
 Abhilash.B

 --
 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.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] Online Training Sap,Data Warehousing,Testing,Oracle,Microsoft Technologies,SAS @BigClasses

2010-12-22 Thread big class
Knowledge doesn’t comes easily. It comes through cost, efforts and
last of all but not least through a skilled craftsman.
I represent Bigclasses. Bigclasses.com is a global online IT training
company. We offer virtual online training on all major IT Technologies
Like SAP/ Oracle/Data WH/Testing Tools to mention a few.
Bigclasses.com was started by highly experienced industry experts and
our parent company has got more than 7 years of experience in IT
development, IT consulting and corporate training as well. We engage
the trainers, those who are Industry experts and teaching experts.
Bigclasses.com has got renowned experienced trainers in all IT
Technologies.
We provide study materials, ways to sharpen your skills ,help build
self confidence, contact with real time techies  and assistance 24 *7.
I proclaim that the training provided will show you the gateway for
your future i.e grabbing a job will only be a matter of time.
http://informaticaonlinetraining.blogspot.com/
http://onlinetrainingcognos.blogspot.com/
http://datastageonlinetraining.blogspot.com/
http://microstrategyonlinetraining.blogspot.com/
http://teradataonlinetraining.blogspot.com/
http://cognostrainingonline.wordpress.com/2010/08/17/cognos-business-intelligence/
http://informaticaonlinetraining.wordpress.com/2010/08/17/informatica/
http://sapbwbi.wordpress.com/
http://bigclasses9.wordpress.com/2010/12/09/sap-fico-interactive-online-training-at-bigclasses-com/
http://bigclasses9.wordpress.com/2010/12/09/sap-abap-interactive-online-training-at-bigclasses-com/
http://sapficoonlinetraining.wordpress.com/
http://sapbotraining.wordpress.com/
Contact us:
USA: +1 302 525 2655
INDIA: 91-8008114040

-- 
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] Cognos Interactive Online Training at BigClasses.com

2010-12-22 Thread big class
* 100% JOB Oriented Training
* Attend Two FREE Trail Classes
* Affordable FEE with REAL TIME Trainers
Cognos course content:  http://bigclasses.com/cms/data-warehousing/cognos.html

BigClasses.com is a Global Interactive Online Learning Portal started
by Data Warehousing Experts with an aim to provide a Job Oriented
Training on ETL  BI Reporting Tools.

ABOUT OUR FACULTY: We have excellent Cognos instructors, who have
Industry experience  experts in Online Training.

TRAINING HIGHLIGHTS:
1. Interactive Learning at Learners convenience
2. Industry Savvy Trainers
3. Learn Right from Your Place
4. Customized Curriculum
5. Support after Training
A) Resume Preparation
B) Certification Guidance
C) Interview Assistance

Guaranteed Placement Assistance for USA Learners

We have a forthcoming online batch on Cognos

OTHER DATA WAREHOUSING TOOLS OFFERED:
Reporting Tools: Business Objects, OBIEE, MicroStrategy, Hyperion.
ETL Tools : Informatica, Data Stage, BODI, Abinitio.
Other Tools   : MS BI, TeraData, SAS.

OTHER TRAININGS OFFERED:
* SAP
* IBM Mainframes
* Microsoft Technologies
* Testing Tools
Visit: www.bigclasses.com
CONTACTUS:cont...@bigclasses.com
USA: 1-302 525 2655
INDIA: 91-800 811 4040 for Career Advice
Skype ID: Gtalk ID: Yahoo ID: Hotmail ID: bigclasses

-- 
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] DataStage Interactive Online Training at BigClasses.com

2010-12-22 Thread big class
* 100% JOB Oriented Training
* Attend Two FREE Trail Classes
* Affordable FEE with REAL TIME Trainers
DataStage course content:  
http://bigclasses.com/cms/data-warehousing/data-stage.html

BigClasses.com is a Global Interactive Online Learning Portal started
by Data Warehousing Experts with an aim to provide a Job Oriented
Training on ETL  BI Reporting Tools.

ABOUT OUR FACULTY: We have excellent DataStage instructors, who have
Industry experience  experts in Online Training.

TRAINING HIGHLIGHTS:
1. Interactive Learning at Learners convenience
2. Industry Savvy Trainers
3. Learn Right from Your Place
4. Customized Curriculum
5. Support after Training
A) Resume Preparation
B) Certification Guidance
C) Interview Assistance

Guaranteed Placement Assistance for USA Learners

We have a forthcoming online batch on Data Stage

OTHER DATA WAREHOUSING TOOLS OFFERED:
Reporting Tools: Business Objects, OBIEE, MicroStrategy, Hyperion.
ETL Tools : Informatica, Data Stage, BODI, Abinitio.
Other Tools   : MS BI, TeraData, SAS.

OTHER TRAININGS OFFERED:
* SAP
* IBM Mainframes
* Microsoft Technologies
* Testing Tools
Visit: www.bigclasses.com
CONTACTUS:cont...@bigclasses.com
USA: 1-302 525 2655
INDIA: 91-800 811 4040 for Career Advice
Skype ID: Gtalk ID: Yahoo ID: Hotmail ID: bigclasses

-- 
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: What is the structure of the Android PackageManagerService?

2010-12-22 Thread FrankG


 But for that I need to understand how the installation happens, the
 sequence of steps being called.


What Mark and Dianne wanted to point out is that all questions related
to your solution are out of scope of this group.

And that If you are not able to change the firmware for you devise,
you are not able to try it.

Good luck ! Frank

-- 
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 to disable back button..?

2010-12-22 Thread Abhilash baddam
Thanks kostya it's working fine...

On Wed, Dec 22, 2010 at 5:27 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  Starting with API level 5, you can override onBackPressed().

 For previous API levels, use something like:

 @Override
 public boolean onKeyDown(int keyCode, KeyEvent event) {
 if (keyCode == KeyEvent.KEYCODE_BACK) {
 // your code here
 return true;
 }
 return super.onKeyDown(keyCode, event);
 }

 Whether this is a good idea is another question.

 Also note that the user can still use the Home key to leave the activty,
 and you can't override that.

 -- Kostya

 22.12.2010 14:49, vikram jain пишет:

 use back.setVisible(false)

 On Wed, Dec 22, 2010 at 5:18 PM, Abhilash baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 Hi friends,

Suppose i have an activity which displays a text like
 hello..when the user click on back button i don't want
  to work that key instead i want to display a toast which shows
 back button not works here . How can we disable that
 key programmatically.

 Any suggestions please...



  Regards,
 Abhilash.B
 --
 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



 --
 Kostya Vasilyev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.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.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] SAX parsing problem..

2010-12-22 Thread Abhilash baddam
Hi friends,

  I am new to android. Can any one send me the example on sax
parsing. I got the code  but it's clumsy. So please send me the sample on
Sax parsing






Regards,
Abhilash

-- 
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: Prevent an Android Service from getting destroyed after an unbind

2010-12-22 Thread Kalyan Akella
Thank you jotobjects, Kostya  Streets of Boston for your replies. They were 
very helpful while fixing this problem. Here are the 2 important changes I 
made to get it working exactly the way I wanted:

1. Removed the SharedPreferences checks while calling startService() inside 
the activity A. It just calls *startService(intent)*  *bindService(intent, 
this, 0)* inside the *onCreate()* method.
2. Service S is now a plain *android.app.Service* with a handler thread (and 
looper) for doing web-service calls on location changed events (note that S 
is also a *LocationListener*).
3. Introduced a control on the UI which when clicked causes activity A to 
send a certain message to the service S. Subsequently, the service does some 
cleanup and calls *stopSelf()* and gracefully exits.

Thank you all once again for the help.
Sincere Regards,
Kalyan

-- 
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] UnsupportedOperationException: glGenFramebuffersOES

2010-12-22 Thread pedr0
Hi at all,

when I try to use the function glGenFramebuffersOES I meet an
UnsupportedOperationException, I am working with android 2.1 update 1
under a Samsung galaxy S.

These  function aren't supported on these platform or I am wrong
somethings?

This is my code (very simple):

public void onDrawFrame(GL10 gl10) {

GL11 gl= (GL11) gl10;

if(first_step == false){
// distruggo
GLES11Ext.glDeleteFramebuffersOES(1, viewFramebuffer);
GLES11Ext.glDeleteRenderbuffersOES(1, viewRenderbuffer);
}
 // creo
GLES11Ext.glGenFramebuffersOES(1,viewFramebuffer);
[...other stuff.]
}

Thanks a lot.

-- 
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: Encoding/decoding problem

2010-12-22 Thread ZeeZo
I am done with that part Sarwar before my last post.I can successfully
write the JPG image on my sd card.But now problem is that when i
transfer my processed byte[] to my PC through TCP,it writes a whole
black image.I don't know if its some kind of compression issue or
what.

On Dec 22, 5:46 am, Sarwar Erfan erfanonl...@gmail.com wrote:
 Oh, forgot to mention, before you use setPreviewFormat, use
 getSupportedPreviewFormats() method to determine whether your phone camera
 supports ImageFormat.JPEG or 
 not.http://developer.android.com/reference/android/hardware/Camera.Parame...()

 Regards
 Sarwar Erfan

-- 
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] Inputs from the Android Camera

2010-12-22 Thread Marcin Orlowski
On 22 December 2010 04:02, Vikram vikram.bodiche...@gmail.com wrote:
 We want to get some simple information from the user (in the form of
 checkboxes) for a few seconds before he starts using his camera. Can
 we somehow present our checkbox list over his camera app?

 I understand that the Camera is an app in itself and that we cannot
 make changes or add our stuff on its UI, but is there something that I
 am missing somewhere?

Camera app and camera h/w are two different things. You may want
to write your own app that uses camera hardware and add your
own UI elements to it. You can't overlay existing app.

-- 
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 to get new input language in to the android? Who decides which new input languages for an IME should be added?

2010-12-22 Thread Marcin Orlowski
On 22 December 2010 11:29, Lado Kumsiashvili herrl...@gmail.com wrote:
 Hi.
 There are a lot of languages but not georgian in android. But I've
 implemented also this layout for other IME Projects.
 So who decied which new languages could be adopted to the IME of
 android? Do someone has an idea?

Release it on Market then. And if you want to contribute to the OS development
you may try to speak up on the framework ML to discuss this there
.

-- 
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] Game pretty much like mine

2010-12-22 Thread Marcin Orlowski
On 20 December 2010 08:22, brian purgert brianpurge...@gmail.com wrote:
 So yesterday I,m looking around on the app market and I noticed that there
 is a game very similer to the game I've been working on for months now, so
 now im pretty bummed out I thought I would be the first to bring this type
 of game out for android but Im not.

Your lesson then: do the research first.

But from other hand - even competing apps/games exists it still does not
mean much. If your game is better then you attract users anyway
(for example we releeased couple of apps that shared some features
with existing apps - now our apps outnumbered them even 10 times).
So finish your app and release.

-- 
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: Encoding/decoding problem

2010-12-22 Thread Kostya Vasilyev

Sounds like you have your own server, and seems like bug is possibly there.

Modify your Android code to do both: write to the memory card *and* send 
to the server. Then compare the files you get on the phone and on the 
server.


-- Kostya

22.12.2010 16:03, ZeeZo пишет:

I am done with that part Sarwar before my last post.I can successfully
write the JPG image on my sd card.But now problem is that when i
transfer my processed byte[] to my PC through TCP,it writes a whole
black image.I don't know if its some kind of compression issue or
what.

On Dec 22, 5:46 am, Sarwar Erfanerfanonl...@gmail.com  wrote:

Oh, forgot to mention, before you use setPreviewFormat, use
getSupportedPreviewFormats() method to determine whether your phone camera
supports ImageFormat.JPEG or 
not.http://developer.android.com/reference/android/hardware/Camera.Parame...()

Regards
Sarwar Erfan



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Inputs from the Android Camera

2010-12-22 Thread Atik
hi,
so i have downloaded the source of camera app of android.

and finally i need app only it should perform the zoom in out and
brightness bar as implemented in the camera.it should not capture the
image..


can i do the same.. i have done lot of changes in the code and i m
able to do it ..but else all functions are still there in the
app ..like face track,smile mode etc.

pls let me know...thanks


On Dec 22, 6:04 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 22 December 2010 04:02, Vikram vikram.bodiche...@gmail.com wrote:

  We want to get some simple information from the user (in the form of
  checkboxes) for a few seconds before he starts using his camera. Can
  we somehow present our checkbox list over his camera app?

  I understand that the Camera is an app in itself and that we cannot
  make changes or add our stuff on its UI, but is there something that I
  am missing somewhere?

 Camera app and camera h/w are two different things. You may want
 to write your own app that uses camera hardware and add your
 own UI elements to it. You can't overlay existing app.

-- 
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] Offline maps

2010-12-22 Thread Nikola
Hi,

I need a map for my application, so I have few questions (any additional
info is welcome):

1) I saw applications like mTrip for Iphone that are having google maps but
offline,
how is it possible?

2) Is there anything good enough like alternative for google maps?


Thanks.

-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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] Offline maps

2010-12-22 Thread Mark Murphy
On Wed, Dec 22, 2010 at 8:25 AM, Nikola nikola1...@gmail.com wrote:
 1) I saw applications like mTrip for Iphone that are having google maps but
 offline,
 how is it possible?

AFAIK, it's not possible.

 2) Is there anything good enough like alternative for google maps?

Check out OpenStreetMap. I have been using an OSM application called
TravelDroyd for offline maps for Singapore and Dublin.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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


Re: [android-developers] Show Application Version Number with .apk file

2010-12-22 Thread Mark Murphy
That information is available via PackageManager.

On Wed, Dec 22, 2010 at 5:52 AM, subrat kumar panda
evergreen.sub...@gmail.com wrote:
 Hello all,
 i would like to inform you all that i have been facing problem , that's :
 after run the android app, it gives us the ProjectName.apk.

 so, the problem is how could i get ProjectName-1.0/anything else
 depends upon your Project's version.
 if anybody have knowledge about the mentioned problem would be appreciated.

 Thanks  Regards
 Subrat

 --
 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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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


Re: [android-developers] How to Build Modofied launcher source code

2010-12-22 Thread Mark Murphy
If you are referring to the Launcher application from
source.android.com, that can only be built as part of an entire
firmware build. It is not designed to be built as an SDK application.

On Mon, Dec 20, 2010 at 8:21 PM, sri dsriva...@gmail.com wrote:
 Hi,

 As per my requirement i have to modify the Launcher source code.

 I have imported the launcher code in to Eclipse IDE and i could see
 many import errors and variable not found errors.

 Can any body tell me how to build the launcher source code as weel as
 how to build the modified launcher code?

 I have tried digging for information related to this but could not get
 any pointers.

 Can any body help me out in this?

 Thanks in advance for the 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.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] Web Server

2010-12-22 Thread perumal316
Hi All,

Is it possible to host a web server within an Android phone itself?
Similar to Apache. I want to access the web server from the mobile
browser itself.

Couldn't find any reference online. Is this possible?

Thanks In Advance,
Perumal

-- 
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 to include resource files in a static java library?

2010-12-22 Thread Mark Murphy
You cannot have Android resources in a JAR. Use Android library
projects for this:

http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

On Mon, Dec 20, 2010 at 9:18 PM, Feng Qian feng.qian.web...@gmail.com wrote:
 Hi,
 I am using a third-party jar as a prebuilt static java library which has
 some resource files in it.
 I made Android.mk like this:
 LOCAL_MODULE := my-app
 LOCAL_STATIC_JAVA_LIBRARIES := third-party-prebuilt-lib
 include $(BUILD_PACKAGE)
 However, resources from 3rd party jar is not included in the final .apk
 file. I used 'aapt list my-app.apk'.
 On the other hand, the package built by Eclipse seems preserving resources
 from 3rd party jars.
 Does anyone know how to include resources from a static library into the
 final .apk?
 Thanks in advance,
 Feng

 --
 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



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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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


Re: [android-developers] No Activity found to handle Intent for ACTION_DATA_ROAMING_SETTINGS

2010-12-22 Thread Mark Murphy
http://stackoverflow.com/questions/4407818/error-opening-mobile-network-settings-menu

On Tue, Dec 21, 2010 at 3:42 AM, dacky harvey.dac...@gmail.com wrote:
 Hi everyone,

 Can anyone verify if this is some kind of a documentation error?
 ACTION_DATA_ROAMING_SETTINGS seems to appear on the documentation but
 it gives in error when I tried to invoke this menu.

 http://developer.android.com/reference/android/provider/Settings.html

 --
 Intent intentSettings = new Intent();
 intentSettings.setAction(Settings.ACTION_DATA_ROAMING_SETTINGS);
 cont.startActivity(intentSettings);
 ---


 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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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


Re: [android-developers] Web Server

2010-12-22 Thread Mark Murphy
Sure. You need a Java-based Web server (iJetty, NanoHTTPD, etc.), or
possibly a C-based one you can attach to your app via the NDK. Bear in
mind that this will really only be useful on a WiFi LAN, since the
phone will not have a publicly routable Internet address in most (if
not all) cases.

On Wed, Dec 22, 2010 at 8:46 AM, perumal316 perumal...@gmail.com wrote:
 Hi All,

 Is it possible to host a web server within an Android phone itself?
 Similar to Apache. I want to access the web server from the mobile
 browser itself.

 Couldn't find any reference online. Is this possible?

 Thanks In Advance,
 Perumal

 --
 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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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: TextSwitcher and/or TranslateAnimation changed in API level 8 and upwards?

2010-12-22 Thread Leif
Digging a little deeper reveals that there seems to be a difference in
how the textviews are sized (i.e. the children of the TextSwitcher).
On API levels 4-7 the height is 2904 pixels, while on API levels 8 and
9 the height is only 58 pixels.

So, something seems to have happened in terms of how the views are
measured?
Would be very happy if someone from the Google team could comment on
this.

Regards,
Leif


On 22 Dec, 09:30, Leif l...@leifrilbe.com wrote:
 I am using a TextSwitcher and a TranslateAnimation to create a
 slotmachine reel effect.

 It works fine on API levels 4 through 7, but on API levels 8 and 9 it
 breaks down for some reason.

 Any clues as to why this is happening?

 The UI structure is like this:

 FrameLayout-TextSwitcher-TextViews

 Any known changes in TextSwitcher, TextView or TranslateAnimation
 since API level 7?

 Any pointers appreciated!

 Regards,
 Leif

-- 
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: Does someone have a galaxy tab to test my game?

2010-12-22 Thread Damien Cooke
It worked a treat on mine.  Nice game very smooth
On 22/12/2010 4:50 PM, Brill Pappin br...@pappin.ca wrote:

 Just tried it on my gt, no problems at all.
 Its a Rogers GT (Canada).

 - Brill

 On Dec 21, 8:18 pm, ACR acr...@gmail.com wrote:
 Hey Damien,
 Thanks for the quick reply. The game is CandySwipe FREE on the android
 market and the user says they cannot open the game on the device. Thanks
for
 checking this out, it is much appreciated.

 Albert

 On Dec 21, 2010 8:13 PM, Damien Cooke cooke.dam...@gmail.com wrote:

 Yes I have one if you want me to test it for you.

 Damien

 On 22/12/2010, at 10:37 AM, acr wrote:





  Hi,
  My game has been on the market for a week now with no major issues.
  However
  I got an email from 2 people yesterday saying that they are having
  problems with the game on their Samsung Galaxy Tab
  If someone has a Samsung Galaxy Tab and are willing to test this
  for me, please send me a message. I
  don't want to spam the boards.
  It would be greatly appreciated.
  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.comandroid-developers%2bunsubscr...@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%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
cr...@googlegroups.com
 For more options, visit this group athttp://
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%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: Proguard problem after 2.3 update

2010-12-22 Thread licorna
I've tried different setting with no success:

 - I've set PROGUARD_HOME AND proguard.dir (in local.properties) to:
a) proguard included with SDK, b) proguard 4.5 --stable-- c) proguard
4.6 --beta-- both HOME and /lib directories
 - I'm using ant 1.8.1 (ant -version)

After changing proguard.dir to proguard_dir/lib I'm getting another
error: Expecting class path separator ':' before '{' in argument
number 1

I've lost almost an entire day trying to make this work!

Thanks!

On Dec 21, 7:15 pm, Fred Grott(Android Expert, 
http://mobilebytes.wordpress.com)
fred.gr...@gmail.com wrote:
 set PROGUARD_HOME to point to the proguard in your android sdk install..

 I also had to do a manual ant 1.81 install on Ubuntu 10.04.1 Ubuntu 11 will
 have ant 1.8 but Eclipse 3.7 will not have ant 1.81. until the end of the
 beta process...ie May 2011..

 I use a plugin called wickedshell to run ant 1.8.1 from shell in eclipse..

-- 
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] Offline maps

2010-12-22 Thread Nikola
On Wed, Dec 22, 2010 at 2:41 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Wed, Dec 22, 2010 at 8:25 AM, Nikola nikola1...@gmail.com wrote:
  1) I saw applications like mTrip for Iphone that are having google maps
 but
  offline,
  how is it possible?

 AFAIK, it's not possible.

  2) Is there anything good enough like alternative for google maps?

 Check out OpenStreetMap. I have been using an OSM application called
 TravelDroyd for offline maps for Singapore and Dublin.

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

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


Thanks.

-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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 up development environment on windows 7

2010-12-22 Thread gcstang
Is your Windows 7 32 or 64bit?
Ensure you're using the Oracle JDK should be 1.6.0_23 32bit
Not sure installing 64bit will help much either way unless you have a
pretty beefy machine, so I would uninstall the 64bit JDK.
What path did you install the AndroidSDK to?
Did you setup your JAVA_HOME, CLASSPATH and PATH?

What version of Eclipse did you download and install?  There are a few
different versions with different capabilities.
I personally use MyEclipse but Eclipse should work just as well.
When you go here http://www.eclipse.org/downloads/
You should pick :
32 bit
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR1/eclipse-java-helios-SR1-win32.zip

Android SDK : http://dl.google.com/android/installer_r08-windows.exe
Android Plugin (ensure you read the one on Helios) : How to
http://developer.android.com/sdk/eclipse-adt.html#installing

Uninstall your applications first to start with a clean system if you
prefer it might make it easier.

Install the JDK I prefer to install the JDK to c:\java (note no spaces
in path) and you don't have to change references later.
Install the Android SDK (also make sure no spaces in the path you
install it to)
Install Eclipse (ensure no spaces in path something like c:\eclipse)

Once you're this far you will need to start the Android SDK
application SDK Manager.exe, select Settings and checkmark Force
https... then select Available Packages and expand the URL in the
right window select what you need to develop on (i.e. version of the
SDK you want to work with) then once all is selected click on Install
Selected at a minimum you will want :
The version you select i.e. SDK Platform Android 2.2, API 8, revision
2
Documentation for that version
Samples for that version
Google API's for that version
Usb Driver package (latest one)
Market Licensing package (latest one)

Once it's all downloaded you can shutdown the program you opened and
go over to the Eclipse application to start development, you will need
to tell the plugin where the path to your Android SDK folder is in the
preferences but that should be all you need to get started.

Good luck

On Dec 20, 9:45 am, Jay jaygde...@gmail.com wrote:
 Hi all,
 I want to start learning with my Android developement. I have a
 windows 7 Home Premium PC. My problem is I am not able to setup the
 development environment for android. Here is what I have done till
 now.
 1. I have installed Java (both 32 bit and 64 bit versions)
 2. I have installed Android SDK (installer_r08-windows.exe)
 3. I have not yet downloaded any tools or platforms or ADT.
 4. I have downloaded 32 bit eclipse. (eclipse-SDK-3.5.1-win32.zip)
 5. I am stuck at this eclipse setup. A strange thing I observed is
 that, it does not install. When I click on eclipse.exe, it starts
 running from there only. I am still wondering if my eclipse IDE is
 installed properly?
 6. So, I assumed that my eclipse is working fine. Then when I try
 installing new programs in eclipse, eg google plugin, it gives error.

 I want to know, where am I going wrong? What mistakes am I doing?
 Can anyone guide me with the complete step by step procedure to setup
 my android development environment on windows 7?

 Thanks in advance.

 - Jay

-- 
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: Setting up development environment on windows 7

2010-12-22 Thread Kostya Vasilyev

Developing on Win7 64-bit here without any issues.

Using 32-bit Java Dev Kit update 23, with Eclipse Galileo SR2, also 32-bit.

Eclipse Helios 3.6.1 32-bit also worked fine (but had issues with code 
completion freezing, so I went back to 3.5.2).


-- Kostya

22.12.2010 17:37, gcstang пишет:

Is your Windows 7 32 or 64bit?
Ensure you're using the Oracle JDK should be 1.6.0_23 32bit
Not sure installing 64bit will help much either way unless you have a
pretty beefy machine, so I would uninstall the 64bit JDK.
What path did you install the AndroidSDK to?
Did you setup your JAVA_HOME, CLASSPATH and PATH?

What version of Eclipse did you download and install?  There are a few
different versions with different capabilities.
I personally use MyEclipse but Eclipse should work just as well.
When you go here http://www.eclipse.org/downloads/
You should pick :
32 bit
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR1/eclipse-java-helios-SR1-win32.zip

Android SDK : http://dl.google.com/android/installer_r08-windows.exe
Android Plugin (ensure you read the one on Helios) :How to
http://developer.android.com/sdk/eclipse-adt.html#installing

Uninstall your applications first to start with a clean system if you
prefer it might make it easier.

Install the JDK I prefer to install the JDK to c:\java (note no spaces
in path) and you don't have to change references later.
Install the Android SDK (also make sure no spaces in the path you
install it to)
Install Eclipse (ensure no spaces in path something like c:\eclipse)

Once you're this far you will need to start the Android SDK
application SDK Manager.exe, select Settings and checkmark Force
https... then select Available Packages and expand the URL in the
right window select what you need to develop on (i.e. version of the
SDK you want to work with) then once all is selected click on Install
Selected at a minimum you will want :
The version you select i.e. SDK Platform Android 2.2, API 8, revision
2
Documentation for that version
Samples for that version
Google API's for that version
Usb Driver package (latest one)
Market Licensing package (latest one)

Once it's all downloaded you can shutdown the program you opened and
go over to the Eclipse application to start development, you will need
to tell the plugin where the path to your Android SDK folder is in the
preferences but that should be all you need to get started.

Good luck

On Dec 20, 9:45 am, Jayjaygde...@gmail.com  wrote:

Hi all,
I want to start learning with my Android developement. I have a
windows 7 Home Premium PC. My problem is I am not able to setup the
development environment for android. Here is what I have done till
now.
1. I have installed Java (both 32 bit and 64 bit versions)
2. I have installed Android SDK (installer_r08-windows.exe)
3. I have not yet downloaded any tools or platforms or ADT.
4. I have downloaded 32 bit eclipse. (eclipse-SDK-3.5.1-win32.zip)
5. I am stuck at this eclipse setup. A strange thing I observed is
that, it does not install. When I click on eclipse.exe, it starts
running from there only. I am still wondering if my eclipse IDE is
installed properly?
6. So, I assumed that my eclipse is working fine. Then when I try
installing new programs in eclipse, eg google plugin, it gives error.

I want to know, where am I going wrong? What mistakes am I doing?
Can anyone guide me with the complete step by step procedure to setup
my android development environment on windows 7?

Thanks in advance.

- Jay



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Anybody seen a slowdown in sales?

2010-12-22 Thread Sam
Hi everyone

The slow down is not related to the market ranking, my app has not
moved market ranking. I have seen sales drop from 15-20 per day to 3-4
per day. The app actually had more publicity in december than any
month previously.

The obvious changes are the market app changes - has something in the
new layout reduced sales dramatically - well i am sure Google know -
or should be looking into it.

For example moving the buy button from the bottom to top of the app
screen? now it seems to stand out less, and if you scroll down reading
about the app you end up at a dead end - no buy button.

regards

Sam



On Dec 22, 1:13 pm, Spiral123 cumis...@gmail.com wrote:
 Yeseveryone in Korea who has ever written an App appears to have
 released it to every market in the world.

 I would much prefer if Google actually nominated Local Language(s) for
 each Market and Automatically dumped all Apps not Localized to those
 languages into a new 'Foreign Language' category.

 Apart from helping to clear out the crud, it would encourage
 developers like myself to stop tinkering around and do some proper
 Localizations for non-English Markets.

 On Dec 21, 8:08 pm, Zsolt Vasvari zvasv...@gmail.com wrote:







  In the Finance category where my app is, if I look at the Free apps, a
  lot of the top ones are Korean banking/stock apps, which no doubt come
  preinstalled on phones in Korea.

  I don't understand why the market doesn't filter by language for app
  names, when it does for comments.

  On Dec 22, 3:15 am, niko20 nikolatesl...@yahoo.com wrote:

   I think the market ranking are more accurate now. My app, which has
   over 20,000 downloads and a 4.6 rating, should certainly be higher
   than an app that has only 1000-5000 downloads and a 4.0 rating. I
   think they previously have too much emphasis on active installs.
   Looks like it's fixed now, and for the better in my opinion.

   -nik

   On Dec 20, 12:33 am, Mark Carter mjc1...@googlemail.com wrote:

Indeed I am painfully aware of this and have written in countless forums
about it over the past couple of years!

Country I am living in dictates which Country sim card I use in 
order to
have mobile broadband without paying huge roaming costs. Switching sim 
cards
requires me to pop down to some nearby cafe to make use of their wifi 
and
then access the Market for paid apps (or free apps unavailable in 
obscure
countries - eBay, YouTube?).

How I love the sim card rule :(

On 20 December 2010 14:24, Zsolt Vasvari zvasv...@gmail.com wrote:

 On Dec 20, 2:16 pm, Mark Carter mjc1...@googlemail.com wrote:
  Right now, I'm
  unable to check its ranking on the Android Market app thanks to 
  being in
 a
  non-paid app country :(

 You know that it's the SIM card that determines if you can see the
 paid apps, not your physical location.

 I have to do this as I live in Singapore and I cannot see some apps,
 such as e-Bay (why, why?) and if I want to update it, I need to swap
 in my (non-working) T-Mobile USA SIM card

 --
 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-Hidequoted 
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] Re: Setting up development environment on windows 7

2010-12-22 Thread bagelboy
I'm using windows 7 64 bit and although it wasn't 100% straighforward
there are no dealbreakers. I'm using 64 bit java and it works fine
although my java_home is c:\glassfishv3\jdk. Eclipse doesn't install
anywhere, you simply run the executable from wherever it's unzipped,
so put it in program files(x86) and put in a shortcut.



On Dec 20, 3:45 pm, Jay jaygde...@gmail.com wrote:
 Hi all,
 I want to start learning with my Android developement. I have a
 windows 7 Home Premium PC. My problem is I am not able to setup the
 development environment for android. Here is what I have done till
 now.
 1. I have installed Java (both 32 bit and 64 bit versions)
 2. I have installed Android SDK (installer_r08-windows.exe)
 3. I have not yet downloaded any tools or platforms or ADT.
 4. I have downloaded 32 bit eclipse. (eclipse-SDK-3.5.1-win32.zip)
 5. I am stuck at this eclipse setup. A strange thing I observed is
 that, it does not install. When I click on eclipse.exe, it starts
 running from there only. I am still wondering if my eclipse IDE is
 installed properly?
 6. So, I assumed that my eclipse is working fine. Then when I try
 installing new programs in eclipse, eg google plugin, it gives error.

 I want to know, where am I going wrong? What mistakes am I doing?
 Can anyone guide me with the complete step by step procedure to setup
 my android development environment on windows 7?

 Thanks in advance.

 - Jay

-- 
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] Thread problems

2010-12-22 Thread Schoel
I have a function call from a large engine (which I can not change)
which asks the user whether to save or not. Before this function call
returns, I need an answer from the user whether to save.

There is, as far as I know, no way to start an activity (or show a
dialog) that synchronously returns an answer. Therefore I did like
this (code is not complete but should be enough for understanding):

int queryUserSave()
{
   s_Semaphore.acquire();
   startActivity(QueryUserSaveActivity);
   s_Semaphore.acquire();
   s_Semaphore.release();
   return s_nQueryUserSaveResult;
}

void onQueryUserSaveResult(int aResult)
{
   s_nQueryDialingLineResult = aResult;
   s_Semaphore.release();
}


The problem is, on the second acquire, the program halts (as intended)
without spawning the QueryUserSaveActivity (not as intended). The idea
was that the QueryUserSaveActivity would be spawned and the second
acquire would block until onQueryUserSaveResult is called.
I've checked the thread id of the thread in which queryUserSave is
called and the thread id in which the QueryUserSaveActivity is started
(if I don't use any semaphores) and they are not the same. I thus
conclude that startActivity starts the activity in another thread (the
UI thread) and therefore shouldn't care about the second acquire call.
I also tried setting the startActivity in its own thread and start
that thread with the same result as above.
Do you have any ideas what I can do to solve this?

Appriciate any help,
Schoel

-- 
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] Internal refresh of app

2010-12-22 Thread Leon Moreyn-Android Development
So I am working on an app that is memory intensive. Currently I can
only go back and forth 18 times before my cause a critical memory
crash. I have tried putting in onStop and onPause and releases onBack.
Instead of releasing Process and threads, is there a way to quietly
reset the app in memory without shutting the app down and completely
restarting live on the screen, ie not make it look like a reboot.

-- 
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: Proguard problem after 2.3 update

2010-12-22 Thread licorna
Is there any way to disable this functionality. I just want to keep working 
so I think I will disable proguard for now.

-- 
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: Encoding/decoding problem

2010-12-22 Thread ZeeZo
Hi Kostya,
To be honest,i was waiting for your reply.I have seen a lot of your
replies here related to data sending on network.Actually,my scenario
is that i am making my HTC desire as server and my PC as client.I
start my camera on HTC desire and then gets frames in the form of
byte[] from on onPreviewFrame method.

Now after some processing on this byte[],i write that processed byte[]
on two streams.
1-On file stream to write that on my SD card as JPG image and it
creates very fine image.
2.I am sending  the same byte[] through TCP to my PC and writing that
byte array as JPG file.But it create a whole black image.When i open
both of these images,i mean one from sd card and one from my PC.Only
first 40 bytes are same and then rest are totally
different.Moreover,there is more data on JPG file which i have written
on sd card than the one that i received on my PC.

One other thing that i guess i must mention is that,if i read already
written image on my SD and send that image from my HTC desire to my PC
through TCP.It works just perfect.Thing is i dont want to write that
image before on my SD card and then send to my PC.I want to send that
image directly to mY PC.

Oh one more fact,If i do all the above process with by half of my
byte[](offcourse it will not create a valid image),then instead of
just 40 byte,the whole data is same at both end.I mean on  SD card and
on my PC.Yeah both are whole black but atleast they have same data.

Please help.i am just stuck into this.I can post my code here if you
want.

best regards,
ZZ

On Dec 22, 2:13 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Sounds like you have your own server, and seems like bug is possibly there.

 Modify your Android code to do both: write to the memory card *and* send
 to the server. Then compare the files you get on the phone and on the
 server.

 -- Kostya

 22.12.2010 16:03, ZeeZo пишет:

  I am done with that part Sarwar before my last post.I can successfully
  write the JPG image on my sd card.But now problem is that when i
  transfer my processed byte[] to my PC through TCP,it writes a whole
  black image.I don't know if its some kind of compression issue or
  what.

  On Dec 22, 5:46 am, Sarwar Erfanerfanonl...@gmail.com  wrote:
  Oh, forgot to mention, before you use setPreviewFormat, use
  getSupportedPreviewFormats() method to determine whether your phone camera
  supports ImageFormat.JPEG or 
  not.http://developer.android.com/reference/android/hardware/Camera.Parame...()

  Regards
  Sarwar Erfan

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: rawQuery selection args?

2010-12-22 Thread Bob Kerns
go through this?.  You mean, you'd rather go through the process of
constructing SQL by hand, including handing all the quoting rules?

How about It makes your code smaller, easier to read, and more easily
inspected for correctness?

This is a bit of basic SQL usage best practice that unfortunately all
too many people ignore. It's of sufficient value and importance that,
were I in an environment which LACKED this sort of parameterization --
I would implement it before proceeding further.

If you are dynamically constructing a SQL query yourself, you are
ALMOST certainly doing something wrong. There are exceptions, but any
time you find yourself doing string concatenation to produce a SQL
query, it's worth stopping and seeing if you can use parameters, or
avoid the problem with modifications to the schema. The VAST majority
of cases I've found in other people's code, or in writing my own, have
been avoidable.

And in the cases where it's not been avoidable -- constructed join or
filter criteria, for example -- the actual data is still ALWAYS
supplied via a parameter, without exception.

There would be no such thing as a SQL injection hack were this rule
followed consistently.

On Dec 21, 11:46 am, Tobiah t...@tobiah.org wrote:
 On 12/21/2010 11:38 AM, Mark Murphy wrote:

  String[] args={somebaldingguy};
  rawQuery(SELECT _id, title FROM books WHERE author=?, args);

  The string array elements replace the question mark placeholders.
  SQLite handles quotation rules for strings for you, so you do not have
  to worry about embedded quotes or apostrophes.

 Oh I see, so that would eliminate any worries of say, sql injection
 attack right off?  Is there any other reason that one would go
 through this?  Any performance gain, etc?

 Thanks,

 Tobiah

-- 
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: rawQuery selection args?

2010-12-22 Thread Bob Kerns
It should defend against Bobby's mom just fine. If not, it's broken.

On Dec 21, 11:50 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Dec 21, 2010 at 2:46 PM, Tobiah t...@tobiah.org wrote:
  Oh I see, so that would eliminate any worries of say, sql injection
  attack right off?

 I doubt it defends against little Bobby Tables scenarios, though I
 have not tried it.

 http://xkcd.com/327/

 That being said, SQL injection would seem unlikely to be a problem in
 a mobile app, simply because the data they would attack would be their
 own.

  Is there any other reason that one would go
  through this?  Any performance gain, etc?

 Convenience. Beats doing the string concatenation and
 apostrophe-escaping yourself.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 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] Providing EXTRA_AUTHORITIES when showing the ACTION_ADD_ACCOUNTS in order to show restricted account types to the user.

2010-12-22 Thread Tejas
The description for EXTRA_AUTHORITIES in android.provider.Settings
says :

This can be passed as an extra field in an Activity Intent with one
or more syncable content provider's authorities as a String[]. This
field is used by some intents to alter the behavior of the called
activity.

Example: The ACTION_ADD_ACCOUNT intent restricts the account types
available based on the authority given.

I want to show only the Corporate account type (or the activesync) to
the user. I'm unable to find what String constants need to be passed
as EXTRA_AUTHORITIES for this.

Can anyone point me to account type strings ? Or, provide an example
of restrictively launching the add accounts page ?

-- 
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] icons graphics in android app

2010-12-22 Thread crem
Hi, I have a question:
What is the common approach when using icons in an android app
(buttons, etc...) ?
Android offers these hdpi, ldpi and mdpi folders for images in
different resolutions. How good does this work for all different
displays?
Or is it more common to create the icons programmatically as
vectorgraphics? If yes: can you suggest any turorials regarding this
topic?

greets

-- 
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] icons graphics in android app

2010-12-22 Thread Kostya Vasilyev
It works very well. Image resources are packaged as PNG files, lossless 
compression.


Some useful links:

http://developer.android.com/guide/practices/ui_guidelines/icon_design.html

http://developer.android.com/guide/practices/screens_support.html

http://developer.android.com/guide/topics/resources/drawable-resource.html#NinePatch

It shouldn't be necessary to create icons from code, as there are only 
several fixed pre-defined resolutions, and hence, icon sizes (when 
expressed in pixels).


However, I find it useful to use vector-based (as opposed to raster 
based) drawing tools in Photoshop when creating my [very limited] artwork.


-- Kostya

22.12.2010 19:26, crem пишет:

Hi, I have a question:
What is the common approach when using icons in an android app
(buttons, etc...) ?
Android offers these hdpi, ldpi and mdpi folders for images in
different resolutions. How good does this work for all different
displays?
Or is it more common to create the icons programmatically as
vectorgraphics? If yes: can you suggest any turorials regarding this
topic?

greets




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Custom View with Children Implemented onGestureListener

2010-12-22 Thread argon gold
Hi,

I have a custom View with Children and it has also implemented
OnGestureListener. In custom view class I have also overridden
onSingleTapUp() function as below.

@Override
public boolean onSingleTapUp(MotionEvent e) {
// TODO Auto-generated method stub
return false;
}


 How I will Intercept this Tap action from my MAIN ACTIVITY class when I tap
on any child of custom view?
Thanks in advance for your explanation. Please give some example or pointer.

argongold

-- 
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] InetAddress and the isReachable method

2010-12-22 Thread clarkbriancarl
Hello,

A few years ago, I developed a free server monitor (bMonitor) that has
ping, port, and http(s) monitor capabilities. It has required very
little maintenance to keep up with the rapidly evolving Android OS.

However, in the last several months I have noticed more and more users
are complaining that ping does not work for them. I think I have
finally tracked this down to the isReachable method of the InetAddress
class. It literally seems to work sometime and not others.

More research on the isReachable method revealed that it first tries
to use the ICMP ECHO request, and if that fails tries the much slower
TCP version of ECHO.

More recently, I have found that the only way I can get isReachable to
work is using the loopback address as the host. Every time I try to
ping an external host, it fails. I have even tried putting a very long
time out (greater than 1 min) as the input parameter.

_blnStatus = InetAddress.getByName(localhost).isReachable(2);


The above line of code has worked for as long as I can remember. It
now seems, it fails more often than not.

I have also read that ping requires root access. However, I have a
terminal emulator installed on my phone that is NOT rooted, and ping
does work from it.

So, I guess I have several questions.


1) Has anybody else been experiencing the same problem?

2) Has something changed in the API to cause this?

3) Is it possible to run ping from my application, or do I need to
implement a custom ping routine?


Thank you in advance for any help on this perplexing problem.

-- 
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] OOP objects + complex view

2010-12-22 Thread sisko
Hi guys,

I am developing an app that need to display information on the stock
of a store. Each activity will have upto 100 items.

My plan is to layout this information in a 10 * 10 grid. Each box in
the grid represents an item of stock. Each of these items will be
represented by an icon and a piece of text beneath the icon (the
name). I setup a new layout which has an ImageView and a TextView for
this. I called the layout Tab.xml

So, I need to know if it is possible to write a java class which will
use the Tab.xml as the layout.
Then I can programmatically create each java class item, setting the
image and text as I go along.

Can anyone please give me some direction about this?

-- 
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] OpenGL Problem with Sphere Texture Mapping

2010-12-22 Thread pedr0
Please see the link and reply inside  this post if you have not an
account on OpenGL forum, the question is over there.

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatNumber=288188#Post288188


Thanks a lot.

-- 
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] OOP objects + complex view

2010-12-22 Thread Kostya Vasilyev

Sure, that's possible:

http://developer.android.com/reference/android/view/LayoutInflater.html#inflate(int, 
android.view.ViewGroup)


You'd also need a way to position these views. You could use a 
TableLayout, instantiating TableRows from code as needed, and adding 
inflated (as per the above link) layouts representing table cells to 
table rows.


Or you could just use a class that does that for you:

http://developer.android.com/reference/android/widget/GridView.html

-- Kostya

22.12.2010 20:08, sisko пишет:

Hi guys,

I am developing an app that need to display information on the stock
of a store. Each activity will have upto 100 items.

My plan is to layout this information in a 10 * 10 grid. Each box in
the grid represents an item of stock. Each of these items will be
represented by an icon and a piece of text beneath the icon (the
name). I setup a new layout which has an ImageView and a TextView for
this. I called the layout Tab.xml

So, I need to know if it is possible to write a java class which will
use the Tab.xml as the layout.
Then I can programmatically create each java class item, setting the
image and text as I go along.

Can anyone please give me some direction about this?




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Internal refresh of app

2010-12-22 Thread Dianne Hackborn
You are almost certainly leaking memory.  You need to fix the leaks.  There
are some blog posts and discussions on this list about fixing leaks.

On Wed, Dec 22, 2010 at 7:16 AM, Leon Moreyn-Android Development 
lmor...@earthcam.com wrote:

 So I am working on an app that is memory intensive. Currently I can
 only go back and forth 18 times before my cause a critical memory
 crash. I have tried putting in onStop and onPause and releases onBack.
 Instead of releasing Process and threads, is there a way to quietly
 reset the app in memory without shutting the app down and completely
 restarting live on the screen, ie not make it look like a reboot.

 --
 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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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] How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik
hi
In the gallery I have added my Item to the share menu. But i can only
get one image and making my Activity start. This code give me the URL
for one image. Is it possible to set up the Gallery or the share menu
so that user can select one or many pictures?

if (Intent.ACTION_SEND.equals(action))
{ if extras.containsKey(Intent.EXTRA_STREAM))
{ Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM); 
//path
to image
Toast toast = Toast.makeText(this, path: +
getRealPathFromURI(uri),
Toast.LENGTH_SHORT); toast.show();
return;
} else if
(extras.containsKey(Intent.EXTRA_TEXT)) {
}

} public String getRealPathFromURI(Uri contentUri) { String[] proj =
{
MediaStore.Images.Media.DATA }; Cursor cursor =
managedQuery(contentUri,
proj, null, null, null); int column_index =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst(); return cursor.getString(column_index);
}

intent-filter
action android:name=android.intent.action.SEND /
category 
android:name=android.intent.category.DEFAULT /

data android:mimeType=image/* /
/intent-filter

-- 
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] Thread problems

2010-12-22 Thread Dianne Hackborn
startActivity() always runs the activity on the main thread.

How about just looking at your app in the debugging to see where the threads
are stuck?

On Wed, Dec 22, 2010 at 7:11 AM, Schoel samuelsson.j...@gmail.com wrote:

 I have a function call from a large engine (which I can not change)
 which asks the user whether to save or not. Before this function call
 returns, I need an answer from the user whether to save.

 There is, as far as I know, no way to start an activity (or show a
 dialog) that synchronously returns an answer. Therefore I did like
 this (code is not complete but should be enough for understanding):

 int queryUserSave()
 {
   s_Semaphore.acquire();
   startActivity(QueryUserSaveActivity);
   s_Semaphore.acquire();
   s_Semaphore.release();
   return s_nQueryUserSaveResult;
 }

 void onQueryUserSaveResult(int aResult)
 {
   s_nQueryDialingLineResult = aResult;
   s_Semaphore.release();
 }


 The problem is, on the second acquire, the program halts (as intended)
 without spawning the QueryUserSaveActivity (not as intended). The idea
 was that the QueryUserSaveActivity would be spawned and the second
 acquire would block until onQueryUserSaveResult is called.
 I've checked the thread id of the thread in which queryUserSave is
 called and the thread id in which the QueryUserSaveActivity is started
 (if I don't use any semaphores) and they are not the same. I thus
 conclude that startActivity starts the activity in another thread (the
 UI thread) and therefore shouldn't care about the second acquire call.
 I also tried setting the startActivity in its own thread and start
 that thread with the same result as above.
 Do you have any ideas what I can do to solve this?

 Appriciate any help,
 Schoel

 --
 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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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] How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik
hi
In the gallery I have added my Item to the share menu. But i can only
get one image and making my Activity start. This code give me the URL
for one image. Is it possible to set up the Gallery or the share menu
so that user can select one or many pictures?

if (Intent.ACTION_SEND.equals(action))
   { if extras.containsKey(Intent.EXTRA_STREAM))
   { Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
  Toast toast = Toast.makeText(this, path:
+getRealPathFromURI(uri),
  Toast.LENGTH_SHORT); toast.show();
  return;
   } else if
   (extras.containsKey(Intent.EXTRA_TEXT)) {
   }

 }

public String getRealPathFromURI(Uri contentUri) { String[] proj =
{
   MediaStore.Images.Media.DATA };
   Cursor cursor = managedQuery(contentUri,proj, null, null, null);
   int column_index =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
   cursor.moveToFirst();
   return cursor.getString(column_index);
}

   intent-filter
 action android:name=android.intent.action.SEND /
 category android:name=android.intent.category.DEFAULT /
 data android:mimeType=image/* /
   /intent-filter

-- 
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: uninstall command is undocumented for ADB

2010-12-22 Thread andrew_esh
adb help gives:

 adb uninstall [-k] package - remove this app package from the
device
('-k' means keep the data and cache
directories)

-- 
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] Thread problems

2010-12-22 Thread Kostya Vasilyev

Just to add my two cents:

You didn't include information on what s_Semaphore is, but I'm guessing 
it's from java.concurrent.


Although I'm not too familiar with this package, the docs say this:

http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Semaphore.html

Conceptually, a semaphore maintains a set of permits. Each acquire() 
blocks if necessary until a permit is available, and then takes it.


If you constructed the semaphore with 1 for permits, then what you 
are seeing is as designed - the semaphore will block on second acquire. 
It's not reentrant, the way synchronized blocks are (which can be owned 
multiple times by the same thread).


You can verify this with a simple test:


try {
Semaphore sem = new Semaphore(1);
Log.i(TAG, Semaphore constructed);
sem.acquire();
Log.i(TAG, Semaphore acquired once);
sem.acquire();
Log.i(TAG, Semaphore acquired again);
} catch (InterruptedException x) {
Log.e(TAG, Semaphore interrupted: , x);
}


The test above will block on second acquire, and that is correct 
behavior, since the semaphore's permit count is 1.


Compare this with synchronized keyword:


synchronized (this) {
Log.i(TAG, This is synchronized block 1);
synchronized (this) {
Log.i(TAG, This is synchronized block 2);
}
}


The above will execute both blocks.

A few ways to fix the problem:

- Use a CyclicBarrier instead of a Semaphore.

- Rewrite the code using only the language's built-in synchronization 
syntax:


int queryUserSave()
{
  // start the activity, then
synchronized(this) { wait();  }
return s_nQueryUserSaveResult;
}

void onQueryUserSaveResult(int aResult)
{
synchronized (this) {
  s_nQueryDialingLineResult = aResult;
  notify();
}
}

-- Kostya

22.12.2010 20:58, Dianne Hackborn ?:

startActivity() always runs the activity on the main thread.

How about just looking at your app in the debugging to see where the 
threads are stuck?


On Wed, Dec 22, 2010 at 7:11 AM, Schoel samuelsson.j...@gmail.com 
mailto:samuelsson.j...@gmail.com wrote:


I have a function call from a large engine (which I can not change)
which asks the user whether to save or not. Before this function call
returns, I need an answer from the user whether to save.

There is, as far as I know, no way to start an activity (or show a
dialog) that synchronously returns an answer. Therefore I did like
this (code is not complete but should be enough for understanding):

int queryUserSave()
{
  s_Semaphore.acquire();
  startActivity(QueryUserSaveActivity);
  s_Semaphore.acquire();
  s_Semaphore.release();
  return s_nQueryUserSaveResult;
}

void onQueryUserSaveResult(int aResult)
{
  s_nQueryDialingLineResult = aResult;
  s_Semaphore.release();
}


The problem is, on the second acquire, the program halts (as intended)
without spawning the QueryUserSaveActivity (not as intended). The idea
was that the QueryUserSaveActivity would be spawned and the second
acquire would block until onQueryUserSaveResult is called.
I've checked the thread id of the thread in which queryUserSave is
called and the thread id in which the QueryUserSaveActivity is started
(if I don't use any semaphores) and they are not the same. I thus
conclude that startActivity starts the activity in another thread (the
UI thread) and therefore shouldn't care about the second acquire call.
I also tried setting the startActivity in its own thread and start
that thread with the same result as above.
Do you have any ideas what I can do to solve this?

Appriciate any help,
Schoel

--
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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




--
Dianne Hackborn
Android framework engineer
hack...@android.com mailto:hack...@android.com

Note: please don't send private questions to me, as I don't have time 
to provide private support, and so won't reply to such e-mails.  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

[android-developers] Bitmap Matrix Rotate

2010-12-22 Thread nirm
Hello,

I have a bitmap that i want it to rotate all the time.
This bitmap is placed in a SurfaceView.
My question is: Do i have to create the bitmap every time i want it to
rotate?

here is my code it is placed is the on draw method:

leftMatrix.setRotate(degrees++, coords.getX()+bitmap.getWidth()/2,
coords.getY());

graphic.setBitmap(Bitmap.createBitmap(bitmap, 0, 0,
bitmap.getWidth(), bitmap.getHeight(), leftMatrix, false));
canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null);

Kind Regards
Nir

-- 
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] Thread problems

2010-12-22 Thread Kostya Vasilyev
Oh, and one more thing: the activity not getting displayed likely has 
something to do with the thread going into a wait state right after you 
call startActivity.


Since the call to queryUserSave comes from background thread (as I 
understand from your email), you could use runOnUIThread() with a 
runnable that in turn calls startActivity, just to make sure that the 
flow of starting the activity is not blocked.


-- Kostya

22.12.2010 20:58, Dianne Hackborn ?:

startActivity() always runs the activity on the main thread.

How about just looking at your app in the debugging to see where the 
threads are stuck?


On Wed, Dec 22, 2010 at 7:11 AM, Schoel samuelsson.j...@gmail.com 
mailto:samuelsson.j...@gmail.com wrote:


I have a function call from a large engine (which I can not change)
which asks the user whether to save or not. Before this function call
returns, I need an answer from the user whether to save.

There is, as far as I know, no way to start an activity (or show a
dialog) that synchronously returns an answer. Therefore I did like
this (code is not complete but should be enough for understanding):

int queryUserSave()
{
  s_Semaphore.acquire();
  startActivity(QueryUserSaveActivity);
  s_Semaphore.acquire();
  s_Semaphore.release();
  return s_nQueryUserSaveResult;
}

void onQueryUserSaveResult(int aResult)
{
  s_nQueryDialingLineResult = aResult;
  s_Semaphore.release();
}


The problem is, on the second acquire, the program halts (as intended)
without spawning the QueryUserSaveActivity (not as intended). The idea
was that the QueryUserSaveActivity would be spawned and the second
acquire would block until onQueryUserSaveResult is called.
I've checked the thread id of the thread in which queryUserSave is
called and the thread id in which the QueryUserSaveActivity is started
(if I don't use any semaphores) and they are not the same. I thus
conclude that startActivity starts the activity in another thread (the
UI thread) and therefore shouldn't care about the second acquire call.
I also tried setting the startActivity in its own thread and start
that thread with the same result as above.
Do you have any ideas what I can do to solve this?

Appriciate any help,
Schoel

--
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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




--
Dianne Hackborn
Android framework engineer
hack...@android.com mailto:hack...@android.com

Note: please don't send private questions to me, as I don't have time 
to provide private support, and so won't reply to such e-mails.  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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Internal refresh of app

2010-12-22 Thread Leon Moreyn-Android Development
ok. Would there be a way to track memory to determine where the leak
is coming from?

On Dec 22, 12:34 pm, Dianne Hackborn hack...@android.com wrote:
 You are almost certainly leaking memory.  You need to fix the leaks.  There
 are some blog posts and discussions on this list about fixing leaks.

 On Wed, Dec 22, 2010 at 7:16 AM, Leon Moreyn-Android Development 





 lmor...@earthcam.com wrote:
  So I am working on an app that is memory intensive. Currently I can
  only go back and forth 18 times before my cause a critical memory
  crash. I have tried putting in onStop and onPause and releases onBack.
  Instead of releasing Process and threads, is there a way to quietly
  reset the app in memory without shutting the app down and completely
  restarting live on the screen, ie not make it look like a reboot.

  --
  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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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] Re: Bitmap Matrix Rotate

2010-12-22 Thread Robert Green
No.  Load it once and reuse it, otherwise you will suffer some nasty
performance.

On Dec 22, 10:35 am, nirm nirmi...@gmail.com wrote:
 Hello,

 I have a bitmap that i want it to rotate all the time.
 This bitmap is placed in a SurfaceView.
 My question is: Do i have to create the bitmap every time i want it to
 rotate?

 here is my code it is placed is the on draw method:

 leftMatrix.setRotate(degrees++, coords.getX()+bitmap.getWidth()/2,
 coords.getY());

                 graphic.setBitmap(Bitmap.createBitmap(bitmap, 0, 0,
 bitmap.getWidth(), bitmap.getHeight(), leftMatrix, false));
 canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null);

 Kind Regards
 Nir

-- 
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: Internal refresh of app

2010-12-22 Thread Mark Murphy
On Wed, Dec 22, 2010 at 1:44 PM, Leon Moreyn-Android Development
lmor...@earthcam.com wrote:
 ok. Would there be a way to track memory to determine where the leak
 is coming from?

Use DDMS's track-allocations feature, or use DDMS to dump the heap to
an HPROF file for analysis with Eclipse MAT.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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


Re: [android-developers] Thread problems

2010-12-22 Thread Mark Murphy
On Wed, Dec 22, 2010 at 10:11 AM, Schoel samuelsson.j...@gmail.com wrote:
 I have a function call from a large engine (which I can not change)
 which asks the user whether to save or not. Before this function call
 returns, I need an answer from the user whether to save.

Ask the save/no-save question before doing whatever causes the large
engine to call your callback.

 There is, as far as I know, no way to start an activity (or show a
 dialog) that synchronously returns an answer.

Correct.

 The problem is, on the second acquire, the program halts (as intended)
 without spawning the QueryUserSaveActivity (not as intended).

Correct. Not only does the other activity run on the main application
thread (which you are blocking), but startActivity() does not even
being doing anything until after current callback returns.

 Do you have any ideas what I can do to solve this?

Ask the save/no-save question before doing whatever causes the large
engine to call your callback. Or, always say yes, save, please,
perhaps handling the no-save scenario yourself (e.g., make a backup of
the data file first and roll it back later).

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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


Re: [android-developers] How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Mark Murphy
ACTION_SEND only supports sending one item.

On Wed, Dec 22, 2010 at 12:45 PM, Hans-Erik erikswed...@gmail.com wrote:
 hi
 In the gallery I have added my Item to the share menu. But i can only
 get one image and making my Activity start. This code give me the URL
 for one image. Is it possible to set up the Gallery or the share menu
 so that user can select one or many pictures?

 if (Intent.ACTION_SEND.equals(action))
        { if extras.containsKey(Intent.EXTRA_STREAM))
                { Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM); 
 //path
 to image
                                Toast toast = Toast.makeText(this, path: +
 getRealPathFromURI(uri),
                                Toast.LENGTH_SHORT); toast.show();
                                return;
                } else if
                        (extras.containsKey(Intent.EXTRA_TEXT)) {
 }

 } public String getRealPathFromURI(Uri contentUri) { String[] proj =
 {
                MediaStore.Images.Media.DATA }; Cursor cursor =
 managedQuery(contentUri,
                proj, null, null, null); int column_index =
                cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
                cursor.moveToFirst(); return cursor.getString(column_index);
 }

                intent-filter
                        action android:name=android.intent.action.SEND /
                        category 
 android:name=android.intent.category.DEFAULT /

                    data android:mimeType=image/* /
                /intent-filter

 --
 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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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: How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik

On 22 Dec, 20:17, Mark Murphy mmur...@commonsware.com wrote:
 ACTION_SEND only supports sending one item.

Thanks for your reply
Do you know any other way to do this?
My Activity is dormant and awaken by the user selecting images.
There has to be another way to do this right?

-- 
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: OpenGL Problem with Sphere Texture Mapping

2010-12-22 Thread Robert Green
pedro,

your problem has nothing to do with android.  I think you may need a
3D refresher to solve it.  Normals are not UVs.  Your UVs will depend
on how you want to map, but the easiest way to do it is to map from
the sphere center out using angles, like this.  Since GL has 2D
texture coordinate 0,0 as upper left, you will want to define where
upper left is on your sphere.  I'd use straight up and center as a
unit vector, or (0, 0, 1) if z is up in your world.  If y is up, then
(0,1,0) will be 0,0 in UVs.

so starting with that, you can calculate the UV of any point by
getting the difference of angle of that starting angle and the new
point.  Remember that if they both come from the sphere center, you'll
have complete 2PI radian coverage on both axis... so naturally
dividing the resulting angle by 2PI will give you a UV number between
0 and 1.

The process is like this (assuming z=up)

For each point:
// for U just look at the sphere from overhead
U = (atan2(point.x - center.x, point.y - center.y) + PI) / (2PI)
hyp = distance(point, center);
V = ((point.z - center.z) / hyp) + 1) / 2

I believe that is correct and there will be a more elegant way to do
it but today my head is in 2D math world so I can't remember how to
dot it out.  The idea though is that for every point, you can
determine the angle needed for U by looking at the sphere from
overhead and just using an arctan of the xy differences (assuming
z=up) of the center to the point.  The resulting range is in radians (-
PI to PI) so you have to add PI to change it from 0 to 2PI and then
dividing by 2PI gives you 0 to 1.  Then for the V value, you can just
examine the height (z) of the point and in conjunction with its
distance from the center, you've got an opposite over hypotenuse which
is the same as the sine of the angle, which is what you want to get a
evenly distributed texture top to bottom.  The number will also be
ranged from -1 to 1 so you need to add 1 and divide it by 2 to get the
0 to 1 range.  The texture should touch in the corners and if you use
the right one, look seamless.

If any of my math is wrong, please correct it after debugging, but at
least this should get you going in the right direction.

Cheers

On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote:
 Please see the link and reply inside  this post if you have not an
 account on OpenGL forum, the question is over there.

 http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatN...

 Thanks a lot.

-- 
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: OpenGL Problem with Sphere Texture Mapping

2010-12-22 Thread Robert Green
Also I should add that your sphere normal should be (sphereCenter -
point).Normalize() and will be a 3D vector.  Normals are 3D, UVs are
2D.

On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote:
 Please see the link and reply inside  this post if you have not an
 account on OpenGL forum, the question is over there.

 http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatN...

 Thanks a lot.

-- 
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: How to disable back button..?

2010-12-22 Thread Prateek Jain
Hi,

If you just want to disable the back button and do nothing, you can
try this -

@Override
public void onBackPressed()
{
 // Your code here, If you wish to write any, else no
need. :-)
}

Thats it !!!

Cheers,
Prateek

On Dec 22, 5:06 pm, Abhilash baddam
abhilash.androiddevelo...@gmail.com wrote:
 Thanks kostya it's working fine...







 On Wed, Dec 22, 2010 at 5:27 PM, Kostya Vasilyev kmans...@gmail.com wrote:
   Starting with API level 5, you can override onBackPressed().

  For previous API levels, use something like:

      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if (keyCode == KeyEvent.KEYCODE_BACK) {
                  // your code here
                  return true;
          }
          return super.onKeyDown(keyCode, event);
      }

  Whether this is a good idea is another question.

  Also note that the user can still use the Home key to leave the activty,
  and you can't override that.

  -- Kostya

  22.12.2010 14:49, vikram jain пишет:

  use back.setVisible(false)

  On Wed, Dec 22, 2010 at 5:18 PM, Abhilash baddam 
  abhilash.androiddevelo...@gmail.com wrote:

  Hi friends,

                 Suppose i have an activity which displays a text like
  hello..when the user click on back button i don't want
           to work that key instead i want to display a toast which shows
  back button not works here . How can we disable that
          key programmatically.

  Any suggestions please...

   Regards,
  Abhilash.B
  --
  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

  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.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.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: OpenGL Problem with Sphere Texture Mapping

2010-12-22 Thread Robert Green
Oh here is a faster method - http://www.mvps.org/directx/articles/spheremap.htm

For each point (Assuming Y=up):

3DVec normal = (sphereCenter - point).normalize();
float U = asin(normal.x)/PI + 0.5
float V = asin(normal.y)/PI + 0.5

for z=up:
float U = asin(normal.x)/PI + 0.5
float V = asin(normal.z)/PI + 0.5

But in your code example I don't know if you were calculating normals
correctly.  Your normal should be a vector pointing from the center of
your sphere out the vertex, which is done by subtracting and then
normalizing to make it a unit-vector.

On Dec 22, 11:33 am, Robert Green rbgrn@gmail.com wrote:
 pedro,

 your problem has nothing to do with android.  I think you may need a
 3D refresher to solve it.  Normals are not UVs.  Your UVs will depend
 on how you want to map, but the easiest way to do it is to map from
 the sphere center out using angles, like this.  Since GL has 2D
 texture coordinate 0,0 as upper left, you will want to define where
 upper left is on your sphere.  I'd use straight up and center as a
 unit vector, or (0, 0, 1) if z is up in your world.  If y is up, then
 (0,1,0) will be 0,0 in UVs.

 so starting with that, you can calculate the UV of any point by
 getting the difference of angle of that starting angle and the new
 point.  Remember that if they both come from the sphere center, you'll
 have complete 2PI radian coverage on both axis... so naturally
 dividing the resulting angle by 2PI will give you a UV number between
 0 and 1.

 The process is like this (assuming z=up)

 For each point:
 // for U just look at the sphere from overhead
 U = (atan2(point.x - center.x, point.y - center.y) + PI) / (2PI)
 hyp = distance(point, center);
 V = ((point.z - center.z) / hyp) + 1) / 2

 I believe that is correct and there will be a more elegant way to do
 it but today my head is in 2D math world so I can't remember how to
 dot it out.  The idea though is that for every point, you can
 determine the angle needed for U by looking at the sphere from
 overhead and just using an arctan of the xy differences (assuming
 z=up) of the center to the point.  The resulting range is in radians (-
 PI to PI) so you have to add PI to change it from 0 to 2PI and then
 dividing by 2PI gives you 0 to 1.  Then for the V value, you can just
 examine the height (z) of the point and in conjunction with its
 distance from the center, you've got an opposite over hypotenuse which
 is the same as the sine of the angle, which is what you want to get a
 evenly distributed texture top to bottom.  The number will also be
 ranged from -1 to 1 so you need to add 1 and divide it by 2 to get the
 0 to 1 range.  The texture should touch in the corners and if you use
 the right one, look seamless.

 If any of my math is wrong, please correct it after debugging, but at
 least this should get you going in the right direction.

 Cheers

 On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote:







  Please see the link and reply inside  this post if you have not an
  account on OpenGL forum, the question is over there.

 http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatN...

  Thanks a lot.

-- 
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: How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread bruce
What you want is ACTION_SEND_MULTIPLE.  You will receive a set of
Uris.

Something like
if (Intent.ACTION_SEND_MULTIPLE.equals(action))
 Intent.hasExtra(Intent.EXTRA_STREAM)) {
ArrayListParcelable list =
intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
for (Parcelable p : list) {
   Uri uri = (Uri) p;
   /// do something with it.
   }
}
Just add android.intent.action.SEND_MULTIPLE to your manifest.

Bruce

On Dec 22, 11:31 am, Hans-Erik erikswed...@gmail.com wrote:
 On 22 Dec, 20:17, Mark Murphy mmur...@commonsware.com wrote:

  ACTION_SEND only supports sending one item.

 Thanks for your reply
 Do you know any other way to do this?
 My Activity is dormant and awaken by the user selecting images.
 There has to be another way to do this right?

-- 
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: How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik

On 22 Dec, 20:48, bruce palant...@gmail.com wrote:
 What you want is ACTION_SEND_MULTIPLE.  You will receive a set of
 Uris.

Thanks Bruce!
Coming from Java, Any book you can recommend learning android
infrastructure?

-- 
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] Thread problems

2010-12-22 Thread Kostya Vasilyev

22.12.2010 22:15, Mark Murphy пишет:

activity run on the main application
thread (which you are blocking)

Mark,

I don't believe this is the case.

In fact, Schoel wrote this in his original message:


I've checked the thread id of the thread in which queryUserSave is
called and the thread id in which the QueryUserSaveActivity is started
(if I don't use any semaphores) and they are not the same.


Since activity always run on the UI thread, the above implies that the 
original entry point into the code, queryUserSave, is called on a 
background thread.


A background thread, unlike the UI thread, can be blocked as necessary, 
using wait() or other means, until it's time for it continue.


-- Kostya

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: NFC Demo errors?

2010-12-22 Thread JoeSchmoe
If you're using Eclipse, just right click on the projectBuild Path-
Add External Library

On Dec 8, 10:00 am, phillin77 philli...@gmail.com wrote:
 Dear Dominik,

 I'm new to Android development,
 I use Eclipse and had opened the NFCDemo project which Android 2.3
 provided
 Can you kindly explain more detail how to import Guava
 Thanks a lot !

 On 12月7日, 下午8時50分, Dominik dominik.gru...@fhnw.ch wrote:







  I have no problems with the NFC Demo (after I added the google guava
  library to the project).
  Seems to be that you have the same problem (e.g. BiMap is contained in
  com.google.common.collect).
  Guava is a superset of the Google Collections Library 
  (seehttp://code.google.com/p/guava-libraries/)
  Dominik

-- 
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: TabHost not working in Froyo

2010-12-22 Thread KG
Shameless self bump

On Dec 22, 12:44 am, KG kevinconca...@gmail.com wrote:
 Hi Everyone,

 I have a TabHost in my app that works on my test device running
 Android 2.1 (and all previous versions via the emulator).  However,
 the tabs do not display when Running on Android 2.2 (Froyo) or later.
 All there is is the content of the first tab and a blank spot where
 the tabs should be.  Here is the code I'm using to create the TabHost:

 TabHost
         xmlns:android=http://schemas.android.com/apk/res/android;
         android:id=@android:id/tabhost
         android:layout_height=wrap_content
         android:layout_width=wrap_content

         RelativeLayout
                 android:layout_height=fill_parent
                 android:layout_width=fill_parent
         
                 TabWidget
                         android:divider=#00
                         android:id=@android:id/tabs
                         android:layout_alignParentBottom=true
                         android:layout_height=wrap_content
                         android:layout_width=fill_parent
                 /
                 FrameLayout
                         android:id=@android:id/tabcontent
                         android:layout_above=@android:id/tabs
                         android:layout_height=fill_parent
                         android:layout_width=fill_parent
                 /
         /RelativeLayout
 /TabHost

 LogCat provides nothing.

 Any input would be greatly appreciated.  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: Bitmap Matrix Rotate

2010-12-22 Thread nirm
OK, Thats my question how do i reuse it?
Can you provide me an example?

Thanks
Nir

On Dec 22, 9:05 pm, Robert Green rbgrn@gmail.com wrote:
 No.  Load it once and reuse it, otherwise you will suffer some nasty
 performance.

 On Dec 22, 10:35 am, nirm nirmi...@gmail.com wrote:



  Hello,

  I have a bitmap that i want it to rotate all the time.
  This bitmap is placed in a SurfaceView.
  My question is: Do i have to create the bitmap every time i want it to
  rotate?

  here is my code it is placed is the on draw method:

  leftMatrix.setRotate(degrees++, coords.getX()+bitmap.getWidth()/2,
  coords.getY());

                  graphic.setBitmap(Bitmap.createBitmap(bitmap, 0, 0,
  bitmap.getWidth(), bitmap.getHeight(), leftMatrix, false));
  canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null);

  Kind Regards
  Nir- 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] Re: Inputs from the Android Camera

2010-12-22 Thread ko5tik
You can put whatever you like as overlay over camera surface view
(except another surface view )

See our android sample in javaocr project:
http://sourceforge.net/projects/javaocr/

On Dec 22, 2:20 pm, Atik atik0...@gmail.com wrote:
 hi,
 so i have downloaded the source of camera app of android.

 and finally i need app only it should perform the zoom in out and
 brightness bar as implemented in the camera.it should not capture the
 image..

 can i do the same.. i have done lot of changes in the code and i m
 able to do it ..but else all functions are still there in the
 app ..like face track,smile mode etc.

 pls let me know...thanks

 On Dec 22, 6:04 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:

  On 22 December 2010 04:02, Vikram vikram.bodiche...@gmail.com wrote:

   We want to get some simple information from the user (in the form of
   checkboxes) for a few seconds before he starts using his camera. Can
   we somehow present our checkbox list over his camera app?

   I understand that the Camera is an app in itself and that we cannot
   make changes or add our stuff on its UI, but is there something that I
   am missing somewhere?

  Camera app and camera h/w are two different things. You may want
  to write your own app that uses camera hardware and add your
  own UI elements to it. You can't overlay existing app.

-- 
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: Proguard problem after 2.3 update

2010-12-22 Thread mukgup
I am also getting problem with compiling the project with combination of 
linux (sdk updated r8), android-2.2, ant (1.8.1 ant -version says  compiled 
on April 30 2010 ) and proguard. 

The problem i am getting from ant script is: 

.../ant/main_rules.xml:430: Expecting class path separator ':' before 
'hands-free' in argument number 1

I checked all my paths and make sure all are clean. There is no problem with 
it. The strange thing is same build script and source code works perfectly 
fine in windows (sdk updated r8), android--2.2, ant (1.8.1) and proguard.  

I feel the android SDK r8 version for linux is not fully baked yet Or i 
might be missing some thing. I end up disabling proguard on linux for the 
time being.

Is there any one able to make this combination working on Linux ?

Thank!

-- 
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] Thread problems

2010-12-22 Thread Mark Murphy
Ah, sorry, I missed that.

On Wed, Dec 22, 2010 at 2:58 PM, Kostya Vasilyev kmans...@gmail.com wrote:
 22.12.2010 22:15, Mark Murphy пишет:

 activity run on the main application
 thread (which you are blocking)

 Mark,

 I don't believe this is the case.

 In fact, Schoel wrote this in his original message:

 I've checked the thread id of the thread in which queryUserSave is
 called and the thread id in which the QueryUserSaveActivity is started
 (if I don't use any semaphores) and they are not the same.

 Since activity always run on the UI thread, the above implies that the
 original entry point into the code, queryUserSave, is called on a background
 thread.

 A background thread, unlike the UI thread, can be blocked as necessary,
 using wait() or other means, until it's time for it continue.

 -- Kostya

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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: Proguard problem after 2.3 update

2010-12-22 Thread jtoolsdev
I disabled the Proguard build from Eclipse by commenting out the
proguard.cfg reference in default.properties.  Then did a Refresh
from the project's menu so it would take effect.

On Dec 22, 7:20 am, licorna lico...@gmail.com wrote:
 Is there any way to disable this functionality. I just want to keep working
 so I think I will disable proguard for now.

-- 
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   >