[android-developers] Re: How to keep focus highlight on ExpandableList group....

2009-04-16 Thread Peter Carpenter

I'm struggling with a similar issue myself at the moment.

I traced mine down to the fact that modifying the child component caused
it to call RequestLayout().  This in turn, caused the parent to relayout
which unfortunately meant removing and replacing the component with a
new one - thus the focus being lost.  

I fixed this specific problem by overriding the adapter so that it
always used the same instance of the child view when editing. (I'm not
sure why the internal recycling didn't seem to be doing this already
though...)

This might be enough for your situation, however, I'm still left with
the component receiving the focus but not displaying as focused.  That's
the subject of my other thread.

Just a few thoughts...

Peter.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of John B. Hansen
Sent: Thursday, 16 April 2009 6:27 AM
To: Android Developers
Subject: [android-developers] How to keep focus highlight on
ExpandableList group


I'm using an ExpandableListActivity and notice that whenever I select
a group item (to expand or collapse it), it highlights briefly and
then
quickly un-highlights.

For my application, I want the group items to remain highlighted. I've
tried requestFocus() and several other things but nothing is working.

Anyone know how to keep a selected group item (after expand or
collapse)
highlighted and focused?

Any help appreciated.

jh





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



[android-developers] Accessing internal scrollbar drawable

2009-04-16 Thread Peter Carpenter

Hi,

Hopefully this is a simple one.

My application requires me to draw a scrollbar myself (and include the
old-school physical up/down buttons.  I can't do this via XML as all of
my screens are generated on the fly by data received over a socket. Like
a web browser.

Now the drawables I'm after are scrollbar_vertical.9 and
scrollbar_handle_vertical.9  however these are no longer visible in
the SDK.
I've been poking around and found that
android.R.attr.scrollbarThumbVertical seems to describe what I'm
after, however if I try to load this using
getResources().getDrawable(android.R.attr.scrollbarThumbVertical) I
get a Resources$NotFoundException...

All of the scrollbar parameters in view are protected, but not visible
because the sdk jar file purposely hides them. Grrr!
Ie - ScrollBarDrawable is exactly the class I want, but I quote from the
file:
 * For now, we'll hide it so it can be cleaned up later.
  * {...@hide}

Does anyone know how I can get the standard scrollbar drawables or am I
really going to have to copy them in as my own resources?

Peter.





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Direct Video Encoder Access?

2009-04-16 Thread Sheado

Howdy,

Does anybody know of a way to directly access the Video Encoders
provided by the (android.media.MediaRecorder) API? I'd like to make
changes to the raw camera data before it gets encoded.

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



[android-developers] Re: getting android_id from GoogleLoginServiceBlockingHelper?

2009-04-16 Thread Mariano Kamp

*bump* ;-)

Dianne, nobody else stepped up with more explanation. Do you have any
idea whom to contact or how to proceed to get more information?

Did cupcake change your previous answer in any way?

On Mar 20, 10:50 pm, Dianne Hackborn hack...@android.com wrote:
 Sorry maybe someone else can help you but I can't; I work on the Android
 platform, I am not that familiar with what is going on with the Google apps.

 On Fri, Mar 20, 2009 at 1:01 PM, Mariano Kamp mariano.k...@gmail.comwrote:



  On a related note, is there any API today or planned for tomorrow for
  accessing the user's Google credentials in a safe way to pass them onto a
  Google service?
  The actual context is that I have users complaining that they don't want to
  give my app their google userid/pw to access Google Reader via my app. I
  hear Gmail doesn't ask me for that ... Of course, I am aware, that my app
  will not be on equal footing with Gmail, but I am still wondering if there
  is any way around getting to know the user's credentials today? Or in
  Cupcake?

  2009/3/20 Dianne Hackborn hack...@android.com

  This will be fixed in cupcake, where we have a secure settings area that
  nobody outside of the system can touch.

  Also keep in mind that GoogleLoginServiceBlockingHelper is not public
  API.  In fact it is not an Android API at all, it is part of the Google
  application suite which will not be on all Android phones.

  On Fri, Mar 20, 2009 at 10:47 AM, strazzere str...@gmail.com wrote:

  The android_id *should* not change, but can currently be modified.

  It's stored in the database located at;
  /data/data/com.android.providers.settings/databases/settings.db

  Run the query; select * from system;
  You'll see plenty of information which can then be changed;
  update system set value='dead00beef' where name='android_id';

  However, this only changes the android_id when you do a call to
  Settings.System.ANDROID_ID - not how google does it through the
  GoogleLoginServiceBlockingHelper.

  -Tim

  On Feb 28, 8:30 am, dar dher...@gmail.com wrote:
   I have a related question - is android_id implemented on the device
   and thus will not change no matter which gmail account is used on that
   device?

   I am hoping that if a user downloads my app and runs it on one device
   that they will get one android_id, and if they also use the same gmail
   account on a different device that this will result in a different
   android_id.  Is this true?

   On Feb 26, 4:47 pm, Dan Bornstein danf...@android.com wrote:

On Thu, Feb 26, 2009 at 12:15 PM, strazzere str...@gmail.com
  wrote:
 Here is a small snippet; [...]

I'm sorry to harp on this, but please provide a complete,
  *compilable*
and *runnable* example, along with what you actually observed when
running it (e.g., log output)

I don't doubt that you are seeing a problem, but I've been burned way
too many times by program fragments not actually triggering the
alleged problem to be willing to spend any time (nor expect anyone
else to spend the time) to flesh out an incomplete fragment. What
you've provided thus far, I am afraid, isn't sufficient to
  demonstrate
the problem.

Thanks in advance for your continued efforts,

-dan

  --
  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.  All such questions should be posted on public
  forums, where I and others can see and answer them.

 --
 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.  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: C\C++ support for application level

2009-04-16 Thread Ask



Please give some suggestions..

On Apr 15, 5:35 pm, Asif k asifk1...@gmail.com wrote:
 Hi,

    I want to ask to google engineers that whether future sdk releases
 will provide any C\C++ support for application developement?? If no..
 then Can you please tell me the disadvantage of these languages??

   As per my knowledge and experience, runtime environment is not
 needed to execute C\C++ application. So why cant we directly run any
 application which is written in C\C++?? Is there any way to bypass DVM
 to execute a code?? Core android librarys are C\C++ only...

 Regardz,

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



[android-developers] Geocoder not returning results in 1.5 preview

2009-04-16 Thread Huebi

I do not get any results from the Geocoder in the 1.5 preview release.
Any information on this? In the maps application it works but my calls
simply return an empty list (no exception, all permissions I know of
(in this case only Internet) are set.

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: com.android.dx.cf.code.SimException: local variable type mismatch

2009-04-16 Thread Tomasz Stechly

Dan,
thanks for clarification. It did help.
Regarding filing the bug: sure I can open one.

When I am running the activity I am getting now different error. Do
you know what it may be (see log below). Should I send separate
message to the group?
Thanks for your help
Tomasz


D/installd(   27): DexInv: --- BEGIN '/data/app/vmdl67263.tmp' ---
I/dalvikvm(  402): DexOpt: illegal method access (call
Ljunit/framework/Assert;.failNotEquals
(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V from
Lgroovy/util/GroovyTestCase;)
D/dalvikvm(  402): VFY: unable to resolve exceptionIdx=1153
D/dalvikvm(  402): DexOpt: load 2026ms, verify 9272ms, opt 287ms
D/installd(   27): DexInv: --- END '/data/app/vmdl67263.tmp' (success) ---
D/PackageManager(   66):   Activities: com.stechly.hello.Hello
I/installd(   27): move
/data/dalvik-cache/d...@app@vmdl67263@classes.dex -
/data/dalvik-cache/d...@app@com.stechly.hello@classes.dex
D/PackageManager(   66): New package installed in
/data/app/com.stechly.hello.apk
D/ActivityManager(   66): Uninstalling process com.stechly.hello
D/AndroidRuntime(  396): Shutting down VM
D/dalvikvm(  396): DestroyJavaVM waiting for non-daemon threads to exit
I/dalvikvm(  396): DestroyJavaVM shutting VM down
D/dalvikvm(  396): HeapWorker thread shutting down
D/dalvikvm(  396): HeapWorker thread has shut down
D/jdwp(  396): JDWP shutting down net...
D/dalvikvm(  396): VM cleaning up
D/dalvikvm(  396): LinearAlloc 0x0 used 527764 of 4194304 (12%)
D/dalvikvm(  166): GC freed 1293 objects / 65992 bytes in 272ms
D/dalvikvm(   66): GC freed 9877 objects / 426120 bytes in 130ms
I/ActivityManager(   66): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER} flags=0x1020
comp={com.stechly.hello/com.stechly.hello.Hello} }
I/ActivityManager(   66): Start proc com.stechly.hello for activity
com.stechly.hello/.Hello: pid=409 uid=10020 gids={}
W/dalvikvm(  409): VFY: unable to resolve direct method 15358:
Ljava/lang/Object;.clone ()Ljava/lang/Object;
W/dalvikvm(  409): VFY:  rejecting opcode 0x70 at 0x
W/dalvikvm(  409): VFY:  rejected
Lcom/stechly/hello/Hello;.super$1$clone ()Ljava/lang/Object;
W/dalvikvm(  409): Verifier rejected class Lcom/stechly/hello/Hello;
W/dalvikvm(  409): Class init failed in newInstance call
(Lcom/stechly/hello/Hello;)
D/AndroidRuntime(  409): Shutting down VM
W/dalvikvm(  409): threadid=3: thread exiting with uncaught exception
(group=0x4000fe68)
E/AndroidRuntime(  409): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  409): java.lang.VerifyError: com.stechly.hello.Hello
E/AndroidRuntime(  409):at java.lang.Class.newInstance(Native Method)
E/AndroidRuntime(  409):at
android.app.Instrumentation.newActivity(Instrumentation.java:1096)
E/AndroidRuntime(  409):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
E/AndroidRuntime(  409):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157)
E/AndroidRuntime(  409):at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
E/AndroidRuntime(  409):at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
E/AndroidRuntime(  409):at
android.os.Handler.dispatchMessage(Handler.java:88)
E/AndroidRuntime(  409):at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  409):at
android.app.ActivityThread.main(ActivityThread.java:3739)
E/AndroidRuntime(  409):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  409):at
java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(  409):at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
E/AndroidRuntime(  409):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
E/AndroidRuntime(  409):at dalvik.system.NativeStart.main(Native Method)
I/Process (   66): Sending signal. PID: 409 SIG: 3
I/dalvikvm(  409): threadid=7: reacting to signal 3
I/dalvikvm(  409): Wrote stack trace to '/data/anr/traces.txt'
I/Process (  409): Sending signal. PID: 409 SIG: 9
I/ActivityManager(   66): Process com.stechly.hello (pid 409) has died.

On Wed, Apr 15, 2009 at 4:51 PM, Dan Bornstein danf...@android.com wrote:

 On Apr 14, 11:14 pm, Tomasz Stechly tomasz.stec...@gmail.com wrote:
 While dex-ing a jar I am getting the the following. Does anyone knows
 how to fix it? Supposedly build-no-debug should help but I cannot find
 any reference to this flag in android source.

   [apply] com.android.dx.cf.code.SimException: local variable type
 mismatch: attempt to set or access a value of type
 groovy.lang.Reference using a local variable of type
 java.lang.Object[]. This is symptomatic of .class transformation tools
 that ignore local variable information.

 The dx option you are looking for is --no-locals. That said, if you
 can file a bug and include a sample .class 

[android-developers] Re: Accessing internal scrollbar drawable

2009-04-16 Thread Jeff Sharkey

You're probably looking to resolve the attribute by passing it through
the current theme.  Something like this might work:

TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(android.R.attr.scrollbarThumbVertical,
outValue, true);
getResources().getDrawable(outValue.resourceId);

j

On Wed, Apr 15, 2009 at 11:12 PM, Peter Carpenter
peter.carpen...@skytechnologies.com wrote:

 Hi,

 Hopefully this is a simple one.

 My application requires me to draw a scrollbar myself (and include the
 old-school physical up/down buttons.  I can't do this via XML as all of
 my screens are generated on the fly by data received over a socket. Like
 a web browser.

 Now the drawables I'm after are scrollbar_vertical.9 and
 scrollbar_handle_vertical.9  however these are no longer visible in
 the SDK.
 I've been poking around and found that
 android.R.attr.scrollbarThumbVertical seems to describe what I'm
 after, however if I try to load this using
 getResources().getDrawable(android.R.attr.scrollbarThumbVertical) I
 get a Resources$NotFoundException...

 All of the scrollbar parameters in view are protected, but not visible
 because the sdk jar file purposely hides them. Grrr!
 Ie - ScrollBarDrawable is exactly the class I want, but I quote from the
 file:
  * For now, we'll hide it so it can be cleaned up later.
  * {...@hide}

 Does anyone know how I can get the standard scrollbar drawables or am I
 really going to have to copy them in as my own resources?

 Peter.





 




-- 
Jeff Sharkey
jshar...@google.com

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



[android-developers] Re: How to keep focus highlight on ExpandableList group....

2009-04-16 Thread Jeff Sharkey

This sounds odd.  When you say select a group item do you mean
expanding it using the dpad or touch?  When the list goes into touch
mode there isn't a notion of visible selection.

j

On Wed, Apr 15, 2009 at 11:02 PM, Peter Carpenter
peter.carpen...@skytechnologies.com wrote:

 I'm struggling with a similar issue myself at the moment.

 I traced mine down to the fact that modifying the child component caused
 it to call RequestLayout().  This in turn, caused the parent to relayout
 which unfortunately meant removing and replacing the component with a
 new one - thus the focus being lost.

 I fixed this specific problem by overriding the adapter so that it
 always used the same instance of the child view when editing. (I'm not
 sure why the internal recycling didn't seem to be doing this already
 though...)

 This might be enough for your situation, however, I'm still left with
 the component receiving the focus but not displaying as focused.  That's
 the subject of my other thread.

 Just a few thoughts...

 Peter.

 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of John B. Hansen
 Sent: Thursday, 16 April 2009 6:27 AM
 To: Android Developers
 Subject: [android-developers] How to keep focus highlight on
 ExpandableList group


 I'm using an ExpandableListActivity and notice that whenever I select
 a group item (to expand or collapse it), it highlights briefly and
 then
 quickly un-highlights.

 For my application, I want the group items to remain highlighted. I've
 tried requestFocus() and several other things but nothing is working.

 Anyone know how to keep a selected group item (after expand or
 collapse)
 highlighted and focused?

 Any help appreciated.

 jh





 




-- 
Jeff Sharkey
jshar...@google.com

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



[android-developers] Re: User input in an AppWidget?

2009-04-16 Thread Jon Colverson

On Apr 16, 6:47 am, Jeff Sharkey jshar...@android.com wrote:
 The major reason for this is we don't have a good way of identifying
 how that text should be sent back across a PendingIntent.  To solve
 this from the framework side, one approach would to add the text to
 the extras bundle with the R.id of the EditText as the key, and using
 Intent.fillIn() when sending the PendingIntent.  But then we run into
 issues when there is a button that should also trigger an action: do
 we bundle any+all EditText values with that intent as well?

Thanks for the reply, Jeff.

I rather like the approach you described. It reminds me of an HTML
form: I'm thinking that perhaps there could be a RemoteViews method
called something like setOnClickSubmission(int, PendingIntent) that
would designate a view as a submit button, and then when that is
clicked it gathers up all the state from the others views in the
RemoteViews layout (EditTexts, Checkables, RadioGroups) and puts that
into the Intent.

--
Jon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i get the source code of the command monkey?

2009-04-16 Thread adrian

Hello group,
I download the source code from [platform/development.git]/cmds/
monkey/ and want to build in eclipse.
But I don't have some non-public classes.
like:
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
import android.app.IActivityWatcher;

where can I get the non-public classes?

Thanks and best regards,
Adrian

On Apr 16, 2:54 am, swarup me.s...@gmail.com wrote:
 git source path :

 [platform/development.git]/cmds/monkey/...

 On Apr 15, 10:57 am, adrian linca30...@gmail.com wrote:

  Hello group,
  I don't have a option -f in my commandmonkey(/system/bin/monkey).
  example: adb shellmonkey-f script_file_name.
  But the command unknown option -f.
  So I want to get  the source code of the commandmonkey, then open
  this option and rebuild it.

  Regards,
  Adrian


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem with using DDMS to send mock gps location data!

2009-04-16 Thread Arnaud Weber
You probably live in europe like me.
This bug is caused by internationalization format of the numbers :
the gps input in emulator is waiting for something like 12.3456 when DDMS
sends 12,3456

If you're a window user, change your internationalization settings to
english and it should be fine.

Arnaudweb

2009/4/16 pj pja...@gmail.com


 I have same question. Does anyone know what happened?
 Thank you.

 On Mar 5, 2:07 pm, rocia rocia...@gmail.com wrote:
  hi,
 I encountered with a problem when I use DDMS to send mock gps
  location data .
I checked out the source code of Android  and make the latest
  version.Then put my test apk file of gps to the emulator and start
  DDMS, but when I use Emulator Control of DDMS to manually Button to
  send mock location data it says no GPS emulation in this virtual
  device. But the same apk file works fine in the SDK 1.0
Waiting for your reply,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: User input in an AppWidget?

2009-04-16 Thread Jeff Sharkey

 clicked it gathers up all the state from the others views in the
 RemoteViews layout (EditTexts, Checkables, RadioGroups) and puts that
 into the Intent.

Actually, this would work nicely by just asking the widget layout tree
to onSaveInstanceState() into a single Parcelable, which would include
all random goodies of children, such as cursor location, etc.

Instead of writing that as a short-term solution, we've been looking
for a better way of solving the general views-in-other-processes
problem, without involving the overhead of RemoteViews and
PendingIntents.  Hopefully something lightweight enough to handle
touch and keypress events.


-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: PackageManager.installPackage(Uri packageURI) error on Androdi 1.5 SDK

2009-04-16 Thread Dianne Hackborn
You can't do this.  The only way a third party app can install another
application is by launching the built-in app installer activity.

On Thu, Apr 16, 2009 at 1:08 AM, Surendra Reddy T surendraredd...@gmail.com
 wrote:

 Hi,

 I am developing an app which should be able to install any signed APK
 silelently, and I need API to do this.

 I was unable to call installPackage(Uri packageURI) method of
 PackageManger on  Android 1.1 SDK.
 I have read in 1.5 docs, that Package Manger API is available.

 IF anybody know how to use this API, please help. If is there any other way
 to do this, please send me the API name and usage.

 Regards
 Surendra

 



-- 
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: where can i get the source code of the command monkey?

2009-04-16 Thread Dianne Hackborn
You need to build it with the platform build system.  This is not intended
to be used outside of that.

On Thu, Apr 16, 2009 at 12:46 AM, adrian linca30...@gmail.com wrote:


 Hello group,
 I download the source code from [platform/development.git]/cmds/
 monkey/ and want to build in eclipse.
 But I don't have some non-public classes.
 like:
 import android.app.ActivityManagerNative;
 import android.app.IActivityManager;
 import android.app.IActivityWatcher;

 where can I get the non-public classes?

 Thanks and best regards,
 Adrian

 On Apr 16, 2:54 am, swarup me.s...@gmail.com wrote:
  git source path :
 
  [platform/development.git]/cmds/monkey/...
 
  On Apr 15, 10:57 am, adrian linca30...@gmail.com wrote:
 
   Hello group,
   I don't have a option -f in my commandmonkey(/system/bin/monkey).
   example: adb shellmonkey-f script_file_name.
   But the command unknown option -f.
   So I want to get  the source code of the commandmonkey, then open
   this option and rebuild it.
 
   Regards,
   Adrian
 
 
 



-- 
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: C\C++ support for application level

2009-04-16 Thread Dianne Hackborn
Go to android-ndk.

Or do a google search.  Pretty much anywhere.  This topic has been discussed
all over the place.

On Wed, Apr 15, 2009 at 5:35 AM, Asif k asifk1...@gmail.com wrote:


 Hi,

   I want to ask to google engineers that whether future sdk releases
 will provide any C\C++ support for application developement?? If no..
 then Can you please tell me the disadvantage of these languages??

  As per my knowledge and experience, runtime environment is not
 needed to execute C\C++ application. So why cant we directly run any
 application which is written in C\C++?? Is there any way to bypass DVM
 to execute a code?? Core android librarys are C\C++ only...

 Regardz,

 Asif
 



-- 
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 debug the Launcher activity of android in eclipse

2009-04-16 Thread Dianne Hackborn
It's in the acore process.

On Wed, Apr 15, 2009 at 10:45 PM, Meryl Silverburgh 
silverburgh.me...@gmail.com wrote:


 Hi,

 I am trying to following this documentation
 'http://source.android.com/using-eclipse' to debug android Launcher
 Activity in eclipse.

 It said '

 You may need to open the Debug perspective (next to the Java
 perspective icon in the upper-right, click the small Open
 Perspective icon and select Debug). Once you do, you should see a
 list of threads; if you select one and break it (by clicking the
 pause icon), it should show the stack trace, source file, and line
 where execution is at. Breakpoints and whatnot should all work.

 My question is which threads I need to select in order to debug
 Launcher Activity? I don't see a thread name Launcher.

 Thank you.

 



-- 
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: Accessing System Brightness

2009-04-16 Thread Dianne Hackborn
// Make the screen full bright for this activity.
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 1.0f;

getWindow().setAttributes(lp);



On Wed, Apr 15, 2009 at 10:21 PM, SR stan.r...@gmail.com wrote:


 Dianne,

 Would you mind sharing a snippet of code on how to do this in Cupcake
 using the new API?

 Thanks!

 Stan

 On Apr 8, 3:49 pm, Dianne Hackborn hack...@android.com wrote:
  There is a new API to be able to force the screen brightness while your
  window is on-screen.
 
  On Wed, Apr 8, 2009 at 12:08 PM, Todd Sjolander guyfantas...@gmail.com
 wrote:
 
 



-- 
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: Problem with Camera and layout orientation

2009-04-16 Thread Zeeshan Khan
Hi ,
  I am facing the same problem of 90 degree rotation
  can any one tell how to force the activity so that it will be displayed in
landscape view

On Sun, Apr 12, 2009 at 2:55 AM, Streets Of Boston
flyingdutc...@gmail.comwrote:


 Put the other views in another (sub)activity. I don't know your
 application and can't judge if this is possible for your app, but this
 would save you a lot of hassle.

 On Apr 11, 3:49 pm, mobilekid mobilek...@googlemail.com wrote:
  Yes, saddly that's the reality at the moment.
 
  Yet I can't afford declaring my camera activity in 'landscape' from
  the manifest as I need to display other views in the same activity in
  portait. I guess the only hack here is to extend the views and rotate
  them -90 degrees... but I don't think I will go that far. It's funny
  how they haven't taken care of that with the first release...
 
 
 
   The camera(-surface) only supports landscape view. As Mark said, i too
   believe they're working on this in the new release.
 
   But you can set your camera-activity to 'landscape' in your manifest
   file, and set all other activities in your app to any other
   orientation (or the same orientation).- Hide quoted text -
 
  - Show quoted text -
 


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



[android-developers] Re: getting android_id from GoogleLoginServiceBlockingHelper?

2009-04-16 Thread Mariano Kamp
Well, did Cupcake bring some functionality that lets non-Google apps access
the user's Google credentials or has there been any progress in that
direction?
Reading your question I assume the answer is no. But what would be good way
to get to know if there are any plans to provide the functionality mentioned
above?

On Fri, Mar 20, 2009 at 10:50 PM, Dianne Hackborn hack...@android.comwrote:

 Sorry maybe someone else can help you but I can't; I work on the Android
 platform, I am not that familiar with what is going on with the Google apps.


 On Fri, Mar 20, 2009 at 1:01 PM, Mariano Kamp mariano.k...@gmail.comwrote:

 On a related note, is there any API today or planned for tomorrow for
 accessing the user's Google credentials in a safe way to pass them onto a
 Google service?
 The actual context is that I have users complaining that they don't want
 to give my app their google userid/pw to access Google Reader via my app. I
 hear Gmail doesn't ask me for that ... Of course, I am aware, that my app
 will not be on equal footing with Gmail, but I am still wondering if there
 is any way around getting to know the user's credentials today? Or in
 Cupcake?

 2009/3/20 Dianne Hackborn hack...@android.com

  This will be fixed in cupcake, where we have a secure settings area that
 nobody outside of the system can touch.

 Also keep in mind that GoogleLoginServiceBlockingHelper is not public
 API.  In fact it is not an Android API at all, it is part of the Google
 application suite which will not be on all Android phones.


 On Fri, Mar 20, 2009 at 10:47 AM, strazzere str...@gmail.com wrote:


 The android_id *should* not change, but can currently be modified.

 It's stored in the database located at;
 /data/data/com.android.providers.settings/databases/settings.db

 Run the query; select * from system;
 You'll see plenty of information which can then be changed;
 update system set value='dead00beef' where name='android_id';

 However, this only changes the android_id when you do a call to
 Settings.System.ANDROID_ID - not how google does it through the
 GoogleLoginServiceBlockingHelper.


 -Tim

 On Feb 28, 8:30 am, dar dher...@gmail.com wrote:
  I have a related question - is android_id implemented on the device
  and thus will not change no matter which gmail account is used on that
  device?
 
  I am hoping that if a user downloads my app and runs it on one device
  that they will get one android_id, and if they also use the same gmail
  account on a different device that this will result in a different
  android_id.  Is this true?
 
  On Feb 26, 4:47 pm, Dan Bornstein danf...@android.com wrote:
 
   On Thu, Feb 26, 2009 at 12:15 PM, strazzere str...@gmail.com
 wrote:
Here is a small snippet; [...]
 
   I'm sorry to harp on this, but please provide a complete,
 *compilable*
   and *runnable* example, along with what you actually observed when
   running it (e.g., log output)
 
   I don't doubt that you are seeing a problem, but I've been burned
 way
   too many times by program fragments not actually triggering the
   alleged problem to be willing to spend any time (nor expect anyone
   else to spend the time) to flesh out an incomplete fragment. What
   you've provided thus far, I am afraid, isn't sufficient to
 demonstrate
   the problem.
 
   Thanks in advance for your continued efforts,
 
   -dan




 --
 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.  All such questions should be posted on public
 forums, where I and others can see and answer them.










 --
 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.  All such questions should be posted on public
 forums, where I and others can see and answer them.


 


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



[android-developers] How to terminate an APK on emulator?

2009-04-16 Thread DaRolla

Hello :)

I'd like to know how to terminate / kill an APK on emulator. Most
times I reinstall the APK, but I was wondering if there is a better
way because I simply need to restart my APK...

Greetings,
DaRolla
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Developing absolute layout - no drag drop click drag in eclipse ??

2009-04-16 Thread quakeboy

For me droid draw did not work properly for imageviews in Absolute
layout.. I wil be happy to hear it worked for some others and if they
can share abt how to do that

On Apr 15, 10:32 pm, Amir Alagic amirs...@gmail.com wrote:
 Simple but can help youwww.droiddraw.org

 On Apr 15, 5:28 pm, Frank Ramirez franktheprogram...@gmail.com
 wrote:

  Check outhttp://droiddraw.org/

  On Apr 15, 3:24 am, Boba S sbob...@googlemail.com wrote:

   It would be of great help to me

   2009/4/15 quakeboy prasna...@gmail.com

I have asked the Flex team in our company to make some app which can
import images and you can drag and drop them with options like locking
movement and hiding..
Then the app will generate an xml with all ImageViews and positions in
it..

I can post it here if someone requests for the application..

On Apr 15, 2:28 pm, Boba S sbob...@googlemail.com wrote:
 Can I use another GUI Editor and which can I use for drag'n'drop?

 2009/4/14 Xavier Ducrohet x...@android.com

  Not at this time.

  The layout editor is a work in progress. In 0.9, we added basic
  drag'n'drop support but we haven't added support for manipulating
  views in the layout directly yet.

  Xav

  On Thu, Mar 26, 2009 at 12:21 AM, quakeboy prasna...@gmail.com
wrote:

   Hi I am developing an application which uses absolute layout with
   image views. I am not able to click and drag the images in the 
   layout
   preview in eclipse. Is there a setting which can enable that ?

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



[android-developers] Get active apps displayed on screen

2009-04-16 Thread Gerby

Hi,

is it possible to get listed the apps or activity which are actually
displayed on the screen of the android mobile. I need this function
for an service which should only start an own activity when no
application is displayed, excepting the home screen.

Please help me!

Cheers
Gerby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 with detecting onTouchEvent()

2009-04-16 Thread mobilek...@googlemail.com

Hi,
For some reason onTouchEvent() never gets called in an activity with a
ListView child. Is this is a bug, or it requires a special
implementation? 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: how to get media from MediaStore

2009-04-16 Thread hapciu

Hi Caesar,

Adding _ID to your projection will solve it !
The _ID column is expected by the way you use SimpleCursorAdapter.

Cheers,
Horia


On Feb 25, 5:52 am, Caesar ntk0...@hotmail.com wrote:
 Hello,

 I`d like to implememt media list for SoundRecorder which is open_src
 app.

 But I`ve found some Runtime error.

 I`ve insert media file into the MediaStore.Audio.Media using
 'addToMediaDB(File file)'

 ===

 private Uri addToMediaDB(File file) {
         Resources res = getResources();
         ContentValues cv = new ContentValues();
         long current = System.currentTimeMillis();
         long modDate = file.lastModified();
         Date date = new Date(current);
         SimpleDateFormat formatter = new SimpleDateFormat(
                 res.getString(R.string.audio_db_title_format));
         String title = formatter.format(date);

         // Lets label the recorded audio file as NON-MUSIC so that the
 file
         // won't be displayed automatically, except for in the
 playlist.
         cv.put(MediaStore.Audio.Media.IS_MUSIC, 0);

         cv.put(MediaStore.Audio.Media.TITLE, title);
         Log.d(MediaStore.Audio.Media.TRACK.toString
 (),MediaStore.Audio.Media.TRACK.toString());
         cv.put(MediaStore.Audio.Media.DATA, file.getAbsolutePath());
         cv.put(MediaStore.Audio.Media.DATE_ADDED, (int) (current /
 1000));
         cv.put(MediaStore.Audio.Media.DATE_MODIFIED, (int) (modDate /
 1000));
 //        cv.put(MediaStore.Audio.MediaColumns.DURATION,
 mRecordingLength);
         cv.put(MediaStore.Audio.Media.MIME_TYPE, MIME_TYPE);
         cv.put(MediaStore.Audio.Media.ARTIST,
                 res.getString(R.string.audio_db_artist_name));
         cv.put(MediaStore.Audio.Media.ALBUM,
                 res.getString(R.string.audio_db_album_name));
         Log.d(TAG, Inserting audio record:  + cv.toString());
         ContentResolver resolver = getContentResolver();
         Uri base = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
         Log.d(TAG, ContentURI:  + base);
         Uri result = resolver.insert(base, cv);
         Log.e(TAG, result.toString());
         if (result == null) {
             new AlertDialog.Builder(this)
                 .setTitle(R.string.app_name)
                 .setMessage(R.string.error_mediadb_new_record)
                 .setPositiveButton(R.string.button_ok, null)
                 .setCancelable(false)
                 .show();
             return null;
         }
         if (getPlaylistId(res) == -1) {
             createPlaylist(res, resolver);
         }
         int audioId = Integer.valueOf(result.getLastPathSegment());
         addToPlaylist(resolver, audioId, getPlaylistId(res));

         // Notify those applications such as Music listening to the
         // scanner events that a recorded audio file just created.
         sendBroadcast(new Intent
 (Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, result));
         return result;
     }

 ==

 and I`ve put all of my files from sdcard.

 ==

 private void makePlaylist()
         {
                 String[] cols = new String[] {
                 MediaStore.Audio.Playlists._ID,
                 MediaStore.Audio.Playlists.NAME
         };

                 String status = Environment.getExternalStorageState();
                 Uri uri;

         if (status.equals(Environment.MEDIA_MOUNTED))
                 list_path = new File(/sdcard);
         else
                 list_path = new File(/data/sec_media);

         File f_list[] = list_path.listFiles();

         f_len = f_list.length;

         for(int i=0;i  f_len ; i++){
                 uri = addToMediaDB(f_list[i]);
         }
     }

 ==

 According to logs, media files was in MediaStore.Audio.Media

 ==

 02-25 02:13:20.385: DEBUG/SoundRecorder(1057): Inserting audio record:
 is_music=0 mime_type=audio/amr artist=Your recordings title=2009-02-25
 02:13:20 _data=/sdcard/recording13246.amr date_modified=1235030668
 album=Audio recordings date_added=1235528000

 02-25 02:13:20.385: DEBUG/SoundRecorder(1057): ContentURI:
 content://media/external/audio/media

 02-25 02:13:20.415: ERROR/SoundRecorder(1057): 
 content://media/external/audio/media/322

 ==

 I thought 322 was_ID.

 However when I excute program, error has occured.

 I`d like show my audio file through ListView.

 ==

 public class MyPlaylist extends ListActivity {
         SoundRecorder mSr;
         Uri playlist_uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;

         String[] projection = new 

[android-developers] Re: How to terminate an APK on emulator?

2009-04-16 Thread Aaron

stop it in DDMS devices window, or kill the process after command adb
shell

On Apr 16, 5:13 pm, DaRolla netzprofi.ma...@googlemail.com wrote:
 Hello :)

 I'd like to know how to terminate / kill an APK on emulator. Most
 times I reinstall the APK, but I was wondering if there is a better
 way because I simply need to restart my APK...

 Greetings,
 DaRolla
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] OnTouchListener OnClickListener

2009-04-16 Thread arnouf

Hello everybody,

On a picture I need to do two differents behaviours when user click on
it or slide on it.

The management of the touch event (slide) is done on a parent view. So
I put setOnTouchListener on my imageview and implement ACTION_MOVE to
dispatch the event to its parent.

To manage the click event, I put a setOnClickListener on my image but
the event was not catched. With debug, I understand that the
ACTION_MOVE was still called and the onClick event was forgotten by
the onTouchListener.

I decided to try to catch the event ACTION_UP on onTouch event...

Finally, I can set only ONE event and not the both. If I can click, I
can't slide and if I can slide, I can't click

Do you can help ti resolve this big issue for my app?

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



[android-developers] Re: SDK 1.5 and multiple projects in an application

2009-04-16 Thread sktech

So, what is the  preferred way to share android-aware code between
applications?

On Apr 15, 8:32 pm, Xavier Ducrohet x...@android.com wrote:
 On Wed, Apr 15, 2009 at 6:27 PM, sktech info.sktechnol...@gmail.com wrote:

  Thanks Xavier, that is exactly the situation.

  Can I assume that future releases will allow my android project
  to reference other standard Java projects?

 yes, we are not planning on removing this feature, as it's a lot
 easier to use during development than using a jar file.

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



[android-developers] Re: PackageManager.installPackage(Uri packageURI) error on Androdi 1.5 SDK

2009-04-16 Thread Al Sutton
Allowing the silent of APKs would present a security risk as users should
always be aware of what is being installed on their device, and so it is
unlikely this will ever be possible.
 
Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.



 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Surendra Reddy T
Sent: 16 April 2009 09:08
To: android-developers@googlegroups.com
Subject: [android-developers] PackageManager.installPackage(Uri packageURI)
error on Androdi 1.5 SDK


Hi,

I am developing an app which should be able to install any signed APK
silelently, and I need API to do this. 

I was unable to call installPackage
file:///D:/NTMS_Sdks/Android/android-sdk-windows-1.5_pre/android-sdk-window
s-1.5_pre/docs/reference/android/content/pm/PackageManager.html#installPacka
ge%28android.net.Uri%29 (Uri
file:///D:/NTMS_Sdks/Android/android-sdk-windows-1.5_pre/android-sdk-window
s-1.5_pre/docs/reference/android/net/Uri.html  packageURI) method of
PackageManger on  Android 1.1 SDK.
I have read in 1.5 docs, that Package Manger API is available.

IF anybody know how to use this API, please help. If is there any other way
to do this, please send me the API name and usage.

Regards
Surendra




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Factory configurable data

2009-04-16 Thread Zhubham

Hi Experts,

I need your help in knowing if string/integer can be made factory
configurable in android.

eg:
A welcome message is stored at some location. To change this message
all a person needs to do is go to the above location and enter the new
text. The ROM image build command would now take this new string for
display. The advantage is that you don't need to recompile your entire
project.

Thanks in advance.

Best Regards,
Zhubham

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] API to delete SIM contacts Messages AND erasing the SD card contents

2009-04-16 Thread Surendra Reddy T
Hi,

Is there any API which can delete the contacts and messages on the SIM card?
And the API to format (erase all) the SD card ?

IF not, please suggest me a way to delete all on SIM and SD card. Any help
will be appriciated.
Is there anyway to access lower level (driver lever) APIs exposed in C/C++?

Regards
Surendra

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: PackageManager.installPackage(Uri packageURI) error on Androdi 1.5 SDK

2009-04-16 Thread Surendra Reddy T
Hi Hackborn,

Thanks a lot for your quick response.
My application sits on the device with users acceptance only.
Once I have installed my app, I should be  able to download any properly
signed APK onto the device and install it on the device without any user
intervention.
And the users of the devices will be intimated about the installation.

This is possible on Symbian.

Can you suggest me a way, since I have to have this in my APP.
Is there any workaround for this or any hidden API ?

Regards
Surendra



On Thu, Apr 16, 2009 at 2:02 PM, Dianne Hackborn hack...@android.comwrote:

 You can't do this.  The only way a third party app can install another
 application is by launching the built-in app installer activity.


 On Thu, Apr 16, 2009 at 1:08 AM, Surendra Reddy T 
 surendraredd...@gmail.com wrote:

 Hi,

 I am developing an app which should be able to install any signed APK
 silelently, and I need API to do this.

 I was unable to call installPackage(Uri packageURI) method of
 PackageManger on  Android 1.1 SDK.
 I have read in 1.5 docs, that Package Manger API is available.

 IF anybody know how to use this API, please help. If is there any other
 way to do this, please send me the API name and usage.

 Regards
 Surendra





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


 



-- 
Surendra Reddy T

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] If Android support multiple PDP.......then ?

2009-04-16 Thread 葉子

The general use for multiple PDP (mPDP) is that when we use one PDP(A)
to download a file, and we want to send a mms message via another PDP
(B), the original PDP(A) will not be disconnected.

This is the scenario on Windows Mobile.

My question is ,if Android had supported mPDP, how does one
application know which PDP should be used to transfer data ?

Or Application (ex: Browser) doesn't care these issue, and it will try
all PDP to transfer data ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get the source of the android 1.5 preview SDK?

2009-04-16 Thread swarup

get the cupcake branch.

On Apr 16, 10:02 am, Lucius Fox lucius.fo...@gmail.com wrote:
 Hi,

 How to get the source of the android 1.5 preview SDK? Should I get the
 trunk? or get the cupcake branch?

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



[android-developers] Re: How to create home screen short cut?

2009-04-16 Thread patrick

com.android.launcher.permission.INSTALL_SHORTCUT


On Apr 16, 1:36 am, havexz bali.param...@gmail.com wrote:
 What permission do i have to add?

 On Apr 15, 11:21 am, patrick patrick.boul...@gmail.com wrote:

  Did you add the permission in the manifest?

  On Apr 15, 5:06 pm, havexz bali.param...@gmail.com wrote:

   I am trying this code but its not working 

                   Intent shortcutIntent = new Intent
   (Intent.ACTION_MAIN);
                   shortcutIntent.setClassName(this, this.getClass
   ().getName());

                   Intent intent = new Intent();
                   intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT,
   shortcutIntent);
                   intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, hello);
                   Parcelable iconResource =
   Intent.ShortcutIconResource.fromContext(
                           NoteView.this,  R.drawable.short_icon);
                   intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
   iconResource);

                   intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
                   getApplicationContext().sendBroadcast(intent);
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 in using context.getCacheDIr() in emulator.

2009-04-16 Thread Honest

Hello, I am using linux so i have installed Android in it.  I am
getting the exception while calling prepare() from MediaPlayer
object.  The following is my code.

[b]
File bufferedFile = new File(context.getCacheDir(),playingMedia +
(counter++) + .dat);[/b]
moveFile(downloadingMediaFile,bufferedFile);

Log.e(Player,bufferedFile.length()+);
Log.e(Player,bufferedFile.getAbsolutePath());

mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(bufferedFile.getAbsolutePath());
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
System.out.println(before preapare);
[b] mediaPlayer.prepare();[/b]

I am adding the code tutoril also so if any one of you have few
minutes then please check it.  Accoridng to my opiong it i facing some
problem in accessing file system so. Can some one tell me what could
be wrong in it ?

another thing which i want to know is Can some one tell me
context.getCacheDir() will return ?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: inject long home key press

2009-04-16 Thread swarup

try

$ adb shell sendevent device type key-code value-press ; adb
shell sleep 1   #seconds; adb shell sendevent device type
key-code value-release

above is for 1 second long press


On Apr 14, 11:46 pm, Dan Raaka danra...@gmail.com wrote:
 I am using this a work-around for the non-working home key in the 1.0
 or 1.1 emulator.
 If there is fix for it. That would work for me as well.

 On Apr 14, 11:23 am, Dan Raaka danra...@gmail.com wrote:

  Is there a keycode to inject long home key press into a device via adb
  like below ?

  $ adb shell input keyevent 7    # for key '0'

  -Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Programmatically delete a home-screen shortcut

2009-04-16 Thread Eborix13

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



[android-developers] 1.5 release - DexClassLoader issue

2009-04-16 Thread Eborix13

Hi,

   Seeing that the new 1.5 pre-release has support for loading classes
dynamically I immediately tried to see if it works. I used the
DexClassLoader(String dexPath, String dexOutputDir, String libPath,
ClassLoader parent) constructor. But I soon found out that it works
only partially.

   What I am trying to do is dynamically load a class from a given jar
file which contains a classes.dex file. If I try to use the current
class loader (this.getClass().getClassLoader()) as the parent
parameter I get a java.lang.IllegalAccessError: cross-loader access
from pre-verified class error. But if I use the SystemClassLoader as
the parent parameter everything works out nicely. But using the
SystemClassLoader is a problem for me because the class that is loaded
using the SystemClassLoader is a subclass of a class which was
previously loaded by the current class loader. Casting the derived
class to the base class generates a ClassCastException because the
base class was not loaded with the same class loader as the derived
class.

  Is there a way to solve this problem? Am I doing something wrong? Is
there a way to dynamically load a class using the current class loader
instead of the system class loader? Is this problem caused by the fact
that the 1.5 release is incomplete yet, so perhaps this problem is
going to be solved in the final release?

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



[android-developers] Smooth transition of images from one position to other

2009-04-16 Thread balakrishna...@gmail.com

Hi,

I am using opengl es for images to translate from one position to
other.
But, the transition is not going in a smoother manner they are just
jumping from one position to other. How can I get smooth transition
of
images? Rightnow I am using glRotatef() and gltranslatef(). Do I need
to add anything extra?
Please do respond.


Thanks,
Bala.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Quality of paid applications on the Market...

2009-04-16 Thread Tom

I can see why Google may not want to moderate market submissions.
For one, it would come at a cost.  There would have to be a team of
people responsible for it and they'd likely have to take a cut of app
profits to cover the cost. 

Um, 30% seems like a generous cut of app profits.

Looking at the Android Market sales figures, there are very few apps
that have cleared over 10k.

Where are you finding these 'Android Market sales figures', and how
accurate are they?  If indeed they are accurate, then 30% of almost
nothing is probably and unfortunately going to leave us in the 'wild
west' for some time.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 transition of images from one position to other

2009-04-16 Thread Streets Of Boston

You have to create a seperate thread that repeatedly updates the
position of your model a few 'pixels' at a time.

Just calling glTranslate won't smoothly move your model(/world) to
that position. It will just be put at that position.

You have to call glTranslate a number of times, create the animation
yourself.

Take a look at the APIDemos for OpenGL. It'll help :)


On Apr 16, 9:37 am, balakrishna...@gmail.com
balakrishna...@gmail.com wrote:
 Hi,

 I am using opengl es for images to translate from one position to
 other.
 But, the transition is not going in a smoother manner they are just
 jumping from one position to other. How can I get smooth transition
 of
 images? Rightnow I am using glRotatef() and gltranslatef(). Do I need
 to add anything extra?
 Please do respond.

 Thanks,
 Bala.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem with Camera and layout orientation

2009-04-16 Thread Streets Of Boston

Change your activity's orientation in the manifest file to be
landscape.

On Apr 16, 4:58 am, Zeeshan Khan zeeshanno...@gmail.com wrote:
 Hi ,
   I am facing the same problem of 90 degree rotation
   can any one tell how to force the activity so that it will be displayed in
 landscape view

 On Sun, Apr 12, 2009 at 2:55 AM, Streets Of Boston
 flyingdutc...@gmail.comwrote:





  Put the other views in another (sub)activity. I don't know your
  application and can't judge if this is possible for your app, but this
  would save you a lot of hassle.

  On Apr 11, 3:49 pm, mobilekid mobilek...@googlemail.com wrote:
   Yes, saddly that's the reality at the moment.

   Yet I can't afford declaring my camera activity in 'landscape' from
   the manifest as I need to display other views in the same activity in
   portait. I guess the only hack here is to extend the views and rotate
   them -90 degrees... but I don't think I will go that far. It's funny
   how they haven't taken care of that with the first release...

The camera(-surface) only supports landscape view. As Mark said, i too
believe they're working on this in the new release.

But you can set your camera-activity to 'landscape' in your manifest
file, and set all other activities in your app to any other
orientation (or the same orientation).- Hide quoted text -

   - Show quoted text -- Hide quoted text -

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



[android-developers] Re: Early Look Android 1.5 SDK

2009-04-16 Thread StefanK

As the new Eclipse plugin (ADT 0.9) can target both 1.1 and 1.5 SDKs.
is it safe to use 1.1 target to build applications for 1.1 SDK that
can be distributed on the Market right now?
(It appears to work well so far with the only difference I found is
that the signed file (using Export Signed Application Package) is
about 15K smaller (on a 500KB APK) compared to exporting it as
Unsigned from 0.8 ADT and signing it using the external jarsigner
tool.)

I could not find a good way to keep both 0.8 and 0.9 working together
side by side. I have 2 eclipse installs for each ADT but for some
reason they seem to share the location of the SDK (under Window 
Preferences  Android). Apart from the SDK location, because of the
new /gen folder, if I want to share the same project between the 2, I
also have to include/exclude the /gen from build path.

If it is not safe to use ADT 0.9 for 1.1 target, is there a special
trick to keep 0.8 and 0.9 working side by side until an official 0.9
release?

Stefan


On Apr 15, 7:49 pm, Justin (Google Employee) j...@google.com
wrote:
 Sure, start testing your apps against the preview SDK. You can start
 using new API features, as long as you're aware that the 1.5 API is
 *not* finalized. Functionality could be added or removed and method
 signatures may change.

 Cheers,
 Justin
 Android Team @ Google

 On Apr 15, 11:07 am, clark clarkd...@gmail.com wrote:

   However, in the specific case of acquiring mic audio, there may be an
   Android
   engineer here that could confirm that this is going to be in the released
   platform,
   it's just that I don't know the answer.

  Hmm, I sure hope that is a feature since it is listed as one of the
  new features in the early look of Android 1.5 SDK.

  Is it a bad idea to start working with these new features?  I was
  hoping that was part of offering this early look, not just to test
  existing apps, but to get familiar with additions to the SDK.

  Either way, the early look SDK is allowing me to get raw audio from
  the phones mic and run it through an FFT.  The test notes I was
  sending through are being analyzed by the FFT correctly, and I can say
  I am quite happy with the features so far.

  BTW, the emulator is great and should be used as a step in the testing/
  debugging process but as an embedded developer, I value running things
  on the actual metal rather than trust the simulation/emulation,
  especially when it comes to performance.

  Regards,
  ~Clark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Black Screen problem with graphics update using unlockCanvasAndPost()

2009-04-16 Thread john

Your package is package com.baltz.scorched;

Does that mean you're working on a scorched earth type game? It would
be really crazy if you were, because I just started work on the same
game, and I'm using the LunarLander game as a template as well.

It's also my first game - maybe we can help each other out!

-Rick

On Apr 15, 10:25 pm, Warren warrenba...@gmail.com wrote:
 Sarnoth, I appreciate you taking the time to comment.

 Does that matter - if the thread isn't different?

 Just in case there were problems with the thread, I rewrote the
 program not to use a second thread and just execute the drawing loop
 in the view.

 In the code sample, I also changed draw() to drawSprites(), as I
 described in an earlier post. Neither of these things helped.

 == Begin Code ==

 package com.baltz.scorched;

 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;

 class ScorchedView extends SurfaceView implements
 SurfaceHolder.Callback {

     private Context context;
     private SurfaceHolder holder;

     private Bitmap backgroundImage;
     private Bitmap foregroundImage;
     private Bitmap spriteImage;

     private Resources resources;
     private ScorchedTerrain terrain;
     private Engine engine;

     public ScorchedView(Context c, AttributeSet attrs) {
         super(c, attrs);
         // register our interest in hearing about changes to our
 surface
         holder = getHolder();
         holder.addCallback(this);

         context = c;

         resources = context.getResources();

         // load background image as a Bitmap instead of a Dable b/c
         // we don't need to transform it and it's faster to d this way
         backgroundImage = BitmapFactory.decodeResource(resources,
                 R.drawable.earthrise);

         foregroundImage = BitmapFactory.decodeResource(resources,
                 R.drawable.foreground1);

         spriteImage = BitmapFactory.decodeResource(resources,
                         R.drawable.sprite1);

         terrain = new ScorchedTerrain(foregroundImage);

         engine = new Engine();
         Body body;

         body = new Body(spriteImage);
         body.setLocation(50, 50);
         engine.addBody(body);

         body = new Body(spriteImage);
         body.setLocation(40, 100);
         engine.addBody(body);
     }

     /* Callback invoked when the surface dimensions change. */
     public void surfaceChanged(SurfaceHolder h, int format, int width,
 int height) {
         holder = h;
     }

     /*
      * Callback invoked when the Surface has been created and is ready
 to be
      * used.
      */
     public void surfaceCreated(SurfaceHolder h) {
         holder = h;
         gameLoop();
     }

     /*
      * Callback invoked when the Surface has been destroyed and must
 no longer
      * be touched. WARNING: after this method returns, the Surface/
 Canvas must
      * never be touched again!
      */
     public void surfaceDestroyed(SurfaceHolder holder) {
     }

     private void gameLoop(){

         Canvas canvas;

         int i=0;
         while(i30){
                 canvas = null;
                 try {
                     canvas = holder.lockCanvas(null);
                     engine.update();
                     drawSprites(canvas);
                 } finally {
                     // do this in a finally so that if an exception is thrown
                     // during the above, we don't leave the Surface in an
                     // inconsistent state
                     if (canvas != null) {
                         Log.w(dbg, unlocking canvas + i);
                         holder.unlockCanvasAndPost(canvas);
                     }
                 }

                 try{
                   Thread.currentThread().sleep(300);
                 }
                 catch(Exception e){
                 }
                 i++;
         }
     }

     /**
      * Draws the sprites and background to the provided
      * Canvas.
      */
     public void drawSprites(Canvas canvas) {
         // Draw the background image. Operations on the Canvas
 accumulate
         // so this is like clearing the screen.
         canvas.drawBitmap(backgroundImage, 0, 0, null);

         //draw the up-to-date, deformed foreground
         terrain.draw(canvas);

         //draw all bodies (players, projectiles, etc) on the screen
         engine.drawAll(canvas);
     }

 }

 On Apr 15, 4:47 pm, Sarnoth jesse.st...@gmail.com wrote:

  I can't really say without seeing more of the code, but based on your
  description of the problem I wonder if your thread is in fact a
  separate thread or if the run method is simply being executed in the
  main UI thread. Something worth checking. You can log
 

[android-developers] Re: IMPROPER RENDERING OF A HTML OBJECT

2009-04-16 Thread Tom M.

Any workaround for this?

On Feb 20, 10:23 am, whitemice markbr...@zedray.co.uk wrote:
 Added as a bug report 
 here:http://code.google.com/p/android/issues/detail?id=2044can=1q=htmlc...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: IMPROPER RENDERING OF A HTML OBJECT

2009-04-16 Thread Stefano Cannata
Actually not, sorry
bye

On Thu, Apr 16, 2009 at 4:09 PM, Tom M. thomasfmc...@gmail.com wrote:


 Any workaround for this?

 On Feb 20, 10:23 am, whitemice markbr...@zedray.co.uk wrote:
  Added as a bug report here:
 http://code.google.com/p/android/issues/detail?id=2044can=1q=htmlc...
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] why is the sdk 1.5 prerelease releaed with obsolete documentation?

2009-04-16 Thread a druid

Hi,

Well I know, that this is just a pre-release bla . bla . bla,
but still this doesn't justify everything.

Wouldn't it be nice to have the documentation at least halfways
accurate?
Or if it's not accurate to add at some kind of 'obsolete' marker to
certain chapters.
This can be done very quickly and helps users.

The very first thing I looked up was docs/guide/developing/other-
ide.html

Creating an Android project still talks about activityCreator ,
which doesn't exist any more.

Additionally the example still talks about activityCreator.py (which
didn't even exist in the previous release under linux)

My suggestion to the Google team would be to at least mark all
chapters as obsolete, which might have to be rewritten.
If the document changes are already known, the obsolete marler could
already point to some kind of release notes file with the anticipated
changes.

In my example this could have been a reference to 
http://developer.android.com/sdk/preview/
Where is activitycreator

I think this suggestion might help to get rid of quite some un
necessary support questions.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: problem in using context.getCacheDIr() in emulator.

2009-04-16 Thread David Turner
If you use SDK 1.1, there is no cache partition in the emulator, unless you
use the -cache file option.

If you use the preview SDK 1.5, then a cache partition file is automatically
created for you when you create an AVD, and
will be used automatically when you start the emulator with this AVD.

On Thu, Apr 16, 2009 at 2:38 PM, Honest honestsucc...@gmail.com wrote:


 Hello, I am using linux so i have installed Android in it.  I am
 getting the exception while calling prepare() from MediaPlayer
 object.  The following is my code.

 [b]
 File bufferedFile = new File(context.getCacheDir(),playingMedia +
 (counter++) + .dat);[/b]
moveFile(downloadingMediaFile,bufferedFile);

Log.e(Player,bufferedFile.length()+);
Log.e(Player,bufferedFile.getAbsolutePath());

mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(bufferedFile.getAbsolutePath());
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
System.out.println(before preapare);
 [b] mediaPlayer.prepare();[/b]

 I am adding the code tutoril also so if any one of you have few
 minutes then please check it.  Accoridng to my opiong it i facing some
 problem in accessing file system so. Can some one tell me what could
 be wrong in it ?

 another thing which i want to know is Can some one tell me
 context.getCacheDir() will return ?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 track Android PIM changes?

2009-04-16 Thread M. Dodd

After looking in the source repo I'd have to say the database design
of both Contacts and Calendar is unsuitable for multi-host
synchronization (or you will be competing with GSync for the dirty
flags).

I you're in control of the system image the best way would probably be
to fork the code for the Calendar and Contacts providers and add a
proper changelog to both databases.

On 30 Mar, 14:46, AL aaron.long.l...@gmail.com wrote:
 Hi, Experts

 Our team is creating an Exchange ActiveSync client for an Android
 product.

 We met the issue of tracking contacts/calendar changes. Here are some
 proposals we can image. Please advise or give your suggestions.

 1. Like Funambol SyncML for Android, before the sync session,
 calculate each PIM record's hash then figure out the add/update/delete
 change.
 Pros: no dependence on android sync framework
 Cons: time cost is high. It takes 4 minutes to scan 1000 records in my
 emulator. Considering we will launch the sync once any record change
 occurs on device, it is not acceptable.

 2. Make use of _sync_dirty field and _deleted_people table in PIM
 database. The problem is, ContactsProvider does not allow the client
 application to access _deleted_people and clear the _sync_dirty field.
 So we have to modify the ContactsProvider andCalendarProvider.
 The possible change maybe: Add an EasContactsProvider, extended from
 ContactsProvider, then export it by adding a provider section in
 GoogleContactsProvider's AndroidManifest.xml. In EasContactsProvider,
 override insertInternal, updateInternal, deleteInternal and
 queryInternal to allow Exchange ActiveSync service to access
 _deleted_people table or clear the _sync_dirty flag.
 Pros: performance is good
 Cons: seems not a formal way.

 3. Broadcast change notification Intent in ContactsProvider/CalendarProvider. 
 The change notification includes record uri, change
 type and the process id that causes this change. Sync Engine will log
 these changes and will not use any _sync fields in later sync session.
 Changes in ContactsProvider andCalendarProvider:
 For change on single record, if main table is changed, report the
 change. If child table is changed, report UPDATE for the main record.
 For changes (update/delete) on multiple records, if main table is
 changed, query out the records and report change for each. If child
 table is changed, query out the records and report UPDATE for each
 main record.
 Pros: Other sync engines can also make use of this change
 notification.
 Cons: Low performance when multiple changes occur.
 If Google enhances its content observer to broadcast detail change
 info (uri, type, pid), that will be nice. The pid is used for a sync
 engine to check if a change is caused by itself.

 4. Make use of the Android sync framework. To be honest, I doubt
 whether the current sync framework supports contacts/calendar content
 provider to be sync'd by multiple sync protocols without modifying
 Google's code. If any expert has any useful information, please let me
 know.

 Regards
 Aaron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: why is the sdk 1.5 prerelease releaed with obsolete documentation?

2009-04-16 Thread David Turner
The documentation on the official web site is still for 1.1
As as been announced, we will update the site when we release the final 1.5
SDK

It's a preview for a reason :-)

On Thu, Apr 16, 2009 at 4:24 PM, a druid klausf...@gmail.com wrote:


 Hi,

 Well I know, that this is just a pre-release bla . bla . bla,
 but still this doesn't justify everything.

 Wouldn't it be nice to have the documentation at least halfways
 accurate?
 Or if it's not accurate to add at some kind of 'obsolete' marker to
 certain chapters.
 This can be done very quickly and helps users.

 The very first thing I looked up was docs/guide/developing/other-
 ide.html

 Creating an Android project still talks about activityCreator ,
 which doesn't exist any more.

 Additionally the example still talks about activityCreator.py (which
 didn't even exist in the previous release under linux)

 My suggestion to the Google team would be to at least mark all
 chapters as obsolete, which might have to be rewritten.
 If the document changes are already known, the obsolete marler could
 already point to some kind of release notes file with the anticipated
 changes.

 In my example this could have been a reference to
 http://developer.android.com/sdk/preview/
 Where is activitycreator

 I think this suggestion might help to get rid of quite some un
 necessary support questions.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: why is the sdk 1.5 prerelease releaed with obsolete documentation?

2009-04-16 Thread a druid

Hi David,

I do not talk about the documentation on the web.

The documentation packaged with the 1.5. release is wrong as well.
If the doc is wrong in any case it might be better to provide a
doc.html,
which states.

 This is a pre-release.
 Don't expect to find any useful documentation here.
 If you're relally interested in the documentation of the
 previous release, then click 'here'


I still think this would be better than providing bad documentation
without any comments.


On Apr 16, 4:43 pm, David Turner di...@android.com wrote:
 The documentation on the official web site is still for 1.1
 As as been announced, we will update the site when we release the final 1.5
 SDK

 It's a preview for a reason :-)

 On Thu, Apr 16, 2009 at 4:24 PM, a druid klausf...@gmail.com wrote:

  Hi,

  Well I know, that this is just a pre-release bla . bla . bla,
  but still this doesn't justify everything.

  Wouldn't it be nice to have the documentation at least halfways
  accurate?
  Or if it's not accurate to add at some kind of 'obsolete' marker to
  certain chapters.
  This can be done very quickly and helps users.

  The very first thing I looked up was docs/guide/developing/other-
  ide.html

  Creating an Android project still talks about activityCreator ,
  which doesn't exist any more.

  Additionally the example still talks about activityCreator.py (which
  didn't even exist in the previous release under linux)

  My suggestion to the Google team would be to at least mark all
  chapters as obsolete, which might have to be rewritten.
  If the document changes are already known, the obsolete marler could
  already point to some kind of release notes file with the anticipated
  changes.

  In my example this could have been a reference to
 http://developer.android.com/sdk/preview/
  Where is activitycreator

  I think this suggestion might help to get rid of quite some un
  necessary support questions.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: why is the sdk 1.5 prerelease releaed with obsolete documentation?

2009-04-16 Thread David Turner
On Thu, Apr 16, 2009 at 4:49 PM, a druid klausf...@gmail.com wrote:


 Hi David,

 I do not talk about the documentation on the web.


Ah  sorry about that.


 The documentation packaged with the 1.5. release is wrong as well.
 If the doc is wrong in any case it might be better to provide a
 doc.html,
 which states.

  This is a pre-release.
  Don't expect to find any useful documentation here.
  If you're relally interested in the documentation of the
  previous release, then click 'here'


 I still think this would be better than providing bad documentation
 without any comments.


I agree with you, but I can only assume that doing this was going to be a
risky
change to the SDK generation script, and that it was just easier to package
the
stuff as-is for the preview.



 On Apr 16, 4:43 pm, David Turner di...@android.com wrote:
  The documentation on the official web site is still for 1.1
  As as been announced, we will update the site when we release the final
 1.5
  SDK
 
  It's a preview for a reason :-)
 
  On Thu, Apr 16, 2009 at 4:24 PM, a druid klausf...@gmail.com wrote:
 
   Hi,
 
   Well I know, that this is just a pre-release bla . bla . bla,
   but still this doesn't justify everything.
 
   Wouldn't it be nice to have the documentation at least halfways
   accurate?
   Or if it's not accurate to add at some kind of 'obsolete' marker to
   certain chapters.
   This can be done very quickly and helps users.
 
   The very first thing I looked up was docs/guide/developing/other-
   ide.html
 
   Creating an Android project still talks about activityCreator ,
   which doesn't exist any more.
 
   Additionally the example still talks about activityCreator.py (which
   didn't even exist in the previous release under linux)
 
   My suggestion to the Google team would be to at least mark all
   chapters as obsolete, which might have to be rewritten.
   If the document changes are already known, the obsolete marler could
   already point to some kind of release notes file with the anticipated
   changes.
 
   In my example this could have been a reference to
  http://developer.android.com/sdk/preview/
   Where is activitycreator
 
   I think this suggestion might help to get rid of quite some un
   necessary support questions.
 
 
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Better way to debug when there is jar dependancies?

2009-04-16 Thread Bin Chen

My application app depends on jar_a, which depends on jar_b. Now I
want to debug jar_b by changing it's code. Both the jar_a and jar_b is
built by ant tool. So my process is:

1) change jar_b
2) build jar_b
3) copy jar_b to the lib/ directory of jar_a
4) build jar_a
5) delete the reference to jar_a and jar_b in eclipse (Properties of
project) of app
6) re add the jar_a and jar_b into the eclipse

It's really painful, I don't know if I am doing the right way?

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



[android-developers] How can I test the video recording functionality in the new emulator

2009-04-16 Thread ying lcs

Hi,

How can I test the video recording functionality in the new emulator
in 1.5 android preview SDK?

Thank you.

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



[android-developers] Re: Early Look Android 1.5 SDK

2009-04-16 Thread Sundog

Great news. That's two applications back in the development queue for
me!

On Apr 15, 12:07 pm, clark clarkd...@gmail.com wrote:

 Either way, the early look SDK is allowing me to get raw audio from
 the phones mic and run it through an FFT.  The test notes I was
 sending through are being analyzed by the FFT correctly, and I can say
 I am quite happy with the features so far.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Quality of paid applications on the Market...

2009-04-16 Thread Dianne Hackborn
On Thu, Apr 16, 2009 at 6:36 AM, Tom tom_a_h...@yahoo.com wrote:

 Um, 30% seems like a generous cut of app profits.


That money isn't going to Google.

-- 
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: PackageManager.installPackage(Uri packageURI) error on Androdi 1.5 SDK

2009-04-16 Thread Dianne Hackborn
I repeat, no.  If this is allowed, the user has effectively granted you
every possible permission in the system.  At this point we absolutely aren't
going to do this.

It isn't a matter of this being a hidden API or there being a workaround.
If the security system is working correctly, you can't call the API whether
it is hidden or not, and there is no workaround.

On Thu, Apr 16, 2009 at 5:10 AM, Surendra Reddy T surendraredd...@gmail.com
 wrote:

 Hi Hackborn,

 Thanks a lot for your quick response.
 My application sits on the device with users acceptance only.
 Once I have installed my app, I should be  able to download any properly
 signed APK onto the device and install it on the device without any user
 intervention.
 And the users of the devices will be intimated about the installation.

 This is possible on Symbian.

 Can you suggest me a way, since I have to have this in my APP.
 Is there any workaround for this or any hidden API ?

 Regards
 Surendra



 On Thu, Apr 16, 2009 at 2:02 PM, Dianne Hackborn hack...@android.comwrote:

 You can't do this.  The only way a third party app can install another
 application is by launching the built-in app installer activity.


 On Thu, Apr 16, 2009 at 1:08 AM, Surendra Reddy T 
 surendraredd...@gmail.com wrote:

 Hi,

 I am developing an app which should be able to install any signed APK
 silelently, and I need API to do this.

 I was unable to call installPackage(Uri packageURI) method of
 PackageManger on  Android 1.1 SDK.
 I have read in 1.5 docs, that Package Manger API is available.

 IF anybody know how to use this API, please help. If is there any other
 way to do this, please send me the API name and usage.

 Regards
 Surendra





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






 --
 Surendra Reddy T



 



-- 
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: inject long home key press

2009-04-16 Thread Dianne Hackborn
The codes you send through the driver are the raw events, before they have
been translated to Android key codes, so it depends on your hardware.
You'll want to look at the source code of whatever build you are using --
there will be a *.kl file somewhere mapping from the driver codes to android
codes.

On Thu, Apr 16, 2009 at 8:54 AM, a druid klausf...@gmail.com wrote:


 Hi searup.

 I have one more question.
 As a newbie I have still the basic problem of locating the document
 ation, that I need for some tasks.

 Which document(s) / url list(s) the possible devices / types / key-
 codes key-values ?

 thanks a lot in advance.

 On Apr 16, 2:46 pm, swarup me.s...@gmail.com wrote:
  try
 
  $ adb shell sendevent device type key-code value-press ; adb
  shell sleep 1   #seconds; adb shell sendevent device type
  key-code value-release
 
  above is for 1 second long press
 
  On Apr 14, 11:46 pm, Dan Raaka danra...@gmail.com wrote:
 
   I am using this a work-around for the non-working home key in the 1.0
   or 1.1 emulator.
   If there is fix for it. That would work for me as well.
 
   On Apr 14, 11:23 am, Dan Raaka danra...@gmail.com wrote:
 
Is there a keycode to inject long home key press into a device via
 adb
like below ?
 
$ adb shell input keyevent 7# for key '0'
 
-Dan
 
 
 



-- 
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: Quality of paid applications on the Market...

2009-04-16 Thread Robert Green

Can I ask the obvious question, then?  If it doesn't go to google,
then where does it go?

On Apr 16, 11:36 am, Dianne Hackborn hack...@android.com wrote:
 On Thu, Apr 16, 2009 at 6:36 AM, Tom tom_a_h...@yahoo.com wrote:
  Um, 30% seems like a generous cut of app profits.

 That money isn't going to Google.

 --
 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: Factory configurable data

2009-04-16 Thread Dianne Hackborn
This kinds of questions should be asked on android-porting or
android-platform (if you are working on a change to contribute back to the
platform).  Thanks.

On Thu, Apr 16, 2009 at 4:41 AM, Zhubham sahilz...@gmail.com wrote:


 Hi Experts,

 I need your help in knowing if string/integer can be made factory
 configurable in android.

 eg:
 A welcome message is stored at some location. To change this message
 all a person needs to do is go to the above location and enter the new
 text. The ROM image build command would now take this new string for
 display. The advantage is that you don't need to recompile your entire
 project.

 Thanks in advance.

 Best Regards,
 Zhubham

 



-- 
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: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread ludovic.perrier

Hello

I have the same problem, and it don't work yet. I have a question, new
mechanism works if aidl interface file isn't in same package of aidl
parcelable class?

Ludo

On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:
 I have just realized something.

 If you create/edit parcelable typeaidlfiles, this does not trigger a
 recompilation of the interfaceaidlfiles that depends on it. In fact,aidlfiles 
 are only recompiled when theaidlfile is touched.

 We'll do a quick fix for the final ADT 0.9 (which will most likely be
 a full recompilation of allaidlfiles whenever 1aidlfile is
 changed), and implement true dependency support later to minimize
 unneeded recompilations.

 Xav



 On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com wrote:
  I just did a quick test following the information in the link I posted
  above and it is working for me.

  Make sure youraidlfile declares the package it's in (like any java class).

  Xav

  On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com wrote:
  oh I missed this message :(

  Let me do a quick test...

  On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs ho...@helloandroid.com 
  wrote:

  Some more info:

  - I tried creating anaidlfile with the same name as the Parcelable
  class, and I get an error in the console like: path to class/
  class.aidl:1 interface package.class should be declared in a
  file called com.aidl. I tried declaring the Parcelable in com.aidland
  that didn't work either.

  - The documentation in 1.5 onAIDLstill refers to the Android Tools
  CreateAidlpreprocess file for Parcelable classes which is not
  available in ADT 0.9.  Should I open a bug for this?

  Thanks,
  Zach

  On Apr 14, 12:52 pm, Zach Hobbs ho...@helloandroid.com wrote:
  I'm attempting to get build my project with the early preview SDK,
  targeting 1.1 and am having problems gettingAIDLfiles to recognize
  imports for Parcelables. In the previous ADT you could right click on
  your project, hit Android Tools and have an option something like
  GenerateAIDLfor Parcelables.  This would create a file
  project.aidlin your project's root containing a line for each
  Parceable in your project.

  With the new SDK/ADT anytime I try to import a Parcelable in anAIDL
  file I get Couldn't find import for class ...  even though I still
  have the project.aidlfile in the project's root.  Also, the option to
  generate theAIDLfor the Parcelables is no longer available.  Anyone
  know how to get your Parcelables noticed in the new SDK?

  Thanks,
  Zach

  --
  Xavier Ducrohet
  Android Engineer, Google.

  --
  Xavier Ducrohet
  Android Engineer, Google.

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



[android-developers] Re: Quality of paid applications on the Market...

2009-04-16 Thread Sundog


On Apr 16, 10:46 am, Robert Green rbgrn@gmail.com wrote:
 Can I ask the obvious question, then?  If it doesn't go to google,
 then where does it go?


Can I give the obvious reply? Oooh, me, me, me.

This information is easily available to anyone who has done even the
*slightest* research. It's for carrier fees, as has been made
completely clear to anyone paying attention over the last six months.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread ludovic.perrier

I have found!

When parcelable aidl file is in other package
we must set an import on parcelable class in aidl interface

Happy Codding!

On 16 avr, 18:56, ludovic.perrier barbapa...@gmail.com wrote:
 Hello

 I have the same problem, and it don't work yet. I have a question, new
 mechanism works ifaidlinterface file isn't in same package ofaidl
 parcelable class?

 Ludo

 On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:

  I have just realized something.

  If you create/edit parcelable typeaidlfiles, this does not trigger a
  recompilation of the interfaceaidlfiles that depends on it. In 
  fact,aidlfiles are only recompiled when theaidlfile is touched.

  We'll do a quick fix for the final ADT 0.9 (which will most likely be
  a full recompilation of allaidlfiles whenever 1aidlfile is
  changed), and implement true dependency support later to minimize
  unneeded recompilations.

  Xav

  On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com wrote:
   I just did a quick test following the information in the link I posted
   above and it is working for me.

   Make sure youraidlfile declares the package it's in (like any java class).

   Xav

   On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com wrote:
   oh I missed this message :(

   Let me do a quick test...

   On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs ho...@helloandroid.com 
   wrote:

   Some more info:

   - I tried creating anaidlfile with the same name as the Parcelable
   class, and I get an error in the console like: path to class/
   class.aidl:1 interface package.class should be declared in a
   file called com.aidl. I tried declaring the Parcelable in com.aidland
   that didn't work either.

   - The documentation in 1.5 onAIDLstill refers to the Android Tools
   CreateAidlpreprocess file for Parcelable classes which is not
   available in ADT 0.9.  Should I open a bug for this?

   Thanks,
   Zach

   On Apr 14, 12:52 pm, Zach Hobbs ho...@helloandroid.com wrote:
   I'm attempting to get build my project with the early preview SDK,
   targeting 1.1 and am having problems gettingAIDLfiles to recognize
   imports for Parcelables. In the previous ADT you could right click on
   your project, hit Android Tools and have an option something like
   GenerateAIDLfor Parcelables.  This would create a file
   project.aidlin your project's root containing a line for each
   Parceable in your project.

   With the new SDK/ADT anytime I try to import a Parcelable in anAIDL
   file I get Couldn't find import for class ...  even though I still
   have the project.aidlfile in the project's root.  Also, the option to
   generate theAIDLfor the Parcelables is no longer available.  Anyone
   know how to get your Parcelables noticed in the new SDK?

   Thanks,
   Zach

   --
   Xavier Ducrohet
   Android Engineer, Google.

   --
   Xavier Ducrohet
   Android Engineer, Google.

  --
  Xavier Ducrohet
  Android Engineer, Google.


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



[android-developers] Curious debugging problem

2009-04-16 Thread MrChaz

I'm getting a force close on a real device but I can't replicate it on
the emulator which means I can't find out why it's crashing.
For some reason the debugger never attaches when I try and debug on
the actual device.
I'm running Vista and SDK 1.1

Any and all help welcome :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Black Screen problem with graphics update using unlockCanvasAndPost()

2009-04-16 Thread Sarnoth

You definitely need to do your game loop on a different thread. If
your game loop is running in the main UI thread then while it is
running the screen can't update and you can't get input events. The UI
thread is what does these things.

On Apr 15, 10:25 pm, Warren warrenba...@gmail.com wrote:
 Sarnoth, I appreciate you taking the time to comment.

 Does that matter - if the thread isn't different?

 Just in case there were problems with the thread, I rewrote the
 program not to use a second thread and just execute the drawing loop
 in the view.

 In the code sample, I also changed draw() to drawSprites(), as I
 described in an earlier post. Neither of these things helped.

 == Begin Code ==

 package com.baltz.scorched;

 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;

 class ScorchedView extends SurfaceView implements
 SurfaceHolder.Callback {

     private Context context;
     private SurfaceHolder holder;

     private Bitmap backgroundImage;
     private Bitmap foregroundImage;
     private Bitmap spriteImage;

     private Resources resources;
     private ScorchedTerrain terrain;
     private Engine engine;

     public ScorchedView(Context c, AttributeSet attrs) {
         super(c, attrs);
         // register our interest in hearing about changes to our
 surface
         holder = getHolder();
         holder.addCallback(this);

         context = c;

         resources = context.getResources();

         // load background image as a Bitmap instead of a Dable b/c
         // we don't need to transform it and it's faster to d this way
         backgroundImage = BitmapFactory.decodeResource(resources,
                 R.drawable.earthrise);

         foregroundImage = BitmapFactory.decodeResource(resources,
                 R.drawable.foreground1);

         spriteImage = BitmapFactory.decodeResource(resources,
                         R.drawable.sprite1);

         terrain = new ScorchedTerrain(foregroundImage);

         engine = new Engine();
         Body body;

         body = new Body(spriteImage);
         body.setLocation(50, 50);
         engine.addBody(body);

         body = new Body(spriteImage);
         body.setLocation(40, 100);
         engine.addBody(body);
     }

     /* Callback invoked when the surface dimensions change. */
     public void surfaceChanged(SurfaceHolder h, int format, int width,
 int height) {
         holder = h;
     }

     /*
      * Callback invoked when the Surface has been created and is ready
 to be
      * used.
      */
     public void surfaceCreated(SurfaceHolder h) {
         holder = h;
         gameLoop();
     }

     /*
      * Callback invoked when the Surface has been destroyed and must
 no longer
      * be touched. WARNING: after this method returns, the Surface/
 Canvas must
      * never be touched again!
      */
     public void surfaceDestroyed(SurfaceHolder holder) {
     }

     private void gameLoop(){

         Canvas canvas;

         int i=0;
         while(i30){
                 canvas = null;
                 try {
                     canvas = holder.lockCanvas(null);
                     engine.update();
                     drawSprites(canvas);
                 } finally {
                     // do this in a finally so that if an exception is thrown
                     // during the above, we don't leave the Surface in an
                     // inconsistent state
                     if (canvas != null) {
                         Log.w(dbg, unlocking canvas + i);
                         holder.unlockCanvasAndPost(canvas);
                     }
                 }

                 try{
                   Thread.currentThread().sleep(300);
                 }
                 catch(Exception e){
                 }
                 i++;
         }
     }

     /**
      * Draws the sprites and background to the provided
      * Canvas.
      */
     public void drawSprites(Canvas canvas) {
         // Draw the background image. Operations on the Canvas
 accumulate
         // so this is like clearing the screen.
         canvas.drawBitmap(backgroundImage, 0, 0, null);

         //draw the up-to-date, deformed foreground
         terrain.draw(canvas);

         //draw all bodies (players, projectiles, etc) on the screen
         engine.drawAll(canvas);
     }

 }

 On Apr 15, 4:47 pm, Sarnoth jesse.st...@gmail.com wrote:

  I can't really say without seeing more of the code, but based on your
  description of the problem I wonder if your thread is in fact a
  separate thread or if the run method is simply being executed in the
  main UI thread. Something worth checking. You can log
  Thread.currentThread().getName() from inside your run method and from
  

[android-developers] Re: How to change APN Settings

2009-04-16 Thread Omer Saatcioglu

I have the same problem too. Is there anyone who can help us for this?

Thank you,
Omer

On Feb 24, 12:42 pm, Jun'ichiHira hiraya...@gmail.com wrote:
 Hello
 I'm developing an application that change SystemAPN.
 but I don't have any information to do that.
 Does anyone know how to changeAPNSettings
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Voice Recognition in API demos crashing

2009-04-16 Thread zlu

I tried to run the voice recognition in api demo from sdk 1.5 and it
crashed with this stacktrace:

04-16 10:32:00.725: INFO/ActivityManager(568): Starting activity:
Intent { comp={com.example.android.apis/
com.example.android.apis.app.VoiceRecognition} }
04-16 10:32:00.945: INFO/ActivityManager(568): Displayed activity
com.example.android.apis/.app.VoiceRecognition: 215 ms
04-16 10:32:04.275: INFO/ActivityManager(568): Starting activity:
Intent { action=android.speech.action.RECOGNIZE_SPEECH (has extras) }
04-16 10:32:04.295: DEBUG/AndroidRuntime(823): Shutting down VM
04-16 10:32:04.295: WARN/dalvikvm(823): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
04-16 10:32:04.295: ERROR/AndroidRuntime(823): Uncaught handler:
thread main exiting due to uncaught exception
04-16 10:32:04.315: ERROR/AndroidRuntime(823):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.speech.action.RECOGNIZE_SPEECH (has extras) }
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1484)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.app.Activity.startActivityForResult(Activity.java:2656)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.example.android.apis.app.VoiceRecognition.startVoiceRecognitionActivity
(VoiceRecognition.java:79)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.example.android.apis.app.VoiceRecognition.onClick
(VoiceRecognition.java:66)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.View.performClick(View.java:2179)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.View.onTouchEvent(View.java:3828)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.widget.TextView.onTouchEvent(TextView.java:6291)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.View.dispatchTouchEvent(View.java:3368)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1197)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.app.Activity.dispatchTouchEvent(Activity.java:1993)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.os.Looper.loop(Looper.java:123)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
java.lang.reflect.Method.invokeNative(Native Method)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
java.lang.reflect.Method.invoke(Method.java:521)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-16 10:32:04.315: ERROR/AndroidRuntime(823): at
dalvik.system.NativeStart.main(Native Method)
04-16 10:32:04.335: INFO/Process(568): Sending signal. PID: 823 SIG: 3
04-16 10:32:04.335: INFO/dalvikvm(823): threadid=7: reacting to signal
3
04-16 10:32:04.415: INFO/dalvikvm(823): Wrote stack trace to '/data/
anr/traces.txt'
04-16 10:32:12.225: DEBUG/dalvikvm(608): GC freed 9273 objects /
524264 bytes in 98ms

Has anyone get this working?

Zhao
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 create home screen short cut?

2009-04-16 Thread havexz

Thanks a lot But why this small piece of infomation not easily
accessible in the online documentation.

Thanks again...help appreciated

On Apr 16, 7:31 am, patrick patrick.boul...@gmail.com wrote:
 com.android.launcher.permission.INSTALL_SHORTCUT

 On Apr 16, 1:36 am, havexz bali.param...@gmail.com wrote:



  What permission do i have to add?

  On Apr 15, 11:21 am, patrick patrick.boul...@gmail.com wrote:

   Did you add the permission in the manifest?

   On Apr 15, 5:06 pm, havexz bali.param...@gmail.com wrote:

I am trying this code but its not working 

                Intent shortcutIntent = new Intent
(Intent.ACTION_MAIN);
                shortcutIntent.setClassName(this, this.getClass
().getName());

                Intent intent = new Intent();
                intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT,
shortcutIntent);
                intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, hello);
                Parcelable iconResource =
Intent.ShortcutIconResource.fromContext(
                        NoteView.this,  R.drawable.short_icon);
                intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
iconResource);

                intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
                getApplicationContext().sendBroadcast(intent);- Hide 
quoted text -

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



[android-developers] Re: What thread is ViewRoot runs

2009-04-16 Thread Dianne Hackborn
In runs on the thread the window was shown in, and it should be pretty clear
from the code that it is responsible for dispatching draws down the view
hierarchy (though there is no onDraw on activity, so I'm not really sure
what you are asking).

On Thu, Apr 16, 2009 at 10:18 AM, Meryl Silverburgh 
silverburgh.me...@gmail.com wrote:


 Hi,

 Can you please tell me what is the read which ViewRoot runs?
 Is it the same thread as the Activity on the top of the screen? Or it
 is a system thread?

 If it is a system thread, does it responsible calling the onDraw of the
 Activty?

 Thank you.

 



-- 
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: Getting UnknownHostException - Host is Unresolved

2009-04-16 Thread Vaibhav Gathibandhe
Hi,

Any ideas here??

I would really appreciate if someone look into this.

Thanks and Regards,
Vaibhav Gathibandhe

On Thu, Apr 16, 2009 at 12:56 AM, Vaibhav Gathibandhe 
vaibhav.andr...@gmail.com wrote:

 Hi,

 Yes, that's true. Here is the code snippet:

 HttpHost host = new HttpHost(http://10.0.2.2/Nrti/recommendation_saver;);
 HttpRequest request = new HttpPost();
 .
 .
 Setting HttpParams here
 .

 request.setParams(params);
 HttpResponse response = client.execute(host, request);

 And as I mentioned, the same URL works with the emulator's browser and
 browser on my laptop (if I use http://*localhost*
 /Nrti/recommendation_saver).

 So, the question is why the URL is not getting resolved from the code!!

 Thanks and Regards,
 Vaibhav Gathibandhe


 On Thu, Apr 16, 2009 at 12:31 AM, Desu Vinod Kumar 
 vinny.s...@gmail.comwrote:

 Actually why these exception gets is if the I-net address .?method
 getbyname and getlocalhost are unable to resolve the host name then they
 throws an unknownhostexception




 On Thu, Apr 16, 2009 at 9:46 AM, Vaibhav Gathibandhe 
 vaibhav.andr...@gmail.com wrote:


 Hi all,

 I am getting UnknownHostException - host is unresolved in my app when
 trying to connect the emulator to server on my laptop(running on
 localhost).

 The URL I am using is:

 HttpHost host = new HttpHost(http://10.0.2.2/Nrti/
 recommendation_saver);

 I have android.permission.INTERNET permission set in my
 AndroidMenifest.xml. Moreover, with this URL, I am able to connect to
 my machine's server when I use the browser on the emulator.

 Has anyone faced and solved such problem. If yes, I would really like
 to know the solution.

 Thanks in advance.

 Regards,
 Vaibhav Gathibandhe






 --
 Regards
 ---
 Desu Vinod Kumar
 vinny.s...@gmail.com
 09916009493

 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 enable/disable GPRS/EDGE data connection

2009-04-16 Thread Omer Saatcioglu
Hello all,
The service providers in my country are charging for the MBs I downloaded in
my GPRS/EDGE connection. So, whenever I want to disable the GPRS, I just
change my default APN to something wrong and then correct it when I want to
enable it again. I couldn't find another way to enable/disable. I think,
Android team assumed that only 3G users with a good data plan only would use
this phone. Anyway, I just want to develop an application which can do that
automatically for me. However; I couldn't find how to change the APN
settings in the docs. The only clue I had was this:
http://developer.android.com/reference/android/provider/Settings.html#ACTION_APN_SETTINGS

but I couldn't find how to use it. Could you please help me? Any alternative
ways and/or suggestions are welcome.

Thank you,
Omer

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recording audio with 1.5 SDK

2009-04-16 Thread j

One known limitation of SDK 1.1 was that audio can be recorded only to
a File and not to a network stream.  Is this still an issue with 1.5
SDK?

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: Curious debugging problem

2009-04-16 Thread Al

On Apr 16, 6:13 pm, MrChaz mrchazmob...@googlemail.com wrote:
 I'm getting a force close on a real device but I can't replicate it on
 the emulator which means I can't find out why it's crashing.
 For some reason the debugger never attaches when I try and debug on
 the actual device.

For debugging on a real device, you have to enable it under Settings-
Applications and also turn on debugging in the application's
manifest. E.g.

application . debuggable=true . /application

 I'm running Vista and SDK 1.1

 Any and all help welcome :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Curious debugging problem

2009-04-16 Thread Al

Forgot to mention, you should be able to read logcat messages from the
device. Inside Eclipse and also from terminal/command prompt: adb -d
logcat. It should give you a trace of where the crash happened and
why.

On Apr 16, 7:41 pm, Al alcapw...@googlemail.com wrote:
 On Apr 16, 6:13 pm, MrChaz mrchazmob...@googlemail.com wrote:

  I'm getting a force close on a real device but I can't replicate it on
  the emulator which means I can't find out why it's crashing.
  For some reason the debugger never attaches when I try and debug on
  the actual device.

 For debugging on a real device, you have to enable it under 
 Settings-Applications and also turn on debugging in the application's

 manifest. E.g.

 application . debuggable=true . /application

  I'm running Vista and SDK 1.1

  Any and all help welcome :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: getting android_id from GoogleLoginServiceBlockingHelper?

2009-04-16 Thread dar

You probably want to star issue 1073 
http://code.google.com/p/android/issues/detail?id=1073
then you will get updates if it is worked on.


On Apr 16, 5:09 am, Mariano Kamp mariano.k...@gmail.com wrote:
 Well, did Cupcake bring some functionality that lets non-Google apps access
 the user's Google credentials or has there been any progress in that
 direction?
 Reading your question I assume the answer is no. But what would be good way
 to get to know if there are any plans to provide the functionality mentioned
 above?

 On Fri, Mar 20, 2009 at 10:50 PM, Dianne Hackborn hack...@android.comwrote:

  Sorry maybe someone else can help you but I can't; I work on the Android
  platform, I am not that familiar with what is going on with the Google apps.

  On Fri, Mar 20, 2009 at 1:01 PM, Mariano Kamp mariano.k...@gmail.comwrote:

  On a related note, is there any API today or planned for tomorrow for
  accessing the user's Google credentials in a safe way to pass them onto a
  Google service?
  The actual context is that I have users complaining that they don't want
  to give my app their google userid/pw to access Google Reader via my app. I
  hear Gmail doesn't ask me for that ... Of course, I am aware, that my app
  will not be on equal footing with Gmail, but I am still wondering if there
  is any way around getting to know the user's credentials today? Or in
  Cupcake?

  2009/3/20 Dianne Hackborn hack...@android.com

   This will be fixed in cupcake, where we have a secure settings area that
  nobody outside of the system can touch.

  Also keep in mind that GoogleLoginServiceBlockingHelper is not public
  API.  In fact it is not an Android API at all, it is part of the Google
  application suite which will not be on all Android phones.

  On Fri, Mar 20, 2009 at 10:47 AM, strazzere str...@gmail.com wrote:

  The android_id *should* not change, but can currently be modified.

  It's stored in the database located at;
  /data/data/com.android.providers.settings/databases/settings.db

  Run the query; select * from system;
  You'll see plenty of information which can then be changed;
  update system set value='dead00beef' where name='android_id';

  However, this only changes the android_id when you do a call to
  Settings.System.ANDROID_ID - not how google does it through the
  GoogleLoginServiceBlockingHelper.

  -Tim

  On Feb 28, 8:30 am, dar dher...@gmail.com wrote:
   I have a related question - is android_id implemented on the device
   and thus will not change no matter which gmail account is used on that
   device?

   I am hoping that if a user downloads my app and runs it on one device
   that they will get one android_id, and if they also use the same gmail
   account on a different device that this will result in a different
   android_id.  Is this true?

   On Feb 26, 4:47 pm, Dan Bornstein danf...@android.com wrote:

On Thu, Feb 26, 2009 at 12:15 PM, strazzere str...@gmail.com
  wrote:
 Here is a small snippet; [...]

I'm sorry to harp on this, but please provide a complete,
  *compilable*
and *runnable* example, along with what you actually observed when
running it (e.g., log output)

I don't doubt that you are seeing a problem, but I've been burned
  way
too many times by program fragments not actually triggering the
alleged problem to be willing to spend any time (nor expect anyone
else to spend the time) to flesh out an incomplete fragment. What
you've provided thus far, I am afraid, isn't sufficient to
  demonstrate
the problem.

Thanks in advance for your continued efforts,

-dan

  --
  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.  All such questions should be posted on public
  forums, where I and others can see and answer them.

  --
  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.  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] Location.getBearing vs SensorListener

2009-04-16 Thread chris

Hi,

When i get bearing from the GPS , i don't have the same direction as
the data from the SensorListener.

Could someone explain the difference ?
Is the bearing of the GPS calculated from the previous direction ,
that would explain why i don't get bearing when not moving.

On my Dream phone , the sensor listener sometime get crazy and give me
a bearing shifted from 90° anticlockwise.
has anyone else noticed that and find a workaround ?

Regard
Chris



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] WebView and Button in layout, only one of them can be clicked.

2009-04-16 Thread kevin

My LinearLayout has a button and a WebView. The problem is that only
the first one in layout can be clicked, the other is not. If I put
WebView first into the layout, the button is not clickable. If put
button in the layout first, then WebView is not clickable.

Is there a setting to enable this?

Thanks,
Kevin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: getting android_id from GoogleLoginServiceBlockingHelper?

2009-04-16 Thread Mariano Kamp
I did. The last comment is mine. But the most recent update is from February
and I thought it would be interesting to know if there is any progress.

On Thu, Apr 16, 2009 at 8:47 PM, dar dher...@gmail.com wrote:


 You probably want to star issue 1073
 http://code.google.com/p/android/issues/detail?id=1073
 then you will get updates if it is worked on.


 On Apr 16, 5:09 am, Mariano Kamp mariano.k...@gmail.com wrote:
  Well, did Cupcake bring some functionality that lets non-Google apps
 access
  the user's Google credentials or has there been any progress in that
  direction?
  Reading your question I assume the answer is no. But what would be good
 way
  to get to know if there are any plans to provide the functionality
 mentioned
  above?
 
  On Fri, Mar 20, 2009 at 10:50 PM, Dianne Hackborn hack...@android.com
 wrote:
 
   Sorry maybe someone else can help you but I can't; I work on the
 Android
   platform, I am not that familiar with what is going on with the Google
 apps.
 
   On Fri, Mar 20, 2009 at 1:01 PM, Mariano Kamp mariano.k...@gmail.com
 wrote:
 
   On a related note, is there any API today or planned for tomorrow for
   accessing the user's Google credentials in a safe way to pass them
 onto a
   Google service?
   The actual context is that I have users complaining that they don't
 want
   to give my app their google userid/pw to access Google Reader via my
 app. I
   hear Gmail doesn't ask me for that ... Of course, I am aware, that
 my app
   will not be on equal footing with Gmail, but I am still wondering if
 there
   is any way around getting to know the user's credentials today? Or in
   Cupcake?
 
   2009/3/20 Dianne Hackborn hack...@android.com
 
This will be fixed in cupcake, where we have a secure settings area
 that
   nobody outside of the system can touch.
 
   Also keep in mind that GoogleLoginServiceBlockingHelper is not public
   API.  In fact it is not an Android API at all, it is part of the
 Google
   application suite which will not be on all Android phones.
 
   On Fri, Mar 20, 2009 at 10:47 AM, strazzere str...@gmail.com
 wrote:
 
   The android_id *should* not change, but can currently be modified.
 
   It's stored in the database located at;
   /data/data/com.android.providers.settings/databases/settings.db
 
   Run the query; select * from system;
   You'll see plenty of information which can then be changed;
   update system set value='dead00beef' where name='android_id';
 
   However, this only changes the android_id when you do a call to
   Settings.System.ANDROID_ID - not how google does it through the
   GoogleLoginServiceBlockingHelper.
 
   -Tim
 
   On Feb 28, 8:30 am, dar dher...@gmail.com wrote:
I have a related question - is android_id implemented on the
 device
and thus will not change no matter which gmail account is used on
 that
device?
 
I am hoping that if a user downloads my app and runs it on one
 device
that they will get one android_id, and if they also use the same
 gmail
account on a different device that this will result in a different
android_id.  Is this true?
 
On Feb 26, 4:47 pm, Dan Bornstein danf...@android.com wrote:
 
 On Thu, Feb 26, 2009 at 12:15 PM, strazzere str...@gmail.com
   wrote:
  Here is a small snippet; [...]
 
 I'm sorry to harp on this, but please provide a complete,
   *compilable*
 and *runnable* example, along with what you actually observed
 when
 running it (e.g., log output)
 
 I don't doubt that you are seeing a problem, but I've been
 burned
   way
 too many times by program fragments not actually triggering the
 alleged problem to be willing to spend any time (nor expect
 anyone
 else to spend the time) to flesh out an incomplete fragment.
 What
 you've provided thus far, I am afraid, isn't sufficient to
   demonstrate
 the problem.
 
 Thanks in advance for your continued efforts,
 
 -dan
 
   --
   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.  All such questions should be posted on
 public
   forums, where I and others can see and answer them.
 
   --
   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.  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] String comparison with Text in EditText with online data.

2009-04-16 Thread murphy

Hi, I'm trying to use the code below to connect to an online source,
then compare the data as it is read line by line against what is typed
in an EditText field before displaying the next page. At the moment
when I run it and press the Sign In button nothing happens. The
problem seems to be with the comparison of the data. Can anyone help.

try{

URL myURL = new URL(http://www.donalokeeffe.com/
usernames.txt);

URLConnection conn = myURL.openConnection();
conn.connect();

BufferedReader is = new BufferedReader(new InputStreamReader
(conn.getInputStream(), UTF-8));

String istr;
EditText username = (EditText)findViewById(R.id.username2);
String usrname = username.getText().toString();

while ((istr = is.readLine()) != null)
{
if(is.readLine() == usrname)
{
setContentView(R.layout.menu);

Button button2 = (Button)findViewById(R.id.timetable);
button2.setOnClickListener(mShowttListener);

Button button3 = (Button)findViewById(R.id.news);
button3.setOnClickListener(mShowlatnewsListener);

Button button4 = (Button)findViewById(R.id.lecturer);
button4.setOnClickListener(mShowlecturerListener);

Button logout = (Button)findViewById(R.id.logout);
logout.setOnClickListener(mShowmainListener);

}
}

}catch ( IOException e )
{
Log.d(TAG, Can not connect to the target server! );
try {
throw new IOException();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread ludovic.perrier

finaly it's not good

My building process is infinite and blocked at 24%
I see that the generated IService.Java (of my Service.aidl) file is
update each 5 second! and the console display this warning:

[2009-04-16 22:10:41 - MyProject] warning: Ignoring InnerClasses
attribute for an anonymous inner class that doesn't come with an
associated EnclosingMethod attribute. (This class was probably
produced by a broken compiler.)

Please help me...

On 16 avr, 19:12, ludovic.perrier barbapa...@gmail.com wrote:
 I have found!

 When parcelableaidlfile is in other package
 we must set an import on parcelable class inaidlinterface

 Happy Codding!

 On 16 avr, 18:56, ludovic.perrier barbapa...@gmail.com wrote:

  Hello

  I have the same problem, and it don't work yet. I have a question, new
  mechanism works ifaidlinterface file isn't in same package ofaidl
  parcelable class?

  Ludo

  On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:

   I have just realized something.

   If you create/edit parcelable typeaidlfiles, this does not trigger a
   recompilation of the interfaceaidlfiles that depends on it. In 
   fact,aidlfiles are only recompiled when theaidlfile is touched.

   We'll do a quick fix for the final ADT 0.9 (which will most likely be
   a full recompilation of allaidlfiles whenever 1aidlfile is
   changed), and implement true dependency support later to minimize
   unneeded recompilations.

   Xav

   On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com wrote:
I just did a quick test following the information in the link I posted
above and it is working for me.

Make sure youraidlfile declares the package it's in (like any java 
class).

Xav

On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com 
wrote:
oh I missed this message :(

Let me do a quick test...

On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs ho...@helloandroid.com 
wrote:

Some more info:

- I tried creating anaidlfile with the same name as the Parcelable
class, and I get an error in the console like: path to class/
class.aidl:1 interface package.class should be declared in a
file called com.aidl. I tried declaring the Parcelable in com.aidland
that didn't work either.

- The documentation in 1.5 onAIDLstill refers to the Android Tools
CreateAidlpreprocess file for Parcelable classes which is not
available in ADT 0.9.  Should I open a bug for this?

Thanks,
Zach

On Apr 14, 12:52 pm, Zach Hobbs ho...@helloandroid.com wrote:
I'm attempting to get build my project with the early preview SDK,
targeting 1.1 and am having problems gettingAIDLfiles to recognize
imports for Parcelables. In the previous ADT you could right click on
your project, hit Android Tools and have an option something like
GenerateAIDLfor Parcelables.  This would create a file
project.aidlin your project's root containing a line for each
Parceable in your project.

With the new SDK/ADT anytime I try to import a Parcelable in anAIDL
file I get Couldn't find import for class ...  even though I still
have the project.aidlfile in the project's root.  Also, the option to
generate theAIDLfor the Parcelables is no longer available.  Anyone
know how to get your Parcelables noticed in the new SDK?

Thanks,
Zach

--
Xavier Ducrohet
Android Engineer, Google.

--
Xavier Ducrohet
Android Engineer, Google.

   --
   Xavier Ducrohet
   Android Engineer, Google.


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



[android-developers] Re: Direct Video Encoder Access?

2009-04-16 Thread Dave Sparks

No, this would be impractical to do in Java.

On Apr 15, 11:16 pm, Sheado chad...@gmail.com wrote:
 Howdy,

 Does anybody know of a way to directly access the Video Encoders
 provided by the (android.media.MediaRecorder) API? I'd like to make
 changes to the raw camera data before it gets encoded.

 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] Straight-forward BroadcastReceiver to open/read file

2009-04-16 Thread Keith Wiley

I would like my app to pop up in the list of options for opening
certain file types in the various file manager, email, and web browser
apps.  I'm having trouble figuring out how to begin.  I haven't found
any examples of this sort of thing yet.

Don't I need to know what kind of action the other app is trying to
invoke on a selected file?  How can I possibly know that?  Or should I
simply assume that all file manager, email, and browser apps will
always use ACTION_VIEW or perhaps ACTION_EDIT when trying to send a
file to another app?  Must I simply assume this and hope I'm right?
There are so many possible apps to try to get this to work with, how
do I make it receive a open-file command from any arbitrary app?

Is the code below correct so far?  I have the following in the
manifest:

receiver
android:enabled=true
android:exported=true
android:label=Some Label, where does this show up?
android:name=.MyBroadcastReceiver 
intent-filter
action 
android:name=android.intent.action.ACTION_EDIT /
/intent-filter
intent-filter
action 
android:name=android.intent.action.ACTION_VIEW /
/intent-filter
/receiver

I don't see how to specify a file-type or file extension filter in the
receiver.  How do I do this?  Likewise I have the following in the
receiver:

public class MyBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if 
(intent.getAction().equals(android.intent.action.ACTION_EDIT)
|| 
intent.getAction().equals(android.intent.action.ACTION_VIEW))
{
Uri uri = intent.getData();
String uriStr = intent.getDataString();
}
}
}

Is that how I'm supposed to do it?  Do I assume the that file manager,
email. or browser app will send the file to my app by sending a file
URI or URL (I'm unclear on the distinction) in the data field of the
intent?  To be honest, I'm not sure if I'm even close to the mark on
this?  Is this code wildly off-base?

Any assistance is greatly appreciated.  I'm not sure where to find out
how to do this.

Thank you very much.

Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread Xavier Ducrohet

Unless you post your aidl file, it's going to be hard to help you.

Xav

On Thu, Apr 16, 2009 at 1:11 PM, ludovic.perrier barbapa...@gmail.com wrote:

 finaly it's not good

 My building process is infinite and blocked at 24%
 I see that the generated IService.Java (of my Service.aidl) file is
 update each 5 second! and the console display this warning:

 [2009-04-16 22:10:41 - MyProject] warning: Ignoring InnerClasses
 attribute for an anonymous inner class that doesn't come with an
 associated EnclosingMethod attribute. (This class was probably
 produced by a broken compiler.)

 Please help me...

 On 16 avr, 19:12, ludovic.perrier barbapa...@gmail.com wrote:
 I have found!

 When parcelableaidlfile is in other package
 we must set an import on parcelable class inaidlinterface

 Happy Codding!

 On 16 avr, 18:56, ludovic.perrier barbapa...@gmail.com wrote:

  Hello

  I have the same problem, and it don't work yet. I have a question, new
  mechanism works ifaidlinterface file isn't in same package ofaidl
  parcelable class?

  Ludo

  On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:

   I have just realized something.

   If you create/edit parcelable typeaidlfiles, this does not trigger a
   recompilation of the interfaceaidlfiles that depends on it. In 
   fact,aidlfiles are only recompiled when theaidlfile is touched.

   We'll do a quick fix for the final ADT 0.9 (which will most likely be
   a full recompilation of allaidlfiles whenever 1aidlfile is
   changed), and implement true dependency support later to minimize
   unneeded recompilations.

   Xav

   On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com 
   wrote:
I just did a quick test following the information in the link I posted
above and it is working for me.

Make sure youraidlfile declares the package it's in (like any java 
class).

Xav

On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com 
wrote:
oh I missed this message :(

Let me do a quick test...

On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs ho...@helloandroid.com 
wrote:

Some more info:

- I tried creating anaidlfile with the same name as the Parcelable
class, and I get an error in the console like: path to class/
class.aidl:1 interface package.class should be declared in a
file called com.aidl. I tried declaring the Parcelable in com.aidland
that didn't work either.

- The documentation in 1.5 onAIDLstill refers to the Android Tools
CreateAidlpreprocess file for Parcelable classes which is not
available in ADT 0.9.  Should I open a bug for this?

Thanks,
Zach

On Apr 14, 12:52 pm, Zach Hobbs ho...@helloandroid.com wrote:
I'm attempting to get build my project with the early preview SDK,
targeting 1.1 and am having problems gettingAIDLfiles to recognize
imports for Parcelables. In the previous ADT you could right click 
on
your project, hit Android Tools and have an option something like
GenerateAIDLfor Parcelables.  This would create a file
project.aidlin your project's root containing a line for each
Parceable in your project.

With the new SDK/ADT anytime I try to import a Parcelable in anAIDL
file I get Couldn't find import for class ...  even though I still
have the project.aidlfile in the project's root.  Also, the option 
to
generate theAIDLfor the Parcelables is no longer available.  Anyone
know how to get your Parcelables noticed in the new SDK?

Thanks,
Zach

--
Xavier Ducrohet
Android Engineer, Google.

--
Xavier Ducrohet
Android Engineer, Google.

   --
   Xavier Ducrohet
   Android Engineer, Google.


 




-- 
Xavier Ducrohet
Android Engineer, Google.

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



[android-developers] Re: Quality of paid applications on the Market...

2009-04-16 Thread Robert Green

Ok, you caught me.  I didn't research it at all.  So T-Mobile (in the
states) gets the 30%?  Where is google's motivation in this whole
thing?  It all made sense to me when I thought google was getting all
or part of that 30% but if they get none, where's the money coming
from to justify the Android work they are doing?  If it's internal,
what are their plans for revenue based on the platform?

On Apr 16, 11:59 am, Sundog sunns...@gmail.com wrote:
 On Apr 16, 10:46 am, Robert Green rbgrn@gmail.com wrote:

  Can I ask the obvious question, then?  If it doesn't go to google,
  then where does it go?

 Can I give the obvious reply? Oooh, me, me, me.

 This information is easily available to anyone who has done even the
 *slightest* research. It's for carrier fees, as has been made
 completely clear to anyone paying attention over the last six months.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Black Screen problem with graphics update using unlockCanvasAndPost()

2009-04-16 Thread Warren

Sarnoth, that's great to know.  I'll undo the changes I made (that I
thought would simply for testing it appears to have made the situation
worse) then test to see if the game loop is indeed running in its own
thread.



On Apr 16, 12:28 pm, Sarnoth jesse.st...@gmail.com wrote:
 You definitely need to do your game loop on a different thread. If
 your game loop is running in the main UI thread then while it is
 running thescreencan't update and you can't get input events. The UI
 thread is what does these things.

 On Apr 15, 10:25 pm, Warren warrenba...@gmail.com wrote:

  Sarnoth, I appreciate you taking the time to comment.

  Does that matter - if the thread isn't different?

  Just in case there were problems with the thread, I rewrote the
  program not to use a second thread and just execute the drawing loop
  in the view.

  In the code sample, I also changed draw() to drawSprites(), as I
  described in an earlier post. Neither of these things helped.

  == Begin Code ==

  package com.baltz.scorched;

  import android.content.Context;
  import android.content.res.Resources;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.graphics.Canvas;
  import android.util.AttributeSet;
  import android.util.Log;
  import android.view.SurfaceHolder;
  import android.view.SurfaceView;

  class ScorchedView extends SurfaceView implements
  SurfaceHolder.Callback {

      private Context context;
      private SurfaceHolder holder;

      private Bitmap backgroundImage;
      private Bitmap foregroundImage;
      private Bitmap spriteImage;

      private Resources resources;
      private ScorchedTerrain terrain;
      private Engine engine;

      public ScorchedView(Context c, AttributeSet attrs) {
          super(c, attrs);
          // register our interest in hearing about changes to our
  surface
          holder = getHolder();
          holder.addCallback(this);

          context = c;

          resources = context.getResources();

          // load background image as a Bitmap instead of a Dable b/c
          // we don't need to transform it and it's faster to d this way
          backgroundImage = BitmapFactory.decodeResource(resources,
                  R.drawable.earthrise);

          foregroundImage = BitmapFactory.decodeResource(resources,
                  R.drawable.foreground1);

          spriteImage = BitmapFactory.decodeResource(resources,
                          R.drawable.sprite1);

          terrain = new ScorchedTerrain(foregroundImage);

          engine = new Engine();
          Body body;

          body = new Body(spriteImage);
          body.setLocation(50, 50);
          engine.addBody(body);

          body = new Body(spriteImage);
          body.setLocation(40, 100);
          engine.addBody(body);
      }

      /* Callback invoked when the surface dimensions change. */
      public void surfaceChanged(SurfaceHolder h, int format, int width,
  int height) {
          holder = h;
      }

      /*
       * Callback invoked when the Surface has been created and is ready
  to be
       * used.
       */
      public void surfaceCreated(SurfaceHolder h) {
          holder = h;
          gameLoop();
      }

      /*
       * Callback invoked when the Surface has been destroyed and must
  no longer
       * be touched. WARNING: after this method returns, the Surface/
  Canvas must
       * never be touched again!
       */
      public void surfaceDestroyed(SurfaceHolder holder) {
      }

      private void gameLoop(){

          Canvas canvas;

          int i=0;
          while(i30){
                  canvas = null;
                  try {
                      canvas = holder.lockCanvas(null);
                      engine.update();
                      drawSprites(canvas);
                  } finally {
                      // do this in a finally so that if an exception is 
  thrown
                      // during the above, we don't leave the Surface in an
                      // inconsistent state
                      if (canvas != null) {
                          Log.w(dbg, unlocking canvas + i);
                          holder.unlockCanvasAndPost(canvas);
                      }
                  }

                  try{
                    Thread.currentThread().sleep(300);
                  }
                  catch(Exception e){
                  }
                  i++;
          }
      }

      /**
       * Draws the sprites and background to the provided
       * Canvas.
       */
      public void drawSprites(Canvas canvas) {
          // Draw the background image. Operations on the Canvas
  accumulate
          // so this is like clearing thescreen.
          canvas.drawBitmap(backgroundImage, 0, 0, null);

          //draw the up-to-date, deformed foreground
          terrain.draw(canvas);

          //draw all bodies (players, projectiles, etc) on thescreen
          engine.drawAll(canvas);
      }

  }

  

[android-developers] More than one package in my project on pre 1.5 sdk

2009-04-16 Thread barbapapaz

Hello

I have a problem since sdk update

first it's aidl I'm not sure if it works, see my response here:
http://groups.google.com/group/android-developers/browse_thread/thread/3f0117114ee7c0f8/3d4f3789850430fc?lnk=gstq=aidl#3d4f3789850430fc

But I have another problem with an error message who interupt build:

Errors during build.
  Errors running builder 'Android Pre Compiler' on project 'droidify'.
  Resource '/droidify/gen/de/web/mylib' does not exist.

I have two package in my project :
com.thoout.app
de.web.mylib

com.thoout.app contain main activity

You have an idea?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Black Screen problem with graphics update using unlockCanvasAndPost()

2009-04-16 Thread Warren

Does that mean you're working on a scorched earth type game?

Maybe.  :)


On Apr 16, 8:53 am, john jbatk...@gmail.com wrote:
 Your package is package com.baltz.scorched;

 Does that mean you're working on a scorched earth type game? It would
 be really crazy if you were, because I just started work on the same
 game, and I'm using the LunarLander game as a template as well.

 It's also my first game - maybe we can help each other out!

 -Rick

 On Apr 15, 10:25 pm, Warren warrenba...@gmail.com wrote:

  Sarnoth, I appreciate you taking the time to comment.

  Does that matter - if the thread isn't different?

  Just in case there were problems with the thread, I rewrote the
  program not to use a second thread and just execute the drawing loop
  in the view.

  In the code sample, I also changed draw() to drawSprites(), as I
  described in an earlier post. Neither of these things helped.

  == Begin Code ==

  package com.baltz.scorched;

  import android.content.Context;
  import android.content.res.Resources;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.graphics.Canvas;
  import android.util.AttributeSet;
  import android.util.Log;
  import android.view.SurfaceHolder;
  import android.view.SurfaceView;

  class ScorchedView extends SurfaceView implements
  SurfaceHolder.Callback {

      private Context context;
      private SurfaceHolder holder;

      private Bitmap backgroundImage;
      private Bitmap foregroundImage;
      private Bitmap spriteImage;

      private Resources resources;
      private ScorchedTerrain terrain;
      private Engine engine;

      public ScorchedView(Context c, AttributeSet attrs) {
          super(c, attrs);
          // register our interest in hearing about changes to our
  surface
          holder = getHolder();
          holder.addCallback(this);

          context = c;

          resources = context.getResources();

          // load background image as a Bitmap instead of a Dable b/c
          // we don't need to transform it and it's faster to d this way
          backgroundImage = BitmapFactory.decodeResource(resources,
                  R.drawable.earthrise);

          foregroundImage = BitmapFactory.decodeResource(resources,
                  R.drawable.foreground1);

          spriteImage = BitmapFactory.decodeResource(resources,
                          R.drawable.sprite1);

          terrain = new ScorchedTerrain(foregroundImage);

          engine = new Engine();
          Body body;

          body = new Body(spriteImage);
          body.setLocation(50, 50);
          engine.addBody(body);

          body = new Body(spriteImage);
          body.setLocation(40, 100);
          engine.addBody(body);
      }

      /* Callback invoked when the surface dimensions change. */
      public void surfaceChanged(SurfaceHolder h, int format, int width,
  int height) {
          holder = h;
      }

      /*
       * Callback invoked when the Surface has been created and is ready
  to be
       * used.
       */
      public void surfaceCreated(SurfaceHolder h) {
          holder = h;
          gameLoop();
      }

      /*
       * Callback invoked when the Surface has been destroyed and must
  no longer
       * be touched. WARNING: after this method returns, the Surface/
  Canvas must
       * never be touched again!
       */
      public void surfaceDestroyed(SurfaceHolder holder) {
      }

      private void gameLoop(){

          Canvas canvas;

          int i=0;
          while(i30){
                  canvas = null;
                  try {
                      canvas = holder.lockCanvas(null);
                      engine.update();
                      drawSprites(canvas);
                  } finally {
                      // do this in a finally so that if an exception is 
  thrown
                      // during the above, we don't leave the Surface in an
                      // inconsistent state
                      if (canvas != null) {
                          Log.w(dbg, unlocking canvas + i);
                          holder.unlockCanvasAndPost(canvas);
                      }
                  }

                  try{
                    Thread.currentThread().sleep(300);
                  }
                  catch(Exception e){
                  }
                  i++;
          }
      }

      /**
       * Draws the sprites and background to the provided
       * Canvas.
       */
      public void drawSprites(Canvas canvas) {
          // Draw the background image. Operations on the Canvas
  accumulate
          // so this is like clearing thescreen.
          canvas.drawBitmap(backgroundImage, 0, 0, null);

          //draw the up-to-date, deformed foreground
          terrain.draw(canvas);

          //draw all bodies (players, projectiles, etc) on thescreen
          engine.drawAll(canvas);
      }

  }

  On Apr 15, 4:47 pm, Sarnoth jesse.st...@gmail.com wrote:

   I 

[android-developers] Re: Quality of paid applications on the Market...

2009-04-16 Thread dm1973

I am guessing off of download counts. Top games
1) JewelLust 10-50k downloads
2) Retro defense 1-5k
3) Aevum Obscurum 1-5k

So the 2nd best downloaded game is less than 5k of downloads (not
sales). Multiple by the 2-4 dollars per game and there aren't many
that could possibly be clearing 10k. Through in the number of
cancelations lowers the number more. Maybe people are making a lot off
of ads but given a couple blog posts (3rd most downloaded card game
was doing 20 bucks a day) there isn't a lot of money there.

Now maybe applications are similiar. Maybe there is some 30 dollar app
that sold 500 copies but I doubt you are going to find a lot of them.

On Apr 16, 6:36 am, Tom tom_a_h...@yahoo.com wrote:

 Looking at the Android Market sales figures, there are very few apps
 that have cleared over 10k.

 Where are you finding these 'Android Market sales figures', and how
 accurate are they?  If indeed they are accurate, then 30% of almost
 nothing is probably and unfortunately going to leave us in the 'wild
 west' for some time.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Quality of paid applications on the Market...

2009-04-16 Thread dm1973

Actually the press release says carriers and billing settlement fees.
The billing settlement might count as payment to google. I would
assume the Settlement fees would be about the same as a normal
google checkout transaction.
Either way 30% is a pretty fair fee. If you disagree check out what
places like PalmGear, handago, and so on used to charge. Or look into
what it would cost you to get a merchant account and be able to
generate the traffic the market does.

On Apr 16, 9:59 am, Sundog sunns...@gmail.com wrote:
 On Apr 16, 10:46 am, Robert Green rbgrn@gmail.com wrote:

  Can I ask the obvious question, then?  If it doesn't go to google,
  then where does it go?

 Can I give the obvious reply? Oooh, me, me, me.

 This information is easily available to anyone who has done even the
 *slightest* research. It's for carrier fees, as has been made
 completely clear to anyone paying attention over the last six months.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Straight-forward BroadcastReceiver to open/read file

2009-04-16 Thread Dianne Hackborn
You need to publish and implement an activity, not a receiver.

On Thu, Apr 16, 2009 at 1:26 PM, Keith Wiley kbwi...@gmail.com wrote:


 I would like my app to pop up in the list of options for opening
 certain file types in the various file manager, email, and web browser
 apps.  I'm having trouble figuring out how to begin.  I haven't found
 any examples of this sort of thing yet.

 Don't I need to know what kind of action the other app is trying to
 invoke on a selected file?  How can I possibly know that?  Or should I
 simply assume that all file manager, email, and browser apps will
 always use ACTION_VIEW or perhaps ACTION_EDIT when trying to send a
 file to another app?  Must I simply assume this and hope I'm right?
 There are so many possible apps to try to get this to work with, how
 do I make it receive a open-file command from any arbitrary app?

 Is the code below correct so far?  I have the following in the
 manifest:

receiver
android:enabled=true
android:exported=true
android:label=Some Label, where does this show up?
android:name=.MyBroadcastReceiver 
intent-filter
action
 android:name=android.intent.action.ACTION_EDIT /
/intent-filter
intent-filter
action
 android:name=android.intent.action.ACTION_VIEW /
/intent-filter
/receiver

 I don't see how to specify a file-type or file extension filter in the
 receiver.  How do I do this?  Likewise I have the following in the
 receiver:

 public class MyBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if
 (intent.getAction().equals(android.intent.action.ACTION_EDIT)
||
 intent.getAction().equals(android.intent.action.ACTION_VIEW))
 {
Uri uri = intent.getData();
String uriStr = intent.getDataString();
}
}
 }

 Is that how I'm supposed to do it?  Do I assume the that file manager,
 email. or browser app will send the file to my app by sending a file
 URI or URL (I'm unclear on the distinction) in the data field of the
 intent?  To be honest, I'm not sure if I'm even close to the mark on
 this?  Is this code wildly off-base?

 Any assistance is greatly appreciated.  I'm not sure where to find out
 how to do this.

 Thank you very much.

 Cheers!
 



-- 
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 enable/disable GPRS/EDGE data connection

2009-04-16 Thread Omer Saatcioglu
Ow that's good. I didn't know that. (market search sucks) Thank you David.
However. I also want to disable auto sync and background data when in the
GPRS/EDGE mode and actually I am curious how we can change phone settings,
in the first place.

On Thu, Apr 16, 2009 at 10:40 PM, David Turner di...@android.com wrote:

 For what is worth, there is already an application on Market called
 APNDroid that will just do that for you


 On Thu, Apr 16, 2009 at 8:14 PM, Omer Saatcioglu osaatcio...@gmail.comwrote:

 Hello all,
 The service providers in my country are charging for the MBs I downloaded
 in my GPRS/EDGE connection. So, whenever I want to disable the GPRS, I just
 change my default APN to something wrong and then correct it when I want to
 enable it again. I couldn't find another way to enable/disable. I think,
 Android team assumed that only 3G users with a good data plan only would use
 this phone. Anyway, I just want to develop an application which can do that
 automatically for me. However; I couldn't find how to change the APN
 settings in the docs. The only clue I had was this:
 http://developer.android.com/reference/android/provider/Settings.html#ACTION_APN_SETTINGS

 but I couldn't find how to use it. Could you please help me? Any
 alternative ways and/or suggestions are welcome.

 Thank you,
 Omer




 



-- 
Omer

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Straight-forward BroadcastReceiver to open/read file

2009-04-16 Thread Keith Wiley

My app is already written, I already have an activity that opens and
processes files, but it's all internal to the app.  The app presents a
file chooser from a single hard-coded directory on the sd card.  That
works okay from inside the app (assuming users know to transfer files
to that directory before launching my app), but I want other apps to
be able to invoke my app externally, like when you long-press a file
in Linda File Manager.

My plan is to run my main activity from the broadcast receiver (from
the URI somehow, although I haven't worked out the details yet), but I
just don't know if I'm anywhere near that point yet.  For example,
with the code I showed above, my app doesn't appear in the popup menu
of app options when a file is long-pressed in Linda File Manager.
Lots of other apps appear, but not mine.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread ludovic.perrier

hello

IJotifyService.aidl interface in com.thoout.droitify

package com.thoout.droidify;

//import java.util.List;
import de.felixbruns.jotify.media.Playlist;
import de.felixbruns.jotify.media.Track;
import de.felixbruns.jotify.media.Album;
import de.felixbruns.jotify.media.Artist;


interface IJotifyService
{
int login(String login, String pass);
ListPlaylist getPlaylists();
}

Aidl parcelable class in de.felixbruns.jotify.media

package de.felixbruns.jotify.media;
parcelable Playlist;

Playlist have Track member who have Artist and Album member all these
class implement Parcelable

In de.felixbruns.jotify.media there are:
Plalist.java
Playlist.aidl
Album.java
Album.aidl
Track.java
Track.aidl
Artist.java
Artist.aidl

I have also random problem build error is:
Errors during build.
  Errors running builder 'Android Pre Compiler' on project 'droidify'.
  Resource '/droidify/gen/de/felixbruns/jotify' does not exist.

or

Errors during build.
  Errors running builder 'Android Pre Compiler' on project 'droidify'.
  Resource '/droidify/gen/com/thoout/droitify' does not exist.

I'am on mac

Ludo


On 16 avr, 22:33, Xavier Ducrohet x...@android.com wrote:
 Unless you post youraidlfile, it's going to be hard to help you.

 Xav



 On Thu, Apr 16, 2009 at 1:11 PM, ludovic.perrier barbapa...@gmail.com wrote:

  finaly it's not good

  My building process is infinite and blocked at 24%
  I see that the generated IService.Java (of my Service.aidl) file is
  update each 5 second! and the console display this warning:

  [2009-04-16 22:10:41 - MyProject] warning: Ignoring InnerClasses
  attribute for an anonymous inner class that doesn't come with an
  associated EnclosingMethod attribute. (This class was probably
  produced by a broken compiler.)

  Please help me...

  On 16 avr, 19:12, ludovic.perrier barbapa...@gmail.com wrote:
  I have found!

  When parcelableaidlfile is in other package
  we must set an import on parcelable class inaidlinterface

  Happy Codding!

  On 16 avr, 18:56, ludovic.perrier barbapa...@gmail.com wrote:

   Hello

   I have the same problem, and it don't work yet. I have a question, new
   mechanism works ifaidlinterface file isn't in same package ofaidl
   parcelable class?

   Ludo

   On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:

I have just realized something.

If you create/edit parcelable typeaidlfiles, this does not trigger a
recompilation of the interfaceaidlfiles that depends on it. In 
fact,aidlfiles are only recompiled when theaidlfile is touched.

We'll do a quick fix for the final ADT 0.9 (which will most likely be
a full recompilation of allaidlfiles whenever 1aidlfile is
changed), and implement true dependency support later to minimize
unneeded recompilations.

Xav

On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com 
wrote:
 I just did a quick test following the information in the link I 
 posted
 above and it is working for me.

 Make sure youraidlfile declares the package it's in (like any java 
 class).

 Xav

 On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com 
 wrote:
 oh I missed this message :(

 Let me do a quick test...

 On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs 
 ho...@helloandroid.com wrote:

 Some more info:

 - I tried creating anaidlfile with the same name as the Parcelable
 class, and I get an error in the console like: path to class/
 class.aidl:1 interface package.class should be declared in a
 file called com.aidl. I tried declaring the Parcelable in 
 com.aidland
 that didn't work either.

 - The documentation in 1.5 onAIDLstill refers to the Android Tools
 CreateAidlpreprocess file for Parcelable classes which is not
 available in ADT 0.9.  Should I open a bug for this?

 Thanks,
 Zach

 On Apr 14, 12:52 pm, Zach Hobbs ho...@helloandroid.com wrote:
 I'm attempting to get build my project with the early preview SDK,
 targeting 1.1 and am having problems gettingAIDLfiles to recognize
 imports for Parcelables. In the previous ADT you could right 
 click on
 your project, hit Android Tools and have an option something 
 like
 GenerateAIDLfor Parcelables.  This would create a file
 project.aidlin your project's root containing a line for each
 Parceable in your project.

 With the new SDK/ADT anytime I try to import a Parcelable in 
 anAIDL
 file I get Couldn't find import for class ...  even though I 
 still
 have the project.aidlfile in the project's root.  Also, the 
 option to
 generate theAIDLfor the Parcelables is no longer available.  
 Anyone
 know how to get your Parcelables noticed in the new SDK?

 Thanks,
 Zach

 --
 Xavier Ducrohet
 Android Engineer, Google.

 --
 Xavier Ducrohet
 Android Engineer, Google.

--
Xavier Ducrohet
Android 

[android-developers] Re: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread Xavier Ducrohet

Errors during build.
 Errors running builder 'Android Pre Compiler' on project 'droidify'.
 Resource '/droidify/gen/de/felixbruns/jotify' does not exist.

Lets fix this one first.

There's a bug in ADT 0.9_pre where those folders are not created
automatically. We've fixed it on our side, but you'll simply have to
create them manually (jsut once, unless you do a clean).

This may fix your other issues. let me know.

Xav

On Thu, Apr 16, 2009 at 2:15 PM, ludovic.perrier barbapa...@gmail.com wrote:

 hello

 IJotifyService.aidl interface in com.thoout.droitify

 package com.thoout.droidify;

 //import java.util.List;
 import de.felixbruns.jotify.media.Playlist;
 import de.felixbruns.jotify.media.Track;
 import de.felixbruns.jotify.media.Album;
 import de.felixbruns.jotify.media.Artist;


 interface IJotifyService
 {
    int login(String login, String pass);
    ListPlaylist getPlaylists();
 }

 Aidl parcelable class in de.felixbruns.jotify.media

 package de.felixbruns.jotify.media;
 parcelable Playlist;

 Playlist have Track member who have Artist and Album member all these
 class implement Parcelable

 In de.felixbruns.jotify.media there are:
 Plalist.java
 Playlist.aidl
 Album.java
 Album.aidl
 Track.java
 Track.aidl
 Artist.java
 Artist.aidl

 I have also random problem build error is:
 Errors during build.
  Errors running builder 'Android Pre Compiler' on project 'droidify'.
  Resource '/droidify/gen/de/felixbruns/jotify' does not exist.

 or

 Errors during build.
  Errors running builder 'Android Pre Compiler' on project 'droidify'.
  Resource '/droidify/gen/com/thoout/droitify' does not exist.

 I'am on mac

 Ludo


 On 16 avr, 22:33, Xavier Ducrohet x...@android.com wrote:
 Unless you post youraidlfile, it's going to be hard to help you.

 Xav



 On Thu, Apr 16, 2009 at 1:11 PM, ludovic.perrier barbapa...@gmail.com 
 wrote:

  finaly it's not good

  My building process is infinite and blocked at 24%
  I see that the generated IService.Java (of my Service.aidl) file is
  update each 5 second! and the console display this warning:

  [2009-04-16 22:10:41 - MyProject] warning: Ignoring InnerClasses
  attribute for an anonymous inner class that doesn't come with an
  associated EnclosingMethod attribute. (This class was probably
  produced by a broken compiler.)

  Please help me...

  On 16 avr, 19:12, ludovic.perrier barbapa...@gmail.com wrote:
  I have found!

  When parcelableaidlfile is in other package
  we must set an import on parcelable class inaidlinterface

  Happy Codding!

  On 16 avr, 18:56, ludovic.perrier barbapa...@gmail.com wrote:

   Hello

   I have the same problem, and it don't work yet. I have a question, new
   mechanism works ifaidlinterface file isn't in same package ofaidl
   parcelable class?

   Ludo

   On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:

I have just realized something.

If you create/edit parcelable typeaidlfiles, this does not trigger a
recompilation of the interfaceaidlfiles that depends on it. In 
fact,aidlfiles are only recompiled when theaidlfile is touched.

We'll do a quick fix for the final ADT 0.9 (which will most likely be
a full recompilation of allaidlfiles whenever 1aidlfile is
changed), and implement true dependency support later to minimize
unneeded recompilations.

Xav

On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com 
wrote:
 I just did a quick test following the information in the link I 
 posted
 above and it is working for me.

 Make sure youraidlfile declares the package it's in (like any java 
 class).

 Xav

 On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com 
 wrote:
 oh I missed this message :(

 Let me do a quick test...

 On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs 
 ho...@helloandroid.com wrote:

 Some more info:

 - I tried creating anaidlfile with the same name as the Parcelable
 class, and I get an error in the console like: path to class/
 class.aidl:1 interface package.class should be declared in a
 file called com.aidl. I tried declaring the Parcelable in 
 com.aidland
 that didn't work either.

 - The documentation in 1.5 onAIDLstill refers to the Android 
 Tools
 CreateAidlpreprocess file for Parcelable classes which is not
 available in ADT 0.9.  Should I open a bug for this?

 Thanks,
 Zach

 On Apr 14, 12:52 pm, Zach Hobbs ho...@helloandroid.com wrote:
 I'm attempting to get build my project with the early preview 
 SDK,
 targeting 1.1 and am having problems gettingAIDLfiles to 
 recognize
 imports for Parcelables. In the previous ADT you could right 
 click on
 your project, hit Android Tools and have an option something 
 like
 GenerateAIDLfor Parcelables.  This would create a file
 project.aidlin your project's root containing a line for each
 Parceable in your project.

 With the 

[android-developers] Re: 1.5 release - DexClassLoader issue

2009-04-16 Thread fadden

Most of what you're describing falls into the category of, that's how
class loaders work in the Java programming environment.  If you
create a class loader, and load a class called MyClass from it, you
can't trivially refer to MyClass because the current class' loader
can't resolve it.  You have to use reflection to get at it.  Class
cast operations don't always do what you want.

You can see some twisted examples in dalvik/tests/068-classloader.

The cross-loader complaints arise when you do something like this:

  mystuff.dex has MyClass and MyOtherClass
  newstuff.dex has NewClass and MyOtherClass
  FancyClassLoader knows about mystuff.dex and newstuff.dex
  FancyClassLoader uses MyOtherClass from newstuff.dex

When mystuff.dex was run through dexopt, it was verified and
optimized with the assumption that references from MyClass to
MyOtherClass would refer to the implementation in the same DEX file.
However, FancyClassLoader chose to load a different implementation of
MyOtherClass.  This can cause Issues, so it's not allowed.  (This
could work in a more traditional VM, where the verification and
optimization aren't performed ahead of time, but might not do what you
expect.)

If you want specifics about the classes involved, there's an intensely
cryptic message in the log file (Class resolved by unexpected DEX)
that has some info.

You can avoid this situation by only having one implementation of a
given class.  And by not loading the same DEX file into multiple class
loaders.

BTW, just so we don't confuse each other with terminology:

(1) bootstrap class loader.  Path set by BOOTCLASSPATH.  Includes
core / ext / framework / android.policy / services.  Implemented
directly by the VM.

(2) system class loader, a/k/a application class loader.  Path set by
CLASSPATH.  I don't think this is used by the Android framework.

(3) user-defined class loader.  The Android app framework
implementation uses the ApplicationLoaders class to manage a
dalvik.system.PathClassLoader per app.

On Apr 16, 6:24 am, Eborix13 ebori...@yahoo.com wrote:
 Hi,

    Seeing that the new 1.5 pre-release has support for loading classes
 dynamically I immediately tried to see if it works. I used the
 DexClassLoader(String dexPath, String dexOutputDir, String libPath,
 ClassLoader parent) constructor. But I soon found out that it works
 only partially.

    What I am trying to do is dynamically load a class from a given jar
 file which contains a classes.dex file. If I try to use the current
 class loader (this.getClass().getClassLoader()) as the parent
 parameter I get a java.lang.IllegalAccessError: cross-loader access
 from pre-verified class error. But if I use the SystemClassLoader as
 the parent parameter everything works out nicely. But using the
 SystemClassLoader is a problem for me because the class that is loaded
 using the SystemClassLoader is a subclass of a class which was
 previously loaded by the current class loader. Casting the derived
 class to the base class generates a ClassCastException because the
 base class was not loaded with the same class loader as the derived
 class.

   Is there a way to solve this problem? Am I doing something wrong? Is
 there a way to dynamically load a class using the current class loader
 instead of the system class loader? Is this problem caused by the fact
 that the 1.5 release is incomplete yet, so perhaps this problem is
 going to be solved in the final release?

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



[android-developers] Re: Parcelables / project.aidl in SDK 1.5

2009-04-16 Thread ludovic.perrier

When I haven't the folder error the build is infinite blocked at 24%
in gen directory I haven't the /de/felixbruns/jotify/

The message display in console (in loop)
[2009-04-16 23:30:00 - droidify] warning: Ignoring InnerClasses
attribute for an anonymous inner class that doesn't come with an
associated EnclosingMethod attribute. (This class was probably
produced by a broken compiler.)


On 16 avr, 23:27, Xavier Ducrohet x...@android.com wrote:
 Errors during build.
  Errors running builder 'Android Pre Compiler' on project 'droidify'.
  Resource '/droidify/gen/de/felixbruns/jotify' does not exist.

 Lets fix this one first.

 There's a bug in ADT 0.9_pre where those folders are not created
 automatically. We've fixed it on our side, but you'll simply have to
 create them manually (jsut once, unless you do a clean).

 This may fix your other issues. let me know.

 Xav



 On Thu, Apr 16, 2009 at 2:15 PM, ludovic.perrier barbapa...@gmail.com wrote:

  hello

  IJotifyService.aidlinterface in com.thoout.droitify

  package com.thoout.droidify;

  //import java.util.List;
  import de.felixbruns.jotify.media.Playlist;
  import de.felixbruns.jotify.media.Track;
  import de.felixbruns.jotify.media.Album;
  import de.felixbruns.jotify.media.Artist;

  interface IJotifyService
  {
     int login(String login, String pass);
     ListPlaylist getPlaylists();
  }

 Aidlparcelable class in de.felixbruns.jotify.media

  package de.felixbruns.jotify.media;
  parcelable Playlist;

  Playlist have Track member who have Artist and Album member all these
  class implement Parcelable

  In de.felixbruns.jotify.media there are:
  Plalist.java
  Playlist.aidl
  Album.java
  Album.aidl
  Track.java
  Track.aidl
  Artist.java
  Artist.aidl

  I have also random problem build error is:
  Errors during build.
   Errors running builder 'Android Pre Compiler' on project 'droidify'.
   Resource '/droidify/gen/de/felixbruns/jotify' does not exist.

  or

  Errors during build.
   Errors running builder 'Android Pre Compiler' on project 'droidify'.
   Resource '/droidify/gen/com/thoout/droitify' does not exist.

  I'am on mac

  Ludo

  On 16 avr, 22:33, Xavier Ducrohet x...@android.com wrote:
  Unless you post youraidlfile, it's going to be hard to help you.

  Xav

  On Thu, Apr 16, 2009 at 1:11 PM, ludovic.perrier barbapa...@gmail.com 
  wrote:

   finaly it's not good

   My building process is infinite and blocked at 24%
   I see that the generated IService.Java (of my Service.aidl) file is
   update each 5 second! and the console display this warning:

   [2009-04-16 22:10:41 - MyProject] warning: Ignoring InnerClasses
   attribute for an anonymous inner class that doesn't come with an
   associated EnclosingMethod attribute. (This class was probably
   produced by a broken compiler.)

   Please help me...

   On 16 avr, 19:12, ludovic.perrier barbapa...@gmail.com wrote:
   I have found!

   When parcelableaidlfile is in other package
   we must set an import on parcelable class inaidlinterface

   Happy Codding!

   On 16 avr, 18:56, ludovic.perrier barbapa...@gmail.com wrote:

Hello

I have the same problem, and it don't work yet. I have a question, new
mechanism works ifaidlinterface file isn't in same package ofaidl
parcelable class?

Ludo

On 15 avr, 03:34, Xavier Ducrohet x...@android.com wrote:

 I have just realized something.

 If you create/edit parcelable typeaidlfiles, this does not trigger a
 recompilation of the interfaceaidlfiles that depends on it. In 
 fact,aidlfiles are only recompiled when theaidlfile is touched.

 We'll do a quick fix for the final ADT 0.9 (which will most likely 
 be
 a full recompilation of allaidlfiles whenever 1aidlfile is
 changed), and implement true dependency support later to minimize
 unneeded recompilations.

 Xav

 On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com 
 wrote:
  I just did a quick test following the information in the link I 
  posted
  above and it is working for me.

  Make sure youraidlfile declares the package it's in (like any 
  java class).

  Xav

  On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet 
  x...@android.com wrote:
  oh I missed this message :(

  Let me do a quick test...

  On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs 
  ho...@helloandroid.com wrote:

  Some more info:

  - I tried creating anaidlfile with the same name as the 
  Parcelable
  class, and I get an error in the console like: path to class/
  class.aidl:1 interface package.class should be declared 
  in a
  file called com.aidl. I tried declaring the Parcelable in 
  com.aidland
  that didn't work either.

  - The documentation in 1.5 onAIDLstill refers to the Android 
  Tools
  CreateAidlpreprocess file for Parcelable classes which is not
  available in ADT 0.9.  Should I open a bug for this?

  

[android-developers] Re: String comparison with Text in EditText with online data.

2009-04-16 Thread Raphael

It's hard to see what's going on here because you didn't post the
outer part -- is this an activity onCreate? Looks like you're
accessing your string field before the setContentView.

This is loosely related to your question but you might consider that:
- you're not supposed to do the network fetching part in the main
thread (you don't want to block it get your app ANR)
- if you move your code to another thread, you only access the UI from
the main thread.

You might want to change your operation order: set the content view 
get the views, post a thread that will get the date and update your UI
when done.

R/

On Thu, Apr 16, 2009 at 1:08 PM, murphy howt...@hotmail.com wrote:

 Hi, I'm trying to use the code below to connect to an online source,
 then compare the data as it is read line by line against what is typed
 in an EditText field before displaying the next page. At the moment
 when I run it and press the Sign In button nothing happens. The
 problem seems to be with the comparison of the data. Can anyone help.

 try{

                URL myURL = new URL(http://www.donalokeeffe.com/
 usernames.txt);

                URLConnection conn = myURL.openConnection();
                conn.connect();

                BufferedReader is = new BufferedReader(new InputStreamReader
 (conn.getInputStream(), UTF-8));

                String istr;
                EditText username = (EditText)findViewById(R.id.username2);
                String usrname = username.getText().toString();

                while ((istr = is.readLine()) != null)
                {
                        if(is.readLine() == usrname)
                        {
                                setContentView(R.layout.menu);

                        Button button2 = (Button)findViewById(R.id.timetable);
                    button2.setOnClickListener(mShowttListener);

                    Button button3 = (Button)findViewById(R.id.news);
                    button3.setOnClickListener(mShowlatnewsListener);

                    Button button4 = (Button)findViewById(R.id.lecturer);
                    button4.setOnClickListener(mShowlecturerListener);

                    Button logout = (Button)findViewById(R.id.logout);
                    logout.setOnClickListener(mShowmainListener);

                        }
                }

                }catch ( IOException e )
            {
                Log.d(TAG, Can not connect to the target server! );
                try {
                                        throw new IOException();
                                } catch (IOException e1) {
                                        // TODO Auto-generated catch block
                                        e1.printStackTrace();
                                }
            }
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: String comparison with Text in EditText with online data.

2009-04-16 Thread Raphael

It's hard to see what's going on here because you didn't post the
outer part -- is this an activity onCreate? Looks like you're
accessing your string field before the setContentView.

This is loosely related to your question but you might consider that:
- you're not supposed to do the network fetching part in the main
thread (you don't want to block it and your app will ANR)
- if you move your code to another thread, you can only access the UI
from the main thread.

You might want to change your operation order: set the content view 
get the views, post a thread that will get the data and update your UI
when done.

R/

On Thu, Apr 16, 2009 at 1:08 PM, murphy howt...@hotmail.com wrote:

 Hi, I'm trying to use the code below to connect to an online source,
 then compare the data as it is read line by line against what is typed
 in an EditText field before displaying the next page. At the moment
 when I run it and press the Sign In button nothing happens. The
 problem seems to be with the comparison of the data. Can anyone help.

 try{

                URL myURL = new URL(http://www.donalokeeffe.com/
 usernames.txt);

                URLConnection conn = myURL.openConnection();
                conn.connect();

                BufferedReader is = new BufferedReader(new InputStreamReader
 (conn.getInputStream(), UTF-8));

                String istr;
                EditText username = (EditText)findViewById(R.id.username2);
                String usrname = username.getText().toString();

                while ((istr = is.readLine()) != null)
                {
                        if(is.readLine() == usrname)
                        {
                                setContentView(R.layout.menu);

                        Button button2 = (Button)findViewById(R.id.timetable);
                    button2.setOnClickListener(mShowttListener);

                    Button button3 = (Button)findViewById(R.id.news);
                    button3.setOnClickListener(mShowlatnewsListener);

                    Button button4 = (Button)findViewById(R.id.lecturer);
                    button4.setOnClickListener(mShowlecturerListener);

                    Button logout = (Button)findViewById(R.id.logout);
                    logout.setOnClickListener(mShowmainListener);

                        }
                }

                }catch ( IOException e )
            {
                Log.d(TAG, Can not connect to the target server! );
                try {
                                        throw new IOException();
                                } catch (IOException e1) {
                                        // TODO Auto-generated catch block
                                        e1.printStackTrace();
                                }
            }
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: More than one package in my project on pre 1.5 sdk

2009-04-16 Thread ludovic.perrier

the response is give here by googler

http://groups.google.com/group/android-developers/browse_thread/thread/3f0117114ee7c0f8/3d4f3789850430fc?lnk=gstq=aidl#3d4f3789850430fc

On 16 avr, 22:44, barbapapaz barbapa...@gmail.com wrote:
 Hello

 I have a problem since sdk update

 first it's aidl I'm not sure if it works, see my response 
 here:http://groups.google.com/group/android-developers/browse_thread/threa...

 But I have another problem with an error message who interupt build:

 Errors during build.
   Errors running builder 'Android Pre Compiler' on project 'droidify'.
   Resource '/droidify/gen/de/web/mylib' does not exist.

 I have two package in my project :
 com.thoout.app
 de.web.mylib

 com.thoout.app contain main activity

 You have an idea?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   >