[android-developers] Re: Sharing SQLite Database between activities

2010-06-27 Thread brucko
Probably the model that your looking for is a local service. Keep all
your interaction with the db in the one service. Open the db in
onCreate and close it in onDestroy. You can bind to it from multple
Activities - and if your service is still there when binding so is
your db without replicating code all over the place. Have a look at

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html

Just one word of caution. Dont use a Binder as a non-static inner
class or you may leak the service.

-- 
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] SpinnerTest from SDK is green but doesn't work proper

2010-06-27 Thread hsd
Hi all,

The example unit test SpinnerTest returns green in the test process
but when I try debug this I recognized that the states of activity are
not called. I would like to know if some one test this too and debug.
Please inform me if this is some know bug in SDK examples or no one
have the same experience.

Thanks,
UnitTest fun.

-- 
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: Opening local URLs using the emulator browser

2010-06-27 Thread Mark Murphy
On Sat, Jun 26, 2010 at 10:54 PM, kypriakos demet...@ece.neu.edu wrote:
 Now, if I want the user to be able to open the web page (that includes
 a
 set of javascript scripts) how would the user address the page from
 the browser?

They wouldn't. You can use file:///android_asset/ URLs in WebViews
embedded in your application. I am not aware that
file:///android_asset/ URLs work with the standalone Browser app.

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

Android Training...At Your Office: http://commonsware.com/training

-- 
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: How to capture game screens on device

2010-06-27 Thread Mark Murphy
On Sat, Jun 26, 2010 at 10:12 PM, Lance Nanek lna...@gmail.com wrote:
 3 - I haven't convinced Android x86 running in a VM to run at Android
 standard resolution yet. It should be easy to capture video from it
 similarly if I ever do.

Out of curiosity, what problems did you encounter with this?

 5 - Some Android phones can supposedly output apps to TV output, which
 could also do the job combined with a capture device.

I'm not aware of any that output the standard Android screen to HDMI.
For example, the EVO's HDMI output is for video playback and the
Gallery app only. If anyone knows of one that shows the actual Android
screen on HDMI, speak up!

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

Android Training...At Your Office: http://commonsware.com/training

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

2010-06-27 Thread Alex Cohn
Please help me find a reasonable explanation of this permission. When
should I use it?

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


[android-developers] Re: got a problem to learn Android

2010-06-27 Thread Navigateur
The best Java tutorials are the Sun The Java Tutorials on the
internet. Since Android uses the Java programming language but uses a
different virtual machine, you can overlook some of the JVM-related
comments in the tutorials but programming is the same in every
language, so what you learn in Java, you can translate over to any
other language, and develop in that also.

On Jun 25, 3:02 am, ben linus benzhe...@gmail.com wrote:
 thank you for the book you recommended,i will read it seriously.

 2010/6/24 MobDev developm...@mobilaria.com

  you can buy a  book,
  and even though this might be wrongly interpreted as some kind of
  publicity I'd like to advise you to buy Mark Murphy's books.
  He has a beginners version and an advanced one, and in my opinion they
  are very very understandable (I have read some very techincal Android
  books as well, but those became very boring very fast)...
 http://commonsware.com/

  On 22 jun, 11:13, ben linus benzhe...@gmail.com wrote:
   Hi ,
   Does anyone can tell me how to master android fast, i am a beginner.
   The official doc is so tedious, i have no clue to learn it.
   expect your reply and thanks for it.

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



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


[android-developers] Re: How to capture game screens on device

2010-06-27 Thread Lance Nanek
  3 - I haven't convinced Android x86 running in a VM to run at Android
  standard resolution yet. It should be easy to capture video from it
  similarly if I ever do.

 Out of curiosity, what problems did you encounter with this?

So far I've just run Android x86 on VirtualBox, intending to capture
video via the host should I get to that point. It's using desktop
resolutions by default, however, so a portrait only activity will
still get given a screen that is wider than it is tall and look
screwed up, for example. None of the options in the vga=ask boot
option seem like they can fix this alone, although maybe if I could
figure out how to change the orientation as well, or tried a different
VM with a different virtual video adapter. I haven't gotten the
UVESA_MODE boot option to work. Guess I could change the apps I want
to record to better handle the bizarre resolutions.

  5 - Some Android phones can supposedly output apps to TV output, which
  could also do the job combined with a capture device.

 I'm not aware of any that output the standard Android screen to HDMI.
 For example, the EVO's HDMI output is for video playback and the
 Gallery app only. If anyone knows of one that shows the actual Android
 screen on HDMI, speak up!

Yeah, I read in a review that the Evo 4G is useless for this. I was
thinking of the Droid Incredible with TV out accessory when I wrote
that. I saw a video of it outputting the home screen at least, so
there's a chance it can do apps as well. Not sure if it outputs HDMI
or something else.

Are you interested for the purposes of showing Android full screen on
a projector during talks and classes? My favorite thing for that so
far is to just run the emulator skinless, with the -skin 320x480
command line option, for example, and then set it to full screen mode
using the key combination for that. Looks better than a document
camera, for non-OpenGL stuff anyway, in my opinion. I tried installing
a custom mouse pointer that looks like a huge finger, so people can
better tell where I'm clicking, but the emulator seems to override it
as soon as my mouse moves over it. So that's a drawback, I guess.

I have to use Android 1.5 with that method, unfortunately, because it
gets better frame rate on the emulator than 2.2 even, but it crashes
all over the place outside my apps, like when playing with the
wireless/airplane mode in the settings app. I assume you could use a
modern, bloated Android version, though.

On Jun 27, 3:30 am, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Jun 26, 2010 at 10:12 PM, Lance Nanek lna...@gmail.com wrote:
  3 - I haven't convinced Android x86 running in a VM to run at Android
  standard resolution yet. It should be easy to capture video from it
  similarly if I ever do.

 Out of curiosity, what problems did you encounter with this?

  5 - Some Android phones can supposedly output apps to TV output, which
  could also do the job combined with a capture device.

 I'm not aware of any that output the standard Android screen to HDMI.
 For example, the EVO's HDMI output is for video playback and the
 Gallery app only. If anyone knows of one that shows the actual Android
 screen on HDMI, speak up!

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

 Android Training...At Your Office:http://commonsware.com/training

-- 
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: Looking for programmer - iMagnifier.com

2010-06-27 Thread Maxood
I guess this is right URL http://imagnifier.com/ because the
aforementioned requested URL /www.iMagnifier.com was not found on the
server.

Please confirm. We will be happy to inform you how far it is feasible
to develop such an application on Android.

We have made a number of apps on Android for www.feelsocial.com.
Here is our portfolio:
http://www.avenuesocial.com/

Thank you,
Maqsood

On Jun 24, 6:49 am, KISSandroid accessibili...@gmail.com wrote:
 I am looking for someone that can create an application to turn a
 droid into a hand-held video magnifier.  www.iMagnifier.comgives you
 an idea.

 The product would be a private label from Vision Helpers,www.VisionHelpers.com

 Thank you for your support!

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-27 Thread Lance Nanek
Weird that it matters what previous versions are laying around. On my
Windows 7 (32-bit) machine, at least, I can flat out force it to use
the latest. So old versions don't matter.

Goes something like: make sure latest SDK USB drivers are downloaded
to the default Android windows SDK usb_driver directory, press windows
+ pause/break to go to system properties, choose device manager, right-
click on malfunctioning ADB device, choose update driver software,
choose browse my computer, browse to the Android windows SDK
usb_driver directory, press next, see installing your device software
screen, see driver software successfully installed screen. No clue how
it goes on 2k3.

I've always assumed that when it says installing it is copying the
files over to system32/drivers, so I don't think any old locations
matter anyway. You might see them listed in some update driver dialogs
simply as a shortcut to reuse a previously used location.

On Jun 26, 6:54 pm, pcm2a reeeye...@gmail.com wrote:
 When I uncheck the Show compatible hardware box the ADB selection
 disappears.

 My ADK drivers are also revision 3.  However, that hasn't stopped me
 from deleting them and download them several additional times through
 the SDK.
 I have also gone as far as to download random other SDK versions I
 found floating about the internet.

 I still can't find the one single place that tells it to keep looking
 at the SDK for the drivers.  Somewhere in some registry setting or
 file it's telling it hey go look in this usb_driver folder for
 files.  I've deleted a billion things out of my registry but so far
 no success.

 On Jun 26, 5:49 pm, Lance Nanek lna...@gmail.com wrote:

  I have to uncheck Show compatible hardware before Windows 7 will
  offer Android ADB Interface for theDroid. Not that I know the
  difference between the Android Composite ADB Interface driver I'm
  using and the Android ADB Interface one you are using.

  Is your USB driver that comes with the SDK up to date? I'm using Usb
  Driver package, revision 3 according to the Android SDK and AVD
  Manager. You can update it from the same in the available packages
  section if yours is earlier. Then you have to go use the update
  driver option in the device manager again to switch over to the
  updated one.

  On Jun 26, 3:25 pm, pcm2a reeeye...@gmail.com wrote:

   When I choose Dont search I will choose the driver to install I only
   get two things listed:
   - Android ADB Interface
   - USB Compisite Interface

   After installing and reinstalling the Motorola drivers 100 times I was
   hoping to see something extra in this list but nothing ever changes.

   On Jun 26, 1:47 pm, Lance Nanek lna...@gmail.com wrote:

I ran into the same problem connecting both theEvo4G andDroidto my
Windows 7 Tablet PC. After installing the HTC software off theEvo's
SD card, theDroidstopped working. I guess I did update a lot of SDK
stuff around then too, so that's also a potential factor.

I did eventually get both phones working at once. Basically I just
tried lots of combinations of removing everything HTC/Motorola in
remove programs, reinstalling them, connecting and disconnecting
devices, and the star of the show: right clicking on devices in the
device manager and choosing to update their drivers and picking a
different one from the list of applicable drivers. You can use this,
for example, to change a Mot Composite ADB Interface to an Android
Composite ADB Interface by choosing the Android drivers instead of
Motorola's.

My currently working setup doesn't even have Motorola's software
installed, but does have HTC's. There are several Android Composite
ADB Interface for theDroidand other phones, and one My HTC, no
Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
but I had to uninstall Motorola, but whatever. Although if you have
something pointing to a removed directory somehow I'd try fixing that
first via similar right-clicking on devices and updating methods.
Although I suspect what you are talking about there might just be a
helpful last used location for something copied into system32/drivers
anyway.

On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:

 Still have no resolution for this issue.

 I have tried uninstalling and removing every single DLL that hte
 Android SDK USB Drivers comes with from my system.  Afterwards I
 installed the Motorola USB Drivers.  Next I plug in theDroidand all
 it does it keep erroring out looking for the old sdk usb folder, which
 I removed.

 On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

  I have owned myDroidsince day 1 and I have been doing Android
  development, with ADB working, on my Windows 2003 Server laptop all
  this time.  I'll try to be as detailed as possible.

  Things to note right off the bat:
  - MotorolaDroid2.1
  - Windows Server 2003 laptop
  

[android-developers] Drawing 2D stuff on the screen in OpenGL over a 3D scene

2010-06-27 Thread Navigateur
Can somebody take me step-by-step how to draw 2D stuff over a 3D scene
(such as controls, etc.). What I've been doing so far has not been
working (it only draws the 3D scene), which is (in every frame): draw
the 3D scene as normal, projection matrix mode, load identity, call
GLU.gluOrtho2D(gl, 0, myScreenWidthInPixels, 0,
myScreenHeightInPixels), switch the array pointers (vertices and
texture coords) to the ones for my 2D stuff, then drawElements with an
appropriate index list. (then switch the array pointers back so the 3D
stuff works again).

I get nothing added to the screen (just the 3D stuff).

Do I need to be doing something else for it to draw? Can somebody take
me step-by-step?

-- 
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] Can I put a donation link in my free app?

2010-06-27 Thread Alex Xin
Hi, folks

I want to login my app as free app, but I think maybe I can put a donation
link in my app, of course, my users can use my app without any donations. I
don't sell my app.
Does Google allow developer to do this?

Thanks a lot

Alex

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

Re: [android-developers] Re: Is runtime mapview defining possible? (rather then in main.xml)

2010-06-27 Thread Thomas Wrobel
Thanks, but no luck. I get the exact same error :-/



On 26 June 2010 22:35, HeHe cnm...@gmail.com wrote:

 it should be possible. one way is to put a framelayout on xml and in
 activity do sxth like:

 mapview mview=new mapview(this,getString(R.string.mapkey));

 framelayout frame=(framelayout)findViewById(R.id.frame);

 bframe.addView(mview,0,new
 framelayout.layoutparams(FILL_PARENT,FILL_PARENT));


 On Jun 26, 12:52 pm, ThomasWrobel darkfl...@gmail.com wrote:
  I've been trying to use a mapView in my app, and have been following
  the tutorial;
 http://developer.android.com/resources/tutorials/views/hello-mapview
 
  However, I'd like to be able to generate the mapView at runtime, and
  assign it to a widget container. (rather then just having it as the
  route element in Main.xml as in the example).
 
  Is this possible?
 
  I tried just extending mapActivity as stated, and implementing the
  overrides.
  However, at the moment I'm getting this error;
 
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845):
  java.lang.IllegalAccessError: Class ref in pre-verified class resolved
  to unexpected implementation
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  dalvik.system.DexFile.defineClass(Native Method)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  java.lang.ClassLoader.loadClass(ClassLoader.java:573)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  java.lang.ClassLoader.loadClass(ClassLoader.java:532)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.app.Instrumentation.newActivity(Instrumentation.java:1021)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  2489)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
  2621)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.app.ActivityThread.access$2200(ActivityThread.java:126)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.os.Handler.dispatchMessage(Handler.java:99)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.os.Looper.loop(Looper.java:123)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  android.app.ActivityThread.main(ActivityThread.java:4595)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  java.lang.reflect.Method.invokeNative(Native Method)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  java.lang.reflect.Method.invoke(Method.java:521)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:860)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
  dalvik.system.NativeStart.main(Native Method)
  
 
  Which I think might be because theres no where in my code or xml at
  the moment that defines where the mapView actually goes.
  I can't figure out how to assign it. (in this case to a page in my
  tabHost)

 --
 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: This Community Map could not be displayed because it contains errors

2010-06-27 Thread Lance Nanek
That looks like the URL for an RSS feed version or something like
that, not a KML version. Last time I showed a My Map the way you are
trying, not only did I need a KML version produced by adding the
output=kml parameter to the My Map's normal viewing URL, I also had to
proxy the KML via my server in order to fix the mime-type, which was
set to something ridiculous, like JavaScript's mime-type.

On Jun 20, 6:51 pm, François Masurel fm2...@mably.com wrote:
 Hi everybody,

 I'm try to display a map from a Google Maps Data API query (calling
 intent geo:0,0?q=my query url) and I get this message :

 This Community Map could not be displayed because it contains errors

 Does anybody have an idea what the problem could be ?

 Here is the query URL :

 http://maps.google.com/maps/feeds/features/106514162886780242289.0004...

 Thanx for your help.

 François Masurel
 Bordeaux, France

-- 
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] Can I put a donation link in my free app?

2010-06-27 Thread Andrew Brampton
Yup donations are fine, you could even put adverts in.

Andrew

On 27 June 2010 14:16, Alex Xin xinxi...@gmail.com wrote:
 Hi, folks
 I want to login my app as free app, but I think maybe I can put a donation
 link in my app, of course, my users can use my app without any donations. I
 don't sell my app.
 Does Google allow developer to do this?
 Thanks a lot
 Alex

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

-- 
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: Is runtime mapview defining possible? (rather then in main.xml)

2010-06-27 Thread HeHe
sorry it does not work for you. it is odd. all map views of my app are
dynamically created and inserted this way. i need to check if they are
ok with debug and release modes while i dont want to hardcode map key
in layout xml and manually modify xml whenever i switch my app between
two modes. anyway hope you find a way out soon.

On Jun 27, 7:21 am, Thomas Wrobel darkfl...@gmail.com wrote:
 Thanks, but no luck. I get the exact same error :-/

 On 26 June 2010 22:35, HeHe cnm...@gmail.com wrote:



  it should be possible. one way is to put a framelayout on xml and in
  activity do sxth like:

  mapview mview=new mapview(this,getString(R.string.mapkey));

  framelayout frame=(framelayout)findViewById(R.id.frame);

  bframe.addView(mview,0,new
  framelayout.layoutparams(FILL_PARENT,FILL_PARENT));

  On Jun 26, 12:52 pm, ThomasWrobel darkfl...@gmail.com wrote:
   I've been trying to use a mapView in my app, and have been following
   the tutorial;
 http://developer.android.com/resources/tutorials/views/hello-mapview

   However, I'd like to be able to generate the mapView at runtime, and
   assign it to a widget container. (rather then just having it as the
   route element in Main.xml as in the example).

   Is this possible?

   I tried just extending mapActivity as stated, and implementing the
   overrides.
   However, at the moment I'm getting this error;

   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):
   java.lang.IllegalAccessError: Class ref in pre-verified class resolved
   to unexpected implementation
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   dalvik.system.DexFile.defineClass(Native Method)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   java.lang.ClassLoader.loadClass(ClassLoader.java:573)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   java.lang.ClassLoader.loadClass(ClassLoader.java:532)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.app.Instrumentation.newActivity(Instrumentation.java:1021)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
   2489)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
   2621)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.app.ActivityThread.access$2200(ActivityThread.java:126)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.os.Handler.dispatchMessage(Handler.java:99)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.os.Looper.loop(Looper.java:123)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   android.app.ActivityThread.main(ActivityThread.java:4595)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   java.lang.reflect.Method.invokeNative(Native Method)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   java.lang.reflect.Method.invoke(Method.java:521)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:860)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
   06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
   dalvik.system.NativeStart.main(Native Method)
   

   Which I think might be because theres no where in my code or xml at
   the moment that defines where the mapView actually goes.
   I can't figure out how to assign it. (in this case to a page in my
   tabHost)

  --
  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] TextView showing invisible chars in 2.0 - 2.1

2010-06-27 Thread Connick
In testing my app across different OS versions I've noticed what appears to
be carriage returns showing as visible squares in TextView. This doesn't
happen on Froyo ...wondering if anyone knows how get around this in previous
versions?

Thanks,
Stace

-- 
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: Is runtime mapview defining possible? (rather then in main.xml)

2010-06-27 Thread Thomas Wrobel
I think I worked it out.
I had imported the maps.jar file into my build path, rather then just
setting the target to GoogleAPI 7 under the android tab.
(with that set, I could remove the manually imported maps.jar file and it
worked fine).

I was overcomplicating maters :)

Cheers,
Thomas


On 27 June 2010 17:16, HeHe cnm...@gmail.com wrote:

 sorry it does not work for you. it is odd. all map views of my app are
 dynamically created and inserted this way. i need to check if they are
 ok with debug and release modes while i dont want to hardcode map key
 in layout xml and manually modify xml whenever i switch my app between
 two modes. anyway hope you find a way out soon.

 On Jun 27, 7:21 am, Thomas Wrobel darkfl...@gmail.com wrote:
  Thanks, but no luck. I get the exact same error :-/
 
  On 26 June 2010 22:35, HeHe cnm...@gmail.com wrote:
 
 
 
   it should be possible. one way is to put a framelayout on xml and in
   activity do sxth like:
 
   mapview mview=new mapview(this,getString(R.string.mapkey));
 
   framelayout frame=(framelayout)findViewById(R.id.frame);
 
   bframe.addView(mview,0,new
   framelayout.layoutparams(FILL_PARENT,FILL_PARENT));
 
   On Jun 26, 12:52 pm, ThomasWrobel darkfl...@gmail.com wrote:
I've been trying to use a mapView in my app, and have been following
the tutorial;
  http://developer.android.com/resources/tutorials/views/hello-mapview..
 ..
 
However, I'd like to be able to generate the mapView at runtime, and
assign it to a widget container. (rather then just having it as the
route element in Main.xml as in the example).
 
Is this possible?
 
I tried just extending mapActivity as stated, and implementing the
overrides.
However, at the moment I'm getting this error;
 
06-26 21:31:20.946: ERROR/AndroidRuntime(1845):
java.lang.IllegalAccessError: Class ref in pre-verified class
 resolved
to unexpected implementation
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.DexFile.defineClass(Native Method)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2489)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2621)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.access$2200(ActivityThread.java:126)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.os.Looper.loop(Looper.java:123)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.main(ActivityThread.java:4595)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.reflect.Method.invokeNative(Native Method)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.reflect.Method.invoke(Method.java:521)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.NativeStart.main(Native Method)

 
Which I think might be because theres no where in my code or xml at
the moment that defines where the mapView actually goes.
I can't figure out how to assign it. (in this case to a page in my
tabHost)
 
   --
   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 

[android-developers] ListView scrolling

2010-06-27 Thread Scott Warfield
I have a ListView with a scrolling issue.  The Array contain a large number
of items.  When i try to scroll down, the listview displays the first items
again.  For example, if the initial view shows 12 items, and I scroll down
to view the next three, instead of showing 4 through 15, if shows 4 through
12 followed by 1, 2, and three.  Debugging the Adapter reports that getView
return 4 through 15 just as I would expect.  Any thoughts on what I might be
missing?

-- Scott

-- 
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: TextView showing invisible chars in 2.0 - 2.1

2010-06-27 Thread Stacy
Ah found it. Set transformation on the TextView -
HideReturnsTransformationMethod()



On Jun 27, 11:40 am, Connick oconn...@gmail.com wrote:
 In testing my app across different OS versions I've noticed what appears to
 be carriage returns showing as visible squares in TextView. This doesn't
 happen on Froyo ...wondering if anyone knows how get around this in previous
 versions?

 Thanks,
 Stace

-- 
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: ListView scrolling

2010-06-27 Thread Scott Warfield
NM, got it.  It was a problem in the getView method of the adapter
specifically related to the convertView argument.

On Sun, Jun 27, 2010 at 11:50 AM, Scott Warfield malam...@gmail.com wrote:

 I have a ListView with a scrolling issue.  The Array contain a large number
 of items.  When i try to scroll down, the listview displays the first items
 again.  For example, if the initial view shows 12 items, and I scroll down
 to view the next three, instead of showing 4 through 15, if shows 4 through
 12 followed by 1, 2, and three.  Debugging the Adapter reports that getView
 return 4 through 15 just as I would expect.  Any thoughts on what I might be
 missing?

 -- Scott


-- 
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: how to play a 8192*8192 image ?

2010-06-27 Thread xhy
i want to  paly a 8192*8192 image int a big TV screen,as a result  such a
big image is needed.

2010/6/25 Mike dg vinb...@gmail.com

 I doubt you have an 8192x8192 screen. So figure out what you re
 actually doing with the image and then only use as much as you need or
 all of it scaled to screen size.

 On Jun 25, 6:52 am, Mark Murphy mmur...@commonsware.com wrote:
  On Fri, Jun 25, 2010 at 6:42 AM, xhy xhyg...@gmail.com wrote:
   I want to play a   8192*8192 image,but the system exists a overflow of
   memory exception,what should i do ? Thank you!
 
  That is a ~200MB image uncompressed (8192 x 8192 x 3 bytes), and you
  have 16MB to work with.
 
  The simplest option is to use a smaller image to start with.
 
  The next-simplest option is to scale the image, as youken suggests,
  though this will take some time.
 
  The option that keeps your size is to split the image into tiles, like
  Google Maps does, and show only a few tiles at a time.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy
 
  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
  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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
xhy

-- 
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: How to capture game screens on device

2010-06-27 Thread Mark Murphy
On Sun, Jun 27, 2010 at 7:28 AM, Lance Nanek lna...@gmail.com wrote:
 None of the options in the vga=ask boot
 option seem like they can fix this alone

Ah, OK. I played around with Androidx86 briefly, actually with an eye
towards larger screen sizes, and forgot that it might not handle the
regular ones.

 Yeah, I read in a review that the Evo 4G is useless for this. I was
 thinking of the Droid Incredible with TV out accessory when I wrote
 that. I saw a video of it outputting the home screen at least, so
 there's a chance it can do apps as well. Not sure if it outputs HDMI
 or something else.

OK, I'll have to pick up an...u...micro HDMI cable(?) and give the
Incredible a whirl. I figured it was EVO-ish in its HDMI handling, so
I hadn't bothered trying it to date.

 Are you interested for the purposes of showing Android full screen on
 a projector during talks and classes?

Particularly for things that just demo better on a device (e.g.,
sensors). Regular demos, the emulator is fine. I am getting by with
dr...@screen (itself an improvement over my original DroidEx), but
there's just not that much extra horsepower we can wring out of it
while sticking with the current implementation, so the low fps is what
it is. Demoing with HDMI would be a nice option. It also beats the
ELMO for many cases, particularly if you're not strictly trying to
demonstrate the user input, because ELMOs can be a pain in terms of
lighting and focus.

Thanks for the info!

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

Android Training...At Your Office: http://commonsware.com/training

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-27 Thread pcm2a
When I pick properties of the Android ADB Interface I have 3 tabs,
General, Driver, and Details.

Driver Tab:
- Driver Details
  - WinUSB, WdfCoInstaller01007, WinUSBCoInstaller
- Update Driver
  - Update Driver has me search for another driver
- Roll Back Driver
  - No driver has been backed up for this device.
- Uninstall

Details Tab:
- Value: USB\VID_22B8PID_41DB\040368420F01901B


On Jun 26, 6:43 pm, schwiz sch...@gmail.com wrote:
 when it detects the device goto the properties and select install
 driver and then pick from existing installed drivers and pick adb from
 another android phone.

 On Jun 26, 5:54 pm, pcm2a reeeye...@gmail.com wrote:



  When I uncheck the Show compatible hardware box the ADB selection
  disappears.

  My ADK drivers are also revision 3.  However, that hasn't stopped me
  from deleting them and download them several additional times through
  the SDK.
  I have also gone as far as to download random other SDK versions I
  found floating about the internet.

  I still can't find the one single place that tells it to keep looking
  at the SDK for the drivers.  Somewhere in some registry setting or
  file it's telling it hey go look in this usb_driver folder for
  files.  I've deleted a billion things out of my registry but so far
  no success.

  On Jun 26, 5:49 pm, Lance Nanek lna...@gmail.com wrote:

   I have to uncheck Show compatible hardware before Windows 7 will
   offer Android ADB Interface for the Droid. Not that I know the
   difference between the Android Composite ADB Interface driver I'm
   using and the Android ADB Interface one you are using.

   Is your USB driver that comes with the SDK up to date? I'm using Usb
   Driver package, revision 3 according to the Android SDK and AVD
   Manager. You can update it from the same in the available packages
   section if yours is earlier. Then you have to go use the update
   driver option in the device manager again to switch over to the
   updated one.

   On Jun 26, 3:25 pm, pcm2a reeeye...@gmail.com wrote:

When I choose Dont search I will choose the driver to install I only
get two things listed:
- Android ADB Interface
- USB Compisite Interface

After installing and reinstalling the Motorola drivers 100 times I was
hoping to see something extra in this list but nothing ever changes.

On Jun 26, 1:47 pm, Lance Nanek lna...@gmail.com wrote:

 I ran into the same problem connecting both the Evo 4G and Droid to my
 Windows 7 Tablet PC. After installing the HTC software off the Evo's
 SD card, the Droid stopped working. I guess I did update a lot of SDK
 stuff around then too, so that's also a potential factor.

 I did eventually get both phones working at once. Basically I just
 tried lots of combinations of removing everything HTC/Motorola in
 remove programs, reinstalling them, connecting and disconnecting
 devices, and the star of the show: right clicking on devices in the
 device manager and choosing to update their drivers and picking a
 different one from the list of applicable drivers. You can use this,
 for example, to change a Mot Composite ADB Interface to an Android
 Composite ADB Interface by choosing the Android drivers instead of
 Motorola's.

 My currently working setup doesn't even have Motorola's software
 installed, but does have HTC's. There are several Android Composite
 ADB Interface for the Droid and other phones, and one My HTC, no
 Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
 but I had to uninstall Motorola, but whatever. Although if you have
 something pointing to a removed directory somehow I'd try fixing that
 first via similar right-clicking on devices and updating methods.
 Although I suspect what you are talking about there might just be a
 helpful last used location for something copied into system32/drivers
 anyway.

 On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:

  Still have no resolution for this issue.

  I have tried uninstalling and removing every single DLL that hte
  Android SDK USB Drivers comes with from my system.  Afterwards I
  installed the Motorola USB Drivers.  Next I plug in the Droid and 
  all
  it does it keep erroring out looking for the old sdk usb folder, 
  which
  I removed.

  On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

   I have owned my Droid since day 1 and I have been doing Android
   development, with ADB working, on my Windows 2003 Server laptop 
   all
   this time.  I'll try to be as detailed as possible.

   Things to note right off the bat:
   - Motorola Droid 2.1
   - Windows Server 2003 laptop
   - ADB has worked perfectly with this for ~ 8 months

   My work gave me a HTC Evo to do some development on. I installed 
   the
   HTC drivers, ADB worked fine, did my development and now I am done
   with 

[android-developers] Re: how to play a 8192*8192 image ?

2010-06-27 Thread Streets Of Boston
Wow, do you have a big screen TV capable of displaying 8192*8192 pixel
images!?
I doubt it :-)

If you have an HDTV of 1080p, then the max resolution is 1920*1080
(about 2MPixels). There's no need to go larger.

On Jun 27, 12:06 pm, xhy xhyg...@gmail.com wrote:
 i want to  paly a 8192*8192 image int a big TV screen,as a result  such a
 big image is needed.

 2010/6/25 Mike dg vinb...@gmail.com





  I doubt you have an 8192x8192 screen. So figure out what you re
  actually doing with the image and then only use as much as you need or
  all of it scaled to screen size.

  On Jun 25, 6:52 am, Mark Murphy mmur...@commonsware.com wrote:
   On Fri, Jun 25, 2010 at 6:42 AM, xhy xhyg...@gmail.com wrote:
I want to play a   8192*8192 image,but the system exists a overflow of
memory exception,what should i do ? Thank you!

   That is a ~200MB image uncompressed (8192 x 8192 x 3 bytes), and you
   have 16MB to work with.

   The simplest option is to use a smaller image to start with.

   The next-simplest option is to scale the image, as youken suggests,
   though this will take some time.

   The option that keeps your size is to split the image into tiles, like
   Google Maps does, and show only a few tiles at a time.

   --
   Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twit...

   _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
   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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 xhy- 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] Reading from XML

2010-06-27 Thread Michael
Hello, on my app I will be reading in from an XML file thats formatted
something like this

database
db1


db
namename here/name
streetstreet here/street
long longitude here/long
lat latitude here /lat
/db

db
name new name here /name
street new street here /street
long new longitude here /long
lat new latitude here /latitude
/db

/db1
/database


With this information I need to create Overlay Markers on the map
(using latitude and longitude) and when they're clicked on I need it
to display the name with the address. Depending on the conditions of
where the map is, the number of markers will be different so I need a
dynamic model for reading in these markers.

If I were to use Document methods like getElementById(String name)
then I couldn't call getElementById(name) because it would likely
try to call just the first name/name or give an unintended result.

Any help on this would be much appreciated!

Michael


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


[android-developers] Re: “Failed to find provider info for android.server.checkin ” ?

2010-06-27 Thread Lance Nanek
Your app should always be coded to be able to handle
getLastKnownLocation returning null. Something has to have requested
location updates for there to be any last known location. For the GPS
provider, for example, getLastKnownLocation will not turn the GPS on,
but requestLocationUpdates will. See the documentation:
http://developer.android.com/reference/android/location/LocationManager.html

On Jun 21, 2:31 pm, tarek attia tarek.m.at...@gmail.com wrote:
 Hi ,

 I'm doing a GPS application ,and it worked fine till I updated the SDK for
 API 8 ,,then after close and open eclipse once again I got this error in my
 LgCat

 “Failed to find provider info for android.server.checkin ”

 and anytime I call Location =
 locationManager.getLastKnownLocation(provider);

 I got Location=null and the application crashes

 Any Idea???

 --
 tarek

-- 
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 expose methods of an application to another application

2010-06-27 Thread Dantu
Hello,
 Is there any way to expose the methods of one application to
another application in android.
Suppose that I have written a slider for one application and if i want
to use the same slider in some other application, How can I do it
without copying the source.(Both the applications are installed on the
device).

thanks
Dantu

-- 
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: how to play a 8192*8192 image ?

2010-06-27 Thread Kostya Vasilyev

27.06.2010 21:25, Streets Of Boston пишет:

Wow, do you have a big screen TV capable of displaying 8192*8192 pixel
images!?
I doubt it:-)

If you have an HDTV of 1080p, then the max resolution is 1920*1080
(about 2MPixels). There's no need to go larger.
   
Besides, the phone's real output resolution might be even smaller (to 
match the screen).


--
Kostya Vasilev -- 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: discoverability

2010-06-27 Thread Lance Nanek
Even developers sometimes miss that certain apps have menus: we've had
questions in this group about clearing Market app reviews, and
skipping entries in the ADC2 app, for instance. Users probably have
the problem even more since they won't know as much about Android and
won't be as technically inclined on average. Often it is pretty easy
to add a button to your app's screen that opens the menu and also lets
users know it is available just by being there, at least.

On Jun 21, 12:47 pm, Frank Weiss fewe...@gmail.com wrote:
 It's merely an interesting idea without some usability data. What's
 the actual problem?

 I would say that every Android user assumes there's a menu for each
 activity. Adding an extra UI element to indicate whether there is or
 not tends to violate the law of parsimony - and more strongly, YAGNI
 (ya ain't gonna need it).

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


Re: [android-developers] How to expose methods of an application to another application

2010-06-27 Thread Mark Murphy
On Sun, Jun 27, 2010 at 2:33 PM, Dantu dantu.swar...@gmail.com wrote:
         Is there any way to expose the methods of one application to
 another application in android.

For pure processing, you can expose a remote service with an AIDL interface...

 Suppose that I have written a slider for one application and if i want
 to use the same slider in some other application,

...however, I know of no way to share UI components between
applications that way.

 How can I do it
 without copying the source.

Option #1: Compile the slider into a JAR, if it just pure Java code

Option #2: If both of the applications are yours, create an Android
library project:

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

Option #3: If you are trying to create a generally reusable UI
component, consider creating a parcel:

http://andparcel.com

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

Android Training...At Your Office: http://commonsware.com/training

-- 
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: Reading from XML

2010-06-27 Thread chaitanya
How about using the SAXParser ? The SAXParser will throw events for
start of a tag and end of a tag. Plus it is much more faster than a
DOM Parser. For every head element i.e. in your case db have a flag
and store the value in the name tag in either a StringBuilder or a
custom object which contains information about overlays.

On Jun 27, 10:52 am, Michael michael...@gmail.com wrote:
 Hello, on my app I will be reading in from an XML file thats formatted
 something like this

 database
 db1

 db
 namename here/name
 streetstreet here/street
 long longitude here/long
 lat latitude here /lat
 /db

 db
 name new name here /name
 street new street here /street
 long new longitude here /long
 lat new latitude here /latitude
 /db

 /db1
 /database

 With this information I need to create Overlay Markers on the map
 (using latitude and longitude) and when they're clicked on I need it
 to display the name with the address. Depending on the conditions of
 where the map is, the number of markers will be different so I need a
 dynamic model for reading in these markers.

 If I were to use Document methods like getElementById(String name)
 then I couldn't call getElementById(name) because it would likely
 try to call just the first name/name or give an unintended result.

 Any help on this would be much appreciated!

 Michael

-- 
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: Mapping Multiple textures to a cube in Android OpenGL ES

2010-06-27 Thread chaitanya
Thanks Robert, So in short you are stating that I use a texture atlas
approach. The second approach is what I used right now, for every face
of the cube construct that side and binding it to the texture which
was really inefficient.
  Well, you have said something about the distortion. I read at nehe's
site that you can use mimaps to upload image of any size which will be
scaled to the best aspect ratio and will minimize the distortion.
Could I use that technique to create the texture atlas? Also, could
you give me some pointers or articles which discuss the creation of a
texture atlas since I'm fairly new at this.

On Jun 26, 12:01 am, Robert Green rbgrn@gmail.com wrote:
 No, that's not what cube maps are for.

 You can only draw 1 texture at a time (unless multitexturing but
 that's totally different and not what you want) so you have 2 options:

 1)  Combine all textures together into a single one and map the
 coordinates to each side accordingly (will run much faster)
 2)  Draw side-at-a-time binding to the appropriate texture for each
 side. (not usually the preferred method.)

 A trick many of us use when doing something like... say you want to
 have the user pick 6 photos from their SD card and then you want to
 display those on a cube, one on each face.  At some point you must
 load each photo up, clipping and scaling it to fit aspect ratio and a
 power-of-two texture and then uploading it to vram.  Well, instead of
 uploading each one as a separate texture, why not just create a
 1024x1024 bitmap and draw all 6 photos to it in different spots.  You
 could use 50% of the texture vertically and 33% horizontally (for
 example) to pack 6 photos onto it for 100% usage.  It's ok if they
 distort going on to it so long as you draw them aspect-correct.  You
 then keep track of which one is where (using UVs, so percentages from
 0 to 1).  Upload that texture atlas as a single texture and when you
 draw your cube, you just bind to that atlas once and draw everything
 in one shot.  It'll run fast and it's not really that hard to do.

 On Jun 25, 6:26 pm, chaitanya vengeance...@gmail.com wrote:

  Hi,
        I have just began opengl programming in android and i am fairly
  new to opengl as well. I've been using nehe's opengl tutorials as well
  as insanitydesign's android ports. I successfully managed to create a
  cube with a single texture mapped to all its 6 faces. I even mapped
  multiple textures to different faces of the cube.
          But the way I did it was to create 6 faces seperately, have 6
  seperate index and texture buffers and then using glBindTexture() with
  the selected texture for each face and then calling glDrawElements.
  Isn't there an efficient way around this. Should i use a cube map
  texture instead of a GL_TEXTURE_2D?

    Any suggestions would be 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] Designing and Implementing Android App Idea

2010-06-27 Thread B Woods
Does anyone have any good references for designing and implementing an
idea I have for an android application.

My idea is for an application that stores information and reviews
about a specific location and presents this information to user.

I have gone through all the tutorials and have been reading up on
anything and everything about android. Now I am ready to challenge
myself with my first app.

Any suggestions on getting started would be greatly appreciated.

-- 
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: Designing and Implementing Android App Idea

2010-06-27 Thread Maps.Huge.Info (Maps API Guru)
You might want to review the other apps that have a similar theme,
check out http://www.androlib.com or http://cyrket.com for a web based
app search tool, then try them on your Android device to see if your
idea is anything unique. After that, I suggest looking at this site:
http://commonsware.com/ - Mark has some great books and tutorials on
Android. Also, the SDK contains a lot of interesting and detailed
examples, try the hello world one and see if you're up to the task.

-John Coryat

-- 
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] Routing Audio to Bluetooth Headset API Level 8

2010-06-27 Thread jwei512
Hello!

I was wondering if it was possible to route audio files from the phone
to a bluetooth headset on versions of Android API Level 7 and under
(so versions older than the new Froyo)

If so, do you know of any sample code I could look at to figure out
how to do this? Or perhaps just point me in the right direction?

Thanks!

- jwei

-- 
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: Do VBOs really improve performance? Really?

2010-06-27 Thread Lance Nanek
Do VBOs do anything on a device with unified memory? There is no
separate graphics memory on many of these devices, right?

On Jun 20, 9:51 pm, Robert Green rbgrn@gmail.com wrote:
 Navigateur,

 Performance is highly device-dependent.  If you're not seeing any
 performance differences, it would be helpful if you listed on which
 device, what your FPS is with/without VBOs, etc..

 It sounds like you're doing it right.  I doubt it matters how you
 partition the vertex attributes.  You can do what you do or do what I
 do which is have 3 separate VBOs for them.  I would expect no
 difference there.  If you're not getting a performance improvement
 then that's not a bottleneck for your app/game, but it's still
 lightening the load on the bus so is a good thing overall.  Most games
 are fill-bound, not vert-bound.

 On Jun 20, 11:46 am, Navigateur naveen.c...@googlemail.com wrote:

  What is your approximate experimental fps improvement using exactly
  the same content with and without VBOs? I'm testing with 3000 static
  verts (GL_STATIC_DRAW) and I'm getting exactly the same frame rate
  with and without VBOs, only the set-up time is longer with VBOs. What
  are your results with and without? If you're sure there's an
  improvement, then what might I be doing wrong with my VBOs? (I'm using
  2 VBOs, one for the indices and the other for verts, normals and
  texturecoords) And what's your way of doing it?

  On Jun 20, 11:50 am, Robert Green rbgrn@gmail.com wrote:

   The question are VBOs faster is a very subjective one.

   I can answer the question are VBOs faster for large amounts of static
   geometry and the answer in my experience has been yes, very much so,
   especially on first-gen devices.

   For quads and such?  No.  In fact, it could actually be slower
   depending on the chip and implementation.

   VBOs are designed to reduce bus bandwidth usage for static geometry.
   If you're not pushing too much across that bus (as in the case of
   quads or very few, very low poly objects), they won't do much.  If, on
   the other hand, you're actually running static scenes that are moving
   5k polys per draw eg (7.5k verts, 7.5k normals, 15k indices, 7.5k UVs)
   = 270Kb, you will most likely see some sort of improvement, especially
   on chips like the qualcomms as they have fairly slow transfers.  Just
   think, 270Kb @30fps = 8.1Mb of memory copying per second you're saving
   using VBOs.

   If you're rendering scenes that have REALLY large amounts of geometry
   (for mobile), such as 50k or 100k polys, you'll find that you'll be
   totally vert-bound on the first gen devices, so there's kind of that
   limit there as to how effective VBOs can be.  The spots where they
   REALLY shine, like really high poly counts, can't ever be used on the
   first-gen phones because they are incapable of processing that many
   vertices with high efficiency anyway.  High end devices running big
   scenes like that will really benefit from them because it's a whole
   lot of memory transfer savings.  Anyone doing things like that will
   want to be using configurable LoD to support the first-gens while
   keeping things high quality on newer chips.

   I would be interested in a simple test that increases poly count frame
   by frame and graphs the FPS up from 0 to 100k polys.  Running one pass
   textured and the other just colored would be a good way to
   discriminate between becoming fill-bound and memory or vert-bound.
   Seeing this data on an MSM7200, Cortex/PVR (Droid) and a snapdragon
   would be very useful for determining optimization targets.

   On Jun 20, 4:37 am, Navigateur naveen.c...@googlemail.com wrote:

No I'm not even using draw_texture. I'm comparing using VBOs to just
ordinary Buffers for the vertices (and no draw_texture). My test is
not near the max frame rate for my device.

On Jun 20, 12:21 am, Miguel Morales therevolti...@gmail.com wrote:

 Well, if you look at the talk google gave the developer gave a short
 note about 
 it:http://code.google.com/intl/es-ES/events/io/2010/sessions/writing-rea...
 If memory serves me correct, you won't gain much of a speed gain from
 using VBOs as opposed to say draw_texture.
 This is because the FPS is capped at 30FPS for some devices, however I
 can't recall the details.

 Miguel.

 On Sat, Jun 19, 2010 at 3:01 PM, Navigateur 
 naveen.c...@googlemail.com wrote:
  I've been trying VBOs (3D) and I've seen no improvement at all on my
  Motorola Dext over not using VBOs.

  I've tried all kinds of configurations, interleaved arrays,
  bytebuffers instead of floatbuffers, both direct and indirect.

  My question is, has anybody got any measured improvement in frames 
  per
  second by using VBOs instead of exactly the same content without 
  VBOs?

  If and only if so, what were your fps results? And can you therefore
  show me the proper way of doing VBOs 

Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)

2010-06-27 Thread Pedro Teixeira

Thanks a lot Brad!

I think it's working now. Though I don't know why my map center  
retrieves a change map, since before I do all this code I setCenter at  
some specific coordinates, my ''getMapCenter'' is not the same value.  
I also set up like in your code the calculation in the server side  
which makes more sense. I wonder how ur sending back the information  
to Android. I'm trying a JSONObject but all this parsing is  
overwhelming.


Anyway, thanks a lot, I'll try to fix this so I ca test the code and  
the algorithm. By now it seems fine other than that ''center'' issue.


Again, thanks a lot :D


On Jun 27, 2010, at 2:37 AM, Brad Gies wrote:


I hope it's generic for all zoom levels.. it should be :).

How it works is that Google Maps at a zoom level of 1 displays the  
entire world in 256 pixels... When you go to zoom level 2 you get  
half the world in 256 pixels, zoom level 3 is 1/4 the world in 256  
pixels... which is the same as 1 divided by 2 (to the power of  
zoom level - 1), so the Math.pow(2, zoomLevel - 1) just gets the  
number that corresponds to what you need to adjust by for the zoom  
level.


All these functions could be (and will be) combined into about 3  
lines for production.. but I just needed to step through it one step  
at a time to test it out.


The double entireWorld = zoomToPower * 256;  just calculates how  
many pixels it would take to show the entire world (height or width)


and then I just brought it down to 1 degree so I could check the  
calculations against a map and see what I was doing :).

double OneDegree = entireWorld / 360;

This calculates how much of a degree your screen will show for both  
the height and width of your screen. I subtracted 40 pixels from the  
height because that's roughly what my activity uses... and I didn't  
care if I was exact.. I only want very close. I use it to call a web  
service and I pass the Map Center latitude and longitude to the web  
service along with the screen size (in degrees),

   double heightSpan = (display.getHeight() - 40) / OneDegree;
   double widthSpan = display.getWidth() / OneDegree;



and this is how I used it. Because my function returns the fraction  
of a degree that will show on the screen, I adjust the  
getLatitudeSpan() function to pass the same value by dividing it by  
1E6. Again that should be combined for production.


LatLonSpans latLonSpans = getSpans();
if (mapView.getLatitudeSpan() == 0)
{
nvps.add(new BasicNameValuePair(latitudespan,  
String.valueOf(latLonSpans.LatSpan)));

}
else
{
double latSpan = mapView.getLatitudeSpan() / 1E6;
nvps.add(new BasicNameValuePair(latitudespan,  
String.valueOf(latSpan)));

}
 also do the Longitude
and latLonSpans = null;


My function returns the percentage of a degree that your entire  
screen will show, so I pass the map center lat and lon to the server  
with the latLonSpan values and then on the server end, I use almost  
the same calculation you do:


int topLatitude = mapCenter (latitude) + (latSpanPassed /2);
int bottomLatitude = mapCenter (latitude) - (latSpanPassed/2);
int leftLongitude = mapCenter (longitude) - (lonSpanPassed /2);
int rightLongitude = mapCenter (longitude) + (lonSpanPassed /2);




On 26/06/2010 8:47 AM, Pedro Teixeira wrote:

Hi Brad,

Thanks for your solution. I'm trying to understand how it works.
Is this generic for all zoom levels?
I don't know how to implement the if condition snippet of your  
code. Something is missing me or I'm not understanding it right.

Can you explain this value:
latSpan/1E6, is this the simple getLatitudeSpan?

I'm sorry, I'm a little bit overwhelmed with this problem for some  
days and I've been really confused.


On Jun 26, 2010, at 3:53 AM, Brad Gies wrote:


Pedro,

I've been working on roughly the same thing today... see the  
thread  MapView.getLatitudeSpan..


All you're running into is that the map isn't ready when you are  
asking for the getLatitudeSpan, so you need to wait until it is  
ready...OR...

the formula I've come up with to calculate it is this :

Note that I don't expect this formula is perfect.. and I can  
certainly make it more compact and faster by reworking it, but for  
working on it I wanted to do it step by step :).


  private class LatLonSpans
  {
  @SuppressWarnings(unused)
  public double LatSpan = 0.0;
  @SuppressWarnings(unused)
  public double LonSpan = 0.0;
  }

  private LatLonSpans getSpans()
  {
  LatLonSpans latLonSpans = new LatLonSpans();
  Display display = getWindowManager().getDefaultDisplay();
  int width = display.getWidth();
  int height = display.getHeight();


  int zoomLevel = mapView.getZoomLevel();
  // zoomToPower times 256 should be equal to the pixels  
required to view the entire world

  // at the resolution I've set.
  double zoomToPower = Math.pow(2, zoomLevel - 1);
  // it 

[android-developers] Re: Best way to determine device capabilities, chipset, etc

2010-06-27 Thread Lance Nanek
 scaling, min/max freq). And I'm pretty sure you can query OpenGL for
 all kinds of stuff without the need for any hacks.

Checking glGetString(GL_RENDERER) for Adreno nails down a lot of high
quality phones, particularly.

On Jun 22, 2:31 am, Piotr Buła piotr.b...@gmail.com wrote:
 On Jun 19, 9:18 am, Robert Green rbgrn@gmail.com wrote:

  3)  Pull some raw info out of linux and use that.
  Pros - Most detailed info available
  Cons - Can't find things like raw CPU Mhz, OpenGL version support,
  etc..

 This seems like the best approach. As for the cons, you can do this
 stuff too. Check out /sys/devices/system/cpu/cpu0/cpufreq/ directory.
 There are all kinds of information there regarding CPU (frequency
 scaling, min/max freq). And I'm pretty sure you can query OpenGL for
 all kinds of stuff without the need for any hacks.

 Hope that helps.

-- 
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] Designing and Implementing Android App Idea

2010-06-27 Thread Brad Gies
Probably the best references you will find is the API documentation for 
Google Local Search, unless you are planning on storing the 
information on your own server.


Learn everything you can about Android HttpClient, and probably JSON.. 
you will need it extensively.


I have an app on the market called Bistro Bot, which does restaurant 
reviews, and I am just in the final stages of a an Android called for 
iHotTonight.com.. and I will be releasing a Web Service API for both 
bistroblurb.com and iHotTonight.com within a couple of weeks. As part of 
the documentation for the web services, I will be putting some 
information up on the sites about developing with both Android and 
iPhone. You could have a look at that if it's released early enough for 
you... or let me know what your specific questions are ... I'm quite 
interested to know what you need because I will need to take into 
account developer questions for the documentation.


If you have a look at Bistro Bot, and want to know how any of it is 
done, send me an email, and I'll be glad to share some information.


Good Luck :).

Brad.


On 27/06/2010 1:48 PM, B Woods wrote:

Does anyone have any good references for designing and implementing an
idea I have for an android application.

My idea is for an application that stores information and reviews
about a specific location and presents this information to user.

I have gone through all the tutorials and have been reading up on
anything and everything about android. Now I am ready to challenge
myself with my first app.

Any suggestions on getting started would be greatly appreciated.

   


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
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: Mapping (x,y) to (latitude,longitude)

2010-06-27 Thread Brad Gies


I think your map center is giving you different values because you are 
checking it before it has animated/moved to the new position you have 
set... It's the same reason your getLatitudeSpan() was zero at the time. 
BUT.. if you are setting the map center anyway, you don't need to get it 
from the map, just use the coordinates you are setting the map center 
to, OR wait for the map to be finished moving.. and get all the values 
from there...


I think it's safe to assume that if your getLatitudeSpan() is zero... 
then your getMapCenter() is probably not accurate either... but I don't 
know that for sure.


Here's how I call it... The below has a couple of my own functions in it 
to set parameters etc... but you would just substitute it for whatever 
you need to do. After the JSON object is created I just assign it to 
both my Map Overlay and a list view, so I can view the info on either a 
Map or in a list.


The line:
 sharedFunctions.SendMessage(handler, HandlerReturnMessage, param1, 
param2, retStr);
sends the returned string to a handler in the calling activity which 
deals with it like this :



The HANDLER IN MY ACTIVITY..

Handler handler = new Handler()
{
@Override
public void handleMessage(Message msg)
{
try
{
setProgressBarIndeterminateVisibility(false);

String res = (String) msg.obj;

switch (msg.what)
{
case BistroSharedStatic.MESSAGE_LOCATIONS:
{
try
{
resultsJSON = new JSONArray(res);
}
catch (Exception ex)
{
resultsJSON = new JSONArray();  // just 
so it's not null.

}
break;
}
  etc




SENDING TO THE SERVER:
try
{
InputStream is = null;

DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(urlString);

if (needSearchParams)
{
String searchParams = getSearchParams();
searchParams = URLEncoder.encode(searchParams, HTTP.UTF_8);

nvps.add(new BasicNameValuePair(category, searchParams));
}

httpPost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
HttpResponse response = httpclient.execute(httpPost);

HttpEntity entity = response.getEntity();

if (entity != null)
{
try
{
is = entity.getContent();

String line;
StringBuilder builder = new StringBuilder();
BufferedReader reader = new BufferedReader(new 
InputStreamReader(is), 8192);

while ((line = reader.readLine()) != null)
{
builder.append(line);
}
String retStr = builder.toString();
// Now get any messages coming back.
if (BistroSharedStatic.DEBUGGING_APP)
Log.d(GetResults, retStr);

if (handler != null)
sharedFunctions.SendMessage(handler, 
HandlerReturnMessage, param1, param2, retStr);


}
finally
{
entity.consumeContent();
is = null;
}
}

}
catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
if (handler != null)
sharedFunctions.SendMessage(handler, 0, 0, 0, 
e.getMessage());

}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
if (handler != null)
sharedFunctions.SendMessage(handler, 0, 0, 0, 
e.getMessage());

}
catch (Exception e)
{
e.printStackTrace();
if (handler != null)
sharedFunctions.SendMessage(handler, 0, 0, 0, 
e.getMessage());

}





On 27/06/2010 3:12 PM, Pedro Teixeira wrote:

Thanks a lot Brad!

I think it's working now. Though I don't know why my map center 
retrieves a change map, since before I do all this code I setCenter at 
some specific coordinates, my ''getMapCenter'' is not the same value. 
I also set up like in your code the calculation in the server side 
which makes more sense. I wonder how ur sending back the information 
to Android. I'm trying a JSONObject but all this parsing is overwhelming.


Anyway, thanks a lot, I'll try to fix this so I ca test the code and 
the algorithm. By now it seems fine other than that ''center'' issue.


Again, 

Re: [android-developers] Re: how to play a 8192*8192 image ?

2010-06-27 Thread xhy
In fact  the clients demand it,so i have no idea.

2010/6/28 Kostya Vasilyev kmans...@gmail.com

 27.06.2010 21:25, Streets Of Boston пишет:

  Wow, do you have a big screen TV capable of displaying 8192*8192 pixel
 images!?
 I doubt it:-)

 If you have an HDTV of 1080p, then the max resolution is 1920*1080
 (about 2MPixels). There's no need to go larger.


 Besides, the phone's real output resolution might be even smaller (to match
 the screen).

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




-- 
xhy

-- 
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 play a 8192*8192 image ?

2010-06-27 Thread Streets Of Boston
Then you need to tell them it is impossible. Ask them what the maximum
resolution is of the output they desire. And i'm curious which output-
device your clients have in mind if it needs a 8192x8192 resolution.

Anyway, if it is an HDTV, more than 1920x1080 is not necessary. And if
you hook up the phone to an output-device using HDMI, more than 1080p
is not supported...

If it is an Android phone, more than 854x480 is not necessary.

They still can supply you with a 8192x8192 image, but for display you
need to scale it down to the display resolution
(BitmapFactory.Options.inSampleSize having a value greater than 1).

On Jun 27, 8:02 pm, xhy xhyg...@gmail.com wrote:
 In fact  the clients demand it,so i have no idea.

 2010/6/28 Kostya Vasilyev kmans...@gmail.com





  27.06.2010 21:25, Streets Of Boston пишет:

   Wow, do you have a big screen TV capable of displaying 8192*8192 pixel
  images!?
  I doubt it:-)

  If you have an HDTV of 1080p, then the max resolution is 1920*1080
  (about 2MPixels). There's no need to go larger.

  Besides, the phone's real output resolution might be even smaller (to match
  the screen).

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

 --
 xhy- 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: Diapad phone red button press

2010-06-27 Thread Raja Nagendra Kumar

Sorry..Here is my Question..


We have a application which initiates a call using the Intents to
Android Dialer

In a normal context, the user of the application makes the call and
ends the call by red button press.


We are looking to automate such actions of the users though the
testcase api. We are using robotium to send the key press events.. but
it says permission error as Applications can't send key events to
other applications (in this case Android Dialer)

We did try to add assign-permission
android:name='android.permission.INJECT_EVENT'/ and
uses-permission android:name='android.permission.INJECT_EVENTS'/

but this does not seem to help. Permission error continues te be
shown.


Regards,
Nagendra



On Jun 25, 3:01 pm, MobDev developm...@mobilaria.com wrote:
 I'm afraid you will have to do better in explaining your problem ? Or
 is it a question ?

 On 25 jun, 06:57, RajaNagendraKumar nagendra.r...@tejasoft.com
 wrote:



  Hi,

  Has any has success of pressing the redbutton of the dialpad, which is
  launched my their own application.

  We want to do press read button from ActivityInstrumentationTestCase2
  testses on our own application.

  Regards,
  RajaNagendraKumar,
  C.T.Owww.tejasoft.com- 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: notifyDataSetChanged() not updating listview after orientation change

2010-06-27 Thread Bara
I figured it out!  As it turns out, I have the ListView's visibility
set to GONE by default.  I show the ListView in my OnClick event for
my button.  When the orientation changes and the Activity gets
destroyed and re-created, the ListView's visibility gets reset to the
default set in the XML, GONE.  All I had to do was to set the
visibility to VISIBLE in UpdateDisplay() and it all worked!

Thanks to everyone for the help!  It is much appreciated, and I'll be
sure to put all of your usernames in the About/Thank You section of my
app :)

Bara

On Jun 23, 1:44 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 thisListView.setAdapter(r_adapter);
 r_adapter.notifyDataSetChanged();

 If you do 'setAdapter', calling notifyDataSetChanged() is not
 necessary, if i'm not mistaken. But calling an extra
 notifyDataSetChanged() should hurt.

 Override the adapter's getItem and getCount methods and put a break-
 point in these methods. See if these get hit and, if they do, see what
 values they return.

 On Jun 22, 11:55 pm, Bara bara.kath...@gmail.com wrote:

  Hmm... could it be my ArrayAdapter class causing the problem?

  This is how I call it:

  r_adapter = new ReminderAdapater(rData.getCurrentActivity(),
  remindersList, thisListView);
  thisListView.setAdapter(r_adapter);
  r_adapter.notifyDataSetChanged();

  And this is ReminderAdapater itself:

      public class ReminderAdapater extends ArrayAdapterClass_Reminder
  {
          ArrayListClass_Reminder items = new
  ArrayListClass_Reminder();
          private ListView listView;

          public ReminderAdapater(Activity activity, ArrayListClass_Reminder
  items, ListView listView) {
              super(activity, 0, items);
              this.listView = listView;
              this.items = items;

              Log.i(ReminderAdapater, Constructor; Size:  + items.size());
          }

          @Override
          public void add(Class_Reminder object)
          {
              Log.i(ReminderAdapater.add, Item count =  + items.size());
              super.add(object);
          }

          @Override
          public View getView(int position, View convertView, ViewGroup 
  parent)
  {
              //... some view related stuff here, but it never actually gets 
  to
  this point
          }
      }

  Do you guys see anything wrong with that?

  On Jun 22, 11:47 pm, Streets Of Boston flyingdutc...@gmail.com
  wrote:

   The call to onRetainConfigurationChange and
   getLastNonConfigurationInstance always works, if you have your
   activity declared not to handle configuration changes by itself (which
   it doesn't by default).

   On Jun 22, 10:51 am, Gyan gnanesh@gmail.com wrote:

Classic problem!

Use a static variable rather than onRetainConfigurationChange() lot of 
state
data to be saved  doesn't work all the time!!

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


Re: [android-developers] Re: Avoiding GPL

2010-06-27 Thread Andy Savage
From a technical standpoint presuming the GPL licence allows it (I'm not a
lawyer and I don't pretend to be one) you might want to consider something
like OpenIntents.

http://code.google.com/p/openintents/

This could allow you to link two unrelated packages together in theory (I
think).

On Sun, Jun 27, 2010 at 2:29 AM, Fabrizio Giudici 
fabrizio.giud...@tidalwave.it wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 6/25/10 22:53 , Anton Persson wrote:
  Well, to connect to a MySQL database you need a connector, and the
  connector library shipped with MySQL is under GPL. Which is what I
  meant. And, hence, corporations buy licenses from MySQL to avoid
  having to release their applications under the GPL. (If you still
  don't believe me, try explaining the reason why they HAVE a dual
  license model... If they only wanted to sell support and
  indemnification, a separate paid-for license would NOT be needed...
  See Red Hat for an example of how that works..)

 But I was referring to MySQL, not the connector. Also, sure there will
 be also corporates who pay for not using the GPL, but my point was
 that one is not forced to pay to use it. Now I think we are made clear
 our points, and MySQL was only an example.

  And; the INTENT of MySQL is that if you use the GPL version of the
  MySQL database, your application should also be GPL. But, of
  course, there are loopholes. However, using these loopholes in a
  way that is obviously a circumvention is against this INTENT.
 
  If you want people to respect YOUR intellectual property, you
  should respect others as well, and not exploit their software in an
  unintended manner.

 Licenses arbitrate how much land each entity has the right to own, in
 other words they establish borders in a objective way that everybody
 agrees on, not a subjective or moralistic one. So while I personally
 might have some interest in what other people are willing to do
 (subjective and moral position), not everybody is compelled to do
 that, but only respect the law. Everybody uses licenses to try to
 place that border in the most convenient possible way. An author of
 FLOSS software tries to place the border in the best possible position
 in his perspective, and a user of a FLOSS software has the same right,
 in his perspective.

 PS MySQL intent was to make money, and GPL is one of the best way to
 do that, because of the double licensing thing. In fact, they made a
 lot of money. Note that the owner of MySQL has changed many times and
 the intents of the original founders, of Sun Microsystems and Oracle
 might have been changed. Frankly, if I used MySQL I wouldn't be
 interested in what their intents are, only in what I can do.


 - --
 Fabrizio Giudici - Java Architect, Project Manager
 Tidalwave s.a.s. - We make Java work. Everywhere.
 java.net/blog/fabriziogiudici - www.tidalwave.it/people
 fabrizio.giud...@tidalwave.it
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkwmRwIACgkQeDweFqgUGxdGBACbBX13NejP63WSlLMgtoCuZ2xb
 cQcAn15F0686sMX6qDugfZy8ScS4ajE/
 =ME+q
 -END PGP SIGNATURE-

 --
 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] Implementing a toolbar/taskbar kind of thing.

2010-06-27 Thread Bhavya Siddappa
Hi,

The way we can do it in HTML, where we have two framesets. If I click
a link in one frame then only the other frame(target one) is reloaded,
the one from which I clicked is not.

How this can be done in Android?

As in, Say I have a kind of taskbar/toolbar which is part of all
views. Is there any way in which Activities from one Frame can
switch but activity in other frame remains stable?

Thanks,
- Bhavya

-- 
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] Marketplace behavior when version is wrong.

2010-06-27 Thread TreKing
On Tue, Jun 22, 2010 at 6:10 PM, Chris Hessing chsoftwo...@gmail.comwrote:

 What does the user see?


A message saying the app could not be found with absolutely no explanation
as to WHY, leading to many confused individuals that then flood the Android
Market Support forum with the same questions every single day.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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] Track user location.

2010-06-27 Thread TreKing
On Wed, Jun 23, 2010 at 2:05 AM, Sohan badaya sohan.bad...@gmail.comwrote:

 1.) Is it possible to find out location of your phone book
 friends (current location based on his mobile number).


If you mean using your phone to find out other people's location without
their knowledge - no, obviously not. If they were to have your app and
enable this feature, then sure. This is basically what Google Latitude does.


 2.) How to get Longitute and Latitute Values based on current mobile
 location.


Look at LocationManager.


 3.) I am using a getFromLocation(double latitude, double longitude,
 int maxResults) method of GeoCoder class. It gives me List of
 Address.From this i get country and other details but getLocality()
 method return null.
  so i am not being able to get exact location.


The latitude and longitude IS the exact location. GeoCoder just gives you an
approximate address based on that input. I have no idea what locality would
even be used for but I'm not surprised it would be null.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] Android SDK and Helios - compatibility problems?

2010-06-27 Thread SChaser
Are folks having success with Helios (Eclipse 3.6) and the latest SDK
(r_06)?

I am having problems getting the Eclipse DDMS to work;. It is missing
most of its views (such as logcat) and complained about that the first
time I ran it (but not since, so I don't have a list of what is going
on.

I had a previous working version with a prior Eclipse, but started
from scratch with this one. The steps were:

*Download and install (via unzip) Helios

*Download and unzip files for SDK

*Run SDK setup and download everything it would download.
**It complained that some packages available were incompatible and it
wouldn't download (or list) them

*Install the Eclipse plug-in from https://dl-ssl.google.com/android/eclipse/
using the Eclipse new software dialog

Is Helios incompatible? Or am I doing something wrong?

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: sqlite3 in adb not in 2.2?

2010-06-27 Thread Vincent Tsao


On May 24, 7:41 am, Mark Murphy mmur...@commonsware.com wrote:
 schwiz wrote:
  So I just watched the talk at Google I/O where they showed how to use
 sqlite3in ADB to help debug your database.  I didn't know you could
  do that way cool.  So I was doing it on my nexus which is rooted and
  it was working fine.  

 Then I went ahead and installed 2.2 and now when I typesqlite3in the shell 
 it sayssqlite3notfound  Any ideas?

 Well, it's in the 2.2 emulator image, for what that's worth.

i found it's too bad to check data  debug from my app

i can't check my data from my nexus one anymore, that's bad!


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

 Android Consulting:http://commonsware.com/consulting

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


Re: [android-developers] Re: sqlite3 in adb not in 2.2?

2010-06-27 Thread Connick
Hmm it should work as I've been using it for some time in 2.2. Try to su
root first.


On Sun, Jun 27, 2010 at 11:50 PM, Vincent Tsao caojunvinc...@gmail.comwrote:



 On May 24, 7:41 am, Mark Murphy mmur...@commonsware.com wrote:
  schwiz wrote:
   So I just watched the talk at Google I/O where they showed how to use
  sqlite3in ADB to help debug your database.  I didn't know you could
   do that way cool.  So I was doing it on my nexus which is rooted and
   it was working fine.
 
  Then I went ahead and installed 2.2 and now when I typesqlite3in the
 shell it sayssqlite3notfound  Any ideas?
 
  Well, it's in the 2.2 emulator image, for what that's worth.

 i found it's too bad to check data  debug from my app

 i can't check my data from my nexus one anymore, that's bad!

 
  --Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy
 
  Android Consulting:http://commonsware.com/consulting
 
  --
  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 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: Mapping Multiple textures to a cube in Android OpenGL ES

2010-06-27 Thread Robert Green
Forget about mipmapping for now - that's a different kind of
distortion.  I'm talking about taking an image that's 100x100 and
putting it into a space that's 150x100, then drawing it back out at
100x100.  The user will never know that it was stored at a different
aspect ratio because so long as you draw it how it should be, you're
good.

Here's a good exercise:

Create your texture in photoshop or your favorite image editor.  Make
the texture 1024x1024 and shove 6 different images onto it.  Now, drop
guidelines down to the edges of the images and switch your info to
percentages.  Write down all of the percentages that your guides are
at.  If you do 2 rows of 3, it will be 0, 50 and 100 for the y and 0,
33.3, 66.6, 100 for the x.  Those will then become your UVs.

Change your cube app to use those hardcoded UVs, eg:

// face 0 counterclockwise winding
0,0
0,.5f
.333f,.5f
.333f,0,
// face 1 ccw winding
...

Get that working with you manually entering all of the geometry and UV
data.  Once you figure out how to make that work, you can probably
come up with an automated way of doing what you want :)


On Jun 27, 3:48 pm, chaitanya vengeance...@gmail.com wrote:
 Thanks Robert, So in short you are stating that I use a texture atlas
 approach. The second approach is what I used right now, for every face
 of the cube construct that side and binding it to the texture which
 was really inefficient.
   Well, you have said something about the distortion. I read at nehe's
 site that you can use mimaps to upload image of any size which will be
 scaled to the best aspect ratio and will minimize the distortion.
 Could I use that technique to create the texture atlas? Also, could
 you give me some pointers or articles which discuss the creation of a
 texture atlas since I'm fairly new at this.

 On Jun 26, 12:01 am, Robert Green rbgrn@gmail.com wrote:



  No, that's not what cube maps are for.

  You can only draw 1 texture at a time (unless multitexturing but
  that's totally different and not what you want) so you have 2 options:

  1)  Combine all textures together into a single one and map the
  coordinates to each side accordingly (will run much faster)
  2)  Draw side-at-a-time binding to the appropriate texture for each
  side. (not usually the preferred method.)

  A trick many of us use when doing something like... say you want to
  have the user pick 6 photos from their SD card and then you want to
  display those on a cube, one on each face.  At some point you must
  load each photo up, clipping and scaling it to fit aspect ratio and a
  power-of-two texture and then uploading it to vram.  Well, instead of
  uploading each one as a separate texture, why not just create a
  1024x1024 bitmap and draw all 6 photos to it in different spots.  You
  could use 50% of the texture vertically and 33% horizontally (for
  example) to pack 6 photos onto it for 100% usage.  It's ok if they
  distort going on to it so long as you draw them aspect-correct.  You
  then keep track of which one is where (using UVs, so percentages from
  0 to 1).  Upload that texture atlas as a single texture and when you
  draw your cube, you just bind to that atlas once and draw everything
  in one shot.  It'll run fast and it's not really that hard to do.

  On Jun 25, 6:26 pm, chaitanya vengeance...@gmail.com wrote:

   Hi,
         I have just began opengl programming in android and i am fairly
   new to opengl as well. I've been using nehe's opengl tutorials as well
   as insanitydesign's android ports. I successfully managed to create a
   cube with a single texture mapped to all its 6 faces. I even mapped
   multiple textures to different faces of the cube.
           But the way I did it was to create 6 faces seperately, have 6
   seperate index and texture buffers and then using glBindTexture() with
   the selected texture for each face and then calling glDrawElements.
   Isn't there an efficient way around this. Should i use a cube map
   texture instead of a GL_TEXTURE_2D?

     Any suggestions would be 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


Re: [android-developers] Display a Dialog in non-Activity (simple Java) Class By passing Parameters

2010-06-27 Thread TreKing
On Wed, Jun 23, 2010 at 4:38 AM, Nishant Kumar nishant.cs...@gmail.comwrote:

 I am trying to display a dialog box in a simple Java class that is called
 from my main Activity but not successful.


First question: why are you trying to show a dialog from a class that is not
an Activity?


 But I am *unable to call* the onCreateDialog method that I have *defined
 in the simple java class*.

 However , If I define the *onCreateDialog method in MainActivity*, I am
 able to display it* successfully.
 *


Well onCreateDialog is defined in Activity. How do you expect it to be
called in your custom class that does not extend Activity and thus does not
inherit the function?

WHAT ARE YOU TRYING TO ACCOMPLISH?

On Wed, Jun 23, 2010 at 8:52 AM, Gyan gnanesh@gmail.com wrote:

 make the activity variable static


No.

and don't use this try getApplicationContext


Hells no.


 or an instance created with new keyword


Now you're just f***ing with the us.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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] Voice Recognition Libraries - Open Source?

2010-06-27 Thread Matthew Patience
I have an application, Twitoc, in the market that uses Google Voice
Recognition to send Tweets to Twitter. The application only works for
Android 2.1+ as I believe that is the only platform that has Google
Voice recognition libraries pre-installed (I may be wrong). I found
that it works on Android 1.5 if you install
com.google.android.voicesearch. I found this package from a third
party website but I believe it is available in some Android Markets
for download (Not Canada as far as I can see).

http://uk.androlib.com/android.application.com-google-android-voicesearch-jwAq.aspx

My question is that if I find a way to incorporate this into my app,
am I allowed to to redistribute it with proper attribution to Google?
Is it open-source?

I appreciate a response as this would allow me to make this
application available to all devices!

Thanks,

Matthew Patience
Mobicartel

-- 
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: Using barcode scanner as input method?

2010-06-27 Thread brucko


On Jun 17, 12:44 am, PinkSharK senghouth.h...@gmail.com wrote:
 +1, I am also interested in it. I have installed two of the first free
 applications from the Android Market listed when looking for
 barcode:BarcodeScanner from ZXing Team and pic2shop by Vision
 Smarts. Unfortunately, both do not allow this simple feature: scan 
 abarcodeusing the camera to put the string of digits at the cursor
 position. Do not tell me I have to develop an application from scratch
 to get this...
 PinkSharK

I am an now actually working on a developing a couple of small apps to
achieve exactly this.

What type of scenarios are you looking to use this functionality?

Do you need to scan barcodes as a one off or many at once?

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


Re: [android-developers] Re: Using barcode scanner as input method?

2010-06-27 Thread Brad Gies

What's the problem you are having?

The Zxing barcode scanner returns the barcode to your app... and you 
only need to put where you want it.




On 27/06/2010 9:39 PM, brucko wrote:


On Jun 17, 12:44 am, PinkSharKsenghouth.h...@gmail.com  wrote:
   

+1, I am also interested in it. I have installed two of the first free
applications from the Android Market listed when looking for
barcode:BarcodeScanner from ZXing Team and pic2shop by Vision
Smarts. Unfortunately, both do not allow this simple feature: scan 
abarcodeusing the camera to put the string of digits at the cursor
position. Do not tell me I have to develop an application from scratch
to get this...
PinkSharK
 

I am an now actually working on a developing a couple of small apps to
achieve exactly this.

What type of scenarios are you looking to use this functionality?

Do you need to scan barcodes as a one off or many at once?

   


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
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] What are the advantages of an Android Developers Device?

2010-06-27 Thread sagare
Hi All,

   I saw this http://developer.android.com/guide/developing/device.html
and as per what i got the advantages of Android developer device is
that it is SIM unlocked and unlocked bootloader what i wanted to know
is are there any other advantages than this of the Android developers
Device?

  Also i want to know which device are all of the developers
using for developing their apps are they using only Android developers
device or any other device?

   Also i want to know whether Android developers device has
Android 2.1 update?

   Also i want to know is motorola droid a good device to be
selected for android application testing?

Please help me on this.

Thanks,
Sagar

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