[android-developers] Re: paypal mobile payment allowed?

2010-07-06 Thread ko5tik


On Jul 6, 12:01 am, moneytoo m...@seznam.cz wrote:
 It depends on what you want to charge the user for.

 From 3.3: All fees received by Developers for Products distributed via
 the Market must be processed by the Market’s Payment Processor.

 Definition ofroducts: Software, content and digital materials created
 for Devices in accordance with the Android SDK and distributed via the
 Market.

I think you can distribute your free app  through market, and provide
paypal financed donwload
of paid parts through some other means.   This way your paid parts are
not served through market.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 eliminate the java.lang.OutOfMemoryError: bitmap size exceeds VM budget issue while scrolling in bluetooth screen.

2010-07-06 Thread grace
Hi,
seems that memory being used is more..
when dealing with bitmap its always better to free up earlier used
memory before using the new one
so you follow the link that will guide you with the clear solution.

http://stackoverflow.com/questions/477572/android-strange-out-of-memory-issue/823966#823966
On Jul 5, 8:03 am, sourabh.j...@gmail.com sourabh.j...@gmail.com
wrote:
 HI ,

 While performing scrolling on the Bluetooth scanned devices screen I
 faced the below out of memory issue.

 06-28 12:35:51.338 E/AndroidRuntime( 1311): Caused by:
 java.lang.OutOfMemoryError: bitmap size exceeds VM budget
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:447)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:
 323)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.graphics.drawable.NinePatchDrawable.inflate(NinePatchDrawable.java:
 254)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:
 788)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.graphics.drawable.Drawable.createFromXml(Drawable.java:729)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.content.res.Resources.loadDrawable(Resources.java:1690)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.content.res.TypedArray.getDrawable(TypedArray.java:548)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.view.View.init(View.java:1850)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.view.View.init(View.java:1799)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     at
 android.view.ViewGroup.init(ViewGroup.java:284)
 06-28 12:35:51.338 E/AndroidRuntime( 1311):     ... 36 more

 It looks like the memory for the application was exhausted .The
 bluetooth settings page uses BluetoothDevicePreference to handle
 onBindView() api for showing the the icon and name of the searched
 bluetooth devices , now while scrolling the searched device page every
 time the getView of the preference is getting called and that is
 eventually calling the onBindView() api to show the icon and device
 name on the screen.

 So can anyone suggest me how should I handle this kind of out of
 memory issue ?

 Thanks and Regards,
 Sourabh.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: paypal mobile payment allowed?

2010-07-06 Thread Chister Nordvik
 I think you can distribute your free app  through market, and provide
 paypal financed donwload
 of paid parts through some other means.   This way your paid parts are
 not served through market.

Well, if we only could get Google to confirm this...

Spotify - free in the market, but you have to be a subscriber to use
to program. OK
Program A - free in the market, but to access premium content you have
to be a registered user on a website which charges you monthly through
a credit card. OK?
Program B - free in the market, but to access premium content you have
to buy access with PayPal in your application. OK?
Program C - free in the market, but to access premium content you have
to buy access with a credit card in your application. OK?

I can understand that Google wants to prevent developers pushing out
free apps that will only prompt for a credit card/PayPal account to be
able to use, but if some of the features are free then maybe it's
allowed?

-Christer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Default Android Applications

2010-07-06 Thread Andy Savage
Hi there,

You can find this out by installing the SDK and running the emulator. This
will give you a working phone to have a look (for all intensive purposes).

On Mon, Jul 5, 2010 at 4:51 PM, Srinivasan J srinivas1...@gmail.com wrote:

 :

 Hi all,
  I am new to Android Developement.

 I am going to start writing applications in Android OS?

 I would like to know what are all the basic features and apps
 available when Android OS is installed in Mobile?

 I would like to implement following Apps
 Dialer,Contacts,Messaging
 Browser,Gallery,Camera
 Music,Media Player,Google Mail
 Market,Youtube,Alarm Clock
 Calculator,Calendar,Email
 Favorite contacts,FM radio,Google Maps
 Google Talk,Homescreen selector,Java Downloads
 Moxier Calendar,Moxier Contacts,Moxier Mail
 Moxier Sync,Moxier Tasks,My e-mail
 Quickoffice,Settings,SIM Toolkit
 Video editor,Voice recorder

 Out of these how many applications are available in Android OS and
 will be loaded when Android OS is installed in a mobile?

 Please do help me on this...


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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: Avoid non-static inner classes in an activity?

2010-07-06 Thread Bob Kerns
Actually, they CAN return different Application objects, and are
actually documented to do so, if you read it carefully.

I don't think it's exactly a bug that they do -- but I do think the
platform would be improved by removing getApplicationContext() from
the public API somehow. Perhaps by deprecating it, changing all the
valid internal uses to something internal, and making it return what
getApplication() returns (thereby fixing bugs).

getApplicationContext() returns the context of the single, global
Application object of the current process. There are several problems
with this:

* Programmers shouldn't be writing their programs around what process
their activities and applications live in

* They won't have useful access to it anyway (when it's from a
different .apk, it's also from a different classloader, so you can't
cast it to anything).

* It's not well-defined just WHICH application will be the single
global Application object of the current process.

* It's confusing having two calls which APPEAR to do the same thing. I
believe the presence of the name context in the name here is
responsible for a lot people using it when they should be using the
Activity. It's like a road sign showing a shorter route, that happens
to lead to a bridge that's out.

It's worth noting that, in the case where getApplicationContext()
returns a different Application, you don't even want to access the
resources. If it's not your application, they'll be the wrong ones --
and you have no definition of which application it will be.

It's fortunate that applications rarely share a process, and never
without sharing a name and signing key. Calling the wrong one will
very rarely hurt you.

I'd like to highlight your statement: while the base Context
implementation needs to retrieve it for its package. That's NOT what
it's documented to do, and that's NOT the behavior I last observed.
The last I checked, it did NOT retrieve it based on the current
package. If that has changed, then the documentation needs to catch
up, and you're probably half-way toward my proposed solution
(deprecation + behavior change). In that case, you'd just need to
document the change (i.e. change the document), and deprecate.

On Jul 5, 12:01 pm, Dianne Hackborn hack...@android.com wrote:
 The getApplicationContext() should return return the same Application object
 as getApplication()...  however, they do go through slightly different
 code-paths (the Activity has its Application handed to it during
 initialization, while the base Context implementation needs to retrieve it
 for its package), so there could have been differences in behavior at times.
  We should probably have a CTS test for this.

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


[android-developers] Re: Display android screen on projector

2010-07-06 Thread grace
Hi,

Android ScreenCast tool can also help you in this aspect.

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

this works with the camera preview,
refresh rate 4-5 fps and can changed to landscape mode also

On Jul 4, 2:26 pm, Mark Murphy mmur...@commonsware.com wrote:
 You can use dr...@screen:

 http://blog.ribomation.com/2010/01/21/droidscreen/

 That is based on my earlier DroidEx utility. Both can only do about 6
 frames per second, due to the limitations of the adb interface. Hence,
 this is fine for basic apps, but will not work well for:

 -- videos
 -- camera previews
 -- OpenGL animations

 Of course, you can also simply run the application in the emulator, if
 that will suffice for your needs.



 On Sun, Jul 4, 2010 at 5:23 AM, Krishna Kumar krissf...@gmail.com wrote:
  laptop

  On Sun, Jul 4, 2010 at 5:20 PM, Nishant Kumar nishant.cs...@gmail.com
  wrote:

  Hi,

  I have made an android application. Now I want to demonstrate the
  application to a group of people.

  How can I show my android screen live on a projector through a
  laptop/desktop.

  Thanks,
  Nishant

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 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

  --
  Krishna Kumar

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

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/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 at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: App Not Visible On Donut

2010-07-06 Thread Pent


On Jul 6, 2:47 am, Lance Nanek lna...@gmail.com wrote:
 Have you tried the aapt dump badging command on the APK to see if
 any uses-feature are getting added?

Good thinking but only the camera is getting added.

 Maybe all you'll have to do to fix
 it is drop this in or whatever:
 uses-feature android:name=android.hardware.bluetooth
 android:required=false /


I'll give that a go anyway.

With invisible logic going on in the background anything might work.

Pent

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: App Not Visible On Donut

2010-07-06 Thread Pent
Forgot to say thank you :)

Pent

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] where does openFileOutput store the file

2010-07-06 Thread Abhyudai Shanker
Hey guys,

M trying to write a file using openFileOutput, using the following snippet:

  // open myfilename.txt for writing
  OutputStreamWriter out = new
OutputStreamWriter(openFileOutput(myfilename.txt,0));
  // write the contents on mySettings to the file
  out.write(sa_lt);
  // close the file
  out.close();

I have to use this file, myfilename.txt, later in my native code. To
reference it I must know it's path.

Anyone knows where does openFileOutput create the file and if it can be
opened in my native code using the path, as in would there be any permission
issues.

Please guide me

Abhyudai

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: paypal mobile payment allowed?

2010-07-06 Thread Al Sutton
It's a chicken and egg scenario.

We, at AndAppStore, see a fair amount of traffic and purchases, but
nowhere near the volume of Market. Because of this many developers
don't list with us because they don't want the hassle of maintaining
multiple listings (i.e. one at Market and one at AndAppStore). This
leads to AndAppStore not being as appealing to users and OEMs because
of the more limited availability of apps.

If developers really do want an alternative to Market then they'll
need to list at the alternatives to help boost their appeal to both
OEMs and users and help those alternatives appeal to OEMs  users.

Al.

On Jul 6, 6:41 am, Mathias Lin m...@mathiaslin.com wrote:
 The Android Market is bothering lots of developers, but Google doesn't
 seem to change anything about it or at least communicate anything
 about it. Hoping for an alternative market like slide.me to catch on
 and become an alternative de-facto standard and vendors would
 eventually pre-install it on the devices by default as well.
 See also the recent discussion 
 here:http://groups.google.com/group/android-developers/browse_thread/threa...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: paypal mobile payment allowed?

2010-07-06 Thread Chister Nordvik
The alternative market approach is hopeless in my eyes. Currently we
have at least:
SlideMe, AndAppStore, AndroidPit, SE PlayNow, Motorola, Lenovo,
Handango, Mobihand, OnlyAndroid, GetJar ++

You will not get me submitting screenshotsAPK and descriptions for all
of those. And I guess there are lots more not in that list.

If an alternative appstore had collected screenshots, apk and
description from the Android Market and only needed an OK from the
developer, then maybe it would get more people to submit. But I guess
the APK collection is a bit on the gray side of what is legal? :-)

But back to the point of the discussion, is there any hope in getting
answers from Google regarding the various approaches to selling
premium content inside a free app? There seems to be nowhere to get
support for these kinds of question and Android Market related issues
are never commented by Google in these newsgroups :-(

-Christer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: paypal mobile payment allowed?

2010-07-06 Thread Al Sutton
Just to address your point on collecting information from Googles
Market; I've talked to someone at Google about this and it was an
absolute no-go. The request wasn't for AndAppStore, but for another
project that I was working on part of and some people at Google had
shown some interest in.

So in case you were wondering; the question has been asked, and the
request denied.

Al.

On Jul 6, 9:13 am, Chister Nordvik cnord...@gmail.com wrote:
 The alternative market approach is hopeless in my eyes. Currently we
 have at least:
 SlideMe, AndAppStore, AndroidPit, SE PlayNow, Motorola, Lenovo,
 Handango, Mobihand, OnlyAndroid, GetJar ++

 You will not get me submitting screenshotsAPK and descriptions for all
 of those. And I guess there are lots more not in that list.

 If an alternative appstore had collected screenshots, apk and
 description from the Android Market and only needed an OK from the
 developer, then maybe it would get more people to submit. But I guess
 the APK collection is a bit on the gray side of what is legal? :-)

 But back to the point of the discussion, is there any hope in getting
 answers from Google regarding the various approaches to selling
 premium content inside a free app? There seems to be nowhere to get
 support for these kinds of question and Android Market related issues
 are never commented by Google in these newsgroups :-(

 -Christer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: App Not Visible On Donut

2010-07-06 Thread Aleprex
For anyone needing an answer, apps aren't visible to Donut or Cupcake
if they specify BLUETOOTH or BLUETOOTH_ADMIN it seems... great...

It would seem so! read here
http://www.medieval.it/google-is-censoring-bluetooth-on-android-the-proof/menu-id-66.html


On 6 Lug, 09:33, Pent lee.wil...@googlemail.com wrote:
 Forgot to say thank you :)

 Pent

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


[android-developers] Is there any Dalvik bytecoder available?

2010-07-06 Thread Gonzalo
Hi:
As part of my research I implemented a runtime bytecoder for Java apps
based on Javassist. The idea is to introduce code to execute code
remotely based on current context. Since the context is not the same
at every moment, I need to perform the bytecoding at every execution
(if needed).
I tried to port my code to Android in order to test it on mobile
devices (I already tested it on win mobile and iphone using phoneme
and jamvm respectively). However, I could not find any bytecoding tool
available for Dalvik.
Is there any Dalvik bytecoder available or an ongoing project that I
can join/check that is working on this issue?
If not, is there any other alternative beside running a decompiler for
dex files, and modifying it manually?

Thanks,
--Gonzalo

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 set current tab in the sub activity pop up dialog

2010-07-06 Thread grace
HI,

Try using getTabHost().setCurrentTab(1/*tab2*/);
once you enter/leave the tab2 activity

On Jul 1, 9:01 pm, Jeruliu jeru@gmail.com wrote:
 I have a TabActivity class A with 2 tabs, a sub activity class B in
 tab 2.

 Now a dialog pops up from the UI in B, once i click the save button in
 this dialog it goes back to the TabActivity but the tab is set to 1,
 however i want to set the current tab to 2 once the dialog box closed.

 In short i need to acquire the tabHost reference in the diaglo when
 clicking on the save button.

 Please let me know how to do that 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: where does openFileOutput store the file

2010-07-06 Thread grace
Hi,

I think this will store the file as data/data/app-package-name/file-
name-specified

On Jul 6, 12:42 pm, Abhyudai Shanker abhyudai.shan...@gmail.com
wrote:
 Hey guys,

 M trying to write a file using openFileOutput, using the following snippet:

               // open myfilename.txt for writing
               OutputStreamWriter out = new
 OutputStreamWriter(openFileOutput(myfilename.txt,0));
               // write the contents on mySettings to the file
               out.write(sa_lt);
               // close the file
               out.close();

 I have to use this file, myfilename.txt, later in my native code. To
 reference it I must know it's path.

 Anyone knows where does openFileOutput create the file and if it can be
 opened in my native code using the path, as in would there be any permission
 issues.

 Please guide me

 Abhyudai

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Accurate sleep()\timer in Android

2010-07-06 Thread Omer Gilad
Thanks!

Doing it in native might be a good idea.
1. Will increasing the thread priority improve accuracy (starving
other threads in the meanwhile of course)?
2. The operation I'm doing involves network activity - UDP\TCP packet
sending. Is there good native support for networking that is device
independent (like the normal libc, libz)? Or maybe I should ask this
in the NDK group?

On Jul 5, 10:08 pm, Dianne Hackborn hack...@android.com wrote:
 You are doomed if you just want to be able to schedule exactly 80ms every
 time so that you add it all up after 1000 times and you get 80 seconds.

 At the very least, you should schedule your events so that even if there is
 some jitter in individual timings they add up correctly -- that is start at
 the current time, then schedule each next event for a successive 80ms from
 that base time, regardless of when the previous event actually fired.

 At this point, then, the only question is how much jitter between events you
 will find acceptable.  As Richard said, some big events can cause a fair
 amount of jitter, in particular GCs.  The platform is designed to avoid
 thrashing through objects and thus not cause GCs, so if you are likewise
 careful you may be able to do things so that GCs don't happen enough to be
 an issue.  For perspective: on low-end hardware, a GC can take on the order
 of 100ms; on higher-end devices like the Droid it is more like 30ms.

 If that is still not sufficient, you may want to consider dropping down to
 native code and doing the timing in a separate native thread (which thus
 won't be paused by GCs).  Of course you still won't have 100% accurate 80ms
 every time because there will still be other processes wanting to run at
 times, though the jitter will be significantly smaller (as long as your
 process is not in the background scheduling group).





 On Mon, Jul 5, 2010 at 7:30 AM, Omer Gilad omer.gi...@gmail.com wrote:
  Hello,
  Does anyone know of a precise way of measuring 80 milliseconds for
  scheduling purposes?
  Thread.sleep() and SystemClock.sleep() don't seem accurate enough.

  Purpose - I want to schedule a certain event to happen in an exact
  interval of 80 milliseconds and I don't want the time to skew
  (scheduling 1000 such events must take 80 seconds in total).

  Thanks

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

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

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

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


[android-developers] Are Android apps developed with the NDK slower than their counterparts on other OS's?

2010-07-06 Thread Simon Broenner
Hello developers!

I've been wondering lately, about the sad situation of media playback
on Android - namely: Video that isn't supported in hardware and/ or
natively supported by Android OS.

Coming from Windows Mobile devices, I was suprised (and frankly,
dismayed) to see that things like simple playback of an XviD-encoded
AVI file were not possible, even with third party apps. Currently
there is only one application available (RockPlayer, currently in
beta), and it only runs well on high-end devices, due to the need for
immense CPU power.

The same videos that stutter using this only usable DivX/XviD player
on Android (I need to overclock my Milestone's Cortex A8 to get it
smooth) run perfectly well on older Windows Mobile devices such as the
Touch Diamond/Touch Pro/Touch Pro 2 - all of which use far slower
CPUs. Android devices with the same CPUs can't even run RockPlayer
because it uses CPU features that aren't even available on these older
Qualcomm chips - probably needed because otherwise the performance
wouldn't be up to par, even on a Cortex A8 or Snapdragon...


So what exactly is the problem with Android? Why is it so difficult to
develop efficient decoders for video formats that aren't natively
supported? Are codecs usually written in a way that makes them
impossible to implement with the tools available for Android
(Assembly?)?

Or does the fact that ...the NDK does not enable you to develop
native-only applications. Android's primary runtime remains the Dalvik
virtual machine. limit the speed of the software so drastically that
it makes implementation of highly efficient software such as a decent
XviD decoder impossible?

I look forward to hearing your input on this, and would be very
thankful for links to resources concerned with the issue of
performance and efficiency in Android applications.

Thanks in advance!

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


[android-developers] how to fix the runtimeexception:android.database.sqlite.SQLiteException: Unable to close due to unfinalised statements

2010-07-06 Thread D. Y
Dear Alll,

The log is as following, any suggestion will be grateful.

 Thanks,

Best Regards,
D.Y


E/XT9IME  (  218): onFinishInput()...no input view
I/ActivityManager(  140): Displayed activity
com.acer.android.musicer/.HistoryDetails: 332 ms (total 332 ms)
D/Activity(  492): SAVE_SNAPSHOT: Update snapshot
record[7](com.acer.android.musicer) done!
E/XT9IME  (  218): onFinishInput()...no input view
D/ViewFlipper(  492): updateRunning() mVisible=false, mStarted=false,
mUserPresent=true, mRunning=false
D/ViewFlipper(  492): updateRunning() mVisible=false, mStarted=false,
mUserPresent=true, mRunning=false
E/XT9IME  (  218): onFinishInput()...no input view
E/Database(  492): sqlite3_close(0x14d6b0) failed: 5
W/dalvikvm(  492): threadid=3: thread exiting with uncaught exception
(group=0x2aac6160)
E/AndroidRuntime(  492): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  492): java.lang.RuntimeException: Unable to destroy
activity
{com.acer.android.musicer/com.acer.android.musicer.HistoryActivity}:
android.database.sqlite.SQLiteException: Unable to close due to unfinalised
statements
E/AndroidRuntime(  492): at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3468)
E/AndroidRuntime(  492): at
android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3486)
E/AndroidRuntime(  492): at
android.app.ActivityThread.access$2800(ActivityThread.java:119)
E/AndroidRuntime(  492): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1896)
E/AndroidRuntime(  492): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  492): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  492): at
android.app.ActivityThread.main(ActivityThread.java:4362)
E/AndroidRuntime(  492): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  492): at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  492): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(  492): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(  492): at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime(  492): Caused by: android.database.sqlite.SQLiteException:
Unable to close due to unfinalised statements
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteDatabase.dbclose(Native Method)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteDatabase.onAllReferencesReleased(SQLiteDatabase.java:254)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteClosable.releaseReference(SQLiteClosable.java:42)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteProgram.onAllReferencesReleased(SQLiteProgram.java:67)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteClosable.releaseReference(SQLiteClosable.java:42)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteProgram.close(SQLiteProgram.java:221)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteQuery.close(SQLiteQuery.java:141)
E/AndroidRuntime(  492): at
android.database.sqlite.SQLiteCursor.close(SQLiteCursor.java:507)
E/AndroidRuntime(  492): at
android.app.Activity.onDestroy(Activity.java:1792)
E/AndroidRuntime(  492): at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3455)
E/AndroidRuntime(  492): ... 11 more
E/dalvikvm(  492): Unable to open stack trace file '/data/anr/traces.txt':
Permission denied

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

[android-developers] Re: Android Emma Code Coverage

2010-07-06 Thread raghava
Is creating another build of android created by following the steps
specified in the below blog :

http://duykham.blogspot.com/2009/09/how-to-get-emma-code-coverage-of.html

is the solution for the 0% code coverage or is there any other
solution?

I don't think that this is the solution I think I am missing
something while generating the code coverage.

Please help me in this regard

Thanks in Advance
Raghava Reddy

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


[android-developers] Web Runtime Curriculum Advanced v1.0 Beta

2010-07-06 Thread James Baker
Hey Guys
Was going through this great Curriculum from Forum Nokia website,
thought to share it with you.
This set contains the following lectures: WRT widget structure, Ajax,
UI Development, Platform Services, Performance, and Homescreen
Widgets.
Topics covered are:
•   Symbian^3
•   Tools
•   IDE
•   Aptana Studio
•   Training
•   UI
•   UI Design
•   Web Technology
•   Web Runtime (WRT)
•   Widget for S60
Download it here http://bit.ly/dw0rMJ

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Garbage Collection Infinit Loop: clamp GC FOR MALLOC Grow heap loop

2010-07-06 Thread TjerkW
I have a Service which uploads a big file to a webserver. This works
fine on the emulator (android 2.1).

But if i run it on a Nexus One Froyo phone it starts out fine. But
after a while it is in an infinite GC loop.
The whole phone becomes unusable:


07-06 11:56:28.916: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 60
07-06 11:56:28.987: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 60
07-06 11:56:28.987: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 60
07-06 11:56:29.057: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 60
07-06 11:56:29.057: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 60
07-06 11:56:29.127: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 61
07-06 11:56:29.127: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 61
07-06 11:56:29.196: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 61
07-06 11:56:29.196: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 61
07-06 11:56:29.476: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 25.533MB to 24.000MB
07-06 11:56:29.476: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 14048
objects / 515832 bytes in 240ms
07-06 11:56:29.497: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 61
07-06 11:56:29.497: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 61
07-06 11:56:29.567: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 61
07-06 11:56:29.567: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 61
07-06 11:56:29.847: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 25.791MB to 24.000MB
07-06 11:56:29.847: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 6001
objects / 217168 bytes in 235ms
07-06 11:56:29.877: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 62
07-06 11:56:29.877: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 62
07-06 11:56:30.157: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 25.911MB to 24.000MB
07-06 11:56:30.157: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 2591
objects / 92632 bytes in 241ms
07-06 11:56:30.407: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 25.964MB to 24.000MB
07-06 11:56:30.407: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 1044
objects / 36816 bytes in 224ms
07-06 11:56:30.407: VERBOSE/
HyvesUpload::mediaUpload::onProgress(2351): progress: 62
07-06 11:56:30.407: DEBUG/ImageUploadService(2351):
onPictureUploadProgress 62
07-06 11:56:30.657: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 25.982MB to 24.000MB
07-06 11:56:30.657: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 509
objects / 18232 bytes in 232ms
07-06 11:56:30.897: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 11:56:30.897: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
objects / 0 bytes in 240ms
07-06 11:56:30.897: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 24.000MB to 24.000MB
07-06 11:56:30.897: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
24.000MB for 28-byte allocation
07-06 11:56:31.136: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 11:56:31.136: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
objects / 0 bytes in 233ms
07-06 11:56:31.136: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 24.000MB to 24.000MB
07-06 11:56:31.136: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
24.000MB for 24-byte allocation
07-06 11:56:31.377: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 11:56:31.377: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
objects / 0 bytes in 245ms
07-06 11:56:31.377: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 24.000MB to 24.000MB
07-06 11:56:31.377: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
24.000MB for 28-byte allocation
07-06 11:56:31.617: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 11:56:31.617: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
objects / 0 bytes in 234ms
07-06 11:56:31.617: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 24.000MB to 24.000MB
07-06 11:56:31.617: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
24.000MB for 28-byte allocation
07-06 11:56:31.847: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 11:56:31.847: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
objects / 0 bytes in 234ms
07-06 11:56:31.847: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 24.000MB to 24.000MB
07-06 11:56:31.847: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
24.000MB for 28-byte allocation
07-06 11:56:32.097: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 11:56:32.097: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 1
objects / 32 bytes in 243ms
07-06 11:56:32.097: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 24.000MB to 24.000MB
07-06 11:56:32.097: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
24.000MB for 8-byte allocation
07-06 11:56:32.337: INFO/dalvikvm-heap(1872): Clamp target GC heap
from 26.000MB to 24.000MB
07-06 

[android-developers] Re: App Not Visible On Donut

2010-07-06 Thread Pent
I wouldn't call it 'censorship'.

Probaby they're just following their market-forces-ignoring 'people
shouldn't use these private/undocumented APIs, it's your own problem
if it breaks' thinking.

A comment about this would be nice anyway. Is it intentional ? Will it
stay like that ?

I already need several versions of my app (market-cupcake, non-market-
cupcake, market-not-cupcake, non-market-not-cupcake), now I need
'market-version-donut-no-bluetooth'  as well.

Pent

On Jul 6, 9:36 am, Aleprex alep...@gmail.com wrote:
 For anyone needing an answer, apps aren't visible to Donut or Cupcake
 if they specify BLUETOOTH or BLUETOOTH_ADMIN it seems... great...

 It would seem so! read 
 herehttp://www.medieval.it/google-is-censoring-bluetooth-on-android-the-p...

 On 6 Lug, 09:33, Pent lee.wil...@googlemail.com wrote:

  Forgot to say thank you :)

  Pent



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Whether to use a Service or Thread for Http Connection?

2010-07-06 Thread sagare
Hi All,

Thanks for your replies AsynTask seems to be what I should use but I
am still not clear with the difference between service and Thread for
Http communication.

Thanks,
Sagar

On Jul 6, 12:43 am, Frank Weiss fewe...@gmail.com wrote:
 Only people who want to punish themselves use Java threads on Android:-)

 But you also asked about Service. You can use an AsyncTask in an
 Activity if the task has to happen while the activity is active. If
 the task needs to happen also when the acitivity is not active, (like
 when the user goes to other activities while the task is downloading
 stuff) use an AsyncTask in a 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] Uninstall Updates functionality

2010-07-06 Thread Mark Carter
I noticed that (on Froyo) when viewing Google Maps using the Market
app (or going through Manage Applications), there is a button to
Uninstall Updates. I haven't seen this for any other app (but I
haven't looked that hard either).

Is this functionality available to the rest of us devs?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Uninstall Updates functionality

2010-07-06 Thread Carlos Silva
On Tue, Jul 6, 2010 at 11:15, Mark Carter mjc1...@googlemail.com wrote:

 I noticed that (on Froyo) when viewing Google Maps using the Market
 app (or going through Manage Applications), there is a button to
 Uninstall Updates. I haven't seen this for any other app (but I
 haven't looked that hard either).

 Is this functionality available to the rest of us devs?


It's not only on Froyo, Eclair has it too (at least CyanogenMod has it).

I think it's because you can't really uninstall a system app so you can only
uninstall de updates. Not sure anyway.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Uninstall Updates functionality

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 6:15 AM, Mark Carter mjc1...@googlemail.com wrote:
 I noticed that (on Froyo) when viewing Google Maps using the Market
 app (or going through Manage Applications), there is a button to
 Uninstall Updates. I haven't seen this for any other app (but I
 haven't looked that hard either).

If I had to guess, this is because Maps comes on the firmware and can
be updated via the Market. They label it Uninstall Updates because
removing the Market package would result in you still having the Maps
app, just back to the firmware edition.

 Is this functionality available to the rest of us devs?

If you ship as part of phone firmware, presumably yes. For example,
the device manufacturer might ship 1.0 of your app but tell you to
push updates via the Market for 1.1, 1.1b, System 3000, Mark V, and
1.1c of your app.

Note, though, that this is an educated guess, based on a few
conversations, with only a passing resemblance to absolute assurance.

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

_Android Programming Tutorials_ Version 2.8 Available!

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


[android-developers] Re: Game Development

2010-07-06 Thread Maxood
Can you please post the complete code.

Do you want to draw the bitmap in your onCreate method?

Thank you


On Jul 5, 9:13 pm, android_interest kar...@gmail.com wrote:
 Hello,
 I have following example code:

 
 Character c =
 CharacterFactory.getCharacter(CharacterEnum.SpecialCharacter);
 //factory has applicationContext reference to get bitmaps from R.
 ...
 Paint bitmapPaint = new Paint();
 ...

 View::onDraw(Canvas canvas)
 ...
 canvas.drawBitmap(c.bitmap(), 0, 0, bitmapPaint);
 ...

 For some reason (must be something simple) I do not see the bitmaps at
 the 0,0 of the canvas.

 Inspecting the bitmap and etc does not show anything obvious (nulls),
 I must have missed something...

 Is there something I should be paying particular attention to while
 drawing bitmaps?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: where does openFileOutput store the file

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 4:56 AM, grace grace.a...@wipro.com wrote:
 I think this will store the file as data/data/app-package-name/file-
 name-specified

This will be true if the app is installed into the on-board flash. The
location should be different on Android 2.2 if your app is installed
on external storage.

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

_Android Programming Tutorials_ Version 2.8 Available!

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


[android-developers] Re: Whether to use a Service or Thread for Http Connection?

2010-07-06 Thread Federico Paolinelli
On Jul 6, 12:12 pm, sagare sagar.ekb...@gmail.com wrote:
 Hi All,

 Thanks for your replies AsynTask seems to be what I should use but I
 am still not clear with the difference between service and Thread for
 Http communication.

 Thanks,
 Sagar

 On Jul 6, 12:43 am, Frank Weiss fewe...@gmail.com wrote:

  Only people who want to punish themselves use Java threads on Android:-)

  But you also asked about Service. You can use an AsyncTask in an
  Activity if the task has to happen while the activity is active. If
  the task needs to happen also when the acitivity is not active, (like
  when the user goes to other activities while the task is downloading
  stuff) use an AsyncTask in a Service.


Services run in the application's main thread.

Check this excellent post on multitasking on android

http://android-developers.blogspot.com/2010/04/multitasking-android-way.html

and this other thread

http://groups.google.it/group/android-developers/browse_thread/thread/d5b97af5032725e9?hl=it#

Hope it helps

 Federico

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Whether to use a Service or Thread for Http Connection?

2010-07-06 Thread Sudeep
Hi Sagar,
  Use AsycTask class if u want to publish the result or
response in the UI thread.
i.e. from the activity u called http connection .
If you want to listen for any updates say stock value,then use a
service which is like a background thread
always running  .almost:)

On Jul 6, 3:12 pm, sagare sagar.ekb...@gmail.com wrote:
 Hi All,

 Thanks for your replies AsynTask seems to be what I should use but I
 am still not clear with the difference between service and Thread for
 Http communication.

 Thanks,
 Sagar

 On Jul 6, 12:43 am, Frank Weiss fewe...@gmail.com wrote:

  Only people who want to punish themselves use Java threads on Android:-)

  But you also asked about Service. You can use an AsyncTask in an
  Activity if the task has to happen while the activity is active. If
  the task needs to happen also when the acitivity is not active, (like
  when the user goes to other activities while the task is downloading
  stuff) use an AsyncTask in a 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


Re: [android-developers] Re: Having the actual devices is critical!

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 1:37 AM, JP joachim.pfeif...@gmail.com wrote:
 2. Google, please bring back and build out the lab days

If you live in a city big enough to have a Meetup or GTUG or
something, you may be able to work out something more peer-to-peer.
You might set it up a bit like speed dating -- two people across
from each other swap phones for, say, 15 minutes, collect data on
their apps on the other person's phone, then move to another pairing.
This would reduce the risk of somebody walking off with somebody
else's phone. You might even be able to rig up an app to assign the
pairings/tables in advance, to maximize the range of other devices
each person gets to see.

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

_Android Programming Tutorials_ Version 2.8 Available!

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


[android-developers] Re: Game Development

2010-07-06 Thread Maxood
Did you try using this method here:

@Override
protected void onDraw(Canvas canvas)
{
super.dispatchDraw(canvas);
paint(canvas);
}

For more information download the source code of this book here:
http://www.apress.com/book/downloadfile/4504



Thanks,
Maxood

http://www.maxood-android-corner.blogspot.com/

On Jul 5, 9:13 pm, android_interest kar...@gmail.com wrote:
 Hello,
 I have following example code:

 
 Character c =
 CharacterFactory.getCharacter(CharacterEnum.SpecialCharacter);
 //factory has applicationContext reference to get bitmaps from R.
 ...
 Paint bitmapPaint = new Paint();
 ...

 View::onDraw(Canvas canvas)
 ...
 canvas.drawBitmap(c.bitmap(), 0, 0, bitmapPaint);
 ...

 For some reason (must be something simple) I do not see the bitmaps at
 the 0,0 of the canvas.

 Inspecting the bitmap and etc does not show anything obvious (nulls),
 I must have missed something...

 Is there something I should be paying particular attention to while
 drawing bitmaps?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Speech to text not working behind corporate firewall

2010-07-06 Thread greg
Pardon me.  I mixed up the order of the words speech and text.
When you asked about speech to text, I thought of text to
speech ... perhaps because there is a class named TextToSpeech.
However, I now realize you were asking about voice input (or voice
recognition).
I haven't tried connecting to Google's voice recognition server other
than through cellular or WIFI connections.


On Jul 5, 3:14 pm, greg sep...@eduneer.com wrote:
 I regularly use speech to text on my Nexus One without a wireless
 connection.  A local speech to text library and a local (on SD card)
 copy of speech data are needed for Android's speech to text to work.
 Although I had downloaded them to get speech to text capability in the
 emulator, I don't recall having to download either to my Nexus One and
 I was under the assumption that the Nexus One is shipped including the
 speech to text library and the local speech data.

 On the other hand (or in the other direction), the voice input
 capability definitely requires a wireless connection to work.

 On Jul 5, 2:30 pm, EdKawas ed.ka...@gmail.com wrote:

  Not sure if this helps, but I noticed that if my nexus one doesnt have
  a wifi/data signal, speech to text does not work. Only when a
  connection is present does it work.

  Eddie

  On Jul 5, 10:59 am, Connick oconn...@gmail.com wrote:

   I've noticed that speech to text only works on cellular or WiFi 
   connections
   not behind corporate firewalls. I'm guessing it uses non-standard ports of
   some kind? Anyone else seen this?

   -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] Problem using android services

2010-07-06 Thread Abhi
Hi,
I am trying to create an application which has a service running
in the background. But i should also be able to re run the service
when i select option(Here it is a check box) from the fore ground. I
am getting Unable to instantiate service error. I have called the
service in my main activity using

Intent periodicService= new Intent();
periodicService.setAction(com.myservice.myservice);
context.stopService(periodicService);
context.startService(periodicService);

where my context is got by using getApplicationContext();

Any help would be welcome.
Thanks and Regards,
Abhijeeth

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Problem using android services

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 7:49 AM, Abhi abishe...@gmail.com wrote:
    I am trying to create an application which has a service running
 in the background. But i should also be able to re run the service
 when i select option(Here it is a check box) from the fore ground. I
 am getting Unable to instantiate service error.

This means there is a bug in your service. There should be more
details later in your stack trace, showing you where your service is
crashing.

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

_Android Programming Tutorials_ Version 2.8 Available!

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


[android-developers] TabActivity and JNI

2010-07-06 Thread Abhyudai Shanker
Hey Guys,

I just discovered that I cant call my JNI function from my TabActivity which
I am extending as I want Tabs in my GUI.

Is there a solution to this.

Please help

Abhyudai

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Are Android apps developed with the NDK slower than their counterparts on other OS's?

2010-07-06 Thread Simon Broenner
Hello Vedran!

Thank you for your answer!

Do you know whether these low-level APIs are exposed on other platforms
(Windows Mobile, iPhone and so on)? I always thought that DivX playback on
Windows Mobile, for instance, was purely software decoded.

The VFP instructions you referred to are actually being used in RockPlayer,
and are what causes the current public beta version to only run on certain
devices (MSM720x doesn't have the instruction set, AFAIK), but they don't
seem to help all too much - smooth playback, even on the TI OMAP in the
Milestone/Droid, seems to be very, very taxing, with significant performance
improvements through overclocking (indicating that the processor is very
much the bottleneck).

I just have a hard time believing that even my old HTC Prophet (200MHz TI
OMAP 850) had hardware support for DivX - and it still played back 480x360
DivX files flawlessly.

I also find it a little puzzling that Android devices have trouble playing
simple video files, while games such as Asphalt 5 or FIFA 10 (both games
with incredibly detailed graphics) run smoothly... shouldn't these be far
more taxing than playing back a measly standard definition video file?


Don't get me wrong, Rockplayer is great, and it runs smoothly enough for
daily use, but I just have the feeling that the processors in the Android
devices aren't being used anywhere near their full potential. The CPU needs
to be cranked to 100% for smooth playback, and that drains the battery like
crazy...

Thanks again for the explanation!

Simon

On Tue, Jul 6, 2010 at 2:13 PM, Vedran Rodic vro...@gmail.com wrote:

 Hi Simon,

 (I've put you in CC because for some reason my mails to android-developers
 are still not getting through.)

 I've also asked myself the same question.

 The thing is that Android API probably doesn't expose low level APIs for
 doing hardware accelerated surface scaling and color space ( YUV- RGB )
 conversion. These are two basic conditions for building efficient video
 decoders since they offload the CPU from doing stupid work where every
 byte of every frame must be processed individually by the CPU. This hardware
 is present in most 2D accelerators in mainstream hardware for at least 10
 years now, so it should be in every android device also.

 This is probably the main reason for high CPU usage, since it destorys both
 the CPU cache and uses resources.


 Other than scaling and color, other things can be accelerated by using DSP
 hardware that could be different on different android devices. Also using
 VFP/NEON instructions can help, but for scaling and colorspace conversion,
 it's best to offload it to dedicated hardware.

 It is possible that hw scaling and colorspace conversion could work with
 OpenGL ES, but not all devices support that. I guess that even the devices
 without OpenGL ES hw acceleration still have sufficient 2D and video
 acceleration to support this.

 NDK r3 and r4 added some OpenGL ES and VFP/NEON support. It's unclear from
 the ChangeLog if this can be used on Android 2.2 only or if it works on
 older Androids.

 You can try your look by looking at Android platform source code and
 finding where is low level video implemented for the standard media player.

 And lets hope somebody from google has a better answer :)

 Vedran



 On Tue, Jul 6, 2010 at 11:25 AM, Simon Broenner 
 simonbroen...@gmail.comwrote:

 Hello developers!

 I've been wondering lately, about the sad situation of media playback
 on Android - namely: Video that isn't supported in hardware and/ or
 natively supported by Android OS.

 Coming from Windows Mobile devices, I was suprised (and frankly,
 dismayed) to see that things like simple playback of an XviD-encoded
 AVI file were not possible, even with third party apps. Currently
 there is only one application available (RockPlayer, currently in
 beta), and it only runs well on high-end devices, due to the need for
 immense CPU power.

 The same videos that stutter using this only usable DivX/XviD player
 on Android (I need to overclock my Milestone's Cortex A8 to get it
 smooth) run perfectly well on older Windows Mobile devices such as the
 Touch Diamond/Touch Pro/Touch Pro 2 - all of which use far slower
 CPUs. Android devices with the same CPUs can't even run RockPlayer
 because it uses CPU features that aren't even available on these older
 Qualcomm chips - probably needed because otherwise the performance
 wouldn't be up to par, even on a Cortex A8 or Snapdragon...


 So what exactly is the problem with Android? Why is it so difficult to
 develop efficient decoders for video formats that aren't natively
 supported? Are codecs usually written in a way that makes them
 impossible to implement with the tools available for Android
 (Assembly?)?

 Or does the fact that ...the NDK does not enable you to develop
 native-only applications. Android's primary runtime remains the Dalvik
 virtual machine. limit the speed of the software so drastically that
 it makes 

[android-developers] Re: Are Android apps developed with the NDK slower than their counterparts on other OS's?

2010-07-06 Thread Tim


On Jul 6, 10:25 am, Simon Broenner simonbroen...@gmail.com wrote:
 RockPlayer
 because it uses CPU features that aren't even available on these older
 Qualcomm chips - probably needed because otherwise the performance
 wouldn't be up to par, even on a Cortex A8 or Snapdragon...

True but it still doesn't use NEON instructions:
http://www.diffthink.com/forum/viewtopic.php?f=2t=11

 So what exactly is the problem with Android? Why is it so difficult to
 develop efficient decoders for video formats that aren't natively
 supported? Are codecs usually written in a way that makes them
 impossible to implement with the tools available for Android
 (Assembly?)?

It takes time to implement a codec using SIMD/DSP instructions. It's
nothing to do with the NDK.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Are Android apps developed with the NDK slower than their counterparts on other OS's?

2010-07-06 Thread Simon Broenner
Hello Tim!

Thanks for clearing up the detail about NEON, I'll read up on that.
However, the thing that I'm trying to get at here is that as far as I
know, the Windows Mobile platform doesn't have any form of hardware
support for decoding XviD either, but still manages to play it back
fine with processors that are far outclassed in terms of pure
computational horsepower by a Cortex A8 or Snapdragon, even completely
discounting the additional instruction sets and other features found
in the newer processors.

Please correct me if I'm mistaken, but it seems to me that even
without any specialized support for instruction sets or hardware
support on either side, Android is just less efficient. Or am I just
completely confused, and WinMo devices have had specialized
instruction sets and/or even hardware support for this sort of thing
all along?


Kind regards,
Simon



By the way, here's the message Vedran sent, which did not get posted:

Hi Simon,

(I've put you in CC because for some reason my mails to android-
developers are still not getting through.)

I've also asked myself the same question.

The thing is that Android API probably doesn't expose low level APIs
for doing hardware accelerated surface scaling and color space ( YUV-
RGB ) conversion. These are two basic conditions for building
efficient video decoders since they offload the CPU from doing stupid
work where every byte of every frame must be processed individually
by the CPU. This hardware is present in most 2D accelerators in
mainstream hardware for at least 10 years now, so it should be in
every android device also.

This is probably the main reason for high CPU usage, since it destorys
both the CPU cache and uses resources.


Other than scaling and color, other things can be accelerated by using
DSP hardware that could be different on different android devices.
Also using VFP/NEON instructions can help, but for scaling and
colorspace conversion, it's best to offload it to dedicated hardware.

It is possible that hw scaling and colorspace conversion could work
with OpenGL ES, but not all devices support that. I guess that even
the devices without OpenGL ES hw acceleration still have sufficient 2D
and video acceleration to support this.

NDK r3 and r4 added some OpenGL ES and VFP/NEON support. It's unclear
from the ChangeLog if this can be used on Android 2.2 only or if it
works on older Androids.

You can try your look by looking at Android platform source code and
finding where is low level video implemented for the standard media
player.

And lets hope somebody from google has a better answer :)

Vedran



On Jul 6, 2:35 pm, Tim tdh...@gmail.com wrote:
 On Jul 6, 10:25 am, Simon Broenner simonbroen...@gmail.com wrote:

  RockPlayer
  because it uses CPU features that aren't even available on these older
  Qualcomm chips - probably needed because otherwise the performance
  wouldn't be up to par, even on a Cortex A8 or Snapdragon...

 True but it still doesn't use NEON 
 instructions:http://www.diffthink.com/forum/viewtopic.php?f=2t=11

  So what exactly is the problem with Android? Why is it so difficult to
  develop efficient decoders for video formats that aren't natively
  supported? Are codecs usually written in a way that makes them
  impossible to implement with the tools available for Android
  (Assembly?)?

 It takes time to implement a codec using SIMD/DSP instructions. It's
 nothing to do with the NDK.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Best Way to detect online connection ?

2010-07-06 Thread mac-systems
Hello,

whats the best way to detect that the App is able to download data
from somewhere ?

At the mo. is do something like this:

public static boolean isNetworkReachable(final Context _context)
{
final ConnectivityManager systemService = (ConnectivityManager)
_context
.getSystemService(Context.CONNECTIVITY_SERVICE);

/**
 * Avoid NullPointerException when offline
 */
if (systemService.getActiveNetworkInfo() == null)
{
Log.i(LOG_TAG, Network not reachable);
return false;
}

final State networkState =
systemService.getActiveNetworkInfo().getState();
final boolean isRoamingNow =
systemService.getActiveNetworkInfo().isRoaming();


Anyone else can point me to a better way to do it ?

thx,
Jens


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Unable to view Map on the emulator

2010-07-06 Thread pranay
hi, i am trying to run the application Maps which is built in the
emulator, i just get a grids and no map. i did set the permissions of
internet and fine and coarse, also got the apiKey too. I have looked
into this http://code.google.com/p/android/issues/detail?id=3764  , so
has there been no solution yet to run the Maps under proxy?

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


[android-developers] Error Recieving Broadcast Intent

2010-07-06 Thread Shekhar
Hi Group members,


I am facing a problem where I am using a list view and on click of
list item,sending intent to the another activity.Observed that the
intent is recieved
more than once in the recieving activity and finally it gives
RuntimeException.

Can anybody give some pointers to resolve this.Above behavior is
observed rarely in my application


Error logs:

07-06 11:10:11.514: ERROR/AndroidRuntime(1507): Uncaught handler:
thread main exiting due to uncaught exception
07-06 11:10:11.522: ERROR/AndroidRuntime(1507):
java.lang.RuntimeException: Error receiving broadcast Intent { intent
name (has extras) } in activity name$...@43e53940
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
android.app.ActivityThread$PackageInfo$ReceiverDispatcher
$Args.run(ActivityThread.java:796)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
android.os.Handler.handleCallback(Handler.java:587)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
android.os.Handler.dispatchMessage(Handler.java:92)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
android.os.Looper.loop(Looper.java:136)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
android.app.ActivityThread.main(ActivityThread.java:4425)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
java.lang.reflect.Method.invokeNative(Native Method)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
java.lang.reflect.Method.invoke(Method.java:521)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-06 11:10:11.522: ERROR/AndroidRuntime(1507): at
dalvik.system.NativeStart.main(Native Method)


Thanks,
Shekhar

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Garbage Collection Infinit Loop: clamp GC FOR MALLOC Grow heap loop

2010-07-06 Thread TjerkW
Basically this stops me from properly implementing a background file
upload.
Anybody has an idea what is going on here?

On Jul 6, 12:02 pm, TjerkW tje...@gmail.com wrote:
 I have a Service which uploads a big file to a webserver. This works
 fine on the emulator (android 2.1).

 But if i run it on a Nexus One Froyo phone it starts out fine. But
 after a while it is in an infinite GC loop.
 The whole phone becomes unusable:

 07-06 11:56:28.916: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 60
 07-06 11:56:28.987: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 60
 07-06 11:56:28.987: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 60
 07-06 11:56:29.057: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 60
 07-06 11:56:29.057: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 60
 07-06 11:56:29.127: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 61
 07-06 11:56:29.127: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 61
 07-06 11:56:29.196: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 61
 07-06 11:56:29.196: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 61
 07-06 11:56:29.476: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 25.533MB to 24.000MB
 07-06 11:56:29.476: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 14048
 objects / 515832 bytes in 240ms
 07-06 11:56:29.497: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 61
 07-06 11:56:29.497: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 61
 07-06 11:56:29.567: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 61
 07-06 11:56:29.567: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 61
 07-06 11:56:29.847: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 25.791MB to 24.000MB
 07-06 11:56:29.847: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 6001
 objects / 217168 bytes in 235ms
 07-06 11:56:29.877: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 62
 07-06 11:56:29.877: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 62
 07-06 11:56:30.157: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 25.911MB to 24.000MB
 07-06 11:56:30.157: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 2591
 objects / 92632 bytes in 241ms
 07-06 11:56:30.407: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 25.964MB to 24.000MB
 07-06 11:56:30.407: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 1044
 objects / 36816 bytes in 224ms
 07-06 11:56:30.407: VERBOSE/
 HyvesUpload::mediaUpload::onProgress(2351): progress: 62
 07-06 11:56:30.407: DEBUG/ImageUploadService(2351):
 onPictureUploadProgress 62
 07-06 11:56:30.657: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 25.982MB to 24.000MB
 07-06 11:56:30.657: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 509
 objects / 18232 bytes in 232ms
 07-06 11:56:30.897: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 26.000MB to 24.000MB
 07-06 11:56:30.897: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
 objects / 0 bytes in 240ms
 07-06 11:56:30.897: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 24.000MB to 24.000MB
 07-06 11:56:30.897: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
 24.000MB for 28-byte allocation
 07-06 11:56:31.136: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 26.000MB to 24.000MB
 07-06 11:56:31.136: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
 objects / 0 bytes in 233ms
 07-06 11:56:31.136: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 24.000MB to 24.000MB
 07-06 11:56:31.136: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
 24.000MB for 24-byte allocation
 07-06 11:56:31.377: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 26.000MB to 24.000MB
 07-06 11:56:31.377: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
 objects / 0 bytes in 245ms
 07-06 11:56:31.377: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 24.000MB to 24.000MB
 07-06 11:56:31.377: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
 24.000MB for 28-byte allocation
 07-06 11:56:31.617: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 26.000MB to 24.000MB
 07-06 11:56:31.617: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
 objects / 0 bytes in 234ms
 07-06 11:56:31.617: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 24.000MB to 24.000MB
 07-06 11:56:31.617: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
 24.000MB for 28-byte allocation
 07-06 11:56:31.847: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 26.000MB to 24.000MB
 07-06 11:56:31.847: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 0
 objects / 0 bytes in 234ms
 07-06 11:56:31.847: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 24.000MB to 24.000MB
 07-06 11:56:31.847: INFO/dalvikvm-heap(1872): Grow heap (frag case) to
 24.000MB for 28-byte allocation
 07-06 11:56:32.097: INFO/dalvikvm-heap(1872): Clamp target GC heap
 from 26.000MB to 24.000MB
 07-06 11:56:32.097: DEBUG/dalvikvm(1872): GC_FOR_MALLOC freed 1
 objects / 32 bytes in 243ms
 07-06 11:56:32.097: 

[android-developers] Re: Question about parcelable object

2010-07-06 Thread jul
Thanks again Kostya.

I don't understand why my List of Restaurant objects is a LinkedList,
since I define it as
   private ListRestaurant restaurants = new
ArrayListRestaurant();
in my RestaurantList class...

Anyway, I tried your fix, but I'm still messed with types:

-first, I had to cast restaurantList.getRestaurants().toArray() to
(Restaurant[]), because it returns an Object[]:

Restaurant[] restArray =
(Restaurant[])restaurantList.getRestaurants().toArray();
outState.putParcelableArray(restoList,restArray);

-and even with that, I get an error when executing putParcelableArray:

07-06 16:09:30.066: ERROR/AndroidRuntime(930):
java.lang.RuntimeException: Unable to pause activity
{org.digitalfarm.atable/org.digitalfarm.atable.Atable}:
java.lang.ClassCastException: [Ljava.lang.Object;
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2840)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2797)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.handlePauseActivity(ActivityThread.java:
2780)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.access$2000(ActivityThread.java:112)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.os.Looper.loop(Looper.java:123)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
java.lang.reflect.Method.invokeNative(Native Method)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
java.lang.reflect.Method.invoke(Method.java:521)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
dalvik.system.NativeStart.main(Native Method)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): Caused by:
java.lang.ClassCastException: [Ljava.lang.Object;
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.Activity.performSaveInstanceState(Activity.java:1008)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:
1256)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2822)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): ... 12 more


Julien

On Jul 5, 10:17 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Jul,

 This is the heart of the problem in logcat:

 07-05 19:34:28.647: ERROR/AndroidRuntime(808): Caused by:
 java.lang.ClassCastException: java.util.LinkedList
 07-05 19:34:28.647: ERROR/AndroidRuntime(808):     at
 org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)

 My guess is that

 gson.fromJson

 creates a LinkedListRestaurant, then it blows at line Atable.java:254.

 I am guessing it's the line saying:

 outState.putParcelableArrayList(restoList,
 (ArrayListRestaurant)restaurantList.getRestaurants());

 and the immediate cause is the cast from LinkedListRestaurant to
 ArrayListRestaurant, which are unrelated classes.

 To fix this, you can change the above code to read:

     Restaurant[] restArray = restaurantList.getRestaurants().toArray();
     outState.putParcelableArray(restoList,restArray);

 -- Kostya

 05.07.2010 21:42, jul пишет:



  Is it the right way to do it? The writeToParcel method of my
  Restaurant object is never called...

  The error seems to be in

       outState.putParcelableArrayList(restoList,
  (ArrayListRestaurant)restaurantList.getRestaurants());

  and I get in my LogCat:

  07-05 19:34:13.846: WARN/ActivityManager(563): Activity pause timeout
  for HistoryRecord{436950f8 {org.digitalfarm.atable/
  org.digitalfarm.atable.Atable}}
  07-05 19:34:28.336: DEBUG/AndroidRuntime(808): Shutting down VM
  07-05 19:34:28.336: WARN/dalvikvm(808): threadid=3: thread exiting
  with uncaught exception (group=0x4000fe70)
  07-05 19:34:28.336: ERROR/AndroidRuntime(808): Uncaught handler:
  thread main exiting due to uncaught exception
  07-05 19:34:28.637: DEBUG/dalvikvm(808): GC freed 3337 objects /
  259288 bytes in 94ms
  07-05 19:34:28.647: ERROR/AndroidRuntime(808):
  java.lang.RuntimeException: Unable to pause activity
  {org.digitalfarm.atable/org.digitalfarm.atable.Atable}:
  java.lang.ClassCastException: java.util.LinkedList
  07-05 19:34:28.647: 

[android-developers] Re: Unable to view Map on the emulator

2010-07-06 Thread JP

You need to switch back and forth between debug and release keys,
depending on how the app is being installed. Release for side install
or through the Market; debug when installing from Eclipse.

On Jul 6, 6:12 am, pranay streetfi...@gmail.com wrote:
 hi, i am trying to run the application Maps which is built in the
 emulator, i just get a grids and no map. i did set the permissions of
 internet and fine and coarse, also got the apiKey too. I have looked
 into thishttp://code.google.com/p/android/issues/detail?id=3764 , so
 has there been no solution yet to run the Maps under proxy?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Question about parcelable object

2010-07-06 Thread Kostya Vasilyev

Jul,

What is the code around line 254 in Atable.java?

07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)


And, what does restaurantList.getRestaurants() really return, when 
called from  onSaveInstanceState ?


-- Kostya

06.07.2010 18:19, jul пишет:

Thanks again Kostya.

I don't understand why my List of Restaurant objects is a LinkedList,
since I define it as
private ListRestaurant  restaurants = new
ArrayListRestaurant();
in my RestaurantList class...

Anyway, I tried your fix, but I'm still messed with types:

-first, I had to cast restaurantList.getRestaurants().toArray() to
(Restaurant[]), because it returns an Object[]:

 Restaurant[] restArray =
(Restaurant[])restaurantList.getRestaurants().toArray();
 outState.putParcelableArray(restoList,restArray);

-and even with that, I get an error when executing putParcelableArray:

07-06 16:09:30.066: ERROR/AndroidRuntime(930):
java.lang.RuntimeException: Unable to pause activity
{org.digitalfarm.atable/org.digitalfarm.atable.Atable}:
java.lang.ClassCastException: [Ljava.lang.Object;
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2840)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2797)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.handlePauseActivity(ActivityThread.java:
2780)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.access$2000(ActivityThread.java:112)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.os.Looper.loop(Looper.java:123)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
java.lang.reflect.Method.invokeNative(Native Method)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
java.lang.reflect.Method.invoke(Method.java:521)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
dalvik.system.NativeStart.main(Native Method)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): Caused by:
java.lang.ClassCastException: [Ljava.lang.Object;
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.Activity.performSaveInstanceState(Activity.java:1008)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:
1256)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2822)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): ... 12 more


Julien

On Jul 5, 10:17 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
   

Jul,

This is the heart of the problem in logcat:

07-05 19:34:28.647: ERROR/AndroidRuntime(808): Caused by:
java.lang.ClassCastException: java.util.LinkedList
07-05 19:34:28.647: ERROR/AndroidRuntime(808): at
org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)

My guess is that

gson.fromJson

creates a LinkedListRestaurant, then it blows at line Atable.java:254.

I am guessing it's the line saying:

outState.putParcelableArrayList(restoList,
(ArrayListRestaurant)restaurantList.getRestaurants());

and the immediate cause is the cast from LinkedListRestaurant  to
ArrayListRestaurant, which are unrelated classes.

To fix this, you can change the above code to read:

 Restaurant[] restArray = restaurantList.getRestaurants().toArray();
 outState.putParcelableArray(restoList,restArray);

-- Kostya

05.07.2010 21:42, jul пишет:



 

Is it the right way to do it? The writeToParcel method of my
Restaurant object is never called...
   
 

The error seems to be in
   
 

  outState.putParcelableArrayList(restoList,
(ArrayListRestaurant)restaurantList.getRestaurants());
   
 

and I get in my LogCat:
   
 

07-05 19:34:13.846: WARN/ActivityManager(563): Activity pause timeout
for HistoryRecord{436950f8 {org.digitalfarm.atable/
org.digitalfarm.atable.Atable}}
07-05 19:34:28.336: DEBUG/AndroidRuntime(808): Shutting down VM
07-05 19:34:28.336: WARN/dalvikvm(808): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
07-05 19:34:28.336: ERROR/AndroidRuntime(808): Uncaught handler:
thread main exiting due to 

[android-developers] Less number of downloads

2010-07-06 Thread aswani kumar tholeti
Hi folks

i published my application in android market 7 months before.i am getting
less number of downloads .is there any publish problem or any other

Thanks in advance

Aswan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 catch a http 403 error

2010-07-06 Thread Ralph Bergmann
Hi @all,


how can I catch a HTTP 403 error?

I use the HttpURLConnection to establish a HTTP connection with Base
Authentication. When the authentication fails I get a
FileNotFoundException :-(

Why I doesn't get a HttpResponseException?



Ralph

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Smooth Image Rotation with Gesture Control?

2010-07-06 Thread Sephy
Isn't there a copyright on stargate stuff?


On 6 juil, 05:49, ocdtrekkie jtn...@gmail.com wrote:
 Ah crud, now I feel fairly stupid.  ;)  People responded and I didn't
 see it and posted a seperate request.  I'm gonna upload the design
 document for it, I've got the UI designed, I just can't figure out
 how to program it so it will behave right.  I've read a lot of
 examples/tutorials/help things regarding image rotation, but I haven't
 seen anything that's the same sort of thing, even though I would
 imagine it's a fairly simple idea.

 http://imgs.ocdtrekkie.com/MobileDHDConcept2.jpg

 This is only a portion of the UI, but it's the one I need help with.
 Basically I have a fancy circular image (it's a ring), and I want to
 situate it about there on the screen, and then let people rotate it
 with their finger.  (Only a certain portion of the ring will be
 visible on screen at a time, as you can see).  Looking at the
 different Layout formats though, I'm wondering if I have to go to
 OpenGL for something like this, or if it can be done without it.

 (Oh, TreKing, I just looked at your site... and I will use your app
 next time I go into the city for sure, I live in the Chicago suburbs,
 and public transit here baffles me.  ;) )

 On Jun 24, 10:38 am, TreKing treking...@gmail.com wrote:

  On Fri, Jun 18, 2010 at 12:01 AM, ocdtrekkie jtn...@gmail.com wrote:
   Can anyone help get me started?  I can program all the logic I need for my
   program really well, I just need some help with designing the UI to 
   function
   the way I want it to.

  What exactly do you expect us to do for you?
  How are we supposed to help you design a UI for your app?

  -
  TreKing - Chicago transit tracking app for Android-powered 
  deviceshttp://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] Re: how to catch a http 403 error

2010-07-06 Thread mac-systems
using HttpClient its easy:


final HttpResponse response = getHTTPClient().execute(httpGet);
if (Logging.isLoggingEnabled())
{
final StatusLine status = response.getStatusLine();
Log.d(LOG_TAG, Response Code was :  + 
status.getStatusCode() + 
-  + status.getReasonPhrase());
}

if (HttpStatus.SC_OK != 
response.getStatusLine().getStatusCode())



- Jens

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Smooth Image Rotation with Gesture Control?

2010-07-06 Thread ocdtrekkie
I've seen a lot of apps pertaining to copyrighted material on the
Android Market, including paid apps.  Mario stuff, Star Trek stuff,
Avatar stuff, etc.  It doesn't *appear* that anyone goes to the effort
of licensing them, as they're made by various smaller developers.
Most franchises tend to be alright with free stuff that doesn't
conflict with or detract from the sales of their own licensed
materials as well.  There is a DHD program, albeit a poorly-designed
one, for the iPhone.  I did put a lot of thought into it, and I
believe it is alright.  If MGM does have any complaints, I would fully
comply with it, but the general idea would be free, fun, and
supporting the Stargate franchise.  I did put a good amount of thought
into this issue before making the attempt. ;)

If it did turn out that I was forced to take it down, I still would be
able to play with it personally, and it's creation is going to be a
learning process in itself, so it's worth the effort either way.  But
I doubt there's going to be an issue, I'm an avid supporter of the
Stargate franchise, and I was thinking about including like a quick
promotional link in the menu to an official site or something.  Most
companies have no problem with free advertising.

On Jul 6, 9:58 am, Sephy sephyroth6...@gmail.com wrote:
 Isn't there a copyright on stargate stuff?

 On 6 juil, 05:49, ocdtrekkie jtn...@gmail.com wrote:

  Ah crud, now I feel fairly stupid.  ;)  People responded and I didn't
  see it and posted a seperate request.  I'm gonna upload the design
  document for it, I've got the UI designed, I just can't figure out
  how to program it so it will behave right.  I've read a lot of
  examples/tutorials/help things regarding image rotation, but I haven't
  seen anything that's the same sort of thing, even though I would
  imagine it's a fairly simple idea.

 http://imgs.ocdtrekkie.com/MobileDHDConcept2.jpg

  This is only a portion of the UI, but it's the one I need help with.
  Basically I have a fancy circular image (it's a ring), and I want to
  situate it about there on the screen, and then let people rotate it
  with their finger.  (Only a certain portion of the ring will be
  visible on screen at a time, as you can see).  Looking at the
  different Layout formats though, I'm wondering if I have to go to
  OpenGL for something like this, or if it can be done without it.

  (Oh, TreKing, I just looked at your site... and I will use your app
  next time I go into the city for sure, I live in the Chicago suburbs,
  and public transit here baffles me.  ;) )

  On Jun 24, 10:38 am, TreKing treking...@gmail.com wrote:

   On Fri, Jun 18, 2010 at 12:01 AM, ocdtrekkie jtn...@gmail.com wrote:
Can anyone help get me started?  I can program all the logic I need for 
my
program really well, I just need some help with designing the UI to 
function
the way I want it to.

   What exactly do you expect us to do for you?
   How are we supposed to help you design a UI for your app?

   -
   TreKing - Chicago transit tracking app for Android-powered 
   deviceshttp://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] Re: Question about parcelable object

2010-07-06 Thread jul
The type returned by restaurantList.getRestaurants() is LinkedList (I
still don't understand why. I expect ArrayList, as you can see in my
RestaurantList class definition in previous post).
It now works if I create an ArrayList from the LinkedList.

ArrayListRestaurant restArray = new
ArrayListRestaurant(restaurantList.getRestaurants());
outState.putParcelableArrayList(restoList, restArray);

I'm now going to investigate why gson creates a LinkedList instead of
an ArrayList...

Thanks again for your time, it helped a lot.

Julien


On Jul 6, 4:38 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Jul,

 What is the code around line 254 in Atable.java?

 07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
 org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)

 And, what does restaurantList.getRestaurants() really return, when
 called from  onSaveInstanceState ?

 -- Kostya

 06.07.2010 18:19, jul пишет:

  Thanks again Kostya.

  I don't understand why my List of Restaurant objects is a LinkedList,
  since I define it as
      private ListRestaurant  restaurants = new
  ArrayListRestaurant();
  in my RestaurantList class...

  Anyway, I tried your fix, but I'm still messed with types:

  -first, I had to cast restaurantList.getRestaurants().toArray() to
  (Restaurant[]), because it returns an Object[]:

       Restaurant[] restArray =
  (Restaurant[])restaurantList.getRestaurants().toArray();
       outState.putParcelableArray(restoList,restArray);

  -and even with that, I get an error when executing putParcelableArray:

  07-06 16:09:30.066: ERROR/AndroidRuntime(930):
  java.lang.RuntimeException: Unable to pause activity
  {org.digitalfarm.atable/org.digitalfarm.atable.Atable}:
  java.lang.ClassCastException: [Ljava.lang.Object;
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread.performPauseActivity(ActivityThread.java:
  2840)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread.performPauseActivity(ActivityThread.java:
  2797)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread.handlePauseActivity(ActivityThread.java:
  2780)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread.access$2000(ActivityThread.java:112)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.os.Handler.dispatchMessage(Handler.java:99)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.os.Looper.loop(Looper.java:123)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread.main(ActivityThread.java:3948)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  java.lang.reflect.Method.invokeNative(Native Method)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  java.lang.reflect.Method.invoke(Method.java:521)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:782)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  dalvik.system.NativeStart.main(Native Method)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930): Caused by:
  java.lang.ClassCastException: [Ljava.lang.Object;
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.Activity.performSaveInstanceState(Activity.java:1008)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:
  1256)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     at
  android.app.ActivityThread.performPauseActivity(ActivityThread.java:
  2822)
  07-06 16:09:30.066: ERROR/AndroidRuntime(930):     ... 12 more

  Julien

  On Jul 5, 10:17 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

  Jul,

  This is the heart of the problem in logcat:

  07-05 19:34:28.647: ERROR/AndroidRuntime(808): Caused by:
  java.lang.ClassCastException: java.util.LinkedList
  07-05 19:34:28.647: ERROR/AndroidRuntime(808):     at
  org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)

  My guess is that

  gson.fromJson

  creates a LinkedListRestaurant, then it blows at line Atable.java:254.

  I am guessing it's the line saying:

  outState.putParcelableArrayList(restoList,
  (ArrayListRestaurant)restaurantList.getRestaurants());

  and the immediate cause is the cast from LinkedListRestaurant  to
  ArrayListRestaurant, which are unrelated classes.

  To fix this, you can change the above code to read:

       Restaurant[] restArray = restaurantList.getRestaurants().toArray();
       outState.putParcelableArray(restoList,restArray);

  -- Kostya

  

[android-developers] Re: Unable to view Map on the emulator

2010-07-06 Thread pranay
ok, but i am only running the app on Eclipse so i use only the
debug.keystore file to get the api key? If yes , i am doing that only.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Question about parcelable object

2010-07-06 Thread Kostya Vasilyev

Jul,

The definition in your class only says that the restaurant list is a 
ListRestaurant.


List is an interface:

http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html

Actual implementations are, among others, ArrayList and LinkedList. The 
only thing they have in common is that they both implement the same 
interface: List.


You can assign any actual implementation in one place (in RestaurantList 
field initializer), but it doesn't mean that all other places 
automagically use the same actual implementation, they are free to use 
any other, as long as it's a ListRestaurant


And it appears that gson.fromJson does exactly that - returns a 
ListRestaurant, which is actually a LinkListRestaurant.


-- Kostya

06.07.2010 19:11, jul пишет:

The type returned by restaurantList.getRestaurants() is LinkedList (I
still don't understand why. I expect ArrayList, as you can see in my
RestaurantList class definition in previous post).
It now works if I create an ArrayList from the LinkedList.

 ArrayListRestaurant  restArray = new
ArrayListRestaurant(restaurantList.getRestaurants());
 outState.putParcelableArrayList(restoList, restArray);

I'm now going to investigate why gson creates a LinkedList instead of
an ArrayList...

Thanks again for your time, it helped a lot.

Julien


On Jul 6, 4:38 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
   

Jul,

What is the code around line 254 in Atable.java?

07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)

And, what does restaurantList.getRestaurants() really return, when
called from  onSaveInstanceState ?

-- Kostya

06.07.2010 18:19, jul пишет:

 

Thanks again Kostya.
   
 

I don't understand why my List of Restaurant objects is a LinkedList,
since I define it as
 private ListRestaurantrestaurants = new
ArrayListRestaurant();
in my RestaurantList class...
   
 

Anyway, I tried your fix, but I'm still messed with types:
   
 

-first, I had to cast restaurantList.getRestaurants().toArray() to
(Restaurant[]), because it returns an Object[]:
   
 

  Restaurant[] restArray =
(Restaurant[])restaurantList.getRestaurants().toArray();
  outState.putParcelableArray(restoList,restArray);
   
 

-and even with that, I get an error when executing putParcelableArray:
   
 

07-06 16:09:30.066: ERROR/AndroidRuntime(930):
java.lang.RuntimeException: Unable to pause activity
{org.digitalfarm.atable/org.digitalfarm.atable.Atable}:
java.lang.ClassCastException: [Ljava.lang.Object;
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2840)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2797)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.handlePauseActivity(ActivityThread.java:
2780)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.access$2000(ActivityThread.java:112)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.os.Looper.loop(Looper.java:123)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
java.lang.reflect.Method.invokeNative(Native Method)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
java.lang.reflect.Method.invoke(Method.java:521)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
dalvik.system.NativeStart.main(Native Method)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): Caused by:
java.lang.ClassCastException: [Ljava.lang.Object;
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.Activity.performSaveInstanceState(Activity.java:1008)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:
1256)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
2822)
07-06 16:09:30.066: ERROR/AndroidRuntime(930): ... 12 more
   
 

Julien
   
 

On Jul 5, 10:17 pm, Kostya Vasilyevkmans...@gmail.comwrote:
   
 

Jul,
 
 

This is the heart of the problem in logcat:
 
 

07-05 

[android-developers] Re: How to make a imageview at right of linearlayout

2010-07-06 Thread Jeremy
The gravity attribute should be in the linearlayout, not the
imageview. The gravity attribute tells you what the gravity should be
within a certain area (ie textview or viewgroup)

On Jul 5, 10:08 am, neil monteiro neilm30s...@gmail.com wrote:
 Hi

   Give layout_width=wrap_content for ImageView

 Thanks
 Neil



 On Mon, Jul 5, 2010 at 2:25 AM, cindy ypu01...@yahoo.com wrote:
  Hi All,

  In the linearlayout, I need to put the image at right. I have tried a
  lot of method, none of them works. Can someone point out what is
  wrong?

  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
                 android:layout_width=fill_parent
                 android:id=@+id/logo_block
                 android:padding=10px
         android:layout_height=wrap_content
                 ImageView
                         android:layout_width=fill_parent
                         android:layout_height=fill_parent
                         android:gravity=right
                         android:layout_alignParentRight=true
                         android:src=@drawable/logo_poweredby/
         /LinearLayout

  Thanks!

  Cindy

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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


Re: [android-developers] Re: Change the progress bar style dynamically

2010-07-06 Thread TreKing
On Sat, Jul 3, 2010 at 10:57 AM, Serdel adam.lichwierow...@gmail.comwrote:

 I haven't seen any methods that regard to style in the progress barclass...


I don't think you looked hard enough:
http://developer.android.com/reference/android/app/ProgressDialog.html#setProgressStyle(int)

-
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] How to wait for Asynctask to return with data

2010-07-06 Thread Stephen Lebed
Hi,

I'm calling an AsyncTask in my UI thread from a button click.  The
AsyncTask is collecting data from the hardware sensors, and will store
the info into global variables that I'll perform work from.  I'd like
to know how to either wait for the AsyncTask to finish without locking
up the UI, or how to trigger an event when AsyncTask is finished.

Thanks,
Stephen

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 wait for Asynctask to return with data

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 12:57 PM, Stephen Lebed srle...@gmail.com wrote:
 I'm calling an AsyncTask in my UI thread from a button click.  The
 AsyncTask is collecting data from the hardware sensors, and will store
 the info into global variables that I'll perform work from.

global variables = ick.

 I'd like
 to know how to either wait for the AsyncTask to finish without locking
 up the UI, or how to trigger an event when AsyncTask is finished.

Override onPostExecute() in the AsyncTask and do your work there. In
fact, why not get rid of the global variables, hold onto the data in
the AsyncTask, and just apply them in onPostExecute()?

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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: paypal mobile payment allowed?

2010-07-06 Thread Shane Isbell
On Tue, Jul 6, 2010 at 1:13 AM, Chister Nordvik cnord...@gmail.com wrote:

 The alternative market approach is hopeless in my eyes. Currently we
 have at least:
 SlideMe, AndAppStore, AndroidPit, SE PlayNow, Motorola, Lenovo,
 Handango, Mobihand, OnlyAndroid, GetJar ++

The space has gotten saturated and it will be tough for smaller players to
survive unless they find a strong niche. Handango, mobihand, getjar and the
like have content across multiple operating systems so adding Android is not
much of a cost to them. They can remain in the market indefinitely.

Smaller players like SlideME and AndAppStore are positioned directly against
Google. Currently, they have an important niche in the international market,
but each time Google moves into a new country, they lose. And eventually
Google will be global in its Android Market reach. So they will have to
position themselves differently to make it in the long run.

When I did the first launch of ZappMarket, with a traditional focus +
analytics, it didn't pick up well. I got invaluable feedback from developers
and it became clear there was not enough of a differentiating factor between
Zapp and other offerings like AndAppStore. It also required a lot of users
for aggregate information to have any value. So I was deep in the
chicken-and-egg problem of users driving content and content driving users.

For the launch last week, I tried a different approach, one that didn't
require a lot of users in the beginning to provide value.  ZappMarket is now
a social site, where users hook into facebook, sell their apps and interact
with users. Even a few dedicated users of your apps commenting and providing
feedback can make a huge difference in the direction and quality of your app
(and also drive more sales on Android Market). And there is also the
potential of going viral through friends-of-friends network. A possibility
traditional app stores don't have.

The developer interest in this latest approach is much, much better than the
initial approach, showing that there is a need for social integration into
app stores. I have a personal goal of 1 app a day on average being uploaded
to ZappMarket  and so far so good.

With the right niche, I don't think developers mind uploading their apps,
it's primarily a problem of uploading multiple times to hit the same market
that doesn't make sense.



 You will not get me submitting screenshotsAPK and descriptions for all
 of those. And I guess there are lots more not in that list.

 If an alternative appstore had collected screenshots, apk and
 description from the Android Market and only needed an OK from the
 developer, then maybe it would get more people to submit. But I guess
 the APK collection is a bit on the gray side of what is legal? :-)

 But back to the point of the discussion, is there any hope in getting
 answers from Google regarding the various approaches to selling
 premium content inside a free app? There seems to be nowhere to get
 support for these kinds of question and Android Market related issues
 are never commented by Google in these newsgroups :-(

 -Christer

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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




-- 
Shane Isbell (Founder of ZappMarket)
http://apps.facebook.com/zappmarket/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Address Parsing in Android Webkit

2010-07-06 Thread tenacious
When my site renders in WebKit on Android, addresses are parsed and an
OnClick intent is assigned to them, but this behavior gets in the way
of javascript I want to act when the text is clicked.  Is it because
my site uses MicroFormats for the address?  Is there a way to disable
this on the browser, so no automated parsing occurs?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Game Development

2010-07-06 Thread android_interest
Maxood,

I could post the source code but at this time i'm at a different
location, so I don't have access.

I am already using the onDraw of View. Subclassed a View and onDraw I
draw the bitmap with canvas.drawBitmap(bitmap, locX, locY,
bitmapPaint);

It worked fine when I created 1 bitmap as a private of my subclassed
view class (i.e. ClassX extends View { . private Bitmap
characterBitmap = ... } ).

All that changed is I created a Factory of Character types, gave
Character its own private Bitmap attribute and I load it before the
onDraw of the View executes.

Anything that I could verify, verify the bitmap loaded (i inspected it
with eclipse debug mode, looked fine), any reason why a bitmap would
not load, other than  obvious (specifying the right R.drawable.id, or
something else) ?

Karl

p.s. I have this book too, but thanks for pointing it out. :)

On Jul 6, 3:39 am, Maxood maqs...@salsoft.net wrote:
 Did you try using this method here:

 @Override
         protected void onDraw(Canvas canvas)
         {
                 super.dispatchDraw(canvas);
                 paint(canvas);
         }

 For more information download the source code of this book 
 here:http://www.apress.com/book/downloadfile/4504

 Thanks,
 Maxood

 http://www.maxood-android-corner.blogspot.com/

 On Jul 5, 9:13 pm, android_interest kar...@gmail.com wrote:

  Hello,
  I have following example code:

  
  Character c =
  CharacterFactory.getCharacter(CharacterEnum.SpecialCharacter);
  //factory has applicationContext reference to get bitmaps from R.
  ...
  Paint bitmapPaint = new Paint();
  ...

  View::onDraw(Canvas canvas)
  ...
  canvas.drawBitmap(c.bitmap(), 0, 0, bitmapPaint);
  ...

  For some reason (must be something simple) I do not see the bitmaps at
  the 0,0 of the canvas.

  Inspecting the bitmap and etc does not show anything obvious (nulls),
  I must have missed something...

  Is there something I should be paying particular attention to while
  drawing bitmaps?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 wait for Asynctask to return with data

2010-07-06 Thread Stephen Lebed
Thanks Mark, but I'm not sure if that will work in this case.

I have the user press a button that invokes Asynctask to retrieve data
from the hardware.

The user is then asked to press a second button to retrieve alternate
data from the hardware.

If the user presses the second button before the first call to
Asynctask returns, then the data will not be complete.

I hope this makes sense.  Any ideas for this scenario?

Thanks,
Stephen





On Jul 6, 10:23 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Jul 6, 2010 at 12:57 PM, Stephen Lebed srle...@gmail.com wrote:
  I'm calling an AsyncTask in my UI thread from a button click.  The
  AsyncTask is collecting data from the hardware sensors, and will store
  the info into global variables that I'll perform work from.

 global variables = ick.

  I'd like
  to know how to either wait for the AsyncTask to finish without locking
  up the UI, or how to trigger an event when AsyncTask is finished.

 Override onPostExecute() in the AsyncTask and do your work there. In
 fact, why not get rid of the global variables, hold onto the data in
 the AsyncTask, and just apply them in onPostExecute()?

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

 Android Development Wiki:http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Game Development

2010-07-06 Thread android_interest
I do what they describe here:

http://developer.android.com/guide/topics/graphics/index.html

in the On a View: section...

Maybe I should try debugging with Hiearchy Viewer
http://developer.android.com/guide/developing/tools/hierarchy-viewer.html

K



On Jul 6, 11:31 am, android_interest kar...@gmail.com wrote:
 Maxood,

 I could post the source code but at this time i'm at a different
 location, so I don't have access.

 I am already using the onDraw of View. Subclassed a View and onDraw I
 draw the bitmap with canvas.drawBitmap(bitmap, locX, locY,
 bitmapPaint);

 It worked fine when I created 1 bitmap as a private of my subclassed
 view class (i.e. ClassX extends View { . private Bitmap
 characterBitmap = ... } ).

 All that changed is I created a Factory of Character types, gave
 Character its own private Bitmap attribute and I load it before the
 onDraw of the View executes.

 Anything that I could verify, verify the bitmap loaded (i inspected it
 with eclipse debug mode, looked fine), any reason why a bitmap would
 not load, other than  obvious (specifying the right R.drawable.id, or
 something else) ?

 Karl

 p.s. I have this book too, but thanks for pointing it out. :)

 On Jul 6, 3:39 am, Maxood maqs...@salsoft.net wrote:

  Did you try using this method here:

  @Override
          protected void onDraw(Canvas canvas)
          {
                  super.dispatchDraw(canvas);
                  paint(canvas);
          }

  For more information download the source code of this book 
  here:http://www.apress.com/book/downloadfile/4504

  Thanks,
  Maxood

 http://www.maxood-android-corner.blogspot.com/

  On Jul 5, 9:13 pm, android_interest kar...@gmail.com wrote:

   Hello,
   I have following example code:

   
   Character c =
   CharacterFactory.getCharacter(CharacterEnum.SpecialCharacter);
   //factory has applicationContext reference to get bitmaps from R.
   ...
   Paint bitmapPaint = new Paint();
   ...

   View::onDraw(Canvas canvas)
   ...
   canvas.drawBitmap(c.bitmap(), 0, 0, bitmapPaint);
   ...

   For some reason (must be something simple) I do not see the bitmaps at
   the 0,0 of the canvas.

   Inspecting the bitmap and etc does not show anything obvious (nulls),
   I must have missed something...

   Is there something I should be paying particular attention to while
   drawing bitmaps?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 wait for Asynctask to return with data

2010-07-06 Thread Frank Weiss
The second button should be disabled while the first asynctask runs.
When it finishes, the second button is enabled.

You don't need global variables. You can save the results in
instance fields of the activity.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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]

2010-07-06 Thread saurabh sinha
hello friends

I am android developer getting married on 24 july in AMERICA california so
best of luck to me for good life

and all you keep working on android one day it will take up

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Uninstall Updates functionality

2010-07-06 Thread Dianne Hackborn
Yep this is to remove an update to a pre-installed app.  This has been in
the platform since 1.6.

On Tue, Jul 6, 2010 at 3:23 AM, Mark Murphy mmur...@commonsware.com wrote:

 On Tue, Jul 6, 2010 at 6:15 AM, Mark Carter mjc1...@googlemail.com
 wrote:
  I noticed that (on Froyo) when viewing Google Maps using the Market
  app (or going through Manage Applications), there is a button to
  Uninstall Updates. I haven't seen this for any other app (but I
  haven't looked that hard either).

 If I had to guess, this is because Maps comes on the firmware and can
 be updated via the Market. They label it Uninstall Updates because
 removing the Market package would result in you still having the Maps
 app, just back to the firmware edition.

  Is this functionality available to the rest of us devs?

 If you ship as part of phone firmware, presumably yes. For example,
 the device manufacturer might ship 1.0 of your app but tell you to
 push updates via the Market for 1.1, 1.1b, System 3000, Mark V, and
 1.1c of your app.

 Note, though, that this is an educated guess, based on a few
 conversations, with only a passing resemblance to absolute assurance.

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

 _Android Programming Tutorials_ Version 2.8 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




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

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

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

Re: [android-developers] Re: Accurate sleep()\timer in Android

2010-07-06 Thread Dianne Hackborn
On Tue, Jul 6, 2010 at 2:11 AM, Omer Gilad omer.gi...@gmail.com wrote:

 1. Will increasing the thread priority improve accuracy (starving
 other threads in the meanwhile of course)?


It depends.  As I said, the main thing is to not be running in the
background, which means using the platform facilities for this (either being
associated with an activity that is currently in the foreground, or a
service that has been put in the foreground).


 2. The operation I'm doing involves network activity - UDP\TCP packet
 sending. Is there good native support for networking that is device
 independent (like the normal libc, libz)? Or maybe I should ask this
 in the NDK group?


You have extremely strict jitter requirements for something involving
NETWORKING?  That is...  strange.

I suspect the jitter happening on the network end is going to way outweigh
what is happening on the device.

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

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

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

[android-developers] Re: How to wait for Asynctask to return with data

2010-07-06 Thread Stephen Lebed
Thanks Frank, its a very good idea.  I'll have to rewrite the
interface code to accommodate it.  I'm currently using an alert dialog
to present the user with the button to click or cancel.  It executes
the Asynctask, and calls a second alert dialog with a new button to
press or cancel.  Right now the second alert dialog appears as soon as
the first button is pressed.  That is the reason why I wanted to wait
for Asynctask to return.

I guess I could try calling a new alert dialog in the onPostExecute(),
but I don't think I can do that?







On Jul 6, 11:57 am, Frank Weiss fewe...@gmail.com wrote:
 The second button should be disabled while the first asynctask runs.
 When it finishes, the second button is enabled.

 You don't need global variables. You can save the results in
 instance fields of the activity.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Avoid non-static inner classes in an activity?

2010-07-06 Thread Dianne Hackborn
On Mon, Jul 5, 2010 at 11:56 PM, Bob Kerns r...@acm.org wrote:

 Actually, they CAN return different Application objects, and are
 actually documented to do so, if you read it carefully.


Well I wrote the functions and looked at the code to double-check, and as
intended they return the Application singleton associated with that
component's package.

Note that in some early versions of the platform there could not be multiple
Application objects in a process, so if you had multiple .apks loaded in the
same process then you would always get the Application of the first.  That
has been fixed since at least 1.5.  And anyway, if we are just talking about
a single .apk running in a process, this is all extremely simple and there
is one and only one Application object there.


 I don't think it's exactly a bug that they do -- but I do think the
 platform would be improved by removing getApplicationContext() from
 the public API somehow. Perhaps by deprecating it, changing all the
 valid internal uses to something internal, and making it return what
 getApplication() returns (thereby fixing bugs).


I don't think there is any benefit to removing it.  Like I said, it would be
good to have a CTS test to ensure that these days it returns the same thing
as getApplication().


 getApplicationContext() returns the context of the single, global
 Application object of the current process. There are several problems
 with this:


The documentation has not been updated since the fix was done to deal with
multiple .apks in a process.


 * Programmers shouldn't be writing their programs around what process
 their activities and applications live in


Er...  of course they should.  We very carefully define what process things
will run in, and allow developers to explicitly modify that behavior.
 Forcing people to not be able to make assumptions about the process they
are running in would make developing applications incredibly difficult for
no good reason.


 * They won't have useful access to it anyway (when it's from a
 different .apk, it's also from a different classloader, so you can't
 cast it to anything).


Yes if you have multiple .apks in a process, there are interesting
interactions.  These days you should be getting the Application/Context for
your own .apk.  Things are super broken if you don't -- for example any
attempt to access your own resources with it will fail.


 * It's not well-defined just WHICH application will be the single
 global Application object of the current process.


It is today.


 * It's confusing having two calls which APPEAR to do the same thing. I
 believe the presence of the name context in the name here is
 responsible for a lot people using it when they should be using the
 Activity. It's like a road sign showing a shorter route, that happens
 to lead to a bridge that's out.


This is mostly a case of layering.  Context lives in the content package, so
doesn't know anything about Application.  However it is useful to have a
clear way to get the Application object, so there is a method on Activity to
do so.


 It's worth noting that, in the case where getApplicationContext()
 returns a different Application, you don't even want to access the
 resources. If it's not your application, they'll be the wrong ones --
 and you have no definition of which application it will be.


We really just don't want this to happen.


 It's fortunate that applications rarely share a process, and never
 without sharing a name and signing key. Calling the wrong one will
 very rarely hurt you.


Yes sharing a process should be a rare thing, though we do this not
infrequently in the platform.  One of the reasons this bug got fixed is
because on the initial lower-end devices launcher and contacts share a
process, and started running into bugs because of the mix of the Application
object.


 I'd like to highlight your statement: while the base Context
 implementation needs to retrieve it for its package. That's NOT what
 it's documented to do, and that's NOT the behavior I last observed.
 The last I checked, it did NOT retrieve it based on the current
 package. If that has changed, then the documentation needs to catch
 up, and you're probably half-way toward my proposed solution
 (deprecation + behavior change). In that case, you'd just need to
 document the change (i.e. change the document), and deprecate.


Yeah the documentation should be updated.

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

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to

Re: [android-developers] Re: How to wait for Asynctask to return with data

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 3:44 PM, Stephen Lebed srle...@gmail.com wrote:
 I guess I could try calling a new alert dialog in the onPostExecute(),
 but I don't think I can do that?

I would expect that to work just fine.

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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Image Saving Small Size

2010-07-06 Thread jeremynealbrown
I have written a simple app that opens the camera and passes in a path
for saving any captured images.

The code basically looks like this:

File file = new File( Environment.getExternalStorage() + myimages/,
my_image.jpg );

Uri outputUri = Uri.fromFile( file );

Intent intent = new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
Intent.putExtra( MediaStore.EXTRA_OUTPUT, outputUri );

This works perfectly on my Motorola Droid. Images are saved 2592x1936.
However, when tested on the Motorola Milestone, the images are saved
at much smaller sizes such as 320x240 and 1280 x 1900.

It seems like there is some default setting on the Milestone causing
this behavior. The difficult part about this bug is that I don't
actually have the device to test on. This is part of a research
project that is happening in Greece and the Milestones are there. I am
testing at home with a Droid.

Any help would be greatly appreciated.

Thanks,
~Jeremy

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Create a Surface object without a foreground activity

2010-07-06 Thread James Aguilar
I have a function that needs a Surface object to work. I'd like to be
able to call that function from a background Service without starting
a foreground Activity. Every Surface source in the API that I can see,
though, requires a View that's laid out before the Surface becomes
available. Are there other ways to create a Surface that I am missing,
and can you point me to them?

-- James

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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]

2010-07-06 Thread ranjan ar
Good luck with your married life.

On Tue, Jul 6, 2010 at 12:27 PM, saurabh sinha saurs...@gmail.com wrote:

 hello friends

 I am android developer getting married on 24 july in AMERICA california so
 best of luck to me for good life

 and all you keep working on android one day it will take up

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

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

Re: [android-developers] Create a Surface object without a foreground activity

2010-07-06 Thread Dianne Hackborn
No you need to be associated with an Activity UI in some way, so you can
have a SurfaceView attached to it to.

On Tue, Jul 6, 2010 at 1:53 PM, James Aguilar aguilar.ja...@gmail.comwrote:

 I have a function that needs a Surface object to work. I'd like to be
 able to call that function from a background Service without starting
 a foreground Activity. Every Surface source in the API that I can see,
 though, requires a View that's laid out before the Surface becomes
 available. Are there other ways to create a Surface that I am missing,
 and can you point me to them?

 -- James

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




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

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

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

[android-developers] Wrong API reference doc?

2010-07-06 Thread Sebastián Treu
Hi all,

Building with:
[setup] Android SDK Tools Revision 6
[setup] Project Target: Google APIs
[setup] Vendor: Google Inc.
[setup] Platform Version: 2.2
[setup] API level: 8

From here:
http://developer.android.com/intl/fr/reference/android/view/ViewGroup.html#onRequestFocusInDescendants%28int,%20android.graphics.Rect%29

The documentation says that direction should be one of:  FOCUS_UP,
FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT.



From here:
http://developer.android.com/intl/fr/reference/android/view/View.html#FOCUS_FORWARD.

The doc says that FOCUS_FORWARD is a value to be used with 'focusSearch(int)'.



And from here:
http://developer.android.com/intl/fr/reference/android/view/View.html#focusSearch%28int%29

The doc says that direction should be one of: FOCUS_UP, FOCUS_DOWN,
FOCUS_LEFT, and FOCUS_RIGHT.


I needed to extend Gallery as it seems to manage absolutly BAD the
focus on the selected view. When I was overriding:

'onRequestFocusInDescendants(int direction, Rect  previouslyFocusedRect)'

I made a debug to see which value was 'direction'. It was 2
(FOCUS_FORWARD). I was NOT calling requestFocus(int, Rect), so the
view system was. After that, I made a 'focusSearch(FOCUS_FORWARD)'
from a View and I get an illegal argument exception.

Any ideas where that '2' came in? And why the doc says that
FOCUS_FORWARD is to be used in focusSearch() in the constant details
but in the method description says no.

Best regards,
-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] GUI Android

2010-07-06 Thread ranjan ar
I have problems aligning Widgets (using Droid Draw)  the GUI, while in
emulator the GUI looks perfect..but when I deploy in Droid (Motorola) the
buttons and text boxes get overlapped on each other..  a lot of
compatibility issues..is there a way to design .. any tool other than Droid
Draw?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 set sync interval for accounts in pre-froyo

2010-07-06 Thread Carlos Silva
On Wed, Jun 23, 2010 at 00:48, Connick oconn...@gmail.com wrote:

 Hi folks,

 Does anyone know if there's a way to set the sync interval on accounts via
 sync adapter in pre-froyo? They've added the API to do so in 2.2 but I'm
 curious to know if there is a workaround in 2.0-2.1. (My backup plan is the
 alarm manager) What's odd is there doesn't even seem to be any preset
 interval either ...so accounts are never synced!


Does anyone know anything about this?

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

[android-developers] show map intent shows my location first, take a look

2010-07-06 Thread Yorgos X
Hi, I have found this erroneous behaviour on my phone, please let me know if
you have any idea how to resolve it:

I am trying to open a google maps intent using the following URI:

geo:latitude,longitude?z=zoom

However, when I open this intent, the gps on the device starts and google
maps first displays my location instead of the location in the URI. This
happens only the first time you open google maps. If I go back to my app and
make the same selection , then the correct position on the map appears.

I tried using something like this: geo:0,0?q=*business+near+city, however
this doesnt centers the map on a position, but in the nearest address.*
**
*Any ideas?*

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

[android-developers] Randomly closing app - Input Manager -

2010-07-06 Thread Genc

Hi all,

I've a very simple app, similar to fingerpaint application. I'm
drawing some lines on the screen with my finger.

My problem is that, app closes itself randomly, taking me back to
Android home screen.

Only log I can see on LogCat is that line:

(Warning) Tag: InputManagerService: Got RemoteException sending
setActive(false) notification to pid 4962 uid 10077.

No exception is thrown.

I've tried compiling project against Android 2.0, 2.1 and 2.2...

I've tried disabling debuggable attribute in manifest.

I'm having this problem on both Nexus One and 2.2 Emulator.

Any help is appreciated.

Thanks in advance.

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


[android-developers] Randomly closing app - InputManagerService: Got RemoteException sending setActive(false) notification

2010-07-06 Thread Genc
Hi all,

I've a very simple app, similar to fingerpaint application. I'm
drawing some lines on the screen with my finger.

My problem is that, app closes itself randomly, taking me back to
Android home screen.

Only log I can see on LogCat is that line:

(Warning) Tag: InputManagerService: Got RemoteException sending
setActive(false) notification to pid 4962 uid 10077.

No exception is thrown.

I've tried compiling project against Android 2.0, 2.1 and 2.2...

I've tried disabling debuggable attribute in manifest.

I'm having this problem on both Nexus One and 2.2 Emulator.

Any help is appreciated.

Thanks in advance.

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


[android-developers] Maintaining Aspect Ratio of Background Image

2010-07-06 Thread Daniel Lew
I've got a complex problem I've been thinking over for a while.  The
core issue is that I've got a background for my app which I would like
to maintain its aspect ratio, yet at the same time use as much of the
background as possible.  My current solution, which is less-than-
ideal, is to simply use the default android:windowBackground style,
which simply fills the background; so on some screens it looks fine,
and on others the aspect ratio is a little wonky.

One important thing to note is that the background isn't being used
for anything but as a background.  I know some people use the
background as a board for games...  this isn't a case like that.  In
this situation, the aspect ratio keeps the image looking nice, nothing
more.

Anyways, I've come upon an interim solution, which is to use a
BitmapDrawable with Gravity set on it to center.  However, while this
maintains aspect ratio, it presents a few problems:

1. I have to create multiple images, one for each possible overall
screen size (small, medium and large).

2. Depending on the image, it won't necessarily take up the entire
space.  For example, if I make a 480x854 (for Droid) background image,
some of the vertical space will be chopped off on an N1.

What I'd like - and I'm not sure if this is possible - is for the
background to fill vertically, maintain the horizontal resolution
based on the modifications made vertically, then to be centered.  In
other words, the horizontal part may be clipped, but the vertical part
will always be 100%.

Is any of this doable?  Is there a better solution to this problem I'm
not aware of?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 wait for Asynctask to return with data

2010-07-06 Thread Stephen Lebed
It did work fine!  Thank again for all your help as always.

Best,
Stephen


On Jul 6, 12:47 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Jul 6, 2010 at 3:44 PM, Stephen Lebed srle...@gmail.com wrote:
  I guess I could try calling a new alert dialog in the onPostExecute(),
  but I don't think I can do that?

 I would expect that to work just fine.

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

 Android Development Wiki:http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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 set sync interval for accounts in pre-froyo

2010-07-06 Thread baka
On Eclair, I think accounts can be synced only manually by going to
Settings - Accounts - Sync Now

On Jul 6, 5:23 pm, Carlos Silva r3...@r3pek.org wrote:
 On Wed, Jun 23, 2010 at 00:48, Connick oconn...@gmail.com wrote:
  Hi folks,

  Does anyone know if there's a way to set the sync interval on accounts via
  sync adapter in pre-froyo? They've added the API to do so in 2.2 but I'm
  curious to know if there is a workaround in 2.0-2.1. (My backup plan is the
  alarm manager) What's odd is there doesn't even seem to be any preset
  interval either ...so accounts are never synced!

 Does anyone know anything about this?

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


Re: [android-developers] Re: How to set sync interval for accounts in pre-froyo

2010-07-06 Thread Carlos Silva
On Tue, Jul 6, 2010 at 23:50, baka rkabhi1...@gmail.com wrote:

 On Eclair, I think accounts can be synced only manually by going to
 Settings - Accounts - Sync Now


Google accounts sync automatically :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Maintaining Aspect Ratio of Background Image

2010-07-06 Thread Frank Weiss
Sounds like you are making unrealistic assumptions that every device's
display aspect ratio will be similar. What would happen with a device
with a completely square display?

What would you lose if you had a fallback, such as letterboxing? What
would you lose if your application didn't have a background image?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Create a Surface object without a foreground activity

2010-07-06 Thread James Aguilar
On Jul 6, 2:23 pm, Dianne Hackborn hack...@android.com wrote:
 No you need to be associated with an Activity UI in some way, so you can
 have a SurfaceView attached to it to.

I can't really get around needing a Surface, because one is necessary
for setPreviewDisplay on the camera. On the other hand, I have tested
that I can dismiss an Activity from the foreground once I have the
Surface and continue recording video. The Surface seems to be
available in the background as long as it was in the foreground at
_some_ time. So, I've struck on a solution that might be good enough
for my purposes.

When I need to start recording video, I could start an Activity that
allocates the surface, begins recording, then backgrounds itself. I
haven't looked into it yet, but I assume the Android platform has some
way of remembering what the previous activity was so I can
automatically return to it. Then I can keep recording in that activity
until I'm done, and then stop the Activity somehow.

I guess that this will result in the screen flickering when the
activity starts up, but it sounds like there is no way around it. Do
you have any suggestions for how I could operate the video recorder
less disruptively than that? Specifically, in a way that would not
interrupt whatever else the user is doing when my program decides to
start recording?

-- James

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Create a Surface object without a foreground activity

2010-07-06 Thread Dianne Hackborn
If you need a Surface, you need to have your UI running in the foreground.
 That is just the way it is.

On Tue, Jul 6, 2010 at 4:13 PM, James Aguilar aguilar.ja...@gmail.comwrote:

 On Jul 6, 2:23 pm, Dianne Hackborn hack...@android.com wrote:
  No you need to be associated with an Activity UI in some way, so you can
  have a SurfaceView attached to it to.

 I can't really get around needing a Surface, because one is necessary
 for setPreviewDisplay on the camera. On the other hand, I have tested
 that I can dismiss an Activity from the foreground once I have the
 Surface and continue recording video. The Surface seems to be
 available in the background as long as it was in the foreground at
 _some_ time. So, I've struck on a solution that might be good enough
 for my purposes.

 When I need to start recording video, I could start an Activity that
 allocates the surface, begins recording, then backgrounds itself. I
 haven't looked into it yet, but I assume the Android platform has some
 way of remembering what the previous activity was so I can
 automatically return to it. Then I can keep recording in that activity
 until I'm done, and then stop the Activity somehow.

 I guess that this will result in the screen flickering when the
 activity starts up, but it sounds like there is no way around it. Do
 you have any suggestions for how I could operate the video recorder
 less disruptively than that? Specifically, in a way that would not
 interrupt whatever else the user is doing when my program decides to
 start recording?

 -- James

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




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

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

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

Re: [android-developers] Re: How to set sync interval for accounts in pre-froyo

2010-07-06 Thread Connick
I ended up using a hybrid solution. Alarm manager to perform a requestSync.
I believe auto is feasible if you have the option of leveraging their
cloud-device messaging.


On Tue, Jul 6, 2010 at 6:55 PM, Carlos Silva r3...@r3pek.org wrote:

 On Tue, Jul 6, 2010 at 23:50, baka rkabhi1...@gmail.com wrote:

 On Eclair, I think accounts can be synced only manually by going to
 Settings - Accounts - Sync Now


 Google accounts sync automatically :)


  http://groups.google.com/group/android-developers?hl=en


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

Re: [android-developers] Re: User comments available in the developer console!

2010-07-06 Thread Mark Murphy
On Tue, Jul 6, 2010 at 8:51 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
 What stinks is that me, as a one-person team, but with a non-open
 source app, have no access to the Google Code bug tracking system.
 Google's justification is that non-open source projects should have
 the financial backing to pay for their own issue tracking solution.  I
 think that's a very wrong assumption in the case of the Android
 platform.

Lighthouse is $15/month. Teambox is $12/month. Here's a StackOverflow
post with some free ones:

http://stackoverflow.com/questions/966404/does-anyone-know-of-a-decent-free-online-bug-tracker-for-web-development-purposes

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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] double tap zoom on Google maps

2010-07-06 Thread zeeshan mirza
Here is my own code which i have written up till now. I am trying to
implement onDoubleTap() zoom in function in my application. My code is as
follows. LEt me know where is the problem ? and if possible please add the
correct code for double tap zoom in function.

public class Maps extends MapActivity implements OnGestureListener,
OnDoubleTapListener{

 private GestureDetector detector;
 MapView mapView;
 /** Called when the activity is first created. */
 @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//MapViewer mapViewer = new MapViewer(null, null);
mapView = (MapView) findViewById(R.id.mapview);
detector = new GestureDetector(this,this);
mapView.setBuiltInZoomControls(true);
}
 @Override
 protected boolean isRouteDisplayed() {
   return false;
 }

 public boolean onDoubleTap(MotionEvent e) {
  // TODO Auto-generated method stub
  mapView.getController().zoomIn();
  return false;
 }
 public boolean onDoubleTapEvent(MotionEvent e) {
  // TODO Auto-generated method stub
  return false;
 }
 public boolean onSingleTapConfirmed(MotionEvent e) {
  // TODO Auto-generated method stub
  return false;
 }
 public boolean onDown(MotionEvent e) {
  // TODO Auto-generated method stub
  return false;
 }
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
   float velocityY) {
  // TODO Auto-generated method stub
  return false;
 }
 public void onLongPress(MotionEvent e) {
  // TODO Auto-generated method stub

 }
 public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
   float distanceY) {
  // TODO Auto-generated method stub
  return false;
 }
 public void onShowPress(MotionEvent e) {
  // TODO Auto-generated method stub

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

On Fri, Jul 2, 2010 at 5:26 PM, TreKing treking...@gmail.com wrote:

  On Wed, Jun 30, 2010 at 2:44 PM, SilentCoders 
 zeeshan.nabeel.mi...@gmail.com wrote:

 I need a sample code which i can use in my application.


 No, you need to do your own work and ask specific questions when you get
 stuck.

 Start with the Google Maps API documentation, the Hello MapView (or
 whatever it's called) sample on the official documentation site. Review
 handling touch events and start putting something together. If you get stuck
 on something specific, come back, show what you've done and ask a specific
 question someone may be able to help you out with.



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


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

Re: [android-developers] How to make a imageview at right of linearlayout

2010-07-06 Thread Levi
Hi,try it Good Luck!

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
   android:layout_width=fill_parent
   android:id=@+id/logo_block
   android:padding=10px
   android:layout_height=wrap_content
   android:gravity=right
   ImageView
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   android:src=@drawable/logo_poweredby/
   /LinearLayout

2010/7/5 cindy ypu01...@yahoo.com

 Hi All,

 In the linearlayout, I need to put the image at right. I have tried a
 lot of method, none of them works. Can someone point out what is
 wrong?

 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:layout_width=fill_parent
android:id=@+id/logo_block
android:padding=10px
android:layout_height=wrap_content
ImageView
android:layout_width=fill_parent
android:layout_height=fill_parent
android:gravity=right
android:layout_alignParentRight=true
android:src=@drawable/logo_poweredby/
/LinearLayout

 Thanks!

 Cindy

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: Echo Cancellation

2010-07-06 Thread Andy Savage
Just a nudge on this, anybody have any information?

On Wed, Jun 30, 2010 at 10:41 AM, Andy Savage a...@bluewire.net.nz wrote:

 Hi there,

 Can anybody tell me about the current state of echo cancellation in
 Android? Are the functions automatically applied to microphone input?

 Can I use it, or is it applied automatically?

 I presume it uses OSLEC? Is this correct?

 Kind regards,
 Andy Savage


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: Maintaining Aspect Ratio of Background Image

2010-07-06 Thread Daniel Lew
You're making some assumptions about what I'm assuming.  The whole
reason this problem has come up is *because* phones have differing
aspect ratios.  My question has very much so to do with the
possibility of a square display - if one comes up, then I want to be
able to keep the aspect ratio of the image, squishing the image
vertically but cropping horizontally in order to maintain the same
view.  The only assumption I'm making is that the phone won't be super
long and thin, such that the image for the background would run out of
horizontal cropping space.

Both alternatives you list are much inferior to the current one, which
involves a little squishing/skewing.

-Daniel

On Jul 6, 5:55 pm, Frank Weiss fewe...@gmail.com wrote:
 Sounds like you are making unrealistic assumptions that every device's
 display aspect ratio will be similar. What would happen with a device
 with a completely square display?

 What would you lose if you had a fallback, such as letterboxing? What
 would you lose if your application didn't have a background image?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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] Move Image View to new location

2010-07-06 Thread Anthoni
Hello,

In a LinearLayout I have 6 images inside ImageView containers. When I
click on one of them I want that one to pop up by say 10 pixels to
show it's been selected. I also need to have any other image
unselected by having it reset back to where the other images are.

I thought this would be simple, but it turns out it is far more
complex than I realised. I thought that I could increase the
ImageViews y location, but there is no access to that. So I looked
into LayoutParams and managed to get some sort of success, but then
realised it had ruined all my other layouts. So I looked into the
Animation classes and found Translate animation. I can now get it to
move slightly, but the darn thing then snaps back into place and won't
stay there.

This is driving me nuts. I mean it should be so simple, but how on
earth do you move ImageViews once they are laid out ? Below is my
animation code that I am trying, but how do I prevent it from snapping
back to where it is? I then also need to get it snap back only when
another image is selected.

[code]
 private View.OnClickListener cardClick = new View.OnClickListener()
{
public void onClick(View v)
{
//public TranslateAnimation (int fromXType, float
fromXValue, int toXType, float toXValue, int fromYType, float
fromYValue, int toYType, float toYValue)
TranslateAnimation animation = new
TranslateAnimation(0.0f, 0.0f, 0.0f, v.getLayoutParams().height);
animation.setDuration(500);
v.startAnimation(animation);
}
};
[/code]

Regards
Anthoni

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 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: App Not Visible On Donut

2010-07-06 Thread TreKing
On Tue, Jul 6, 2010 at 5:11 AM, Pent lee.wil...@googlemail.com wrote:

 I already need several versions of my app (market-cupcake,
 non-market- cupcake, market-not-cupcake, non-market-not-cupcake), now I
 need 'market-version-donut-no-bluetooth'  as well.


If you use suggested techniques like reflection to determine what
functionality is available to you at runtime, you only need one version of
your app. Or keep going the way your going and enjoy your maintenance
nightmare.

Why do you need a separate Market and non-Market version anyway?

-
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] Re: How to make a imageview at right of linearlayout

2010-07-06 Thread cindy
Have tried all those, none of them works. Does it mean we can't put a
imageview to right?

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:id=@+id/logo_block
android:padding=10px
 android:gravity=right
android:layout_height=wrap_content
ImageView
android:layout_width=fill_parent
android:layout_height=fill_parent
android:src=@drawable/logo_poweredby/
/LinearLayout

On Jul 6, 6:15 pm, Levi limingwei...@gmail.com wrote:
 Hi,try it Good Luck!

 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
                android:layout_width=fill_parent
                android:id=@+id/logo_block
                android:padding=10px
                android:layout_height=wrap_content
                android:gravity=right
                ImageView
                        android:layout_width=fill_parent
                        android:layout_height=fill_parent
                        android:src=@drawable/logo_poweredby/
        /LinearLayout

 2010/7/5 cindy ypu01...@yahoo.com

  Hi All,

  In the linearlayout, I need to put the image at right. I have tried a
  lot of method, none of them works. Can someone point out what is
  wrong?

  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
                 android:layout_width=fill_parent
                 android:id=@+id/logo_block
                 android:padding=10px
         android:layout_height=wrap_content
                 ImageView
                         android:layout_width=fill_parent
                         android:layout_height=fill_parent
                         android:gravity=right
                         android:layout_alignParentRight=true
                         android:src=@drawable/logo_poweredby/
         /LinearLayout

  Thanks!

  Cindy

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

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


Re: [android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-07-06 Thread Frank Weiss
No worries.

16x9 (a la Droid) is probably the most extreme screen aspect ratio
you'll ever encounter in an Android device. Have you considered
creating a scaled and cropped image on the fly the first time the app
is run and caching that on the SD card?

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


[android-developers] Re: Move Image View to new location

2010-07-06 Thread Anthoni
OK, so I've partially worked it out. Using the code below my image
scrolls upwards by a set amount BUT it also chops that amount off the
top of the image. It looks as though the image is sliding underneath
the view above it, which is not what I want at all.

Can you perhaps change the Z-Order of an ImageView so it rests above
everything else ?
Would I need to post my layout xml, perhaps that is at fault ?

[code]
TranslateAnimation animation = new TranslateAnimation
(
Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f,
Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE,
v.getLayoutParams().height - 10
);
animation.setDuration(500);
animation.setFillAfter(true);
v.startAnimation(animation);
[/code]

Regards
Anthoni

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


[android-developers] Re: Android can't read wave files

2010-07-06 Thread Walter
Hi,

Please send me a sample file if it can not be played. We always give
user refund if the app doesn't work, even it's over 24 hours.

Regards,

Walter

On Jun 24, 7:43 am, KISSandroid accessibili...@gmail.com wrote:
 I am a new Android user, Verizon Droid and I love the product and I
 don’t know how to get an answer so I hope you can help me.  I could
 not read wave files emailed to me from my answering service and their
 technician said:

 beginning of technicain comments
 Regarding the Verizon Droid user playing wav files. I did a little
 research and found this to be a problem for many, many, Droid owners.
 Our wav files are GSM 6.10 audio format, 13kbps bit rate, mono, 8kHz
 sample rate. Droid does not support the GSM 6.10 wav encoding format.
 Many voice mail systems, answering services, and MagicJack use this
 format. Neither the Droid manufacturer (Motorola) nor Google has a fix
 this problem yet.

 I did find reference to a $3 program available for the Droid that may
 help our customer out though. Since we don't have a Droid to play
 with, I can't tell you if it will work or not. The program is called
 Remote Wave.
 end of technicain comments

 SO, I purchased this program at the Android market.  Remote Wave from
 Walter Yongtao Wang and I have 24 hours to get a refund.  It did not
 work nor could I get my money back.  At this point I am hoping that
 remote wave will get updated and work.

 As a businessman that is investing in the success of Android, I feel
 it is important to point out how the market feels and the above
 comments from an IS person needs to be solved.  I am an advocate for
 Android and I will help out as needed on this problem.  Thank you for
 your support!

 KISS2 Principle

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


  1   2   >