[android-developers] Re: Missing avds

2009-04-29 Thread swarup

> Before I had a 1, 2, and 3 that I could see by typing "android list
> avds" on the command line but now they are gone.

do you mean your targets ('android list targets')got deleted?
did you delete SDK_HOME/platforms, SDK_HOME/add-ons by chance?
If so, copy back these 2 folders and you would be able to see those
targets.


On Apr 29, 11:52 pm, StevePotell  wrote:
> Anyone else hit this problem.  I created a couple of avds, tested,
> then deleted them.  When I deleted the last one all my avd images
> disappeared??
>
> Before I had a 1, 2, and 3 that I could see by typing "android list
> avds" on the command line but now they are gone.  I have tried
> everything right down to reinstalling Eclipse and they are still gone.
>
> What do I have to do to get them back.  These were auto generated by
> something.
>
> 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: creating custom intent

2009-04-29 Thread Bob

Thanks for your help.  I believe I have resolved the problem and it
was that I didn't have the line



following

 
 


Thanks Again,
Bob


On Apr 30, 1:09 am, Jeff Sharkey  wrote:
> That code should have worked, as long as "MyActivity" is directly
> inside of the android:package you defined in the manifest.  If it was
> deeper you would have to reference the remaining sub-package leaves in
> the android:name.
>
> For example, if you had "com.example.uistuff.MyActivity" and your
> manifest was only android:package="com.example", you would need to use
> android:name=".uistuff.MyActivity" when defining that activity.
>
> j
>
>
>
> On Wed, Apr 29, 2009 at 9:32 PM, Bob  wrote:
>
> >> So because you're targeting a BroadcastReceiver, you would call
> >> sendBroadcast() instead of startActivity().
>
> > Thanks Jeff for quick response. What I want to do is start an activity
> > but I tried the Broadcast Receiver because I was getting the activity
> > not found error with the manifest like this:
>
> >  
>
> >              
> >         
>
> >            
>
> > Is there something wrong with that used in conjunction with
> > startactivity()?
>
> > Thanks,
> > Bob
>
> > On Apr 29, 10:32 pm, Jeff Sharkey  wrote:
> >> So because you're targeting a BroadcastReceiver, you would call
> >> sendBroadcast() instead of startActivity().
>
> >> j
>
> >> On Wed, Apr 29, 2009 at 6:45 PM, Bob  wrote:
>
> >> > Hi,
> >> > Can anyone tell me what I am doing wrong, I'm sure it is real simple.
> >> > I am trying to create a custom intent but everytime I try to launch it
> >> > from another activity I get a "No Activity found to handle Intent"
> >> > error?  Am I failing to register the new intent somehow even though it
> >> > is in the manifest?
>
> >> > Thanks,
> >> > Bob
>
> >> > In other activity,produces error:
>
> >> >  Intent i = new Intent("com.example.Intent1");
> >> >        startActivity(i);
>
> >> > In Receiver Activity:
>
> >> > In Manifest:
>
> >> >   >> > android:enabled="true" >
> >> >             
> >> >         
>
> >> >            
> >> >        
>
> >> > In Code File:
>
> >> > import android.content.BroadcastReceiver;
> >> > import android.content.Context;
> >> > import android.content.Intent;
>
> >> > public class TestBroadcastReceiver extends BroadcastReceiver {
>
> >> >       �...@override
> >> >        public void onReceive(Context context, Intent intent) {
> >> >                // TODO Auto-generated method stub
>
> >> >        }
>
> >> > }
>
> >> --
> >> Jeff Sharkey
> >> jshar...@google.com
>
> --
> 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: MediaPlayer State

2009-04-29 Thread westmeadboy

> > Do you know why the State is not exposed? If there is no good reason,
> > then what are the steps to request that it is exposed in some future
> > SDK release?
>
> One reason not to rely on these, and not to expose them so that people don't
> try to rely on them, is that the states are inherently transient, because
> they ultimately come from the media engine, which runs in its own thread(s).

I don't understand this. Are you saying that if the application keeps
track of the State then this is more accurate than if it had access to
the underlying State?

Before I call pause() I potentially need to check that the player is
not in one of these modes:

Idle, Initialized, Prepared, Stopped, PlaybackCompleted, Error

otherwise the errorListener is triggered.

Idle, Initialized and Stopped are completely in my control (and so is
Preparing, once the MediaPlayer has been Prepared) so the only ones I
really need to check for are PlaybackCompleted and Error.

So, as in your example, any call to pause() may result in the
errorListener being triggered because the MediaPlayer can suddenly
enter PlaybackCompleted State just before onCompletionListener has had
a chance to be triggered.

So, it seems to me that the MediaPlayer API is broken because there is
no clear contract for the client code. It details the valid states
under which the various methods can be called but does not allow this
State to be known, only guessed. If you are concerned about the State
changing from one client code statement (testing State) to the next
(invoking a method such as pause()) then isn't this what
synchronization is for?

Furthermore, if you don't want client code relying on the State then
why is isPlaying() provided? Doesn't this just test if the State is
Started?

I would have expected something like onStateChangedListener and using
synchronization to avoid the problem you mentioned.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: API to delete SIM contacts & Messages AND erasing the SD card contents

2009-04-29 Thread Surendra Reddy T
Hi Schimmel,

Thanks for yous advice and suggestions.

What about SIM card tool kit? I read in the cupcake feature list on android
web page.
But now in 1.5 SDK I didnt find any SIM related API.
If any one want to contribute to this, I am ready with my team to develop
the SIM tool kit.

I read in the android developers guide that, we need to sign our application
with the device manufacture's certificate to get the most of the API to
work. Do any one have any info on this?


SD card formatting should be possile as of now with private API in 1.5.
But we can access all the files/dirs on the SD Card and I have written a
java code to delete the files recursively and it is working fine. But the
only problem is that, if u have more data on SD card, that java code takes
more time.
For 500MB it took 5 sec to delete all the files and directories.

Regards
Surendra


On Wed, Apr 29, 2009 at 5:47 PM, brian.schimmel <
brian.schim...@googlemail.com> wrote:

>
> Hi Surendra,
>
> as far as I know, access to the SIM data is restricted to applications
> which are signed by the same entity that signed the system image. That
> is, you either have to be Google/the Open Handset Alliance, or you
> have to build a custom system image. Then users of your sofware would
> have to flash their firmware with yours. If you plan to publish your
> app to end-users, that's not an option, because they cannot flash
> their firmware with yours.
>
> If you application definitely needs access to the SIM, you could join
> the community and provide some effort so that the SIM-API will be
> opend in one of the upcoming Versions (like 1.6) of android. I got the
> same advice when I asked for the same feature, but sadly I and my
> company currently have no spare resources to do that.
>
> The data on the SD-card is secured by the file system permissions, and
> your app will never have the permissions to delete the files that
> other apps created. For card formatting, there might be some API, but
> I guess the same restrictions as for SIM access apply here. But while
> accessing the SIM is a rather common need, which might show up in a
> public API in future (at least I hope so, I don't have any information
> on that), I guess this will never happen for SD-Card-formating.
>
> best regards,
> Brian Schimmel
>
> On 20 Apr., 07:22, tsreddy  wrote:
> > Hi Android Engineers/framework Engineers, please answer my questions.
> > It is very important for me to finisg my application.
> > Your help will be higly appriciated.
> >
> > Regards
> > Surendra
> >
> > On Apr 16, 5:02 pm, Surendra Reddy T 
> > wrote:
> >
> > > Hi,
> >
> > > Is there any API which can delete thecontactsand 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
> >
> >
> >
>


-- 
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] Re: CheckedTextView - Changed?

2009-04-29 Thread nEx.Software

Anybody? Now that T-Mobile appears to be releasing 1.5 OTA, this will
begin to become an issue quickly I think.
My users won't be able to see what they have selected.

On Apr 29, 12:47 pm, "nEx.Software"  wrote:
> No worries. Any idea why my checkmarks disappear in 1.5?
> In my XML I have the following attribute:
> android:checkMark="@drawable/btn_check"
>
> btn_check is a stateful drawable but it seems maybe the states have
> changed or something because if I just set the checkmark to a static
> drawable it displays the checkmark fine. Obviously, I want to be able
> to continue using the stateful drawable. Any ideas?
>
> On Apr 29, 11:45 am, Romain Guy  wrote:
>
> > Doh! Apparently LayoutInflater lets you inflate abstract classes. I'll
> > fixed CheckedTextView to not be abstract anymore. Sorry for that.
>
> > On Wed, Apr 29, 2009 at 11:41 AM, Romain Guy  wrote:
> > > CheckedTextView has always been abstract. You cannot and could not
> > > instantiate it from code but you can use it from XML yes. This has not
> > > changed from 1.1 to 1.5.
>
> > > On Wed, Apr 29, 2009 at 11:10 AM, nEx.Software
> > >  wrote:
>
> > >> I was able to include it in my XML Layout file in 1.1. So to continue
> > >> using it, I'll have to extend it? And reimplement the functions that
> > >> were already provided to me in the last SDK? It is incredibly
> > >> frustrating when, per instructions from the Android engineers, I
> > >> followed what was in the SDK and now it no longer works. Thanks for
> > >> the info, guess I'll Just extend it and go from there.
>
> > >> On Apr 29, 10:57 am, Romain Guy  wrote:
> > >>> CheckedTextView is an abstract class, just as it was in Android 1.1.
> > >>> This means you cannot instantiate it directly.
>
> > >>> On Wed, Apr 29, 2009 at 10:52 AM, nEx.Software
>
> > >>>  wrote:
>
> > >>> > So I tried to test CheckedTextView in a new project based on 1.5 and
> > >>> > it doesn't even show as an option. tried to create in code via
> > >>> > CheckedTextView CTV = new CheckedTextView(this); but it cannot be
> > >>> > instantiated, so how do we use CheckedTextView in the new SDK? What
> > >>> > gives?
>
> > >>> > On Apr 28, 7:15 pm, "nEx.Software"  wrote:
> > >>> >> Seems 1.5 has changed CheckedTextView where the android:checkmark xml
> > >>> >> no longer works? Also, the documentation appears to say indicate the
> > >>> >> checkmarkdrawable only is drawn when checked but does this mean there
> > >>> >> is no uncheckeddrawable?I'm not able to check in my project at the
> > >>> >> moment but it certainly seems this is the case. My UI broke, I know
> > >>> >> that much. Any thoughts?
>
> > >>> --
> > >>> Romain Guy
> > >>> Android framework engineer
> > >>> romain...@android.com
>
> > >>> Note: please don't send private questions to me, as I don't have time
> > >>> to provide private support.  All such questions should be posted on
> > >>> public forums, where I and others can see and answer them
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: creating custom intent

2009-04-29 Thread Jeff Sharkey

That code should have worked, as long as "MyActivity" is directly
inside of the android:package you defined in the manifest.  If it was
deeper you would have to reference the remaining sub-package leaves in
the android:name.

For example, if you had "com.example.uistuff.MyActivity" and your
manifest was only android:package="com.example", you would need to use
android:name=".uistuff.MyActivity" when defining that activity.

j


On Wed, Apr 29, 2009 at 9:32 PM, Bob  wrote:
>
>> So because you're targeting a BroadcastReceiver, you would call
>> sendBroadcast() instead of startActivity().
>
> Thanks Jeff for quick response. What I want to do is start an activity
> but I tried the Broadcast Receiver because I was getting the activity
> not found error with the manifest like this:
>
>  
>
>              
>         
>
>            
>
> Is there something wrong with that used in conjunction with
> startactivity()?
>
> Thanks,
> Bob
>
>
> On Apr 29, 10:32 pm, Jeff Sharkey  wrote:
>> So because you're targeting a BroadcastReceiver, you would call
>> sendBroadcast() instead of startActivity().
>>
>> j
>>
>>
>>
>> On Wed, Apr 29, 2009 at 6:45 PM, Bob  wrote:
>>
>> > Hi,
>> > Can anyone tell me what I am doing wrong, I'm sure it is real simple.
>> > I am trying to create a custom intent but everytime I try to launch it
>> > from another activity I get a "No Activity found to handle Intent"
>> > error?  Am I failing to register the new intent somehow even though it
>> > is in the manifest?
>>
>> > Thanks,
>> > Bob
>>
>> > In other activity,produces error:
>>
>> >  Intent i = new Intent("com.example.Intent1");
>> >        startActivity(i);
>>
>> > In Receiver Activity:
>>
>> > In Manifest:
>>
>> >  > > android:enabled="true" >
>> >             
>> >         
>>
>> >            
>> >        
>>
>> > In Code File:
>>
>> > import android.content.BroadcastReceiver;
>> > import android.content.Context;
>> > import android.content.Intent;
>>
>> > public class TestBroadcastReceiver extends BroadcastReceiver {
>>
>> >       �...@override
>> >        public void onReceive(Context context, Intent intent) {
>> >                // TODO Auto-generated method stub
>>
>> >        }
>>
>> > }
>>
>> --
>> Jeff Sharkey
>> jshar...@google.com
> >
>



-- 
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: Porting 1.0 to 1.5, getSystemService(SENSOR_SERVICE)

2009-04-29 Thread snctln

not sure if there is a work around but I believe this is a known issue
according to the latest sdk release notes 
http://developer.android.com/sdk/RELEASENOTES.html

(copy and pasted below for convenience)
Known Issues

Sensor problems in Emulator

* If your application uses the Sensor API and you are running it
in the emulator on the Android 1.5 system image, you may experience
problems. Your application may generate ANR messages or crash when
using the sensors. The problem is being investigated.

Other

* We regret to inform developers that Android 1.5 will not include
support for the Zilog Z80 processor architecture.


I have a few apps that make use of the Sensor API and they are all
working great on my ADP1 with the 1.5 image installed, so it looks to
be just an emulator issues

---snctln
www.snctln.com

On Apr 29, 11:33 pm, JP  wrote:
> One more find in the 1.5 emulator.
> A call to getSystemService(SENSOR_SERVICE) just hangs. Works just fine
> in 1.0 and goes through both on a device (G1 with latest OTA update
> from T-Mobile) and the 1.0 emulator.
> Accelerator is a "yes" AVD option by default, so that should go
> through? Can anybody confirm this issue... is there a known workaround/
> solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 create a file in current directory?

2009-04-29 Thread prajapatmanoj

Hi

I am new to Android and creating my first application.

I want to create a file in the current directory. Basically I have a
file bundled with aplication package as raw resource. I want to make a
copy of this file in the current file. The reason to create copy in
current directory is that I want my file reading code in native java,
portable code.

To write a file in current directory I am doing following:

String currentdir = System.getProperty("user.dir");
String destination = currentdir + "test.txt";
File fileCon = new File(destination);
if( ! fileCon.exists() ){
fileCon.createNewFile();
}

But on createNewFile statement it is throwing IOException with
following message

java.io.IOException: Parent directory of file is not writable:
temp.txt

So my query is how can I create a file on current directory? The
location current directory is important here as I do not want to make
use of device specific hardcoded path or any Android API while reading
the file. This is so because I want my file reading code portable.

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] Porting 1.0 to 1.5, getSystemService(SENSOR_SERVICE)

2009-04-29 Thread JP

One more find in the 1.5 emulator.
A call to getSystemService(SENSOR_SERVICE) just hangs. Works just fine
in 1.0 and goes through both on a device (G1 with latest OTA update
from T-Mobile) and the 1.0 emulator.
Accelerator is a "yes" AVD option by default, so that should go
through? Can anybody confirm this issue... is there a known workaround/
solution?

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

2009-04-29 Thread Bob

> So because you're targeting a BroadcastReceiver, you would call
> sendBroadcast() instead of startActivity().

Thanks Jeff for quick response. What I want to do is start an activity
but I tried the Broadcast Receiver because I was getting the activity
not found error with the manifest like this:

 

  
 



Is there something wrong with that used in conjunction with
startactivity()?

Thanks,
Bob


On Apr 29, 10:32 pm, Jeff Sharkey  wrote:
> So because you're targeting a BroadcastReceiver, you would call
> sendBroadcast() instead of startActivity().
>
> j
>
>
>
> On Wed, Apr 29, 2009 at 6:45 PM, Bob  wrote:
>
> > Hi,
> > Can anyone tell me what I am doing wrong, I'm sure it is real simple.
> > I am trying to create a custom intent but everytime I try to launch it
> > from another activity I get a "No Activity found to handle Intent"
> > error?  Am I failing to register the new intent somehow even though it
> > is in the manifest?
>
> > Thanks,
> > Bob
>
> > In other activity,produces error:
>
> >  Intent i = new Intent("com.example.Intent1");
> >        startActivity(i);
>
> > In Receiver Activity:
>
> > In Manifest:
>
> >   > android:enabled="true" >
> >             
> >         
>
> >            
> >        
>
> > In Code File:
>
> > import android.content.BroadcastReceiver;
> > import android.content.Context;
> > import android.content.Intent;
>
> > public class TestBroadcastReceiver extends BroadcastReceiver {
>
> >       �...@override
> >        public void onReceive(Context context, Intent intent) {
> >                // TODO Auto-generated method stub
>
> >        }
>
> > }
>
> --
> 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: Basic HTTP authentication

2009-04-29 Thread Jon Colverson

On Apr 29, 6:06 pm, Wouter  wrote:
> I cannot access my page! How can I do this?

Can you post your code?

--
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: Is it possible to call methods of a Activity from service.

2009-04-29 Thread Reghu

Thank you

i made it 



On Apr 27, 9:46 pm, "Justin (Google Employee)" 
wrote:
> Look into android.os.Handler.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Apr 27, 6:24 am,Reghu wrote:
>
> > Hello,
>
> > Is it possible to call methods of a Activity from service.
>
> > I am running a thread from a service and i listening to some external
> > event from that thread.
> > I am not able to call methods  from that thread. Is there any way to
> > call methods from a thread.
>
> > 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: creating custom intent

2009-04-29 Thread Jeff Sharkey

So because you're targeting a BroadcastReceiver, you would call
sendBroadcast() instead of startActivity().

j

On Wed, Apr 29, 2009 at 6:45 PM, Bob  wrote:
>
> Hi,
> Can anyone tell me what I am doing wrong, I'm sure it is real simple.
> I am trying to create a custom intent but everytime I try to launch it
> from another activity I get a "No Activity found to handle Intent"
> error?  Am I failing to register the new intent somehow even though it
> is in the manifest?
>
>
> Thanks,
> Bob
>
> In other activity,produces error:
>
>  Intent i = new Intent("com.example.Intent1");
>        startActivity(i);
>
> In Receiver Activity:
>
> In Manifest:
>
>   android:enabled="true" >
>             
>         
>
>            
>        
>
>
> In Code File:
>
> import android.content.BroadcastReceiver;
> import android.content.Context;
> import android.content.Intent;
>
> public class TestBroadcastReceiver extends BroadcastReceiver {
>
>       �...@override
>        public void onReceive(Context context, Intent intent) {
>                // TODO Auto-generated method stub
>
>        }
>
> }
>
> >
>



-- 
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: Is there a recommended method for app updates?

2009-04-29 Thread Jeff Sharkey

So as of Android 1.1 (which almost everyone has been running for the
past few months), the Market app automatically checks for updates
without any extra work on the developer's part.  It shows a
notification to the user, something like "3 updates available" and the
user can choose which ones to upgrade.

You could also roll your own update checking if you'd like, and
several developers have open-sourced small libraries to help with
this.

j

On Wed, Apr 29, 2009 at 4:41 PM, Filipe Abrantes
 wrote:
>
> Hi all,
>
> I heard from some users that they need to check the Market updates. My
> question is if there is standard, or recommended way of checking for app
> updates? My impression is that Android would greatly benefit if all apps
> used the same API to do this.
>
> Cheers,
> Filipe
>
> http://abrantix.org/rockon.php
>
> >
>



-- 
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: simple demo multiple alarms

2009-04-29 Thread Jeff Sharkey

Right, this is because PendingIntents only keep track of one set of
extras for a given action+data+category+component combination.  That
is to say, it ignores extras when comparing PendingIntents.

Because your second PendingIntent matches the first one, the system
recycles the first one.

Depending on the desired behavior, you could use FLAG_CANCEL_CURRENT
to wipe the old PendingIntent and replace it with a new one containing
the updated extras.  Or, if you need multiple events, you could use
the data Uri to hold the extra information.  (So something like
"custom://avr/myvalue" might work.)

j

On Wed, Apr 29, 2009 at 11:35 AM, guruk  wrote:
>
> thanks...
> finaly the calendar add.. do the same.
>
> but that does not answer my question, how to initiate MULTIPLE
> Alarms.. and especialy
> how o read them in me broadcast receiver and how to know what alarm
> comes initiated.
>
> thanks
> chris
>
>
> On Apr 26, 11:22 pm, Ashok Jeevan  wrote:
>> Hi,Try using
>>
>> am.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+(delay * 1000)
>> , sender);
>>
>> This will set the alarms according to the delay that you specify.
>>
>>
>>
>> On Sun, Apr 26, 2009 at 3:42 PM, guruk  wrote:
>>
>> > Hi, i like to create multiple alarms, but i does not work. how to set
>> > and how to request in my receiver what alarm intent came activated
>>
>> > in my alarm.java i call this function like: setalarm(5); setalarm(10)
>> > (it works but only remember the last)
>>
>> >  public void setalarm(int delay)
>> >    {
>> >         Intent intent = new Intent(alarm.this, alarmreceiver.class);
>> >         PendingIntent sender = PendingIntent.getBroadcast(alarm.this,
>> > 0, intent, 0);
>> >         intent.setData((Uri.parse("custom://"+delay)));  << i heared
>> > about this would make individual alarms.. but does not work
>>
>> >         Calendar calendar = Calendar.getInstance();
>> >         calendar.setTimeInMillis(System.currentTimeMillis());
>> >         calendar.add(Calendar.SECOND, delay);
>>
>> >         intent.putExtra("avr", ""+delay);   //i tried to set my data
>> > here to read later, but also does not work
>>
>> >         AlarmManager am = (AlarmManager)getSystemService
>> > (ALARM_SERVICE);
>> >         am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
>> > sender);
>>
>> >         //Toast.makeText(this, "Alarm set", Toast.LENGTH_LONG).show
>> > ();
>>
>> >    }
>>
>> >  my alarmreceiver.java
>>
>> > public class alarmreceiver extends BroadcastReceiver
>> > {
>> >        NotificationManager mNM;
>> >       �...@override
>> >  public void onReceive(Context context, Intent intent)
>> >  {
>> >                Uri ursistr = intent.getData();
>> >                String intentstr = intent.getStringExtra("avr");  //does not
>> > get the
>> > saved intentextra?!
>>
>> >        Toast.makeText(context, "GOT IT :"+intentstr+" "+ursistr,
>> > Toast.LENGTH_SHORT).show();
>>
>> >  }
>>
>> > greets
>> > chris
> >
>



-- 
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: Why doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

2009-04-29 Thread quill

Hi Dianne,
Do you mean I should put
w.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
R.drawable.icon);
before setContentView()? It still can't work.

On Apr 30, 10:11 am, Dianne Hackborn  wrote:
> It's not a bug, you need to request all features before setContentView().
>
>
>
>
>
> On Wed, Apr 29, 2009 at 6:29 PM, quill  wrote:
>
> > Hi, Streets!
> > My sdk is cupcake1.5, the bug still remains...(if it is a bug)
>
> > On Apr 29, 9:59 pm, Streets Of Boston  wrote:
> > > It's a bug. I don't know if it's fixed in Cupcake, but in 1.1 and 1.0
> > > this does not work. The icon will always be on the left.
>
> > > On Apr 29, 4:39 am, quill  wrote:
>
> > > > Hi all,
> > > > I just want to set an icon in the right of titlebar, so I use:
> > > >         Window  w = getWindow();
> > > >         w.requestFeature(Window.FEATURE_RIGHT_ICON);
> > > >         setContentView(R.layout.main);
> > > >         w.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
> > > >                         R.drawable.icon);
> > > > but it doesn't work, the icon is still at left. Did I miss something?
> > > > Pls help me, thx!- Hide quoted text -
>
> > > - Show quoted text -
>
> --
> 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.- 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: Eclipse + cupcake + other android projects in build path = VerifyError

2009-04-29 Thread Eric Chen
Ok , my way diff the project new with old sdk ,there are 3 modified files
.classpath, AndroidManifest.xml and adding build.xml. It will work
Best Regards

Eric Chen


On Thu, Apr 30, 2009 at 2:40 AM, Guillaume Perrot
wrote:

> The JDK is clearly not the problem here, I don't know what he's talking
> about as there are several causes that can trigger a VerifyError but in this
> discussion we deal with the latest ADT Eclipse plugin release.
> The problem here is that the ADT plugin tries to upload the referenced
> android projects in build path as separate APKs instead of mixing the code
> like in previous SDK releases.
> Even if several APKs are uploaded, there is no link between them on the
> device and so the VerifyError occurs when launching the main one.
> The only solution proposed so far is to use J2SE projects instead, using
> the android.jar in their build path (see one of my previous mail on the
> subject).
>
> PS: Eclipse does not require a JDK, just a JRE, it has its own Java
> compiler, which compliancy level can be set based on what JRE you use.
>
> 2009/4/29 Handtwerk 
>
>
>> > We've had the same problem with ProSyst mBS running on cupcake. After
>> > some checks we found that it depends what JDK you use for building your
>> > jar files before DEXing them. In general here is the info:
>> >
>> > We've checked with the following JDK versions: jdk1.5.0_06, jdk1.5.0_10,
>> > jdk1.5.0_12, jdk1.5.0_15, jdk1.6.0_06, jdk1.6.0_10. Only with
>> > jdk1.5.0_06, jdk1.5.0_10 and jdk1.5.0_12 there was no verify errors.
>>
>> Can anybody confirm this? I'm developing on a Mac, facing the same
>> VerifyError issue. And updates 06, 10 and 12 for JDK 1.5.0 are not
>> available for OSX, so this would mean trouble for Android development
>> on OSX in general.
>>
>> Cheers,
>> Arne
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Possible IMF issue for existing applications

2009-04-29 Thread Simon

Pretty sure adding

android:inputType="number"

will fix your issue. You may also need to add:

android:windowSoftInputMode="stateVisible|adjustResize"

as an attribute of the activity section of AndroidManifest.xml

-- Simon

On Apr 27, 11:37 pm, Tom Gibara  wrote:
> I just tried this in the 1.5 r1 release and it remains non-functional, so
> I'm assuming it's a bug:http://code.google.com/p/android/issues/detail?id=2525
>
> Tom.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sqlite open error : unable to open database file

2009-04-29 Thread havexz

Many of my application users are getting this error. There is no
reason in the code that leads to this. For the background,  I had
released the application with copy protection on and then next day i
had switched it off as people with dev phones are unable to download
the app. Any solution for this problem? Can anyway I can help the app
users to retrieve their data?


android.database.sqlite.SQLiteException: unable to open database file
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:
1421)
at android.database.sqlite.SQLiteDatabase.openDatabase
(SQLiteDatabase.java:537)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:558)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:551)
at android.app.ApplicationContext.openOrCreateDatabase
(ApplicationContext.java:427)
at android.content.ContextWrapper.openOrCreateDatabase
(ContextWrapper.java:181)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase
(SQLiteOpenHelper.java:98)
at com.myactivity.backend.myactivityDBAdapter.open
(myactivityDBAdapter.java:408)
at com.myactivity.views.myactivityMain.onCreate(myactivityMain.java:
233)
at android.app.Instrumentation.callActivityOnCreate
(Instrumentation.java:1122)
at android.app.ActivityThread.performLaunchActivity
(ActivityThread.java:2104)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2157)
at android.app.ActivityThread.access$1800(ActivityThread.java:112)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
1581)
at android.os.Handler.dispatchMessage(Handler.java:88)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3739)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
at dalvik.system.NativeStart.main(Native Method)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

2009-04-29 Thread Dianne Hackborn
It's not a bug, you need to request all features before setContentView().

On Wed, Apr 29, 2009 at 6:29 PM, quill  wrote:

>
> Hi, Streets!
> My sdk is cupcake1.5, the bug still remains...(if it is a bug)
>
> On Apr 29, 9:59 pm, Streets Of Boston  wrote:
> > It's a bug. I don't know if it's fixed in Cupcake, but in 1.1 and 1.0
> > this does not work. The icon will always be on the left.
> >
> > On Apr 29, 4:39 am, quill  wrote:
> >
> >
> >
> > > Hi all,
> > > I just want to set an icon in the right of titlebar, so I use:
> > > Window  w = getWindow();
> > > w.requestFeature(Window.FEATURE_RIGHT_ICON);
> > > setContentView(R.layout.main);
> > > w.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
> > > R.drawable.icon);
> > > but it doesn't work, the icon is still at left. Did I miss something?
> > > Pls help me, thx!- Hide quoted text -
> >
> > - Show quoted text -
> >
>


-- 
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] Porting 1.0 to 1.5, Street view intent (also broken in Google Maps)

2009-04-29 Thread JP

Did I say in an earlier post everything checks out porting from 1.0 to
1.5? Correction. Invoking the Street View activity crashes in the
emulator. Both in ported app and Google Maps app (there by clicking on
an address bubble) Stack dump:

04-30 02:00:27.757: ERROR/AndroidRuntime(665): Uncaught handler:
thread main exiting due to uncaught exception
04-30 02:00:27.785: ERROR/AndroidRuntime(665):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.intent.action.VIEW
data=google.streetview:cbll=47.625476,-122.356021&cbp=1,268.72,,0,0&mz=17 }
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1484)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.app.Activity.startActivityForResult(Activity.java:2656)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.app.Activity.startActivity(Activity.java:2700)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.google.android.maps.StreetViewOverlay.startStreetViewActivity
(StreetViewOverlay.java:697)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.google.android.maps.StreetViewOverlay.startStreetView
(StreetViewOverlay.java:686)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.google.android.maps.StreetViewOverlay.access$1200
(StreetViewOverlay.java:55)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.google.android.maps.StreetViewOverlay$5.onClick
(StreetViewOverlay.java:201)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.View.performClick(View.java:2179)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.View.onTouchEvent(View.java:3828)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.View.dispatchTouchEvent(View.java:3368)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:831)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1197)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.app.Activity.dispatchTouchEvent(Activity.java:1993)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.os.Looper.loop(Looper.java:123)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
java.lang.reflect.Method.invokeNative(Native Method)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
java.lang.reflect.Method.invoke(Method.java:521)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-30 02:00:27.785: ERROR/AndroidRuntime(665): at
dalvik.system.NativeStart.main(Native Method)

I could not find anything on a corresponding "switch" to turn Street
View on (or what 1.5 needs to make this happen). The documentation in
developer.android.com leads to a 404. Swinging by
http://code.google.com/android/add-ons/google-apis/ does not contain
information on Street View (that I could find).
Hmm, anybody seeing the same issues? Resolution?



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



[android-developers] Re: Tabhost Disappearing List view

2009-04-29 Thread cre



Mark,

Ran hierarchyviewer and all is as expected.  The Listview is (visible)
when its supposed to be and (gone) when it supposed to be.

The Listviews are setup once in OnCreate and never modified, that is
why I cannot understand what could cause it or them  to disappear.
Here is the code:

ListView list1 = (ListView) findViewById(R.id.tab1);
list1.setAdapter(ArrayAdapter.createFromResource(
this, R.array.books, R.layout.tab_row));

ListView list2 = (ListView) findViewById(R.id.tab2);
list2.setAdapter(ArrayAdapter.createFromResource(
this, R.array.cards, R.layout.tab_row));

ListView list3 = (ListView) findViewById(R.id.tab3);
list3.setAdapter(ArrayAdapter.createFromResource(
this, R.array.letters, R.layout.tab_row));

TabHost tabs = (TabHost) findViewById(R.id.tabhost);

tabs.setup();

TabHost.TabSpec spec = tabs.newTabSpec("tag1");
spec.setContent(R.id.tab1);
spec.setIndicator("Books", getResources().getDrawable(
R.drawable.bookt_tab));
tabs.addTab(spec);

spec = tabs.newTabSpec("tag2");
spec.setContent(R.id.tab2);
spec.setIndicator("Cards", getResources().getDrawable(
R.drawable.cardt_tab));
tabs.addTab(spec);

spec = tabs.newTabSpec("tag3");
spec.setContent(R.id.tab3);
spec.setIndicator("Letters", getResources().getDrawable(
R.drawable.lettert_tab));
tabs.addTab(spec);

tabs.setCurrentTab(0);

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] creating custom intent

2009-04-29 Thread Bob

Hi,
Can anyone tell me what I am doing wrong, I'm sure it is real simple.
I am trying to create a custom intent but everytime I try to launch it
from another activity I get a "No Activity found to handle Intent"
error?  Am I failing to register the new intent somehow even though it
is in the manifest?


Thanks,
Bob

In other activity,produces error:

 Intent i = new Intent("com.example.Intent1");
startActivity(i);

In Receiver Activity:

In Manifest:

 
 
 





In Code File:

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class TestBroadcastReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub

}

}

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



[android-developers] Porting 1.0 to 1.5, map tiles stopped displaying

2009-04-29 Thread JP

I started porting a functioning 1.0 app to 1.5 last night. It uses
MapView and associated classes and everything checks out on 1.0. No
such luck after taking it to 1.5. I've included maps API, the usual
touch points (API key, Internet permission) are in place of course
(coming from 1.0).
I've created an id=3 AVD (Google Maps app works), and followed the
porting instructions I found posted, but map tiles do not display
after porting. Everything else, i.e. the overlaying functionality, is
there. Nothing terrible shows in LogCat, so I am scratching my head
what might be missing. Pointers welcome, THX in advance!
JP

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

2009-04-29 Thread quill

Hi, Streets!
My sdk is cupcake1.5, the bug still remains...(if it is a bug)

On Apr 29, 9:59 pm, Streets Of Boston  wrote:
> It's a bug. I don't know if it's fixed in Cupcake, but in 1.1 and 1.0
> this does not work. The icon will always be on the left.
>
> On Apr 29, 4:39 am, quill  wrote:
>
>
>
> > Hi all,
> > I just want to set an icon in the right of titlebar, so I use:
> >         Window  w = getWindow();
> >         w.requestFeature(Window.FEATURE_RIGHT_ICON);
> >         setContentView(R.layout.main);
> >         w.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
> >                         R.drawable.icon);
> > but it doesn't work, the icon is still at left. Did I miss something?
> > Pls help me, thx!- 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: retrieve all the images in phone and sdcard

2009-04-29 Thread Peli

Use the media content provider:
http://developer.android.com/guide/topics/providers/content-providers.html
http://developer.android.com/reference/android/provider/MediaStore.Images.Media.html

using something like this:
ContentResolver cr = getContentResolver();
Cursor cur = managedQuery
(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null,
null);

Peli
www.openintents.org


On 30 Apr., 00:34, Xian Chen  wrote:
> Maybe I did not make the question clear.
>
> What I want to do is retrieving all the images in phone and sdcard,
> including file name, and image size. But I do not want the user to pick one
> image, in other words, I want my activity to retrieve all the images the
> user can see automatically and return some information.
>
> So, I need the image ( or imageColumn) URI, but I cannot find it from the
> document.
>
> Anyone know this?
>
> Thanks,
> Xian
>
> On Wed, Apr 29, 2009 at 5:41 PM, Xian Chen  wrote:
> > Hi,
>
> > How can I retrieve all the images both in phone memory and external sdcard?
>
> > I need the image path, name and size information.
>
> > Thanks in advance,
> > Xian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Market from Cupcake on Dev phone

2009-04-29 Thread clark

I have a G1 and loaded the ADP cupcake image and I too can see the app
inside the market, including paid and protected apps.


On Apr 27, 8:11 pm, Marc Lester Tan  wrote:
> I can access Market and download free apps from it using my ADP on cupcake.
> I'm from Philippines.
>
> -Marc
>
>
>
> On Tue, Apr 28, 2009 at 3:18 AM, Humanoid  wrote:
>
> > Hello,
>
> > I'm unable to access Android Market from the Cupcake build released by
> > HTC for Dev1.
> > Some rumors have it that this is an intentional block by Google to
> > discourage users from upgrading to Cupcake.
> > What is a developer to do in order to test Market applications on the
> > new build?- 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] Is there a recommended method for app updates?

2009-04-29 Thread Filipe Abrantes

Hi all,

I heard from some users that they need to check the Market updates. My 
question is if there is standard, or recommended way of checking for app 
updates? My impression is that Android would greatly benefit if all apps 
used the same API to do this.

Cheers,
Filipe

http://abrantix.org/rockon.php

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



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-29 Thread JP



On Apr 29, 12:04 pm, Dianne Hackborn  wrote:
> Friend Finder does not turn GPS on.  MyTracks does not turn on it.  You too
> can live with not turning it on.
>
> Btw, airplane mode afaik has no impact on GPS.
Clearly. Let me rephrase - while changing settings (Airplane mode),
user navigates through Settings and disables GPS as well.

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



[android-developers] Using media scanner

2009-04-29 Thread ivan

Hello,

I'm trying to use the MediaScannerConnection class to update my
external audio content provider.

I download an MP3 file to:

/sdcard/Music/

When the download is complete I successfully scan it, but the file is
scanned to the internal audio content provider...

the uri looks like "/internal/audio/media/55".

Is there a way to control the content provider that the media scanner
scans to?

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

2009-04-29 Thread fadden

On Apr 29, 9:41 am, Ward Willats  wrote:
> Oh well, I switched to gawk and did this "aeheap.awk" (android external heap):

I got a Python script working.  I believe this is the second python
script I've ever written, so it's probably not going to win any style
awards.

When a GC happens you see this in the debug log (e.g. "adb logcat -v
time"):

04-29 22:18:00.224 D/dalvikvm(  195): GC freed 64 objects / 3232 bytes
in 252ms

and this in the event log ("adb logcat -v time -b events"):

04-29 22:18:00.224 I/dvm_gc_info(  195):
[7017575181485851338,-9205213429612410843,-4017630296264763397,7370389]

The monstrosity decomposes to:

> id="acore" time=252 freed=3232
>  freed=64 foot=3276800 allow=3538944 objs=49152 bytes=2424832
>  soft=4063232 act=2621440 allow=2621440 objs=43264 bytes=2076672
>  foot=0 total=0 limit=1077248 alloc=610304

I pulled out the fields that seemed useful, yielding:

04-29 22:18:00 acore(195) softlim=3968KB, extlim=1052KB,
extalloc=596KB
  freed 64 objects / 3232 bytes in 252ms

This duplicates the debug log entry from the original (mostly as a
sanity check), and shows the heap soft limit, the external allocation
limit, and the external bytes allocated.

Note that the numbers don't quite match up.  This is because the event
log encodes values in a 12-bit floating point format, so you don't get
a lot of resolution, and large numbers tend to get rounded.

I put an "early release" copy here if you want to play with it:

  http://bigflake.com/gclog.py.txt

It'll show up in dalvik/tools eventually.

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

2009-04-29 Thread Nick Pelly
Hi Alex,

This patch to external/qemu should fix you up:

Author: Nick Pelly 
Date:   Fri Apr 24 15:28:40 2009 -0700

Fix build for platforms where deprecated symbol EAI_NODATA is not
defined.

diff --git a/sockets.c b/sockets.c
index fa1f39d..be40a56 100644
--- a/sockets.c
+++ b/sockets.c
@@ -634,7 +634,9 @@ sock_address_init_resolve( SockAddress*  a, const char*
hostname, uint16_t  por
 err = EHOSTDOWN;
 break;

+#ifdef EAI_NODATA
 case EAI_NODATA:
+#endif
 case EAI_NONAME:
 err = ENOENT;
 break;


I hit the same problem on Ubuntu 9.04. I'll work on expediating this patch
into open source.

Now a couple of comments about your approach:

If you are interested in getting your build working, then android-porting
would have been the right list. And you should have posted the exact
compliation failure. Not posting the failure message makes it look like you
are searching for an oppurtunity to complain rather than an oppurtunity to
contribute. You are lucky in this case that I fixed (what I think is your
problem) just recently and happened to read this post.

Your trigger-happy claims that Google are acting unprofessionally give the
appearance that you are uninformed. Google engineers do go through a code
review loop just as external developers do. In this case the error is
specific to the deprecation of EAI_NODATA in Ubuntu 9.04 which is less than
a week old, and is not indicative of a code review process problem. The fact
that you must have just installed Ubuntu 9.04 should have given a clue as to
where your problems lay!

Nick



On Wed, Apr 29, 2009 at 3:04 PM, AlexK  wrote:

>
> I especially create clean platform setup for Android builds. And do
> not use platform for any other tasks.
> All environment setup I did according to published by Google
> documentation. So I expect 99% match on requirements for building
> Android OS.
>
> My OS: Linux Ubuntu x86 i386 v9.04
>
> Looks like 1.5 release was very hard and android team tiered.:)
>
> Thanks,
> Good Luck
>
> On Apr 30, 12:32 am, Jean-Baptiste Queru  wrote:
> > We can't test on every possible version of every possible environment.
> > The file in question compiles for us on all platforms (the 1.5_r1 SDK
> > was built with that exact source code).
> >
> > All the changes are reviewed individually and automatically built for
> > each target platform. And we did explicitly check that the recent
> > open-source pushes were building fine for linux and MacOS.
> >
> > My guess: you're not running Ubintu 8.0.4.
> >
> > JBQ
> >
> >
> >
> > On Wed, Apr 29, 2009 at 2:22 PM, AlexK 
> wrote:
> >
> > > Hi,
> >
> > > Second time the same problem: latest sources from MASTER branch have
> > > compilation error. (QEMU compilation failure).
> >
> > > I think problem is in way how Google engineers committing own code
> > > into GIT repository.
> >
> > > Please fill the difference: other developers publish code on GitWeb
> > > then waiting approve from at least two code reviewers and only after
> > > that Google engineer MERGE our changes with MASTER branch... Looks
> > > like Google developers simply commit own changes into GIT without
> > > passing similar loop as other developers do.
> >
> > > It's OK, but at least check those changes before making them MERGED
> > > into MASTER branch. With all respect to all developers, but such
> > > behavior is not a good professional move.
> >
> > > P.S. I don't want to blame anyone, but I want to notify Google Android
> > > Team that other developers watching them and expecting highly
> > > professional behavior. I hope google team will find proper solution
> > > for that "development cycle" problem.
> >
> > > P.P.S. sorry for bad English.
> >
> > > Thanks
> >
> > --
> > Jean-Baptiste M. "JBQ" Queru
> > Android Engineer, Google.
> >
> > Questions sent directly to me that have no reason for being private
> > will likely get ignored or forwarded to a public forum with no further
> > warning.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: retrieve all the images in phone and sdcard

2009-04-29 Thread Xian Chen
Maybe I did not make the question clear.

What I want to do is retrieving all the images in phone and sdcard,
including file name, and image size. But I do not want the user to pick one
image, in other words, I want my activity to retrieve all the images the
user can see automatically and return some information.

So, I need the image ( or imageColumn) URI, but I cannot find it from the
document.

Anyone know this?

Thanks,
Xian

On Wed, Apr 29, 2009 at 5:41 PM, Xian Chen  wrote:

> Hi,
>
> How can I retrieve all the images both in phone memory and external sdcard?
>
> I need the image path, name and size information.
>
> Thanks in advance,
> Xian
>

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



[android-developers] Re: Tabhost Disappearing List view

2009-04-29 Thread Mark Murphy

cre wrote:
> I have a Linearlayout with a tabhost. Intermittently the listview
> under tab3 will disappear when navigating to it.
> It is difficult to replicate the problem with any consistency.  It
> seems to just happen randomly but I certain there is a specific
> trigger.  I just can't find it nor understand what is causing the
> listview not to appear when the tab is selected.  The only way to fix
> it is to restart the app.
> 
> Anyone have any ideas?

It may be the ListView is there but your list contents are gone.

I'd fire up hierarchyviewer and bring up the node diagram for your
activity. See if the ListView is there when you think it is gone.

If the ListView seems fine in hierarchyviewer, figure out where you set
or modify the contents of your list adapter.

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

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: Google Un-Proffesional?!

2009-04-29 Thread AlexK

I especially create clean platform setup for Android builds. And do
not use platform for any other tasks.
All environment setup I did according to published by Google
documentation. So I expect 99% match on requirements for building
Android OS.

My OS: Linux Ubuntu x86 i386 v9.04

Looks like 1.5 release was very hard and android team tiered.:)

Thanks,
Good Luck

On Apr 30, 12:32 am, Jean-Baptiste Queru  wrote:
> We can't test on every possible version of every possible environment.
> The file in question compiles for us on all platforms (the 1.5_r1 SDK
> was built with that exact source code).
>
> All the changes are reviewed individually and automatically built for
> each target platform. And we did explicitly check that the recent
> open-source pushes were building fine for linux and MacOS.
>
> My guess: you're not running Ubintu 8.0.4.
>
> JBQ
>
>
>
> On Wed, Apr 29, 2009 at 2:22 PM, AlexK  wrote:
>
> > Hi,
>
> > Second time the same problem: latest sources from MASTER branch have
> > compilation error. (QEMU compilation failure).
>
> > I think problem is in way how Google engineers committing own code
> > into GIT repository.
>
> > Please fill the difference: other developers publish code on GitWeb
> > then waiting approve from at least two code reviewers and only after
> > that Google engineer MERGE our changes with MASTER branch... Looks
> > like Google developers simply commit own changes into GIT without
> > passing similar loop as other developers do.
>
> > It's OK, but at least check those changes before making them MERGED
> > into MASTER branch. With all respect to all developers, but such
> > behavior is not a good professional move.
>
> > P.S. I don't want to blame anyone, but I want to notify Google Android
> > Team that other developers watching them and expecting highly
> > professional behavior. I hope google team will find proper solution
> > for that "development cycle" problem.
>
> > P.P.S. sorry for bad English.
>
> > Thanks
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
>
> Questions sent directly to me that have no reason for being private
> will likely get ignored or forwarded to a public forum with no further
> warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Google Un-Proffesional?!

2009-04-29 Thread Dianne Hackborn
Please take this off android-developers and to android-porting.

On Wed, Apr 29, 2009 at 2:57 PM, AlexK  wrote:

>
> look's like something alway missed...
>
> please understand my skepticism on this, fix on compilation problem
> can be caught only under Linux Ubuntu, under MacOS everything is ok
> (according to posts from other developers and changes required in
> makefile.android for QEMU for fixing that problem)...
>
> With all respect but this is second time with me when I catch un-
> compilable sources in MASTER branch.
>
> On Apr 30, 12:32 am, Romain Guy  wrote:
> > Hi,
> >
> > All commits made by members of the Android team follow a very similar
> > process. No code is checked  in without code review.
> >
> >
> >
> > On Wed, Apr 29, 2009 at 2:22 PM, AlexK 
> wrote:
> >
> > > Hi,
> >
> > > Second time the same problem: latest sources from MASTER branch have
> > > compilation error. (QEMU compilation failure).
> >
> > > I think problem is in way how Google engineers committing own code
> > > into GIT repository.
> >
> > > Please fill the difference: other developers publish code on GitWeb
> > > then waiting approve from at least two code reviewers and only after
> > > that Google engineer MERGE our changes with MASTER branch... Looks
> > > like Google developers simply commit own changes into GIT without
> > > passing similar loop as other developers do.
> >
> > > It's OK, but at least check those changes before making them MERGED
> > > into MASTER branch. With all respect to all developers, but such
> > > behavior is not a good professional move.
> >
> > > P.S. I don't want to blame anyone, but I want to notify Google Android
> > > Team that other developers watching them and expecting highly
> > > professional behavior. I hope google team will find proper solution
> > > for that "development cycle" problem.
> >
> > > P.P.S. sorry for bad English.
> >
> > > Thanks
> >
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
> >
>


-- 
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: Regarding AbsoluteView being deprecated in 1.5

2009-04-29 Thread Mark Murphy

karthikr wrote:
> I have just realised that AbsoluteLayout has been deprecated in the
> latest sdk, however I have designed my apps based on AbsoluteLayout
> and it is very difficult for me to remove them and change it to a
> different layout. Can someone help me as to how I should proceed?

AFAIK, you have your choice of:

-- Change to another layout

-- Copy the AbsoluteLayout code (and its dependencies) from the source
tree into your project and maintain your own local copy

-- Start an independent open source project to keep AbsoluteLayout alive
(same as previous option, just perhaps with other people helping you)

All of these involve some amount of work.

> Absolute layout was really helpful in positioning the elements to be
> accurate.

That depends on your definition of "accurate".

> One could always had different layout definitions for
> different screen sizes, and based on the current width and height the
> required layout can be set.

You are assuming you will know all of the possible screen sizes. If
Android is a success, you will have no way of knowing, when you write
your software, what screen size will be used, since there will be too
many to keep track of.

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

Android App Developer Books: http://commonsware.com/books.html

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



[android-developers] Re: Screen flip-out on G1

2009-04-29 Thread Kirk

Thanks Yusuf,

I'll take a look at those articles, hopefully they will help!

Kirk

On Apr 28, 3:21 pm, "Yusuf T. Mobile"  wrote:
> Normally the activity is destroyed and recreated when Android detects
> rotation, unless you specify that you want your activity to handle
> events like turning the phone on its side or the keyboard opening.
>
> It's documented 
> here:http://developer.android.com/reference/android/content/res/Configurat...
> You can read more about rotation 
> here:http://androidguys.com/?tag=android-rotation
> andhttp://www.devx.com/wireless/Article/40792/1763/page/5
>
> Some tutorials you may come across may be obsolete on one point: there
> used to be only the flag keyboardhidden, but Android recently added
> hardKeyboardHidden, to handle the case of soft keyboards.
>
> onSaveInstanceState() and onDestroy() should be called before your
> activity is killed and revived, I'm not sure why you don't see it.
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Apr 28, 11:08 am, Kirk  wrote:
>
> > What event in an Activity is called when the screen is flipped out to
> > expose the keyboard on a G1? I need to save some instance variables,
> > but it seems like onCreate is being called without onPause, onStop, or
> > saveInstanceState being called first.
>
> > 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: sharing embedded resource via content provider

2009-04-29 Thread Dianne Hackborn
In 1.5 there is a new content provider API to return a subset of a file
stream.

However, do you really need to do this?  Other applications can directly
access your resources.  The main reason to do this is to provide data to
some existing code that expects to be able to open a stream from a provider,
which only happens in a few places.

On Wed, Apr 29, 2009 at 2:46 PM, andrew  wrote:

>
> Hi,
> How do I share an embedded resource with other apks via a content
> provider?
>
> Thanks,
> Andrew
> >
>


-- 
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: GridView and BaseAdapter position bug

2009-04-29 Thread Siva Rajaraman

Hello Guys,

Even I am facing such a problem, where I need to detect when all the
calls to getView() are done. After this I want to perform my animation
on only one children in the view. Looks like thr is no straight
forward way to detect the completion of getView(). Is there a way by
which I can overcome this issue??

Thanks,

Siva

On Apr 29, 8:27 am, Streets Of Boston  wrote:
> Good to hear!
>
> I'm curious: what did you do to get around this problem?
> (yarik may want to know as well :-))
>
> On Apr 29, 11:13 am, Illidane  wrote:
>
> > No matter.. it's all working now with the GridView, I have fixed that
> > bug by the hand.
> > Thank you for your help)
>
> > On 29 апр, 17:07, Streets Of Boston  wrote:
>
> > > If you have all 100 cells visible at once at all time, the GridView
> > > does not add much functionality (no scrolling necessary), except for
> > > selecting cells.
>
> > > I'm not familiar with your app, but i think it would be 'easier' than
> > > wrestling with GridView to subclass 'View' (or 'ViewGroup' if you need
> > > additional child-views) and have this sub-class handle the 100 cells
> > > (implement onDraw, dispatchDraw) and draw your cells using Drawables.
> > > This also removes the need of having 100 child-views (1 for each
> > > cells), which could become more problematic for the Cupcake release
> > > (see its note about how it is more finnicky about the depth and width
> > > of view-hierarchies). Instead, you have just one view with 100 small
> > > bitmaps/drawables.
>
> > > On Apr 29, 3:03 am, Illidane  wrote:
>
> > > > Extend the GridView or write my own class which will manipulating 100
> > > > cells as drawables?
>
> > > > On 29 апр, 00:27, Streets Of Boston  wrote:
>
> > > > > I have to defend Romain here.
> > > > > The gridview and/or listview is just not designed to do this. You're
> > > > > trying to put a round peg in a square hole.
>
> > > > > Maybe the decision to use a GridView for your purposes is not a good
> > > > > idea, because of its design that does not fit what you need.
>
> > > > > If all 100 cells are visible at the same time (then there's no
> > > > > scrolling needed), why do you need a gridview? Maybe you should
> > > > > subclass your own view and draw the 100 cells as 100 drawables (which
> > > > > you can animate) yourself in its onDraw or dispatchDraw method.
>
> > > > > On Apr 28, 2:53 pm, Illidane  wrote:
>
> > > > > > Ok-ok, I gotcha what you mean.
> > > > > > But with such position to developers you will never make android 
> > > > > > lead
> > > > > > platform.
> > > > > > Sory, if I speak the truth boldly.
>
> > > > > > On 28 апр, 19:44, Romain Guy  wrote:
>
> > > > > > > No, you are just making assumptions about how it should work. 
> > > > > > > Nowhere
> > > > > > > does it say that it should work the way you want it to work, 
> > > > > > > that's
> > > > > > > not how it works and that's not how it will work.
>
> > > > > > > 2009/4/28 Illidane :
>
> > > > > > > > To Romain Guy:
> > > > > > > > Ok, I understood that you think that it's NOT a bug and that you
> > > > > > > > implement it how you want it be.
> > > > > > > > But I need to say you, that in such situation is very hard, or
> > > > > > > > sometimes is impossible to write good, stable, beauty, useful 
> > > > > > > > and
> > > > > > > > competitive apps for Android, not only for me, but for all 
> > > > > > > > Android
> > > > > > > > programmers.
> > > > > > > > And I think you know that.
>
> > > > > > > > On 28 апр, 18:53, Romain Guy  wrote:
> > > > > > > >> I am from the Google team (and I did implement a lot of 
> > > > > > > >> GridView and
> > > > > > > >> ListView) and it is NOT a bug. GridView and ListView can call
> > > > > > > >> getView() out of order and more times than the number of views 
> > > > > > > >> that
> > > > > > > >> will fit on screen, depending how the Grid/ListView is 
> > > > > > > >> measured/laid
> > > > > > > >> out.
>
> > > > > > > >> 2009/4/28 yarik...@gmail.com :
>
> > > > > > > >> > I have exactly same problem. Why do we have 102 values of 
> > > > > > > >> > position
> > > > > > > >> > when there is only 100 cells displayed on screen?
> > > > > > > >> > "position is changed like: 0, 0, 1, 2, 3... 99, 0" - what is 
> > > > > > > >> > the cause
> > > > > > > >> > of that? Can someone from google team answer?
> > > > > > > >> > That seems to be a bug, very annoying bug. Answer "It's not 
> > > > > > > >> > a bug" is
> > > > > > > >> > not answer! How do you generate position?
>
> > > > > > > >> > On Apr 27, 9:40 pm, Illidane  wrote:
> > > > > > > >> >> There is a way to make GridView without Adapter ( e.g. 
> > > > > > > >> >> something
> > > > > > > >> >> like .addView() method ) ?
>
> > > > > > > >> >> On 27 апр, 21:38, Illidane  wrote:
>
> > > > > > > >> >> > My GridView shows all 100 cells on the screen ( all 
> > > > > > > >> >> > visible at one
> > > > > > > >> >> > moment )
> > > > > > > >> >> > and all the animation works fine, and pretty fast

[android-developers] Re: Google Un-Proffesional?!

2009-04-29 Thread AlexK

look's like something alway missed...

please understand my skepticism on this, fix on compilation problem
can be caught only under Linux Ubuntu, under MacOS everything is ok
(according to posts from other developers and changes required in
makefile.android for QEMU for fixing that problem)...

With all respect but this is second time with me when I catch un-
compilable sources in MASTER branch.

On Apr 30, 12:32 am, Romain Guy  wrote:
> Hi,
>
> All commits made by members of the Android team follow a very similar
> process. No code is checked  in without code review.
>
>
>
> On Wed, Apr 29, 2009 at 2:22 PM, AlexK  wrote:
>
> > Hi,
>
> > Second time the same problem: latest sources from MASTER branch have
> > compilation error. (QEMU compilation failure).
>
> > I think problem is in way how Google engineers committing own code
> > into GIT repository.
>
> > Please fill the difference: other developers publish code on GitWeb
> > then waiting approve from at least two code reviewers and only after
> > that Google engineer MERGE our changes with MASTER branch... Looks
> > like Google developers simply commit own changes into GIT without
> > passing similar loop as other developers do.
>
> > It's OK, but at least check those changes before making them MERGED
> > into MASTER branch. With all respect to all developers, but such
> > behavior is not a good professional move.
>
> > P.S. I don't want to blame anyone, but I want to notify Google Android
> > Team that other developers watching them and expecting highly
> > professional behavior. I hope google team will find proper solution
> > for that "development cycle" problem.
>
> > P.P.S. sorry for bad English.
>
> > Thanks
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sharing embedded resource via content provider

2009-04-29 Thread Mark Murphy

andrew wrote:
> How do I share an embedded resource with other apks via a content
> provider?

That feels like you are swatting a fly with a schoolbus.

There may be other simpler ways of solving your problem. Can you tell us
why other APKs need this resource, and who is writing those APKs?

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

Android App Developer Books: http://commonsware.com/books.html

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



[android-developers] sharing embedded resource via content provider

2009-04-29 Thread andrew

Hi,
How do I share an embedded resource with other apks via a content
provider?

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



[android-developers] retrieve all the images in phone and sdcard

2009-04-29 Thread Xian Chen
Hi,

How can I retrieve all the images both in phone memory and external sdcard?

I need the image path, name and size information.

Thanks in advance,
Xian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Get File Path With URI

2009-04-29 Thread Georg

You are right, I know these things, but thats not the problem.

The problem is that i always get 0.0 for the Latitude and Longitude
column.
That's the problem.
Any ideas?

Regards Georg

On Apr 27, 7:05 pm, Sergey Ten  wrote:
> After query returns the cursor, it has to be moved forward. It can be done
> as follows:
>
>    ContentResolver cr = getContentResolver();
>    Cursor cursor = cr.query(photoUri, new String[] {
>            MediaStore.Images.
>
>
>
> > ImageColumns.LATITUDE,
> >            MediaStore.Images.ImageColumns.LONGITUDE
> >     }, null, null, null);
>
> if (cursor != null && cursor.getCount() > 0) {
>     cursor.moveToFirst();
>     long fname = cursor.getLong(cursor.
>
>
>
> >               getColumnIndexOrThrow
> >               (MediaStore.Images.ImageColumns.LATITUDE));
>
> > chatscreen.append("File Name: "+fname);
> }
>
> Sergey
>
> On Wed, Apr 1, 2009 at 11:11 AM, Bobbie  wrote:
>
> > I am launching an image picker (from the gallery) and my code crashes
> > every single time.  I tried to get some help in another post, but
> > people quit responding to the post.  Please help.  When I do a debug,
> > it tells me this (there are TONS of errors, but these looked the most
> > important - also, I changed the "com.app.name/com.app.name.activity"
> > for privacy reasons):
>
> > 04-01 14:09:30.254: WARN/dalvikvm(719): threadid=3: thread exiting
> > with uncaught exception (group=0x4000fe68)
> > 04-01 14:09:30.254: ERROR/AndroidRuntime(719): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 04-01 14:09:30.274: ERROR/AndroidRuntime(719):
> > java.lang.RuntimeException: Failure delivering result ResultInfo
> > {who=null, request=1, result=-1, data=Intent { data=content://media/
> > external/images/media/7 }} to activity {com.app.name/
> > com.app.name.activity}:
> > android.database.CursorIndexOutOfBoundsException: Index -1 requested,
> > with a size of 1
> > 04-01 14:09:30.274: ERROR/AndroidRuntime(719): Caused by:
> > android.database.CursorIndexOutOfBoundsException: Index -1 requested,
> > with a size of 1
>
> > Here is the code that invokes the activity, follwed by the code that
> > is invoked after the activity has finished:
>
> > public void takePic() {
> >                Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
> >                photoPickerIntent.setType("image/*");
> >                startActivityForResult(photoPickerIntent, 1);
> > }
>
> > @Override
> > protected void onActivityResult(int i, int j, Intent intent)
> > {
> >    super.onActivityResult(i, j, intent);
>
> >    Uri photoUri = intent.getData();
>
> >    ContentResolver cr = getContentResolver();
> >    Cursor cursor = cr.query(photoUri, new String[] {
> >            MediaStore.Images.ImageColumns.LATITUDE,
> >            MediaStore.Images.ImageColumns.LONGITUDE
> >     }, null, null, null);
>
> >    long fname = cursor.getLong(cursor.getColumnIndexOrThrow
> > (MediaStore.Images.ImageColumns.LATITUDE));
>
> >    chatscreen.append("File Name: "+fname);
> > }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Google Un-Proffesional?!

2009-04-29 Thread Jean-Baptiste Queru

We can't test on every possible version of every possible environment.
The file in question compiles for us on all platforms (the 1.5_r1 SDK
was built with that exact source code).

All the changes are reviewed individually and automatically built for
each target platform. And we did explicitly check that the recent
open-source pushes were building fine for linux and MacOS.

My guess: you're not running Ubintu 8.0.4.

JBQ

On Wed, Apr 29, 2009 at 2:22 PM, AlexK  wrote:
>
> Hi,
>
> Second time the same problem: latest sources from MASTER branch have
> compilation error. (QEMU compilation failure).
>
> I think problem is in way how Google engineers committing own code
> into GIT repository.
>
> Please fill the difference: other developers publish code on GitWeb
> then waiting approve from at least two code reviewers and only after
> that Google engineer MERGE our changes with MASTER branch... Looks
> like Google developers simply commit own changes into GIT without
> passing similar loop as other developers do.
>
> It's OK, but at least check those changes before making them MERGED
> into MASTER branch. With all respect to all developers, but such
> behavior is not a good professional move.
>
> P.S. I don't want to blame anyone, but I want to notify Google Android
> Team that other developers watching them and expecting highly
> professional behavior. I hope google team will find proper solution
> for that "development cycle" problem.
>
> P.P.S. sorry for bad English.
>
> Thanks
>
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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

2009-04-29 Thread Romain Guy

Hi,

All commits made by members of the Android team follow a very similar
process. No code is checked  in without code review.

On Wed, Apr 29, 2009 at 2:22 PM, AlexK  wrote:
>
> Hi,
>
> Second time the same problem: latest sources from MASTER branch have
> compilation error. (QEMU compilation failure).
>
> I think problem is in way how Google engineers committing own code
> into GIT repository.
>
> Please fill the difference: other developers publish code on GitWeb
> then waiting approve from at least two code reviewers and only after
> that Google engineer MERGE our changes with MASTER branch... Looks
> like Google developers simply commit own changes into GIT without
> passing similar loop as other developers do.
>
> It's OK, but at least check those changes before making them MERGED
> into MASTER branch. With all respect to all developers, but such
> behavior is not a good professional move.
>
> P.S. I don't want to blame anyone, but I want to notify Google Android
> Team that other developers watching them and expecting highly
> professional behavior. I hope google team will find proper solution
> for that "development cycle" problem.
>
> P.P.S. sorry for bad English.
>
> Thanks
>
> >
>



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

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

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



[android-developers] Re: Pending intent not detecting onCreate

2009-04-29 Thread jrgraf...@googlemail.com

Thanks for your help Jeff, its finally starting to make a lot more
sense now!

-James

On Apr 29, 6:43 pm, Jeff Sharkey  wrote:
> Right, that wouldn't have an effect because your inflated layout is a
> completely different copy from the one inflated by the home screen.
>
> Also, I noticed that your using "putExtra" in your PendingIntents.  Be
> sure to use the FLAG_CANCEL_CURRENT flag when calling getActivity() to
> make sure your extras are updated correctly.  And be aware that you
> can only have one set of extras for any given PendingIntent
> action+data+category+component pair.
>
> If you're trying to change the background of a button, you could use
> this slightly-hacky approach: set the button background to a leveled
> drawable, and then use setDrawableParameters() to change the level and
> show the desired background.
>
> You'd probably want to keep the number of layers to a minimum to keep it 
> speedy.
>
> j
>
> On Wed, Apr 29, 2009 at 3:40 AM, jrgraf...@googlemail.com
>
>
>
>  wrote:
>
> > Thanks for your reply Jeff,
>
> > Turns out what I really needed to do here was learn how Intent based
> > programming on Android works and how to actually implement it! What I
> > was missing here was actually declaring the activity in the Android
> > XML (I assumed that activities only had to be declared if they were
> > actually going to display something).
>
> > Still though I would be really nice if I could get direct access to
> > Button Widgets via LayerInflator so that I can directly manipulate the
> > background of the button, unfortunately the following seems to have no
> > effect:
>
> >                LayoutInflater inflater = (LayoutInflater) context
> >                                
> > .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
> >                View view = inflater.inflate(R.layout.widget_layout, null);
>
> >                Button button = (Button) 
> > view.findViewById(R.id.ToggleButton);
> >                button.setBackgroundResource(R.drawable.airplaneoff);
>
> >                RemoteViews views = new RemoteViews(context.getPackageName(),
> >                                R.layout.widget_layout);
>
> >                Intent defineIntent = new Intent(context, 
> > ToggleActivity.class);
> >                defineIntent.putExtra("toggle", toggle);
> >                PendingIntent pendingIntent = 
> > PendingIntent.getActivity(context, 0,
> >                                defineIntent, Intent.FLAG_ACTIVITY_NEW_TASK);
>
> >                views.setOnClickPendingIntent(R.id.ToggleButton, 
> > pendingIntent);
>
> >                // Tell the widget manager
> >                appWidgetManager.updateAppWidget(appWidgetId, views);
>
> > No big deal tho since I can always use an ImageView and call
> > RemoteViews.setImageViewBitmap(id)
>
> > On Apr 29, 4:25 am, Jeff Sharkey  wrote:
> >> Hmm, not sure exactly why it isn't working.  Because you can't know
> >> the state of the remote AppWidgetHostView holding your widget, you
> >> should package up all operations each time you push an update.  You
> >> said in logcat it looks like it's trying to start the activity, could
> >> you paste the couple of lines surrounding that?
>
> >> Also, if you don't have an  inside the Activity
> >> definition in your manifest, you might need to add the
> >> android:exported="true" flag.
>
> >> j
>
> >> On Tue, Apr 28, 2009 at 5:52 PM, jrgraf...@googlemail.com
>
> >>  wrote:
>
> >> > As a side note I also tried using LayoutInflator and attaching an
> >> > onClickListener to the imageview manually, but that failed to
> >> > recognise any events. Im guessing here that changes made via a
> >> > layoutinflator will not be picked up by remote views which later use
> >> > that layout?
>
> >> > On Apr 29, 1:19 am, "jrgraf...@googlemail.com"
> >> >  wrote:
> >> >> I have the following code in a static function in my application
> >> >> widget:
>
> >> >>                 Intent defineIntent = new Intent(context,
> >> >> ToggleIntentActivity.class);
> >> >>                 PendingIntent pendingIntent = PendingIntent
> >> >>                                 .getActivity(context, 0, defineIntent, 
> >> >> 0);
>
> >> >>                 views.setOnClickPendingIntent(R.id.icon, pendingIntent);
>
> >> >>                 // Tell the widget manager
> >> >>                 appWidgetManager.updateAppWidget(appWidgetId, views);
>
> >> >> From the examples it looked as though this was the way to trigger
> >> >> custom activity's based on user clicks on your widgets. However even
> >> >> though Logcat says Starting Activity: Intent {..} my activities on
> >> >> create function never gets called!
>
> >> >> Note my Activity is as follows:
>
> >> >> public class ToggleIntentActivity extends Activity {
> >> >>         @Override
> >> >>         protected void onCreate(Bundle savedInstanceState) {
> >> >>                 super.onCreate(savedInstanceState);
> >> >>                 Log.e(QuickerCutWidgetManager.TAG, "On create");
> >> 

[android-developers] Google Un-Proffesional?!

2009-04-29 Thread AlexK

Hi,

Second time the same problem: latest sources from MASTER branch have
compilation error. (QEMU compilation failure).

I think problem is in way how Google engineers committing own code
into GIT repository.

Please fill the difference: other developers publish code on GitWeb
then waiting approve from at least two code reviewers and only after
that Google engineer MERGE our changes with MASTER branch... Looks
like Google developers simply commit own changes into GIT without
passing similar loop as other developers do.

It's OK, but at least check those changes before making them MERGED
into MASTER branch. With all respect to all developers, but such
behavior is not a good professional move.

P.S. I don't want to blame anyone, but I want to notify Google Android
Team that other developers watching them and expecting highly
professional behavior. I hope google team will find proper solution
for that "development cycle" problem.

P.P.S. sorry for bad English.

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: upgraded to 1.5 and apps wont run

2009-04-29 Thread Xavier Ducrohet

On Wed, Apr 29, 2009 at 1:54 PM, fdimeglio  wrote:
>
> Xavier,
>
> Yes I confirm that if you are using subversion and having a "libs" dir
> in which you have:
>
> - your jar libraries
> - the .svn dir
>
> then the build just crap out with ADT 0.9: the resulting .apk contains
> everything except the signature and if you "zip -T project.apk" you
> will see that the apk file is considered as non valid.
>
> This leads too to the EOCD error you see when trying to push the
> broken apk file to an emulator or a device.
>
> When can we expect a fix for this issue ?

hopefully sometimes next week. We're adding a few more fixes.

> btw I have seen other issues with ADT 0.9: the auto generated resource
> file is not generated if you AndroidManifest file is containing  sdk minSdkVersion="2"> instead of   android:minSdkVersion="2">
> This was working  with SDK1.1 but with SDK1.5 you need to use the
> "android:" prefix

Yeah we've fixed that too. the minSdkVersion attribute must be in the
android namespace (we've fixed the docs for it too)

This has always been the case, it's just that ADT now parses this
value to display a warning in case this conflicts with the build
target. Unfortunately, if the  node is present but the
attribute isn't, there's a bug which prevent the rest of the build
from happening.

thanks
Xav
-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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

2009-04-29 Thread Dianne Hackborn
If none of the standard layout managers let you achieve what you want in an
efficient way, you can just write your own layout manager.  This is actually
what you end up having to do anyway if you are going to have a UI that works
correctly (for any different screen size, for changes to the screen
decorations like an IME being displayed, etc), but it is actually probably a
lot easier to do this correctly by just writing your own layout manager than
using AbsoluteLayout.

On Wed, Apr 29, 2009 at 1:10 PM, karthikr wrote:

>
>
> Hi,
>
> I have just realised that AbsoluteLayout has been deprecated in the
> latest sdk, however I have designed my apps based on AbsoluteLayout
> and it is very difficult for me to remove them and change it to a
> different layout. Can someone help me as to how I should proceed?
> Absolute layout was really helpful in positioning the elements to be
> accurate. One could always had different layout definitions for
> different screen sizes, and based on the current width and height the
> required layout can be set. Removing of AbsoluteLayout  is creating a
> lot of frustration to me as I have already designed most of the things
> using it. Somebody please help me out.
>
> Regards,
> R.Karthik
> >
>


-- 
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: Status bar in screen

2009-04-29 Thread Dianne Hackborn
Basically, you don't.  Your content view will be resized for you to account
for it.  Also when you create windows they will be positioned below it,
unless you specify the "layout in screen" flag.

(Now that said, there is this little View.fitSystemWindows() method that
gets called to help the view hierarchy position your content view relative
to screen decorations...  but I would urge against using it, there should be
no need.)

On Wed, Apr 29, 2009 at 1:26 PM, Daniel Dreiberg <
daniel.dreiber...@gmail.com> wrote:

> Hi,
> How can I find out the height of the status bar programatically?
> 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: upgraded to 1.5 and apps wont run

2009-04-29 Thread fdimeglio

Xavier,

Yes I confirm that if you are using subversion and having a "libs" dir
in which you have:

- your jar libraries
- the .svn dir

then the build just crap out with ADT 0.9: the resulting .apk contains
everything except the signature and if you "zip -T project.apk" you
will see that the apk file is considered as non valid.

This leads too to the EOCD error you see when trying to push the
broken apk file to an emulator or a device.

When can we expect a fix for this issue ?

Fabrice

PS:

btw I have seen other issues with ADT 0.9: the auto generated resource
file is not generated if you AndroidManifest file is containing  instead of  
This was working  with SDK1.1 but with SDK1.5 you need to use the
"android:" prefix

On Apr 29, 11:24 am, Xavier Ducrohet  wrote:
> OK, we have identified a problem where files with no extension in this
> folder make the build system break.
> Even if you don't have files in there, the presence of a .svn folder
> in there can cause the issues.
>
> If you use that folder to store jar libraries. I would just move those
> jar files to a different folder (the issue is only with the folder
> named "libs" and the jar files can be anywhere as long as they are
> added to the project build path).
>
> We have fixed the problem and are looking at possibly releasing an
> update to ADT soon.
>
> Xav
>
>
>
> On Wed, Apr 29, 2009 at 7:33 AM, Josh Dobbs  wrote:
> > Yes I do have a libs folder in the project.
>
> > On Tue, Apr 28, 2009 at 10:45 PM, Xavier Ducrohet  wrote:
>
> >> Do you have a libs folder in your project?
>
> >> Xav
>
> >> On Tue, Apr 28, 2009 at 9:07 PM, Josh  wrote:
>
> >> > I upgraded to version 1.5 of the sdk and now when i try to run or
> >> > debugg apps i get the following error:
>
> >> > [2009-04-28 21:02:58 - Targets] --
> >> > [2009-04-28 21:02:58 - Targets] Android Launch!
> >> > [2009-04-28 21:02:58 - Targets] adb is running normally.
> >> > [2009-04-28 21:02:58 - Targets] Could not find Targets.apk!
>
> >> > Im running eclipse 3.4 and i followed the directions listed here
> >> >http://developer.android.com/sdk/1.5_r1/upgrading.html
>
> >> > any suggestions?
>
> >> --
> >> Xavier Ducrohet
> >> Android Developer Tools Engineer
> >> Google Inc.
>
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Status bar in screen

2009-04-29 Thread Daniel Dreiberg
Hi,
How can I find out the height of the status bar programatically?
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: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-29 Thread Romain Guy

Everything you can do with AbsoluteLayout can be done with FrameLayout
and RelativeLayout. AbsoluteLayout was deprecated because its use
encourage applications that will NOT work with devices with different
screen dimensions/resolutions. As such we decided to deprecate
AbsoluteLayout to encourage developers to do the right thing and use
layouts that will work much better with other screen
dimensions/resolutions.

On Wed, Apr 29, 2009 at 1:19 PM, nEx.Software  wrote:
>
> I'd like to know the reasoning behind the deprecation of this layout.
> I suppose you could maybe pull the code from 1.1 and keep using it, I
> don't see the FrameLayout or RelativeLayout being viable alternatives
> despite being recommended in the docs.
>
> On Apr 29, 1:12 pm, karthikr  wrote:
>> Hi,
>>
>> I have just realised that AbsoluteLayout has been deprecated in the
>> latest sdk, however I have designed my apps based on AbsoluteLayout
>> and it is very difficult for me to remove them and change it to a
>> different layout. Can someone help me as to how I should proceed?
>> Absolute layout was really helpful in positioning the elements to be
>> accurate. One could always had different layout definitions for
>> different screen sizes, and based on the current width and height the
>> required layout can be set. Removing of AbsoluteLayout  is creating a
>> lot of frustration to me as I have already designed most of the
>> things
>> using it. Somebody please help me out.
>>
>> Regards,
>> R.Karthik
> >
>



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

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

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



[android-developers] Re: Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-29 Thread nEx.Software

I'd like to know the reasoning behind the deprecation of this layout.
I suppose you could maybe pull the code from 1.1 and keep using it, I
don't see the FrameLayout or RelativeLayout being viable alternatives
despite being recommended in the docs.

On Apr 29, 1:12 pm, karthikr  wrote:
> Hi,
>
> I have just realised that AbsoluteLayout has been deprecated in the
> latest sdk, however I have designed my apps based on AbsoluteLayout
> and it is very difficult for me to remove them and change it to a
> different layout. Can someone help me as to how I should proceed?
> Absolute layout was really helpful in positioning the elements to be
> accurate. One could always had different layout definitions for
> different screen sizes, and based on the current width and height the
> required layout can be set. Removing of AbsoluteLayout  is creating a
> lot of frustration to me as I have already designed most of the
> things
> using it. Somebody please help me out.
>
> Regards,
> R.Karthik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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

2009-04-29 Thread petunio

Hi everybody

I am having a little issue with the WebView package:
I am able to load and show pages, but the scroll does not work

this is my xml:



  

and this is the code:

WebView myTextHelp = (WebView)findViewById(R.id.textHelp);
myTextHelp.loadUrl(myPage);


and I can see the page, but I cant scroll over it...

what am I missing?

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] Using DNS Lookup

2009-04-29 Thread Breno

  Hi,

 Is there any API to use dns lookup in android? my app
connect to a server, and to final user, we don't want that user need
to enter the ip, but a hostname. I found dnsjava, a lib to handle
that, but if Android would have this, it becomes better.

Thanks a lot

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



[android-developers] Regarding AbsoluteLayout being deprecated in SDK 1.5

2009-04-29 Thread karthikr

Hi,


I have just realised that AbsoluteLayout has been deprecated in the
latest sdk, however I have designed my apps based on AbsoluteLayout
and it is very difficult for me to remove them and change it to a
different layout. Can someone help me as to how I should proceed?
Absolute layout was really helpful in positioning the elements to be
accurate. One could always had different layout definitions for
different screen sizes, and based on the current width and height the
required layout can be set. Removing of AbsoluteLayout  is creating a
lot of frustration to me as I have already designed most of the
things
using it. Somebody please help me out.


Regards,
R.Karthik

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



[android-developers] Regarding AbsoluteView being deprecated in 1.5

2009-04-29 Thread karthikr


Hi,

I have just realised that AbsoluteLayout has been deprecated in the
latest sdk, however I have designed my apps based on AbsoluteLayout
and it is very difficult for me to remove them and change it to a
different layout. Can someone help me as to how I should proceed?
Absolute layout was really helpful in positioning the elements to be
accurate. One could always had different layout definitions for
different screen sizes, and based on the current width and height the
required layout can be set. Removing of AbsoluteLayout  is creating a
lot of frustration to me as I have already designed most of the things
using it. Somebody please help me out.

Regards,
R.Karthik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OutOfMemoryError from BitmapFactory

2009-04-29 Thread Romain Guy

Drawables are cached. So if you reuse the same 9patch in different
activities, you're good :)

On Wed, Apr 29, 2009 at 1:00 PM, fadden  wrote:
>
> On Apr 29, 9:53 am, Ward Willats  wrote:
>> While I wait for a crash I can measure, my colleague here points out
>> we use a lot of 9 patches as backgrounds for various fields on our
>> screens. If they go into bitmap storage, and aren't regularly
>> compacted as we move from screen to screen, well, that could suck
>> down a lot of the external heap (and fragment it to boot). Perhaps
>> single large bitmaps we could preload would be better.
>>
>> Is that a nutty hypothesis?
>
> I'll have to leave that to someone else.  I'm just the plumber. :-)
>
> >
>



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

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

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



[android-developers] Re: OutOfMemoryError from BitmapFactory

2009-04-29 Thread Androman

Google should do somethign about this "feature"... A lot of people get
OutOfMemory exception even if they don't do anything wrong.
Dalvik could and should be better. It is pretty slow compared to
native code 10 or 15 times depending on what you are doing.
Hope that JIT is comming soon on Android since this interpreter is
slow and not that good...

And don't call bugs "features" and fix that OutOfMemory problem!

On Apr 29, 6:53 pm, Ward Willats  wrote:
> At 10:26 PM -0700 4/28/09, fadden wrote:
>
> >Well, that's the interesting question: how much memory are you
> >*actually* spending on bitmaps?
>
> While I wait for a crash I can measure, my colleague here points out
> we use a lot of 9 patches as backgrounds for various fields on our
> screens. If they go into bitmap storage, and aren't regularly
> compacted as we move from screen to screen, well, that could suck
> down a lot of the external heap (and fragment it to boot). Perhaps
> single large bitmaps we could preload would be better.
>
> Is that a nutty hypothesis?
>
> -- Ward
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OutOfMemoryError from BitmapFactory

2009-04-29 Thread fadden

On Apr 29, 9:53 am, Ward Willats  wrote:
> While I wait for a crash I can measure, my colleague here points out
> we use a lot of 9 patches as backgrounds for various fields on our
> screens. If they go into bitmap storage, and aren't regularly
> compacted as we move from screen to screen, well, that could suck
> down a lot of the external heap (and fragment it to boot). Perhaps
> single large bitmaps we could preload would be better.
>
> Is that a nutty hypothesis?

I'll have to leave that to someone else.  I'm just the plumber. :-)

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

2009-04-29 Thread nEx.Software

No worries. Any idea why my checkmarks disappear in 1.5?
In my XML I have the following attribute:
android:checkMark="@drawable/btn_check"

btn_check is a stateful drawable but it seems maybe the states have
changed or something because if I just set the checkmark to a static
drawable it displays the checkmark fine. Obviously, I want to be able
to continue using the stateful drawable. Any ideas?

On Apr 29, 11:45 am, Romain Guy  wrote:
> Doh! Apparently LayoutInflater lets you inflate abstract classes. I'll
> fixed CheckedTextView to not be abstract anymore. Sorry for that.
>
>
>
> On Wed, Apr 29, 2009 at 11:41 AM, Romain Guy  wrote:
> > CheckedTextView has always been abstract. You cannot and could not
> > instantiate it from code but you can use it from XML yes. This has not
> > changed from 1.1 to 1.5.
>
> > On Wed, Apr 29, 2009 at 11:10 AM, nEx.Software
> >  wrote:
>
> >> I was able to include it in my XML Layout file in 1.1. So to continue
> >> using it, I'll have to extend it? And reimplement the functions that
> >> were already provided to me in the last SDK? It is incredibly
> >> frustrating when, per instructions from the Android engineers, I
> >> followed what was in the SDK and now it no longer works. Thanks for
> >> the info, guess I'll Just extend it and go from there.
>
> >> On Apr 29, 10:57 am, Romain Guy  wrote:
> >>> CheckedTextView is an abstract class, just as it was in Android 1.1.
> >>> This means you cannot instantiate it directly.
>
> >>> On Wed, Apr 29, 2009 at 10:52 AM, nEx.Software
>
> >>>  wrote:
>
> >>> > So I tried to test CheckedTextView in a new project based on 1.5 and
> >>> > it doesn't even show as an option. tried to create in code via
> >>> > CheckedTextView CTV = new CheckedTextView(this); but it cannot be
> >>> > instantiated, so how do we use CheckedTextView in the new SDK? What
> >>> > gives?
>
> >>> > On Apr 28, 7:15 pm, "nEx.Software"  wrote:
> >>> >> Seems 1.5 has changed CheckedTextView where the android:checkmark xml
> >>> >> no longer works? Also, the documentation appears to say indicate the
> >>> >> checkmarkdrawable only is drawn when checked but does this mean there
> >>> >> is no uncheckeddrawable?I'm not able to check in my project at the
> >>> >> moment but it certainly seems this is the case. My UI broke, I know
> >>> >> that much. Any thoughts?
>
> >>> --
> >>> Romain Guy
> >>> Android framework engineer
> >>> romain...@android.com
>
> >>> Note: please don't send private questions to me, as I don't have time
> >>> to provide private support.  All such questions should be posted on
> >>> public forums, where I and others can see and answer them
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Pending intent not detecting onCreate

2009-04-29 Thread Jeff Sharkey

Right, that wouldn't have an effect because your inflated layout is a
completely different copy from the one inflated by the home screen.

Also, I noticed that your using "putExtra" in your PendingIntents.  Be
sure to use the FLAG_CANCEL_CURRENT flag when calling getActivity() to
make sure your extras are updated correctly.  And be aware that you
can only have one set of extras for any given PendingIntent
action+data+category+component pair.

If you're trying to change the background of a button, you could use
this slightly-hacky approach: set the button background to a leveled
drawable, and then use setDrawableParameters() to change the level and
show the desired background.

You'd probably want to keep the number of layers to a minimum to keep it speedy.

j


On Wed, Apr 29, 2009 at 3:40 AM, jrgraf...@googlemail.com
 wrote:
>
> Thanks for your reply Jeff,
>
> Turns out what I really needed to do here was learn how Intent based
> programming on Android works and how to actually implement it! What I
> was missing here was actually declaring the activity in the Android
> XML (I assumed that activities only had to be declared if they were
> actually going to display something).
>
> Still though I would be really nice if I could get direct access to
> Button Widgets via LayerInflator so that I can directly manipulate the
> background of the button, unfortunately the following seems to have no
> effect:
>
>                LayoutInflater inflater = (LayoutInflater) context
>                                
> .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
>                View view = inflater.inflate(R.layout.widget_layout, null);
>
>                Button button = (Button) view.findViewById(R.id.ToggleButton);
>                button.setBackgroundResource(R.drawable.airplaneoff);
>
>                RemoteViews views = new RemoteViews(context.getPackageName(),
>                                R.layout.widget_layout);
>
>                Intent defineIntent = new Intent(context, 
> ToggleActivity.class);
>                defineIntent.putExtra("toggle", toggle);
>                PendingIntent pendingIntent = 
> PendingIntent.getActivity(context, 0,
>                                defineIntent, Intent.FLAG_ACTIVITY_NEW_TASK);
>
>                views.setOnClickPendingIntent(R.id.ToggleButton, 
> pendingIntent);
>
>                // Tell the widget manager
>                appWidgetManager.updateAppWidget(appWidgetId, views);
>
> No big deal tho since I can always use an ImageView and call
> RemoteViews.setImageViewBitmap(id)
>
> On Apr 29, 4:25 am, Jeff Sharkey  wrote:
>> Hmm, not sure exactly why it isn't working.  Because you can't know
>> the state of the remote AppWidgetHostView holding your widget, you
>> should package up all operations each time you push an update.  You
>> said in logcat it looks like it's trying to start the activity, could
>> you paste the couple of lines surrounding that?
>>
>> Also, if you don't have an  inside the Activity
>> definition in your manifest, you might need to add the
>> android:exported="true" flag.
>>
>> j
>>
>> On Tue, Apr 28, 2009 at 5:52 PM, jrgraf...@googlemail.com
>>
>>
>>
>>  wrote:
>>
>> > As a side note I also tried using LayoutInflator and attaching an
>> > onClickListener to the imageview manually, but that failed to
>> > recognise any events. Im guessing here that changes made via a
>> > layoutinflator will not be picked up by remote views which later use
>> > that layout?
>>
>> > On Apr 29, 1:19 am, "jrgraf...@googlemail.com"
>> >  wrote:
>> >> I have the following code in a static function in my application
>> >> widget:
>>
>> >>                 Intent defineIntent = new Intent(context,
>> >> ToggleIntentActivity.class);
>> >>                 PendingIntent pendingIntent = PendingIntent
>> >>                                 .getActivity(context, 0, defineIntent, 0);
>>
>> >>                 views.setOnClickPendingIntent(R.id.icon, pendingIntent);
>>
>> >>                 // Tell the widget manager
>> >>                 appWidgetManager.updateAppWidget(appWidgetId, views);
>>
>> >> From the examples it looked as though this was the way to trigger
>> >> custom activity's based on user clicks on your widgets. However even
>> >> though Logcat says Starting Activity: Intent {..} my activities on
>> >> create function never gets called!
>>
>> >> Note my Activity is as follows:
>>
>> >> public class ToggleIntentActivity extends Activity {
>> >>         @Override
>> >>         protected void onCreate(Bundle savedInstanceState) {
>> >>                 super.onCreate(savedInstanceState);
>> >>                 Log.e(QuickerCutWidgetManager.TAG, "On create");
>> >>         }
>>
>> >> }
>>
>> >> Any ideas?
>>
>> --
>> Jeff Sharkey
>> jshar...@google.com
> >
>



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to

[android-developers] Will 2009 Google I/O Android sessions be on YouTube?

2009-04-29 Thread geoff.stromberg

The 2008 Google I/O Android videos were a great resource. The 2009
Android sessions sound like they'll be great too. Can someone who is
in the know say whether this year's sessions will be posted on YouTube
as well? 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: CheckedTextView - Changed?

2009-04-29 Thread Romain Guy

Doh! Apparently LayoutInflater lets you inflate abstract classes. I'll
fixed CheckedTextView to not be abstract anymore. Sorry for that.

On Wed, Apr 29, 2009 at 11:41 AM, Romain Guy  wrote:
> CheckedTextView has always been abstract. You cannot and could not
> instantiate it from code but you can use it from XML yes. This has not
> changed from 1.1 to 1.5.
>
> On Wed, Apr 29, 2009 at 11:10 AM, nEx.Software
>  wrote:
>>
>> I was able to include it in my XML Layout file in 1.1. So to continue
>> using it, I'll have to extend it? And reimplement the functions that
>> were already provided to me in the last SDK? It is incredibly
>> frustrating when, per instructions from the Android engineers, I
>> followed what was in the SDK and now it no longer works. Thanks for
>> the info, guess I'll Just extend it and go from there.
>>
>> On Apr 29, 10:57 am, Romain Guy  wrote:
>>> CheckedTextView is an abstract class, just as it was in Android 1.1.
>>> This means you cannot instantiate it directly.
>>>
>>> On Wed, Apr 29, 2009 at 10:52 AM, nEx.Software
>>>
>>>
>>>
>>>  wrote:
>>>
>>> > So I tried to test CheckedTextView in a new project based on 1.5 and
>>> > it doesn't even show as an option. tried to create in code via
>>> > CheckedTextView CTV = new CheckedTextView(this); but it cannot be
>>> > instantiated, so how do we use CheckedTextView in the new SDK? What
>>> > gives?
>>>
>>> > On Apr 28, 7:15 pm, "nEx.Software"  wrote:
>>> >> Seems 1.5 has changed CheckedTextView where the android:checkmark xml
>>> >> no longer works? Also, the documentation appears to say indicate the
>>> >> checkmarkdrawable only is drawn when checked but does this mean there
>>> >> is no uncheckeddrawable?I'm not able to check in my project at the
>>> >> moment but it certainly seems this is the case. My UI broke, I know
>>> >> that much. Any thoughts?
>>>
>>> --
>>> Romain Guy
>>> Android framework engineer
>>> romain...@android.com
>>>
>>> Note: please don't send private questions to me, as I don't have time
>>> to provide private support.  All such questions should be posted on
>>> public forums, where I and others can see and answer them
>> >>
>>
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>



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

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

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



[android-developers] Re: Make an Alert for a background process

2009-04-29 Thread Dianne Hackborn
Put up a notification.

On Wed, Apr 29, 2009 at 10:33 AM, Linda  wrote:

>
> hi all;
>
> I have a background process that save data in my sdcard how can i be
> alert ?!!
> it is an application run in background
> thx for your help
> >
>


-- 
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: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-29 Thread Dianne Hackborn
Friend Finder does not turn GPS on.  MyTracks does not turn on it.  You too
can live with not turning it on.

Btw, airplane mode afaik has no impact on GPS.

And if you really really care about this, you can find out when you are not
getting GPS updates, and put up a notification telling the user about this.

On Wed, Apr 29, 2009 at 9:53 AM, JP  wrote:

>
>
>
> On Apr 29, 8:25 am, Mike Hearn  wrote:
> > On Apr 28, 11:26 pm, weaselgrater  wrote:
> > No, it's not. Just tell users to leave the GPS setting checked. As
> > mentioned before, it does not mean GPS is always active, just that
> > when an app asks for location it gets one using GPS.
>
> That's not going to cut it IMO... Users at one point will disable GPS
> for some unrelated reason, say, they enter a no-RF environment, switch
> to Airplane mode and BTW disable GPS, forgetting about "sleeper" apps
> that rely on GPS thus leaving GPS off for good.
>
> >
>


-- 
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: Issue in booting with new Android 1.5 (API level 3)

2009-04-29 Thread Nick Pelly
android-porting is the right list for this.

The framework should not shut down if battery level is unknown. If someone
could submit a gerrit patch to fix this it would be appreciated. We've
noticed this as well during bringup :)

Nick

2009/4/29 BigBear 

>
> I also have this problem when porting cupcake to VersatilePB.
> The reason may be that no battery and power soruce can be detected by
> system.
> (battery level =0 and unknown charging status)
> So ShutdownThread is invoked by KeyguardUpdateMonitor to power off the
> system.
>
> Please comment line 300 of "frameworks/policies/base/phone/com/android/
> internal/policy/impl/KeyguardUpdateMonitor"
> and make again to get the new rootfs.
> Then the battery check can be avoided when booting.
>
> On 4月25日, 下午5時37分, John  wrote:
> > Hello friends,
> >  I downloded the latest Android opensource 1.5 (API
> > level 3) dated 24-April-2009  from GIT and compiled for to boot with
> > the omap 2430 board.But after the Android logo am getting system
> > halted message in the minicom and in target lcd it displays as the
> > battery is getting low less than 15% remaining and then the power off
> > msg comes and the system hangs there.
> >
> > Any help would be highly appreciated.
> >
> > logcat message for system halting
> >
> > D/ActivityManager(  565): Start running!
> > I/Zygote  (  565): Process: zygote socket opened
> > I/ActivityManager(  565): Start proc com.android.phone for added
> > application com.android.phone: pid=602 uid=1001 gids={3002, 3001,
> > 3003}
> > I/ActivityManager(  565): Start proc android.process.acore for
> > activity com.android.launcher/.Launcher: pid=604 uid=1 gids={3003}
> > D/ShutdownThread(  565): Notifying thread to start radio shutdown
> > W/ResourceType(  565): No package identifier when getting value for
> > resource number 0x
> > W/StatusBar(  565): Icon not found in : 0
> > D/ShutdownThread(  565): Radio aSystem halted.
> > nd Bluetooth shutdown complete.
> > D/ShutdownThread(  565): Shutting down power.
> > I/ActivityThread(  604): Publishing provider user_dictionary:
> > com.android.providers.userdictionary.UserDictionaryProvider
> > D/StatusBar(  565): updateResources
> > I/ActivityThread(  604): Publishing provider
> > com.android.googlesearch.SuggestionProvider:
> > com.android.googlesearch.SuggestionProvider
> > I/ActivityThread(  602): Publishing provider mms-sms:
> > com.android.providers.telephony.MmsSmsProvider
> > I/ActivityThread(  604): Publishing provider contacts;call_log:
> > com.android.providers.contacts.ContactsProvider
> > I/ActivityThread(  602): Publishing provider mms:
> > com.android.providers.telephony.MmsProvider
> > I/ActivityThread(  602): Publishing provider telephony:
> > com.android.providers.telephony.TelephonyProvider
> > I/ActivityThread(  602): Publishing provider sms:
> > com.android.providers.telephony.SmsProvider
> > I/ActivityThread(  602): Publishing provider sim:
> > com.android.phone.SimProvider
> > W/ActivityManager(  565): Unable to start service Intent
> > { action=android.accounts.IAccountsService comp=
> > {com.google.android.googleapps/
> > com.google.android.googleapps.GoogleLoginService} }: not found
> > W/AccountMonitor(  604): Couldn't connect to Intent
> > { action=android.accounts.IAccountsService comp=
> > {com.google.android.googleapps/
> > com.google.android.googleapps.GoogleLoginService} } (Missing service?)
> > I/ActivityThread(  604): Publishing provider
> > com.android.launcher.settings: com.android.launcher.LauncherProvider
> > E/ApplicationContext(  604): Couldn't rename file /data/data/
> > com.android.launcher/shared_prefs/launcher.xml to backup file /data/
> > data/com.android.launcher/shared_prefs/launcher.xml.bak
>
> >
>

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

2009-04-29 Thread Dianne Hackborn
You don't.  Use Context to create files and get the paths to your app's
directories.

On Wed, Apr 29, 2009 at 6:47 AM, prajapatmanoj wrote:

>
> Hi
>
> I am new to Android and creating my first application.
>
> I want to create a file in the current directory. Basically I have a
> file bundled with aplication package as raw resource. I want to make a
> copy of this file in the current file. The reason to create copy in
> current directory is that I want my file reading code in native java,
> portable code.
>
> To write a file in current directory I am doing following:
>
>String currentdir = System.getProperty("user.dir");
>String destination = currentdir + "test.txt";
>File fileCon = new File(destination);
>if( ! fileCon.exists() ){
>fileCon.createNewFile();
>}
>
> But on createNewFile statement it is throwing IOException with
> following message
>
> java.io.IOException: Parent directory of file is not writable:
> temp.txt
>
> So my query is how can I create a file on current directory? The
> location current directory is important here as I do not want to make
> use of device specific hardcoded path or any Android API while reading
> the file. This is so I want my file reading code portable.
>
> Thanks
>
> >
>


-- 
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] Missing avds

2009-04-29 Thread StevePotell

Anyone else hit this problem.  I created a couple of avds, tested,
then deleted them.  When I deleted the last one all my avd images
disappeared??

Before I had a 1, 2, and 3 that I could see by typing "android list
avds" on the command line but now they are gone.  I have tried
everything right down to reinstalling Eclipse and they are still gone.

What do I have to do to get them back.  These were auto generated by
something.

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: Is there a flag I can enable to permanently display the virtual keyboard in my app?

2009-04-29 Thread Dianne Hackborn
Call the method on InputMethodManager to show the soft keyboard.

On Wed, Apr 29, 2009 at 11:06 AM, blindfold wrote:

>
> > But it seems to only work with an Edit Text view, I understand it
> > makes little sense to do so but is there a way I can have it
> > permanently raised for say an image view?
>
> I too am looking for a very simple way to just pop up a soft keyboard
> for my graphical screen (being an ImageView), to next act as an
> equivalent of onKeyDown() single character control like I use with the
> physical keyboard. It looks like for a soft keyboard such a simple
> thing cannot be done in a couple of statements, judging from a quick
> glance at the softkeyboard SDK sample? I really don't like the
> prospect of writing hundreds of lines of code to accomplish something
> this basic.
>
> Regards
>
> On Mar 17, 12:08 am, me tun  wrote:
> > In the InputMethodManager class, there seems to be a method
> > showSoftInput(view) @param view: The currently focused view, which
> > would like to receive soft keyboard input.  I have tried calling this
> > as follows:
> >
> > InputMethodManager imm = (InputMethodManager)
> > getContext().getSystemService
> > (Context.INPUT_METHOD_SERVICE);
> > imm.showSoftInput(mTextEntry);
> >
> > But it seems to only work with an Edit Text view, I understand it
> > makes little sense to do so but is there a way I can have it
> > permanently raised for say an image view?
> >
> > On Mar 16, 11:03 am, me tun  wrote:
> >
> > > I want to permanently display the virtual keyboard in my application,
> > > but it seems bound by focus to an edit text field.  Is there a way
> > > around this?
> >
> > > Thanks!
> >
>


-- 
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: 1.5 SDK problem with WebView.getZoomControls()

2009-04-29 Thread Jason Parekh

On Wed, Apr 29, 2009 at 2:29 PM, Mariano Kamp  wrote:
> Jason, thanks, I just tried that and, as you say, it works too.
> Regarding performance you talk about the lack of HW acceleration for the old
> way or is it layout performance you talk about?

Not a problem.  I was referring to the lack of HW acceleration for the old way.

jason

>
> On Wed, Apr 29, 2009 at 7:16 PM, Jason Parekh  wrote:
>>
>> On Wed, Apr 29, 2009 at 2:47 AM, Mariano Kamp 
>> wrote:
>> > > >
>> > android:id="@+id/browse_zoom"
>> >
>> > android:layout_width="wrap_content"
>> >
>> > android:layout_height="wrap_content"
>> >
>> > android:layout_centerHorizontal="true"
>> >
>> > android:layout_below="@id/swipe_container" />
>>
>> I saw your subsequent post about using reflection to try to enable the
>> new zoom (thanks for posting that so others can re-use), but just in
>> case you want to fully go back to the old way (which I don't recommend
>> because of worse performance), try:
>>
>> >  android:id="@+id/browse_zoom"
>>  android:layout_width="fill_parent"
>>  android:layout_height="wrap_content"
>>  android:layout_centerHorizontal="true"
>>  android:layout_alignParentBottom="true" />
>>
>> jason
>>
>>
>
>
> >
>

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



[android-developers] list of array types that can be created in a resource file...

2009-04-29 Thread Richard Schilling

I see in the Android documentation that I can create various resources
(http://developer.android.com/guide/topics/resources/available-
resources.html), but the  resource isn't covered.  Sure,
it's in examples 

But, what I'm looking for is a list of XML tags that tell me what
kinds of other arrays I can create.  The Android docs are comming up
short in this area.

Or have I just overlooked something?

Can someone point me in the right direction?

Thanks.

Richard

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

2009-04-29 Thread Romain Guy

CheckedTextView has always been abstract. You cannot and could not
instantiate it from code but you can use it from XML yes. This has not
changed from 1.1 to 1.5.

On Wed, Apr 29, 2009 at 11:10 AM, nEx.Software
 wrote:
>
> I was able to include it in my XML Layout file in 1.1. So to continue
> using it, I'll have to extend it? And reimplement the functions that
> were already provided to me in the last SDK? It is incredibly
> frustrating when, per instructions from the Android engineers, I
> followed what was in the SDK and now it no longer works. Thanks for
> the info, guess I'll Just extend it and go from there.
>
> On Apr 29, 10:57 am, Romain Guy  wrote:
>> CheckedTextView is an abstract class, just as it was in Android 1.1.
>> This means you cannot instantiate it directly.
>>
>> On Wed, Apr 29, 2009 at 10:52 AM, nEx.Software
>>
>>
>>
>>  wrote:
>>
>> > So I tried to test CheckedTextView in a new project based on 1.5 and
>> > it doesn't even show as an option. tried to create in code via
>> > CheckedTextView CTV = new CheckedTextView(this); but it cannot be
>> > instantiated, so how do we use CheckedTextView in the new SDK? What
>> > gives?
>>
>> > On Apr 28, 7:15 pm, "nEx.Software"  wrote:
>> >> Seems 1.5 has changed CheckedTextView where the android:checkmark xml
>> >> no longer works? Also, the documentation appears to say indicate the
>> >> checkmarkdrawable only is drawn when checked but does this mean there
>> >> is no uncheckeddrawable?I'm not able to check in my project at the
>> >> moment but it certainly seems this is the case. My UI broke, I know
>> >> that much. Any thoughts?
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
> >
>



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

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

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



[android-developers] Re: Eclipse + cupcake + other android projects in build path = VerifyError

2009-04-29 Thread Guillaume Perrot
The JDK is clearly not the problem here, I don't know what he's talking
about as there are several causes that can trigger a VerifyError but in this
discussion we deal with the latest ADT Eclipse plugin release.
The problem here is that the ADT plugin tries to upload the referenced
android projects in build path as separate APKs instead of mixing the code
like in previous SDK releases.
Even if several APKs are uploaded, there is no link between them on the
device and so the VerifyError occurs when launching the main one.
The only solution proposed so far is to use J2SE projects instead, using the
android.jar in their build path (see one of my previous mail on the
subject).

PS: Eclipse does not require a JDK, just a JRE, it has its own Java
compiler, which compliancy level can be set based on what JRE you use.

2009/4/29 Handtwerk 

>
> > We've had the same problem with ProSyst mBS running on cupcake. After
> > some checks we found that it depends what JDK you use for building your
> > jar files before DEXing them. In general here is the info:
> >
> > We've checked with the following JDK versions: jdk1.5.0_06, jdk1.5.0_10,
> > jdk1.5.0_12, jdk1.5.0_15, jdk1.6.0_06, jdk1.6.0_10. Only with
> > jdk1.5.0_06, jdk1.5.0_10 and jdk1.5.0_12 there was no verify errors.
>
> Can anybody confirm this? I'm developing on a Mac, facing the same
> VerifyError issue. And updates 06, 10 and 12 for JDK 1.5.0 are not
> available for OSX, so this would mean trouble for Android development
> on OSX in general.
>
> Cheers,
> Arne
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: simple demo multiple alarms

2009-04-29 Thread guruk

thanks...
finaly the calendar add.. do the same.

but that does not answer my question, how to initiate MULTIPLE
Alarms.. and especialy
how o read them in me broadcast receiver and how to know what alarm
comes initiated.

thanks
chris


On Apr 26, 11:22 pm, Ashok Jeevan  wrote:
> Hi,Try using
>
> am.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+(delay * 1000)
> , sender);
>
> This will set the alarms according to the delay that you specify.
>
>
>
> On Sun, Apr 26, 2009 at 3:42 PM, guruk  wrote:
>
> > Hi, i like to create multiple alarms, but i does not work. how to set
> > and how to request in my receiver what alarm intent came activated
>
> > in my alarm.java i call this function like: setalarm(5); setalarm(10)
> > (it works but only remember the last)
>
> >  public void setalarm(int delay)
> >    {
> >         Intent intent = new Intent(alarm.this, alarmreceiver.class);
> >         PendingIntent sender = PendingIntent.getBroadcast(alarm.this,
> > 0, intent, 0);
> >         intent.setData((Uri.parse("custom://"+delay)));  << i heared
> > about this would make individual alarms.. but does not work
>
> >         Calendar calendar = Calendar.getInstance();
> >         calendar.setTimeInMillis(System.currentTimeMillis());
> >         calendar.add(Calendar.SECOND, delay);
>
> >         intent.putExtra("avr", ""+delay);   //i tried to set my data
> > here to read later, but also does not work
>
> >         AlarmManager am = (AlarmManager)getSystemService
> > (ALARM_SERVICE);
> >         am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
> > sender);
>
> >         //Toast.makeText(this, "Alarm set", Toast.LENGTH_LONG).show
> > ();
>
> >    }
>
> >  my alarmreceiver.java
>
> > public class alarmreceiver extends BroadcastReceiver
> > {
> >        NotificationManager mNM;
> >       �...@override
> >  public void onReceive(Context context, Intent intent)
> >  {
> >                Uri ursistr = intent.getData();
> >                String intentstr = intent.getStringExtra("avr");  //does not
> > get the
> > saved intentextra?!
>
> >        Toast.makeText(context, "GOT IT :"+intentstr+" "+ursistr,
> > Toast.LENGTH_SHORT).show();
>
> >  }
>
> > greets
> > 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] Re: 1.5 SDK problem with WebView.getZoomControls()

2009-04-29 Thread Mariano Kamp
Jason, thanks, I just tried that and, as you say, it works too.
Regarding performance you talk about the lack of HW acceleration for the old
way or is it layout performance you talk about?

On Wed, Apr 29, 2009 at 7:16 PM, Jason Parekh  wrote:

>
> On Wed, Apr 29, 2009 at 2:47 AM, Mariano Kamp 
> wrote:
> >  >
> > android:id="@+id/browse_zoom"
> >
> > android:layout_width="wrap_content"
> >
> > android:layout_height="wrap_content"
> >
> > android:layout_centerHorizontal="true"
> >
> > android:layout_below="@id/swipe_container" />
>
> I saw your subsequent post about using reflection to try to enable the
> new zoom (thanks for posting that so others can re-use), but just in
> case you want to fully go back to the old way (which I don't recommend
> because of worse performance), try:
>
>   android:id="@+id/browse_zoom"
>   android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>  android:layout_centerHorizontal="true"
>   android:layout_alignParentBottom="true" />
>
> jason
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: upgraded to 1.5 and apps wont run

2009-04-29 Thread Xavier Ducrohet

OK, we have identified a problem where files with no extension in this
folder make the build system break.
Even if you don't have files in there, the presence of a .svn folder
in there can cause the issues.

If you use that folder to store jar libraries. I would just move those
jar files to a different folder (the issue is only with the folder
named "libs" and the jar files can be anywhere as long as they are
added to the project build path).

We have fixed the problem and are looking at possibly releasing an
update to ADT soon.

Xav

On Wed, Apr 29, 2009 at 7:33 AM, Josh Dobbs  wrote:
> Yes I do have a libs folder in the project.
>
> On Tue, Apr 28, 2009 at 10:45 PM, Xavier Ducrohet  wrote:
>>
>> Do you have a libs folder in your project?
>>
>> Xav
>>
>> On Tue, Apr 28, 2009 at 9:07 PM, Josh  wrote:
>> >
>> > I upgraded to version 1.5 of the sdk and now when i try to run or
>> > debugg apps i get the following error:
>> >
>> >
>> > [2009-04-28 21:02:58 - Targets] --
>> > [2009-04-28 21:02:58 - Targets] Android Launch!
>> > [2009-04-28 21:02:58 - Targets] adb is running normally.
>> > [2009-04-28 21:02:58 - Targets] Could not find Targets.apk!
>> >
>> >
>> > Im running eclipse 3.4 and i followed the directions listed here
>> > http://developer.android.com/sdk/1.5_r1/upgrading.html
>> >
>> > any suggestions?
>> > >
>> >
>>
>>
>>
>> --
>> Xavier Ducrohet
>> Android Developer Tools Engineer
>> Google Inc.
>>
>>
>> >>
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-29 Thread Xavier Ducrohet

Indeed. Now that the whole developer site has been updated for 1.5,
the documentation for AVD is at
http://developer.android.com/guide/developing/tools/avd.html

Xav

On Wed, Apr 29, 2009 at 12:34 AM, SHD  wrote:
>
> That link is already obsolete.
>
> On Apr 14, 2:21 pm, Xavier Ducrohet  wrote:
>> Information about creating and using AVD is available 
>> athttp://developer.android.com/sdk/preview/#avd
>>
>> Xav
>>
>
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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

2009-04-29 Thread nEx.Software

I was able to include it in my XML Layout file in 1.1. So to continue
using it, I'll have to extend it? And reimplement the functions that
were already provided to me in the last SDK? It is incredibly
frustrating when, per instructions from the Android engineers, I
followed what was in the SDK and now it no longer works. Thanks for
the info, guess I'll Just extend it and go from there.

On Apr 29, 10:57 am, Romain Guy  wrote:
> CheckedTextView is an abstract class, just as it was in Android 1.1.
> This means you cannot instantiate it directly.
>
> On Wed, Apr 29, 2009 at 10:52 AM, nEx.Software
>
>
>
>  wrote:
>
> > So I tried to test CheckedTextView in a new project based on 1.5 and
> > it doesn't even show as an option. tried to create in code via
> > CheckedTextView CTV = new CheckedTextView(this); but it cannot be
> > instantiated, so how do we use CheckedTextView in the new SDK? What
> > gives?
>
> > On Apr 28, 7:15 pm, "nEx.Software"  wrote:
> >> Seems 1.5 has changed CheckedTextView where the android:checkmark xml
> >> no longer works? Also, the documentation appears to say indicate the
> >> checkmarkdrawable only is drawn when checked but does this mean there
> >> is no uncheckeddrawable?I'm not able to check in my project at the
> >> moment but it certainly seems this is the case. My UI broke, I know
> >> that much. Any thoughts?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there a flag I can enable to permanently display the virtual keyboard in my app?

2009-04-29 Thread blindfold

> But it seems to only work with an Edit Text view, I understand it
> makes little sense to do so but is there a way I can have it
> permanently raised for say an image view?

I too am looking for a very simple way to just pop up a soft keyboard
for my graphical screen (being an ImageView), to next act as an
equivalent of onKeyDown() single character control like I use with the
physical keyboard. It looks like for a soft keyboard such a simple
thing cannot be done in a couple of statements, judging from a quick
glance at the softkeyboard SDK sample? I really don't like the
prospect of writing hundreds of lines of code to accomplish something
this basic.

Regards

On Mar 17, 12:08 am, me tun  wrote:
> In the InputMethodManager class, there seems to be a method
> showSoftInput(view) @param view: The currently focused view, which
> would like to receive soft keyboard input.  I have tried calling this
> as follows:
>
>         InputMethodManager imm = (InputMethodManager)
>                 getContext().getSystemService
> (Context.INPUT_METHOD_SERVICE);
>         imm.showSoftInput(mTextEntry);
>
> But it seems to only work with an Edit Text view, I understand it
> makes little sense to do so but is there a way I can have it
> permanently raised for say an image view?
>
> On Mar 16, 11:03 am, me tun  wrote:
>
> > I want to permanently display the virtual keyboard in my application,
> > but it seems bound by focus to an edit text field.  Is there a way
> > around this?
>
> > 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] Run a Servlet web application on android i-jetty server.

2009-04-29 Thread anabillo

I've been trying to deploy a war to run a servlet web app on i-jetty
server.
The war worked fine on Tomcat server, but didn't on i-jetty.
I also tried to build a war from the hello sample code, and didn't
work although the ready built war worked fine.
How can I build and run a war to make it work inside android in i-
jetty server? What do I need to do? How can I compile the code?

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



[android-developers] How to set selection of editText by using SendKeyEvent function of InputConnection class

2009-04-29 Thread DrBrain

I need to set selection of an editText box via InputConnection. I used
the SendKeyEvent function with the KEYCODE_DPAD_LEFT and META_SHIFT_ON
state but I've had no luck. My code is as below:

...
// I've already received hardware key event of DPAD left key as event
parameter in this function.

// Change the meta state of event parameter to META_SHIFT_ON
event = new KeyEvent(event.getDownTime(), event.getEventTime(),
event.getAction(), event.getKeyCode(), 
event.getRepeatCount(),
KeyEvent.FLAG_SOFT_KEYBOARD|KeyEvent.FLAG_KEEP_TOUCH_MODE|
KeyEvent.META_SHIFT_LEFT_ON|KeyEvent.META_SHIFT_ON,
event.getDeviceId(), event.getScanCode());
InputConnection ic = getCurrentInputConnection();
ic.sendKeyEvent(event);

After excuting the code, there still no selection in the EditText.

Could somebody help me to resolve this ?

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: ScaleAnimation problem

2009-04-29 Thread vincebodi

I had the same problem and now it is fixed with this line.
scale = new ScaleAnimation(1, 2, 1, 2,
ScaleAnimation.RELATIVE_TO_SELF, 0.5f,
ScaleAnimation.RELATIVE_TO_SELF, 0.5f);

On 14 avr, 21:48, "ellipsoidmob...@googlemail.com"
 wrote:
> Hi
>
> I have an application which is based on the AnimateDrawables sample,
> but which usesScaleAnimationrather than TranslateAnimation
>
> TheproblemI have is that my image scales in the way I expect - but
> it also moves! For example, if my image starts half way down the
> screen on the left and I use an animation such as:
>
> an =ScaleAnimation(1,2,1,2);
>
> then the image doubles in size during the animation, but it also moves
> to the right and down to near the bottom of the screen.
>
> I've tried playing with the pivot values (setting them to 0, or to the
> middle of the image, or to half of the image width and height) but I
> get the same result.
>
> Any ideas???

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



[android-developers] Desktop API of Gears API does not work on Android browser for 1.5

2009-04-29 Thread versae

Since Android 1.5 (API Level 3), if I use the Desktop API of Gears API
in the Android browser, the Javascript flow breaks.

http://code.google.com/intl/es/
apis/gears/gears_init.js">

alert("This alert works fine");

var desktop = google.gears.factory.create('beta.desktop');

alert("This alert is never shown");


No problems with any other API such as Geolocation API or Database
API.

Really I don't know if this issue belongs to Android or Google Gears,
but in previously versions of Android Desktop API worked fine.

Regards.

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



[android-developers] Re: Android 1.5 SDK now available

2009-04-29 Thread SHD

Congrts!

Shuhrat

P.S. Your blog is still linking to SDK 1.1_r1.


On Apr 28, 3:12 am, Xavier Ducrohet  wrote:
> Hello developers,
>
> The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
> download.
>
> More information 
> athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html
>
> Xav
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 create a file in current directory?

2009-04-29 Thread prajapatmanoj

Hi

I am new to Android and creating my first application.

I want to create a file in the current directory. Basically I have a
file bundled with aplication package as raw resource. I want to make a
copy of this file in the current

file. The reason to create copy in current directory is that I want my
file reading code in native java, portable code.

To write a file in current directory I am doing following:

String currentdir = System.getProperty("user.dir");
String destination = currentdir + "test.txt";
File fileCon = new File(destination);
if( ! fileCon.exists() ){
fileCon.createNewFile();
}

But on createNewFile statement it is throwing IOException with
following message

java.io.IOException: Parent directory of file is not writable:
temp.txt

So my query is how can I create a file on current directory? The
location current directory is important here as I do not want to make
use of device specific hardcoded path or any Android API while reading
the file. This is so I want my file reading code portable.

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: AudioRecord can't get any notification when record/marker position updated

2009-04-29 Thread Thomson

Hello Steven_T ,
  Can you tell me how you able to fix this issue?.
I am also not getting  "onMarkerReached" callback.
Is there any limitation for "setNotificationMarkerPosition".












On Apr 28, 6:34 pm, Steven_T  wrote:
> thanks it works
>
> On Apr 28, 5:38 am, Dave Sparks  wrote:
>
> > OK, so it sounds like audio is being produced by the kernel driver.
>
> > I just looked at your code, and I think you need to call read() once
> > to pass in your first input buffer.
>
> > On Apr 24, 6:04 pm, Steven_T  wrote:
>
> > > hi Dave Sparks:
> > > thank you for reply!
>
> > > I didn't disable audio input in avd
> > > what you means is use option "-audio " to set an audio input
>
> > > I had used the next code test audio input
> > > //
> > > 
> > > Intent intent = new Intent
> > > (MediaStore.Audio.Media.RECORD_SOUND_ACTION);
> > > startActivityForResult(intent, ACTIVITY_RECORD_SOUND);
> > > /
> > > =
> > > it can recording and saved audio as a file named "recording47845.3gpp"
> > > in sdcard
>
> > > the next is logcat out put:
> > > ===
> > >  
> > > tag: AudioHardware
> > > Message: AudioStreamInGeneric::read(0x40715b40, 320) from fd 7
>
> > > tag:AudioFlinger
> > > Message: AudioRecordThread: buffer overflow
>
> > > tag: InputMangerServic
> > > Message: Starting input on non-focused client
> > > com.android.internal.view.iinputmethodclient$stub$pr...@4360c470
> > > (uid=100118 pid=764)
> > > ===
> > >  =
>
> > > Please help me, thanks!
>
> > > On Apr 25, 4:44 am, Dave Sparks  wrote:
>
> > > > Did you enable audio input in the emulator?
>
> > > > On Apr 23, 6:48 pm, Steven_T  wrote:
>
> > > > > hi Dave Sparks:
> > > > >    I have changed 50 frames to 400 frmaes, it doesn't work.
> > > > >    then I set bufferSizeInBytes to 100 to init AudioRecord object,
> > > > > and set update period to 400,
> > > > >    it dosn't work too. I had used logcat to watch emulator'log, didn't
> > > > > find this program pid throwed error,
> > > > >    Can you give me sample?
> > > > >    thanks
>
> > > > > On Apr 24, 1:10 am, Dave Sparks  wrote:
>
> > > > > > I suspect the problem is the interval you chose: 50 frames @ 8KHz is
> > > > > > 6.25 msecs. Your app is not going to be able to handle a callback
> > > > > > every 6.25 msecs. Try something more reasonable like 50 msecs (400
> > > > > > frames) and see if that works.
>
> > > > > > On Apr 23, 1:56 am, Steven_T  wrote:
>
> > > > > > > hello everyone,
> > > > > > > I would like to use the new AudioRecord class to record in PCM 
> > > > > > > format.
> > > > > > > Create class and setRecordPositionUpdateListener to it, then start
> > > > > > > recording, I can't get any notification from system forever,why?(I
> > > > > > > didn't get any error when running)
>
> > > > > > > please help me, thanks.
>
> > > > > > > the next is my code.
>
> > > > > > > public class Recorder {
> > > > > > >         private static final int AUDIO_SAMPLE_FREQ = 8000;
> > > > > > >         private static final int AUDIO_BUFFER_SIZE = 20;
>
> > > > > > >         private AudioRecord recorder;
>
> > > > > > >         public Recorder()
> > > > > > >         {
> > > > > > >                 try
> > > > > > >                 {
> > > > > > >                         // init recorder
> > > > > > >                         recorder = new 
> > > > > > > AudioRecord(MediaRecorder.AudioSource.MIC,
> > > > > > >                                         AUDIO_SAMPLE_FREQ,
> > > > > > >                                         
> > > > > > > AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > > > > > >                                         
> > > > > > > AudioFormat.ENCODING_PCM_16BIT,
> > > > > > >                                         AUDIO_BUFFER_SIZE);
> > > > > > >                 }
> > > > > > >                 catch (IllegalArgumentException e)
> > > > > > >                 {
> > > > > > >                        e.printStackTrace();
> > > > > > >                 }
>
> > > > > > >                 
> > > > > > > recorder.setRecordPositionUpdateListener(mNotification);
> > > > > > >                 recorder.setPositionNotificationPeriod(50);
> > > > > > >                 
> > > > > > > recorder.setNotificationMarkerPosition(AUDIO_SAMPLE_FREQ);
> > > > > > >         }
>
> > > > > > >         public OnRecordPositionUpdateListener mNotification = new
> > > > > > >                 OnRecordPositionUpdateListener(){
> > > > > > >                 public void onMarkerReached(AudioRecord arg0) {
> > > > > > >                         // read PCM buffer here
> > > > > > >                         byte[] audioBuffer = new 
> > > > > > > byte[AUDIO_SAMPLE_FREQ];
> > > > > > >                         arg0.read(audioBuffer

[android-developers] Re: Problem with giving the SDK path in eclipse for SDK 1.5 pre in windows

2009-04-29 Thread SHD

That link is already obsolete.

On Apr 14, 2:21 pm, Xavier Ducrohet  wrote:
> Information about creating and using AVD is available 
> athttp://developer.android.com/sdk/preview/#avd
>
> Xav
>

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



[android-developers] Can not read apk file on android emulator - SDK 1.1

2009-04-29 Thread danielececil...@gmail.com

Hi,

It seems my code cannot read an apk File I have created on the Android
emulator.

- First off, I created an sdcard with command 'mksdcard ...'
- then I run this code:

- Begin Cut Here --->

File tmpdir = new File(tmpdirpath+name);

if (!tmpdir.exists())
 {
  boolean b = tmpdir.mkdirs();
 }
else
 {
  if (!tmpdir.isDirectory())
  {
   throw new RuntimeException("here : the tmp dir conflicts");
  }
 }
File apk = new File(tmpdirpath + name + "/" + name + ".apk");
if (!apk.exists())
 {
  apk.createNewFile();
 }
// with name = name of my apk file.

- End Cut Here --->

- The apk file is successfully created on a temporary directory on /
sdcard,
but I have no permissions to read it:

- - - - r w - r w -

- I tryed to change them:
# adb shell
# chmod 777 myFile.apk

No error but permissions remain the same

- - - - r w - r w -

and I get the following exception:
04-28 14:56:16.296: ERROR/dalvikvm(231): Can't open dex cache '/data/
dalvik-cache/

sdc...@.tmpdir@org.python.pycode._p...@org.python.pycode._pyx0.apk@classes.dex':
No such file or directory
04-28 14:56:16.296: INFO/dalvikvm(231): Unable to open or create
cache
for /sdcard/.tmpdir/org.python.pycode._pyx0/
org.python.pycode._pyx0.apk
04-28 14:56:16.306: WARN/System.err(231): java.io.IOException: unable
to open DEX file
04-28 14:56:16.326: WARN/System.err(231): at
dalvik.system.DexFile.openDexFile(Native Method)
04-28 14:56:16.336: WARN/System.err(231): at
dalvik.system.DexFile.(DexFile.java:55)
04-28 14:56:16.346: WARN/System.err(231): at
dalvik.system.DexFile.(DexFile.java:41)
04-28 14:56:16.355: WARN/System.err(231): at
org.python.debug.FixMe.getClassByName(FixMe.java:93)


Can somebody help please?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Issue in booting with new Android 1.5 (API level 3)

2009-04-29 Thread BigBear

I also have this problem when porting cupcake to VersatilePB.
The reason may be that no battery and power soruce can be detected by
system.
(battery level =0 and unknown charging status)
So ShutdownThread is invoked by KeyguardUpdateMonitor to power off the
system.

Please comment line 300 of "frameworks/policies/base/phone/com/android/
internal/policy/impl/KeyguardUpdateMonitor"
and make again to get the new rootfs.
Then the battery check can be avoided when booting.

On 4月25日, 下午5時37分, John  wrote:
> Hello friends,
>  I downloded the latest Android opensource 1.5 (API
> level 3) dated 24-April-2009  from GIT and compiled for to boot with
> the omap 2430 board.But after the Android logo am getting system
> halted message in the minicom and in target lcd it displays as the
> battery is getting low less than 15% remaining and then the power off
> msg comes and the system hangs there.
>
> Any help would be highly appreciated.
>
> logcat message for system halting
>
> D/ActivityManager(  565): Start running!
> I/Zygote  (  565): Process: zygote socket opened
> I/ActivityManager(  565): Start proc com.android.phone for added
> application com.android.phone: pid=602 uid=1001 gids={3002, 3001,
> 3003}
> I/ActivityManager(  565): Start proc android.process.acore for
> activity com.android.launcher/.Launcher: pid=604 uid=1 gids={3003}
> D/ShutdownThread(  565): Notifying thread to start radio shutdown
> W/ResourceType(  565): No package identifier when getting value for
> resource number 0x
> W/StatusBar(  565): Icon not found in : 0
> D/ShutdownThread(  565): Radio aSystem halted.
> nd Bluetooth shutdown complete.
> D/ShutdownThread(  565): Shutting down power.
> I/ActivityThread(  604): Publishing provider user_dictionary:
> com.android.providers.userdictionary.UserDictionaryProvider
> D/StatusBar(  565): updateResources
> I/ActivityThread(  604): Publishing provider
> com.android.googlesearch.SuggestionProvider:
> com.android.googlesearch.SuggestionProvider
> I/ActivityThread(  602): Publishing provider mms-sms:
> com.android.providers.telephony.MmsSmsProvider
> I/ActivityThread(  604): Publishing provider contacts;call_log:
> com.android.providers.contacts.ContactsProvider
> I/ActivityThread(  602): Publishing provider mms:
> com.android.providers.telephony.MmsProvider
> I/ActivityThread(  602): Publishing provider telephony:
> com.android.providers.telephony.TelephonyProvider
> I/ActivityThread(  602): Publishing provider sms:
> com.android.providers.telephony.SmsProvider
> I/ActivityThread(  602): Publishing provider sim:
> com.android.phone.SimProvider
> W/ActivityManager(  565): Unable to start service Intent
> { action=android.accounts.IAccountsService comp=
> {com.google.android.googleapps/
> com.google.android.googleapps.GoogleLoginService} }: not found
> W/AccountMonitor(  604): Couldn't connect to Intent
> { action=android.accounts.IAccountsService comp=
> {com.google.android.googleapps/
> com.google.android.googleapps.GoogleLoginService} } (Missing service?)
> I/ActivityThread(  604): Publishing provider
> com.android.launcher.settings: com.android.launcher.LauncherProvider
> E/ApplicationContext(  604): Couldn't rename file /data/data/
> com.android.launcher/shared_prefs/launcher.xml to backup file /data/
> data/com.android.launcher/shared_prefs/launcher.xml.bak

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 setup Access Point parameters programmatically

2009-04-29 Thread luc276

Hi all
First I'm using the Android SDK 1.5 with ADT 0.9 and I'm investigating
with the emulator.
I'm wondering how to setup the Andoid Access Point parameters (like
APN, username, password..) programmatically.
I saw a WRITE_APN_SETTINGS permission in the SDK help but didn't find
any way to use it.
I guess the settings are stored into /data/data/
com.android.providers.telephony/databases/telephony.db and  into /data/
data/com.android.providers.telephony/shared_prefs/preferred-apn.xml
but I cannot access them programmaticaly.
Indeed, when I call
SQLiteDatabase myDB = SQLiteDatabase.openDatabase("/data/data/
com.android.providers.telephony/databases/telephony.db", null,
SQLiteDatabase.OPEN_READONLY);
an SQLiteException is thrown (830058649800) "unable to open database
file".
I tried to define in the manifest several permissions like
CHANGE_CONFIGURATION, WRITE_SETTINGS but without more success. Just
noticed that I can access the two files with with "adb shell sqlite3"
or DDMS and pull them from the emulator to the PC.
I'm working on the topic since a week and I'm really in hurry right
now so your helps will be greatly appreciated.
Thanks in advance
Regards
luc

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



[android-developers] SDK-1.5 Emulator does not find skin

2009-04-29 Thread Wilfried Kopp
Hello,

Screens beeing always too small :) I am trying to use a skin without any
keyboard.
I got it here :
http://sacoskun.blogspot.com/2008/09/android-emulator-skin-without-keyboard.html

I am copying the BILGICIFTLIGI-LAYOUT-P folder inside
D:\android\tools\lib\images\skins (please note my system is on D:\...)

When running the emulator, I get such message :
[2009-04-29 13:30:30 - Emulator] emulator: ERROR: could not find directory
for skin 'BILGICIFTLIGI-LAYOUT-P', please use a different name

I tried using the -skindir option and provided the full path :
-skindir "d:\Android\Tools\lib\images\skins" -skin "BILGICIFTLIGI-LAYOUT-P"
...with no success.

If I use -skin HVGA, then it works

I have tried on 2 different machines and I get the same result.
I also tried renaming BILGICIFTLIGI-LAYOUT-P into NOKBD (short name) with no
more success.
I have btw first tried -skin BILGICIFTLIGI-LAYOUT-P (no ") with no success.

Anyone would have a hint ?

Regards,
Will

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Issue in booting with new Android 1.5 (API level 3)

2009-04-29 Thread BigBear

I also have this problem when porting cupcake to VersatilePB.
The reason is that no battery and power source can be detected by
system.
(battery level = 0 and charging state is unknown)
So ShutdownThread is invoked by KeyguardUpdateMonitor to power off the
system.

Please comment line 300 of frameworks/policies/base/phone/com/android/
internal/policy/impl/KeyguardUpdateMonitor.java
and make again to get the new rootfs.
Then you can avoid the battery check.


On 4月25日, 下午5時37分, John  wrote:
> Hello friends,
>  I downloded the latestAndroidopensource1.5(API
> level 3) dated 24-April-2009  from GIT and compiled for to boot with
> the omap 2430 board.But after theAndroidlogo am getting system
> halted message in the minicom and in target lcd it displays as the
> battery is getting low less than 15% remaining and then the power off
> msg comes and the system hangs there.
>
> Any help would be highly appreciated.
>
> logcat message for system halting
>
> D/ActivityManager(  565): Start running!
> I/Zygote  (  565): Process: zygote socket opened
> I/ActivityManager(  565): Start proc com.android.phone for added
> application com.android.phone: pid=602 uid=1001 gids={3002, 3001,
> 3003}
> I/ActivityManager(  565): Start procandroid.process.acore for
> activity com.android.launcher/.Launcher: pid=604 uid=1 gids={3003}
> D/ShutdownThread(  565): Notifying thread to start radio shutdown
> W/ResourceType(  565): No package identifier when getting value for
> resource number 0x
> W/StatusBar(  565): Icon not found in : 0
> D/ShutdownThread(  565): Radio aSystem halted.
> nd Bluetooth shutdown complete.
> D/ShutdownThread(  565): Shutting down power.
> I/ActivityThread(  604): Publishing provider user_dictionary:
> com.android.providers.userdictionary.UserDictionaryProvider
> D/StatusBar(  565): updateResources
> I/ActivityThread(  604): Publishing provider
> com.android.googlesearch.SuggestionProvider:
> com.android.googlesearch.SuggestionProvider
> I/ActivityThread(  602): Publishing provider mms-sms:
> com.android.providers.telephony.MmsSmsProvider
> I/ActivityThread(  604): Publishing provider contacts;call_log:
> com.android.providers.contacts.ContactsProvider
> I/ActivityThread(  602): Publishing provider mms:
> com.android.providers.telephony.MmsProvider
> I/ActivityThread(  602): Publishing provider telephony:
> com.android.providers.telephony.TelephonyProvider
> I/ActivityThread(  602): Publishing provider sms:
> com.android.providers.telephony.SmsProvider
> I/ActivityThread(  602): Publishing provider sim:
> com.android.phone.SimProvider
> W/ActivityManager(  565): Unable to start service Intent
> { action=android.accounts.IAccountsService comp=
> {com.google.android.googleapps/
> com.google.android.googleapps.GoogleLoginService} }: not found
> W/AccountMonitor(  604): Couldn't connect to Intent
> { action=android.accounts.IAccountsService comp=
> {com.google.android.googleapps/
> com.google.android.googleapps.GoogleLoginService} } (Missing service?)
> I/ActivityThread(  604): Publishing provider
> com.android.launcher.settings: com.android.launcher.LauncherProvider
> E/ApplicationContext(  604): Couldn't rename file /data/data/
> com.android.launcher/shared_prefs/launcher.xml to backup file /data/
> data/com.android.launcher/shared_prefs/launcher.xml.bak

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



[android-developers] Emulator does not find new skins (1.5)

2009-04-29 Thread chevdor

Hello,

Screens beeing always too small :) I am trying to use a skin without
any keyboard.
I got it here : 
http://sacoskun.blogspot.com/2008/09/android-emulator-skin-without-keyboard.html

I am copying the BILGICIFTLIGI-LAYOUT-P folder inside D:\android\tools
\lib\images\skins (please note my system is on D:\...)

When running the emulator, I get such message :
[2009-04-29 13:30:30 - Emulator] emulator: ERROR: could not find
directory for skin 'BILGICIFTLIGI-LAYOUT-P', please use a different
name

I tried using the -skindir option and provided the full path :
-skindir "d:\Android\Tools\lib\images\skins" -skin "BILGICIFTLIGI-
LAYOUT-P"
...with no success.

If I use -skin HVGA, then it works

I have tried on 2 different machines and I get the same result.
I also tried renaming BILGICIFTLIGI-LAYOUT-P into NOKBD (short name)
with no more success.
I have btw first tried -skin BILGICIFTLIGI-LAYOUT-P (no ") with no
success.

Anyone would have a hint ?

Regards,
Will


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 create a file in current directory?

2009-04-29 Thread prajapatmanoj

Hi

I am new to Android and creating my first application.

I want to create a file in the current directory. Basically I have a
file bundled with aplication package as raw resource. I want to make a
copy of this file in the current file. The reason to create copy in
current directory is that I want my file reading code in native java,
portable code.

To write a file in current directory I am doing following:

String currentdir = System.getProperty("user.dir");
String destination = currentdir + "test.txt";
File fileCon = new File(destination);
if( ! fileCon.exists() ){
fileCon.createNewFile();
}

But on createNewFile statement it is throwing IOException with
following message

java.io.IOException: Parent directory of file is not writable:
temp.txt

So my query is how can I create a file on current directory? The
location current directory is important here as I do not want to make
use of device specific hardcoded path or any Android API while reading
the file. This is so I want my file reading code portable.

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: HelloWorld problems

2009-04-29 Thread peter.kullm...@googlemail.com

Hi,

> the 'Failed to find an AVD compatible with target 'Android 1.5'.
> Launch aborted.' error.

Probably, because there isn't one.

> I have created the AVD with 'android create avd --target 1 --name
> myavd' command as instructed.
>
> After running the 'android list avd' command I noticed that an AVD
> with Android 1.1 is the only one available.

Well, yes, the one you created. If you want to see the available
*targets*, use

android list targets

But you still have to create an avd for that target to have one
available.

>I did create another
> project and used the Android 1.1 and everything seems to work. But the
> questions are: shall I change the AVD to 1.5? How? Why the default is
> 1.1?

You can either change the API level of your failing app to 1.1 in the
properties dialog of the project or use an appropriate avd which is
created by

android create avd --target 3 --name myavd-1.5

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] I formed preference using XML, but I don't know how can I open other view using XML tag intent...

2009-04-29 Thread Scent

Hi, all.

I formed preference view using XML codes..
in here, I wonder that how can I show other View at click this item
using  tag.

if not available, could you give me some advice about this...
I want to implement using XML tag




 


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



  1   2   3   >