[android-developers] MediaPlayer sound problem

2009-04-23 Thread BlackLight

Hello.

I have this task:
Need to play short (0.3-0.4 sec) sounds all the time. When sound is
played, it should start again, etc. User can press button to reset
sound - it should stop and lunch.

I did many tests. I tried to create 1 MediaPlayer, then do this:
MediaPlayer.OnCompletionListener complListener = new
MediaPlayer.OnCompletionListener()
{
public void onCompletion(MediaPlayer mp) {
lunchSound(); // "rewind"
}
};

private boolean lunchSound()
{
try
{
mplayer.seekTo(0); // move to start
mplayer.start();
return true;
}catch(Exception e){}
return false;
}
When user press button, I call lunchSound();

It works great on emulator and on device if I have eclipse+debugger
on.
When I disconnect debugger, I have very strange errors - sound can
stop at all (till program restart), sound can start "repeating" (play
0.1-0.2 sec, then restart). Can someone please provide me some info
about problem?
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: Audio streaming/progressive download over HTTP

2009-04-23 Thread tainy

what is more:

according to "media-formats.html" in the reference, MPEG4 SP is not
supported for both encoding and decoding,
so how can it support streaming?
quite confusing.

On 4月23日, 上午7时59分, Dave Sparks  wrote:
> Progressive streaming using HTTP is well-supported.
>
> RTSP support isn't great yet, but it will get better with the 1.5
> release (Cupcake), which fixes the 302 redirect problem. There may be
> some issues with RTSP and H.264 - we found some issues with the
> hardware codec late in the test cycle that we're too risky to fix. H.
> 263 and MPEG4-SP should work pretty well.
>
> The caveat with RTSP is that carriers may block the streams.
>
> On Apr 22, 2:04 am, tainy  wrote:
>
>
>
> > Hi Dave:
>
> > for audio streaming, only MPEG-4(AAC LC/LTP decoding) is supported,
> > right?
> > what about video streaming? I found no place saying that is not
> > supported, but someone said video streaming is not available by now.
> > and if it will be supported, what format will be ok for streaming?
> > thanks!
>
> > tainy
>
> > On 4月16日, 上午3时40分, Dave Sparks  wrote:
>
> > > AAC inside an MP4 file is fine. There is no support for raw AAC
> > > streams.
>
> > > On Apr 15, 5:53 am, patrick  wrote:
>
> > > > When you say "no support for AAC", does it mean "no AAC support for
> > > > pure audio stream"?
> > > > Can we use rtspstreamingwith a MPEG-4 video containing an AAC audio
> > > > channel?
>
> > > > On Apr 14, 11:56 pm, Dave Sparks  wrote:
>
> > > > > We don't have an API for progressive download yet. Technically, the
> > > > > website should say "progressivestreaming", but from a file authoring
> > > > > perspective there is no distinction between the two.
>
> > > > > RTSP support is only available for MPEG-4 file formats. There is no
> > > > > support for raw AMR, AAC, or MP3 streams.
>
> > > > > On Apr 14, 1:12 pm, Alexander  wrote:
>
> > > > > > Hi All,
>
> > > > > > I have a couple questions regarding audiostreaming/progressive
> > > > > > download over
> > > > > > HTTP. Could you please help me?
>
> > > > > > 1. MediaPlayer supports progressive download according to the
> > > > > > developer guide from
> > > > > > this linkhttp://developer.android.com/guide/topics/media/index.html
> > > > > > ("If you're
> > > > > > passing a URL to an online media file, the file must be capable of
> > > > > > progressive
> > > > > > download."). As far as I understand progressive download means media
> > > > > > playback during
> > > > > > download process with saving the media file to file system(SD card 
> > > > > > or
> > > > > > internal FS) after
> > > > > > the downloading is finished (if it's a file, not a stream in the
> > > > > > passed URL).
> > > > > > So, I tried to set the following URL: setDataSource
> > > > > > (http://84.204.154.49/mmapi/music.mp3). Playback is fine, but the 
> > > > > > file
> > > > > > isn't saved to
> > > > > > SD card or internal phone file system. Can MediaPlayer save media
> > > > > > content to the file system
> > > > > > after downloading is completed? Is there a way to turn on such
> > > > > > capability?
>
> > > > > > 2. Does MediaPlayer support HTTPstreaming? I tried to 
> > > > > > usehttp://217.10.32.134:8129/ultrafan128.mp3,http://62.32.66.180:8800,
> > > > > > also AMR-, AAC-
> > > > > > audio stream over HTTP on the local server, but playback does not
> > > > > > work. For example,
> > > > > > RTSPstreamingworks fine with AMR and AAC.
>
> > > > > > Thank you,
> > > > > >Alexander- 隐藏被引用文字 -
>
> > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 browse deeper into /data/data/package/app_/

2009-04-23 Thread brian.schimmel

Hi,

I think I found two answers to my own question:

1. The files and directories I wanted to see start with a dot (.)
which are hidden by default on linux. Using adb shell, I can use "ls -
a" to see them. Anyway, I can not see them in DDMS and I cannot find a
setting to change that. I think I will file a bug report for that.
2. I've managed to write a simple directory browser activity in 67
lines of code. Only this way I found out that the files started with a
dot. I anyone's interested, I can post that code, too.

On 17 Apr., 20:29, Dianne Hackborn  wrote:
> Unfortunately you can only do this if running as root or the uid of the app
> that owns the data.  On a production G1 you can not do this from adb.
>
> On Fri, Apr 17, 2009 at 10:18 AM, brian.schimmel <
>
>
>
> brian.schim...@googlemail.com> wrote:
>
> > I have to make some additions to what I said before:
>
> > 1. There are some typos in the folder names in my post. They are only
> > in that post and are definitely not the cause of my problems.
>
> > 2. Though there is a small chance that my folder /data/data/package/
> > app_mycustomname/mysubdirectory was indeed empty, but I cannot look
> > into any of the application folders. I think this is a permission
> > related problem, but I thought the usage of MODE_WORLD_WRITEABLE would
> > solve this. I have no good understanding of what linux permissions
> > mean, but drwxrwxrwx seems to me as if every user has every possible
> > permission on that dir. Because I cannot see the files and
> > subdirectories there in, I cannot tell if they are present and if they
> > have the right permissions.
>
> > If there is really a permission problem, I think I could get arround
> > it if I rooted my phone. Do you think this would help? All the how-
> > to's that I found so far were written for consumer devices, do they
> > work an a ADP1 too?
>
> > On Apr 17, 3:33 pm, "brian.schim...@googlemail.com"
> >  wrote:
> > > Hi,
>
> > > my app is creating a directory by using
>
> > > File thisDir = getDir("mycustomname", Context.MODE_WORLD_WRITEABLE);
>
> > > It is stored at
> > > /data/data/package/app_mycustomname/
>
> > > I can browse that directory with DDMS or with 'adb shell', of course,
> > > it is empty. My App then creates some subdirectories there, and those
> > > have subdirectories too, and so on, and creates files in several of
> > > those. My app can read all those dirs and files, too.
>
> > > Sometimes I have to take a look at this directory tree, but I cannot
> > > browse deep into that tree, neither using DDMS (both inside Eclipse
> > > and standalone) nor using the shell. I can see that there is a
> > > directory called /data/data/package/app_mycustomname/mysubdirectory
> > > and I can even 'cd' into this directory. But when I do a 'ls' there,
> > > the directory is reported to be empty, though I'm sure there must be
> > > something inside.
>
> > > app_mycoustomname has the permissions drwxrwx-wx
> > > app_mycoustomname/mysubdirectory has the permissions drwxrwxrwx
>
> > > I have the same issue on the emulator and on the ADP1, both running a
> > > 1.1 firmware.
>
> --
> 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] Is it possible to have a view that is transformed by a matrix?

2009-04-23 Thread dm1973

I would like to draw some buttons that are rotated 45 degrees and was
wondering if there was any way to do that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 check resolution of a Image

2009-04-23 Thread zeeshan

Hi Experts,

i am having a problem when i select a very large image for the code
below:


Uri image= Uri.parse(imageFile);
imageicon.setImageURI(image);

in my application, user selects an image from sd card or capture it.

please advise me how can i check the resolution of the selected image
(URI) and compress if it is very large before passing to imageicon.

i can compress when i capture but not when i select from sd card.


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



[android-developers] changing language on demand?

2009-04-23 Thread DaRolla

hello,

I need to change the language of a running apk on demand.

So the texts are set in xml to @strings/name

And there are different strings.xml inside values-de values-en values-
tr and so on.

Is there a way to tell android to update the layout in order to change
the strings automatically?

Or do I have to replace all of them by hand using findById().setText
(R.strings.name) ?

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



[android-developers] AudioRecord can't get any notification when record/marker position updated

2009-04-23 Thread Steven_T

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, 0, AUDIO_SAMPLE_FREQ);
}

public void onPeriodicNotification(AudioRecord arg0) {
// read PCM buffer here
byte[] audioBuffer = new byte[AUDIO_SAMPLE_FREQ];
arg0.read(audioBuffer, 0, AUDIO_SAMPLE_FREQ);
}

public void StartRecord()
{
recorder.startRecording();
}

public void StopRecord()
{
recorder.stop();
}

public void ReleaseRecord()
{
recorder.release();
}

};

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



[android-developers] Re: changing language on demand?

2009-04-23 Thread Evgeny V
Hi!
Try this.

I have res\values and res\values-ja-rJP folders.
Using following code:

String languageToLoad  = "jp";

Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
context.getBaseContext().getResources().updateConfiguration(config,
context.getBaseContext().getResources().getDisplayMetrics());



On Thu, Apr 23, 2009 at 11:43 AM, DaRolla wrote:

>
> hello,
>
> I need to change the language of a running apk on demand.
>
> So the texts are set in xml to @strings/name
>
> And there are different strings.xml inside values-de values-en values-
> tr and so on.
>
> Is there a way to tell android to update the layout in order to change
> the strings automatically?
>
> Or do I have to replace all of them by hand using findById().setText
> (R.strings.name ) ?
>
> Greetings
> DaRolla
> >
>

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



[android-developers] AudioRecord can't get any notification when record/marker position updated

2009-04-23 Thread Steven_T

hi all
I want use AudioRecord class to record audio in PCM formate.
after create class and set setRecordPositionUpdateListener, then start
recording.
I can't get any notification from system.
why? please help me, thanks

public class Recorder {
private static final int AUDIO_SAMPLE_FREQ = 8000;
private static final int AUDIO_BUFFER_SIZE = 80;

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
byte[] audioBuffer = new byte[AUDIO_SAMPLE_FREQ];
arg0.read(audioBuffer, 0, AUDIO_SAMPLE_FREQ);
}

public void onPeriodicNotification(AudioRecord arg0) {
// read PCM buffer
byte[] audioBuffer = new byte[AUDIO_SAMPLE_FREQ];
arg0.read(audioBuffer, 0, AUDIO_SAMPLE_FREQ);
}
};

public void StartRecord()
{
recorder.startRecording();
}

public void StopRecord()
{
recorder.stop();
}

public void ReleaseRecord()
{
recorder.release();
}
}


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



[android-developers] How to get the wedgit property

2009-04-23 Thread Rain

How to get the wedgit property such as the title,text ...etc by wedgit
id
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 RSS Feeds

2009-04-23 Thread manoj

Hi,

I want to display RSS feeds in my app.

I found that there are some RSS readers are available for Android.

I got some where the link: http://code.google.com/p/android-rss/source/checkout

It is not working on my sdk, giving some errors.

I think, it works on older versioned Android SDK.

Currently I am using android-sdk-windows-1.0_r2.

Can any one please suggest me the better one.

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

2009-04-23 Thread Marco Schmitz

hi,

thanks for this.

I've found the same sourcecode here:
http://almondmendoza.com/2009/01/28/force-localize-an-application-on-android/

:)

All I had to add was this: this.setContentView(R.layout.main);

This way my layout is updated with the right language.

Thought there might be an update mechanism except loading the xml again


Greetings,
DaRolla

2009/4/23 Evgeny V :
> Hi!
> Try this.
>
> I have res\values and res\values-ja-rJP folders.
> Using following code:
>
>     String languageToLoad  = "jp";
>
>     Locale locale = new Locale(languageToLoad);
>     Locale.setDefault(locale);
>     Configuration config = new Configuration();
>     config.locale = locale;
>     context.getBaseContext().getResources().updateConfiguration(config,
>     context.getBaseContext().getResources().getDisplayMetrics());
>
>
>
> On Thu, Apr 23, 2009 at 11:43 AM, DaRolla 
> wrote:
>>
>> hello,
>>
>> I need to change the language of a running apk on demand.
>>
>> So the texts are set in xml to @strings/name
>>
>> And there are different strings.xml inside values-de values-en values-
>> tr and so on.
>>
>> Is there a way to tell android to update the layout in order to change
>> the strings automatically?
>>
>> Or do I have to replace all of them by hand using findById().setText
>> (R.strings.name) ?
>>
>> Greetings
>> DaRolla >>
>

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



[android-developers] Toggle Listadapter Item

2009-04-23 Thread WindWaker

Hi guys i am having a problem disabling a particular listadapter's
item depending on a certain condition.
 I have overriden
public boolean isEnabled(int position) {

return true;

}
and
 public boolean isEnabled(int position) {

return !mStrings[position].startsWith("Eclipse");

}
This is getting disabled fine but i want to toggle it to enable -
disable based on a certain condition. Presently it is permanently
Disabled.Any help ? 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] Parsing XML feed with SAX

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

Hi,

I'm unable to consume a WS with the SAX, for some reason my
implementation doesn't read the complete XML feed, it reads it up to a
random point. Has anyone faced anything similiar? Here's what I'm
doing:

After calling a RESTful WS a read the response from the server as
follows:

if (isSessionActive){
  HttpEntity entity = response.getEntity();
  SAXParserFactory spFactory = SAXParserFactory.newInstance();
  SAXParser saxParser = spFactory.newSAXParser();
  XMLReader xmlReader = saxParser.getXMLReader();
  eventsHandler = new EventsHandler();
  xmlReader.setContentHandler(eventsHandler);
  xmlReader.parse(new InputSource(entity.getContent()));
}

Where my EventsHandler.java is as follows:

public class EventsHandler extends DefaultHandler {
@Override
public void startDocument() throws SAXException {
}
@Override
public void endDocument() throws SAXException {
}
@Override
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
Log.i(this.toString(), "<" + localName + ">");
}
@Override
public void endElement(String namespaceURI, String localName, String
qName) throws SAXException{
Log.i(this.toString(), "");
}
@Override
public void characters(char ch[], int start, int length){
}
}

Hope to get some feedback! 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: why there's no boot.img in Android-1.5

2009-04-23 Thread david 1
The kernel is lost. I traced the making log, and found boot image is
generated based on ramdisk image & kernel. So, boot image is not created
successfully. Then I 'make ARCH=arm CROSS_COMPILE=arm-eabi-
goldfish_defconfig & make'  and got a zImage. Then I used it as 'kernel' to
generate a boot.img and flashed it to G1. Finally, the G1 can not boot up at
all. I miss something else? Or zImage can't be used as a kernel for G1 at
all?  Any hint is appreciated.

david

2009/4/23 david 1 

> Hi All,
>
> I've built all android-1.5. But except for ramdisk.img, userdata.img &
> system.img, I did not find boot.img. Why? Ramdisk.img includes or replaces
> it? Thx.
>
> David

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



[android-developers] Re: How do I get the source code of Android 1.1_r1?

2009-04-23 Thread Marek Urbaniak

Thanks for the answer.

On Apr 20, 7:42 pm, Jean-Baptiste Queru  wrote:
> We focused our energy on getting thesourcecode for 1.5 available.
>
> JBQ
>
> On Sun, Apr 19, 2009 at 5:30 AM, Marek Urbaniak
>
>  wrote:
>
> > On Mar 28, 9:12 pm, Jean-Baptiste Queru  wrote:
> >> The exactsourcecode for1.1is not available.
> > Why?
>
> --
> 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: Parsing XML feed with SAX

2009-04-23 Thread mobilekid

Just to add to my message, endDocument() doesn't get called... Does
that mean that the document is too big too parse?!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: PendingIntent problem

2009-04-23 Thread Fuzzmonkey

Hello,

By explicit component do you mean  in the intent filter or code in the broadcast receiver? Is that
all i'd need?

Thanks,

George

On Apr 23, 1:29 am, Dianne Hackborn  wrote:
> You didn't include all of your code, but you definitely what to set an
> explicit component for your receiver, and then the rest of the intent data
> doesn't matter for deciding where or whether it will be delivered.
>
> On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey  wrote:
>
> > Done a bit more digging.
>
> > proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
> > (;
>
> > If i add this line, the proximity alert is still triggered but the
> > intent is never received. That is I assume it's still being fired but
> > not received. I just get..
>
> > I/LocationManagerService(   57): Entered alert
>
> > Rather than..
>
> > I/LocationManagerService(   57): Entered alert
> > D/DEBUG   (  319): Broadcast received
> > D/MyActivity(  319): Proximity alert fired
> > D/MyActivity(  319): 2 2
>
> > Those log commands are in my broadcast reciever btw. Do i need to
> > change my intent filter with regards to the data bit? I've also logged
> > SystemClock.elapsedRealtime to see if the pending intents were being
> > added at the same time, they aren't.
>
> > Thanks,
>
> > George
>
> > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
> > > Hmm.
>
> > > I'm currently using unique request codes and i'm still getting this
> > > problem. I'm trying to add multiple proximity alerts, with each alert
> > > containing different information. For example, i have 4 gps co-
> > > ordinates belong to the same group. I want the intent to contain the
> > > extra information reflecting this.
>
> > > Intent proxIntent = new Intent
> > > ("android.intent.action.PROXIMITY_ALERT");
> > > proxIntent.putExtra("goal", goalid);
> > > proxIntent.putExtra("mgoal", mgoalid);
>
> > > I then add this 'unique' intent to a pending intent. r represents a
> > > unique request code, generated at random.
>
> > > PendingIntent pi = PendingIntent.getBroadcast(this, r, proxIntent,
> > > PendingIntent.FLAG_CANCEL_CURRENT);
>
> > > And then add this pending intent to the location manager.
>
> > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
>
> > > The problem i'm finding that if a add 4 proximity alerts quite a
> > > distance appart, say 500m and set the radius to 50 the information i'm
> > > receiving when a proximity alert is fired is always that of the last
> > > alert added. I'm assuming this is because the pending intents are not
> > > being seen as unique, and is being over written every time i add a new
> > > proximity alert. If i had the line..
>
> > > i.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime(;
>
> > > The proximity alerts don't seem to fire at all! It's all very
> > > confusing. Any one shed any light on this?
>
> > > Thanks,
>
> > > George
>
> > > On Apr 22, 9:06 pm, Rob Franz  wrote:
>
> > > > Yeah I agree - it is ugly, but for my purposes it worked... the intents
> > > > wouldn't be fired one right after the other for me.
>
> > > > On Wed, Apr 22, 2009 at 4:02 PM, Tom Gibara 
> > wrote:
> > > > > Setting the data uniquely in this way is a bit ugly - and what if you
> > post
> > > > > two intents within the granularity of the clock?
> > > > > I use unique request codes. I can't claim that this is the intended
> > use for
> > > > > them (the documentation is a bit sparse) but it seems to work well.
> > > > > Tom.
>
> > > > > 2009/4/22 Rob Franz 
>
> > > > > Hi Dianne,I thought that the goal was to create unique
> > pendingIntents...
> > > > >> i.e. don't cancel or change the currently pending one.
>
> > > > >> For me, changing the extras didn't work - doing the setData() with
> > the
> > > > >> random value made the intent 'unique' in the eyes of the
> > notification
> > > > >> manager...i wanted the ability to send multiple different pending
> > intents,
> > > > >> and that's worked for me thus far.
>
> > > > >> -rob
>
> > > > >> On Wed, Apr 22, 2009 at 3:44 PM, Dianne Hackborn <
> > hack...@android.com>wrote:
>
> > > > >>> I hope you aren't writing constants into real code like that. :}
>
> > > > >>> For changing the extras -- you need to use cancel, and this will
> > result
> > > > >>> in a new PendingIntent that you need to send to the notification
> > manager.
> > > > >>> As of cupcake you can alternatively use the new
> > FLAG_UPDATE_CURRENT.
>
> > > > >>> On Thu, Mar 26, 2009 at 7:05 PM, Rob Franz 
> > wrote:
>
> > > >  Actually it looks like
> > > >  PendingIntent pendingIntent = PendingIntent.getBroadcast(context,
> > 0,
> > > >  intent, 0x1000);
>
> > > >  ...works for me (0x1000 represents FLAG_CANCEL_CURRENT).  I
> > can
> > > >  verify that the appropriate extras data makes it to the intent.
> >  Hope this
> > > >  helps.
>
> > > >  -Rob
>
> > > >  On Thu, Mar 26, 2009 at 9:29 PM, Rob Franz 
> > wrote:
>
> > > > > I'm running into the same thing - sending multiple

[android-developers] Re: animated GIF support in android

2009-04-23 Thread Mark Murphy

Nasam wrote:
> Is animated GIF supported in android through SKIA library. I am not
> able to play animated GIF which is partially updated about each frame.

I do not believe anything built into Android plays animated GIFs.

-- 
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] Scroll view determine maximum scrollY value

2009-04-23 Thread sergey.drygan...@gmail.com

How to determine maximum ScrollY value for ScrollView?


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



[android-developers] VM won't let us allocate 6291456 bytes

2009-04-23 Thread zeeshan

Hi Experts,

i captured an image by android G1, now trying to display it as
ImageView but it gives me memory allocation exception.

Uri image= Uri.parse(imageFile);
imageicon.setImageURI(image);


/



the default image resolution of G1 camera is 2048 * 1536

i also tried to compress image on selection but still same exception.

onActivityResult
//

OutputStream outstream;
Bitmap bitmap = Media.getBitmap(getContentResolver(), selectedImage);

outstream = getContentResolver().openOutputStream(Uri.parse
(imageFile));

bitmap.compress(Bitmap.CompressFormat.JPEG, 70,
outstream);
outstream.close();




any solution 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] CAN ANYONE ANSWER THIS QUESTION, SIMPLE FOR YOU LOT question on tutorial

2009-04-23 Thread chris idr

this should be simple for you lot, after all its a tutorial, and it 
stops me and a lot of others getting into the software.

id like to first ask how does the hello android,
(get list of contacts, and call selected one work)
i cant get the source code to work.

i have figured out all but the
i.setData(Phones.CONTENT_URI.addId(phoneId));
line,

what should it be???

regards

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

2009-04-23 Thread Fuzzmonkey

I've added the scheme to my intent filter as following.

proxBroadcastReceiver = new MyIntentReceiver();
proxIntentFilter = new IntentFilter
("android.intent.action.PROXIMITY_ALERT");
proxIntentFilter.addDataScheme("custom");
registerReceiver(proxBroadcastReceiver, proxIntentFilter);

I'm now receiving the intents in my receiver again, but the intents
are still containing incorrect data. For example, here are three
proximity alerts i've added to the location manager. The numbers
before the alert info is the goal and sub goal number. These three
belong to goal 2, and are sub goals 0 - 2. If i add them in order,
that is (0, 1, 2) when the proximity alert is fired, i get goal 2, sub
goal 2 in the extras for my intent. My actual location is 2 0, and the
distance between each gps co-ordinate is relatively large. If i enter
the alerts in the manner shown below, i get the correct information,
that is, 2 0. Im assuming this is something to do with the intent /
pendingintent but can't figure out what the problem is! I just hope
it's note the location manager being massively inaccurate!

E/LocalService(  772): 2 2
D/LocationManager(  772): addProximityAlert: latitude =
52.506086855802266, longitude = -2.169971466064453, radius = 100.0,
expiration = -1, intent = android.app.pendingint...@434274f8
D/LocationManagerService(   56): addProximityAlert: latitude =
52.506086855802266, longitude = -2.169971466064453, expiration = -1,
intent = android.app.pendingint...@43552008
E/LocalService(  772): 2 1
D/LocationManager(  772): addProximityAlert: latitude =
52.48497554406308, longitude = -2.167224884033203, radius = 100.0,
expiration = -1, intent = android.app.pendingint...@43428c40
D/LocationManagerService(   56): addProximityAlert: latitude =
52.48497554406308, longitude = -2.167224884033203, expiration = -1,
intent = android.app.pendingint...@43482018
E/LocalService(  772): 2 0
D/LocationManager(  772): addProximityAlert: latitude =
52.493667551283544, longitude = -2.1683353185653687, radius = 100.0,
expiration = -1, intent = android.app.pendingint...@4342a400
D/LocationManagerService(   56): addProximityAlert: latitude =
52.493667551283544, longitude = -2.1683353185653687, expiration = -1,
intent = android.app.pendingint...@4357f0c0

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



[android-developers] Netbook with Android

2009-04-23 Thread info+farm

Hello all,

I am an Android developer and I am going to buy a new netbook for
seamless portability.

Once I read it is possible to install Android on netbooks as an OS, my
eyes started to shine. Therefore, I would like to be able to test my
or third party applications on this netbook in the future.

Which netbook brand/model will be the best suited(no driver headaches-
sdcard, camera...) for upcoming Android OS for netbooks? I am reading
a lot of rumors on the net, but I cannot find a baseline.

Any idea will be appreciated...

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



[android-developers] Re: what is intent action name to launch the native map appl?

2009-04-23 Thread jj

Hello Mark Murphy

For showing direction between two points on map
there is for launching maps for driving direction
"this.startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?
f=d&saddr=37.4,-121.9"+
"&daddr=Bellevue, WA&hl=en")));"

Like this is there any way to show path between two geo points on map?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android 1.5: Video and photo sharing intents

2009-04-23 Thread chaiesubz

I understand that there are video and photo sharing intents in the 1.5
SDK but am not able to find it. Can someone please help me with this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PendingIntent problem

2009-04-23 Thread Fuzzmonkey

I've fixed this now. Rather embarrassingly, in my intent receiver i
never actually retrieved the mgoal from the extras. So the info i was
getting was just the number i initialized the variable with! Thanks
for all your help!

George

On Apr 23, 1:17 pm, Fuzzmonkey  wrote:
> I've added the scheme to my intent filter as following.
>
> proxBroadcastReceiver = new MyIntentReceiver();
> proxIntentFilter = new IntentFilter
> ("android.intent.action.PROXIMITY_ALERT");
> proxIntentFilter.addDataScheme("custom");
> registerReceiver(proxBroadcastReceiver, proxIntentFilter);
>
> I'm now receiving the intents in my receiver again, but the intents
> are still containing incorrect data. For example, here are three
> proximity alerts i've added to the location manager. The numbers
> before the alert info is the goal and sub goal number. These three
> belong to goal 2, and are sub goals 0 - 2. If i add them in order,
> that is (0, 1, 2) when the proximity alert is fired, i get goal 2, sub
> goal 2 in the extras for my intent. My actual location is 2 0, and the
> distance between each gps co-ordinate is relatively large. If i enter
> the alerts in the manner shown below, i get the correct information,
> that is, 2 0. Im assuming this is something to do with the intent /
> pendingintent but can't figure out what the problem is! I just hope
> it's note the location manager being massively inaccurate!
>
> E/LocalService(  772): 2 2
> D/LocationManager(  772): addProximityAlert: latitude =
> 52.506086855802266, longitude = -2.169971466064453, radius = 100.0,
> expiration = -1, intent = android.app.pendingint...@434274f8
> D/LocationManagerService(   56): addProximityAlert: latitude =
> 52.506086855802266, longitude = -2.169971466064453, expiration = -1,
> intent = android.app.pendingint...@43552008
> E/LocalService(  772): 2 1
> D/LocationManager(  772): addProximityAlert: latitude =
> 52.48497554406308, longitude = -2.167224884033203, radius = 100.0,
> expiration = -1, intent = android.app.pendingint...@43428c40
> D/LocationManagerService(   56): addProximityAlert: latitude =
> 52.48497554406308, longitude = -2.167224884033203, expiration = -1,
> intent = android.app.pendingint...@43482018
> E/LocalService(  772): 2 0
> D/LocationManager(  772): addProximityAlert: latitude =
> 52.493667551283544, longitude = -2.1683353185653687, radius = 100.0,
> expiration = -1, intent = android.app.pendingint...@4342a400
> D/LocationManagerService(   56): addProximityAlert: latitude =
> 52.493667551283544, longitude = -2.1683353185653687, expiration = -1,
> intent = android.app.pendingint...@4357f0c0
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: PendingIntent problem

2009-04-23 Thread Fuzzmonkey

I've fixed this now. Rather embarrassingly, in my intent receiver i
never actually retrieved the mgoal from the extras. So the info i was
getting was just the number i initialized the variable with! Thanks
for all your help!

George

On Apr 23, 1:17 pm, Fuzzmonkey  wrote:
> I've added the scheme to my intent filter as following.
>
> proxBroadcastReceiver = new MyIntentReceiver();
> proxIntentFilter = new IntentFilter
> ("android.intent.action.PROXIMITY_ALERT");
> proxIntentFilter.addDataScheme("custom");
> registerReceiver(proxBroadcastReceiver, proxIntentFilter);
>
> I'm now receiving the intents in my receiver again, but the intents
> are still containing incorrect data. For example, here are three
> proximity alerts i've added to the location manager. The numbers
> before the alert info is the goal and sub goal number. These three
> belong to goal 2, and are sub goals 0 - 2. If i add them in order,
> that is (0, 1, 2) when the proximity alert is fired, i get goal 2, sub
> goal 2 in the extras for my intent. My actual location is 2 0, and the
> distance between each gps co-ordinate is relatively large. If i enter
> the alerts in the manner shown below, i get the correct information,
> that is, 2 0. Im assuming this is something to do with the intent /
> pendingintent but can't figure out what the problem is! I just hope
> it's note the location manager being massively inaccurate!
>
> E/LocalService(  772): 2 2
> D/LocationManager(  772): addProximityAlert: latitude =
> 52.506086855802266, longitude = -2.169971466064453, radius = 100.0,
> expiration = -1, intent = android.app.pendingint...@434274f8
> D/LocationManagerService(   56): addProximityAlert: latitude =
> 52.506086855802266, longitude = -2.169971466064453, expiration = -1,
> intent = android.app.pendingint...@43552008
> E/LocalService(  772): 2 1
> D/LocationManager(  772): addProximityAlert: latitude =
> 52.48497554406308, longitude = -2.167224884033203, radius = 100.0,
> expiration = -1, intent = android.app.pendingint...@43428c40
> D/LocationManagerService(   56): addProximityAlert: latitude =
> 52.48497554406308, longitude = -2.167224884033203, expiration = -1,
> intent = android.app.pendingint...@43482018
> E/LocalService(  772): 2 0
> D/LocationManager(  772): addProximityAlert: latitude =
> 52.493667551283544, longitude = -2.1683353185653687, radius = 100.0,
> expiration = -1, intent = android.app.pendingint...@4342a400
> D/LocationManagerService(   56): addProximityAlert: latitude =
> 52.493667551283544, longitude = -2.1683353185653687, expiration = -1,
> intent = android.app.pendingint...@4357f0c0
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 load content in WebView asynchronously

2009-04-23 Thread Aaron

Hi

I use WebView::loadData to display something. But sometimes the data
may be very big, say, more than 200K.

I hope the WebView can display the content asynchronously to improve
the UI response.

Any one knows about this?

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



[android-developers] Re: How to track Android PIM changes?

2009-04-23 Thread Aaron

The Google sync framework is not ready for multiple sources sync...

I saw in HTC G2, some extra tables are inserted into Contacts and
Calendar database for EAS change tracking.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 build a debuggable crosstool chain for android on linux_X86_64?

2009-04-23 Thread Hucheng Zhou
Hi @ll:
  I've successfully build the crosstool chain for android on host
linux_x86_64 (gcc-4.4.0, binutils-2.19, new-lib-1.17.0, gdb-6.6, etc), but
the problem is that the installed gcc cannot find the corresponding header
files, even for simple stdio.h. Why? I use the tar-ball
of android-toolchain-20081019.
  Another issue is how to build a debuggable cross gcc? Just set CFLAGS and
CXXFLAGS="-g3 -O0 -gdwarf-2"? I want to do some development on gcc.
  Thanks in advance.



-- 
Institute of High Performance Computing,

Department of Computer Science and Technology,

Tsinghua University, Beijing, China, 100084.

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



[android-developers] vold or mountd

2009-04-23 Thread l hx
now android use the vold instead of mountd. who know why? and if i use vold,
i can not mount the sd card in my device. how i can do?

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

2009-04-23 Thread Jean-Baptiste Queru

This question should go in the android-porting group.

Thanks,
JBQ

On Thu, Apr 23, 2009 at 6:53 AM, l hx  wrote:
> now android use the vold instead of mountd. who know why? and if i use vold,
> i can not mount the sd card in my device. how i can do?
>
> >
>



-- 
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] AutoCompleteTextView and Theme.Light

2009-04-23 Thread Huebi

Hi, if I use an AutoCompleteTextView and the Theme.Light, I cannot see
the text in the dropdown-box as the font is changed to white and the
background of the dropdown is white as well. Any help on how to change
the font color of the dropdown list?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: PendingIntent problem

2009-04-23 Thread Guillaume Perrot

info+fram Use different request codes each time in
PendingIntent.getActivity, the documentation is bugged and say this is
not in use but they DO work. There is an old discussion on this one:
http://groups.google.com/group/android-developers/browse_thread/thread/ad855bb57042c2bd/ee143afcddd65982?hl=en&lnk=gst&q=pendingintent+request+code#ee143afcddd65982

On Mar 22, 11:25 am, "info+farm"  wrote:
> Hello all,
>
> I have more than one notification in notifications area and each of
> them has the same intent with different extras in it. Once I start() a
> pending intent from the notifications, first intent is handled
> correctly and the extras received successfully on the next(called)
> activity. Nonetheless, if I go with the other notifications with
> different extras, activity is resuming but rather than containing my
> new extras it still has the first(old) values.
>
> I played with the flags on intent but as far as I see notification is
> always calling the intent with FLAG_ACTIVITY_NEW_TASK flag set. If I
> do the same coding with Intent(rather than PendingIntent) everything
> goes well.
>
> Here is the code that I tried;
>                                 PendingIntent contentIntent = 
> PendingIntent.getActivity(this, 0,
>                                                 new 
> Intent(Weather.GET_WEATHER_ACTION).
>                                                 
> putExtra("package.prefix.tmp", 1).setFlags
> (Intent.FLAG_ACTIVITY_NEW_TASK), 0);
>                                 try {
>                                         contentIntent.send();
>                                 } catch (CanceledException e) {
>                                         e.printStackTrace();
>                                 }
>
>                                 PendingIntent contentIntent = 
> PendingIntent.getActivity(this, 0,
>                                                 new 
> Intent(Weather.GET_WEATHER_ACTION).
>                                                 
> putExtra("package.prefix.tmp", 2).setFlags
> (Intent.FLAG_ACTIVITY_NEW_TASK), 0);
>                                 try {
>                                         contentIntent.send();
>                                 } catch (CanceledException e) {
>                                         e.printStackTrace();
>                                 }
>
> 1 is received in first call but in the second call 1 is received again
> rather than 2.
> I think I am missing something on the life cycle of the PendingIntent,
> any help/idea would be appreciated.
>
> info+farm
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Parsing XML feed with SAX

2009-04-23 Thread Mariano Kamp
I don't know. Did you try a smaller document?How big is it anyway?
What does the log say?

On Thu, Apr 23, 2009 at 12:28 PM, mobilekid wrote:

>
> Just to add to my message, endDocument() doesn't get called... Does
> that mean that the document is too big too parse?!
> >
>

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

2009-04-23 Thread Marco Nelissen
Does it work with longer sounds?
Have you tried using MediaPlayer.setLooping(true) instead of restarting it
yourself from the OnCompletionListener callback?


On Thu, Apr 23, 2009 at 12:00 AM, BlackLight wrote:

>
> Hello.
>
> I have this task:
> Need to play short (0.3-0.4 sec) sounds all the time. When sound is
> played, it should start again, etc. User can press button to reset
> sound - it should stop and lunch.
>
> I did many tests. I tried to create 1 MediaPlayer, then do this:
>MediaPlayer.OnCompletionListener complListener = new
> MediaPlayer.OnCompletionListener()
>{
>public void onCompletion(MediaPlayer mp) {
>lunchSound(); // "rewind"
>}
>};
>
>private boolean lunchSound()
>{
>try
>{
>mplayer.seekTo(0); // move to start
>mplayer.start();
>return true;
>}catch(Exception e){}
>return false;
>}
> When user press button, I call lunchSound();
>
> It works great on emulator and on device if I have eclipse+debugger
> on.
> When I disconnect debugger, I have very strange errors - sound can
> stop at all (till program restart), sound can start "repeating" (play
> 0.1-0.2 sec, then restart). Can someone please provide me some info
> about problem?
> 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] Ways To Monetize Free Android Application

2009-04-23 Thread Android

Hi everyone,

sadly i can't sell apps to the android market..(yet)
till then..
how can i make money from free apps?can you share info on ad-supported
model?
is the use of landing page/links to websites allowed?

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: Screen lock turns of the accelerometer.

2009-04-23 Thread dilit

Accelerometer does work under screen lock when the power is not
dimmed.
We debugged it in ddms on the real g1 device.

Guess, if you can acquire a Power wake Lock, you should be able to
read acceleration.
We have not tried to acquire it in program, just manually.

This was done on current android version, not cupcake release.

D

On Apr 20, 2:39 pm, Jordan Frank  wrote:
> Fixed in cupcake!
>
> Described 
> further:http://groups.google.com/group/android-developers/msg/a616773b12c2d9e5
>
> Jordan
>
> On Apr 20, 12:01 pm, dilit  wrote:
>
> > Have you implemented the accel. listener as a Service (vs Activity)?
> > Service should run in the background without the need to be in
> > focus...
>
> > There is not much documentation on  Screen Lock I could find.
>
> > Dmitriy
>
> > On Apr 16, 7:11 pm, Mark  wrote:
>
> > > What I'm looking for:
>
> > >  ** A way to read the accelerometer even when thescreenis locked. **
>
> > > Currently it seems that locking thescreenautomatically turns off the
> > > accelerometer.
> > > I looked around for quite a while and didnt find any solution for
> > > that. Is that intentional?
> > > It would be really helpful to know if this is how it is or if I just
> > > didnt find the solution for that so far.
>
> > > thank you for any help on that
> > > (and as I said, even "doesnt work right now/on purpose/.. is a very
> > > helpful answer for me :) )
>
> > > best regards,
> > > mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Error installing ADT 0.9

2009-04-23 Thread Anna PS

I had the same problem and this worked for me. Use wget with the -c
option to resume downloads.

On Apr 22, 10:52 am, chris  wrote:
> It seems the download server is occupied/busy and resets the
> connections quite often.
> I recommend downloading the file using a program that can resume
> downloads.
>
> On 17 Apr, 07:07, Mathieu Plourde  wrote:
>
> > I'm using Win XP and I'm trying to install ADT 0.9 for Eclipse (In
> > order to try SDK 1.5). I downloaded the ADT-0.9_pre.zip file and
> > everything. I follow the steps provided 
> > there:http://developer.android.com/sdk/preview/
>
> > When I add the site, I choose "Archive" and browse to the file. When I
> > press OK, it get this error:
> > "No repository found at jar:file:C:\ADT-0.9_pre.zip!/"
>
> > Also, I noticed that my remote site (https://dl-ssl.google.com/android/
> > eclipse/) doesn't work anymore. To make it work, I need to use http
> > instead of https.
>
> > Anyone encountered this issue installing the new ADT? If it's because
> > of my firewall or something of the sort, I don't have access to it
> > (I'm living in my university's residences, and the network
> > infrastructure is provided by them).
>
> > 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: Parsing XML feed with SAX

2009-04-23 Thread mobilekid

It isn't big at all, it's got about 25 elements, it's not not a very
deep tree either. I've parsed way longer XML feeds in the past with
the same implementation of SAX.

I asked the server guy to remove the element where it got stuck, and
then it managed to parse one more element down the tree, and got stuck
again. So that makes me think the problem is to do with the size of
the document, but it isn't big at all... Any ideas?


On Apr 23, 3:30 pm, Mariano Kamp  wrote:
> I don't know. Did you try a smaller document?How big is it anyway?
> What does the log say?
>

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

2009-04-23 Thread Mariano Kamp
What happens when you add a println statement before the last line? Is this
reached? Is startDocument() called and how do you know that endDocument() is
not called? In the quoted code you're not doing anything.
Also, is it a conscious decision to use SAX here? I think SAX is a pain for
most ordinary cases, and when you have such a small document DOM might be ok
for you. It probably wouldn't here as the DOM parser uses SAX to build the
tree.

On Thu, Apr 23, 2009 at 5:50 PM, mobilekid wrote:

>
> It isn't big at all, it's got about 25 elements, it's not not a very
> deep tree either. I've parsed way longer XML feeds in the past with
> the same implementation of SAX.
>
> I asked the server guy to remove the element where it got stuck, and
> then it managed to parse one more element down the tree, and got stuck
> again. So that makes me think the problem is to do with the size of
> the document, but it isn't big at all... Any ideas?
>
>
> On Apr 23, 3:30 pm, Mariano Kamp  wrote:
> > I don't know. Did you try a smaller document?How big is it anyway?
> > What does the log say?
> >
>
> >
>

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



[android-developers] OnClickListener for a mapview never called

2009-04-23 Thread RodgerWilko!

Hi,

I have setup a OnClickListener for a mapview and find that it's never
called.  I have set clickable to be true but it's still not working.
Am I missing something or is the OnClickListener not supported on a
mapview?

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] “The application xxxxxxxx (pr ocess xxxxxx) has stopped unexpectedly. Please try again.”

2009-04-23 Thread Kenn Min Chong

Hi there!
 For some reason I can't explain, when my app runs, I will on
occasion get the following error message:

“The application  (process xx) has stopped unexpectedly.
Please try again.”

When I debug my code, it seems to break at random places that doesn't
make sense. On top of that I tried to surround the entire code with a
try/catch block just to try to catch the exception, but it doesn't
work either. I'm suspecting it's the OS that is producing this error
message but I don't know why. As far as my code goes, if there were
exceptions caused by it, it would've been caught by the try/catch
block.  Can someone shed some light here?

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



[android-developers] distributing an app packaged with just emulator

2009-04-23 Thread tansaku

Hi All,

I was wondering if anyone has ever been able to distribute their app
in a bundle with an emulator?

The reason I want to do this is that I have some friends who don't
have android phones, but I'd like them to be able to play with my app
so that they can give me feedback.  I've previously sent them screen
casts, but I'd really like them to be able to get interactive with the
app.

Now I could ask them to get all installed with the whole android
framework, eclipse etc,. but some of them are not so technical.
Ideally what I'd like to be able to do is create a package that is the
android emulator with my app and perhaps 1 or 2 other related apps pre-
installed, so that they can download it, open it and run it
interactively on their computers?

Has anyone ever tried this?

So far I found that I can run the emulator standalone, and I assume I
could probably send them just that and it would run.  However the adb
tool is needed to install apps.  I could send them that too, and ask
the to run an 'adb install myapp.apk' from the command line, but at
the moment I can't even seem to do that myself.

Running the emulator standalone, the adb tool can't seem to see it:

samuel-josephs-computer-2:tools samueljoseph$ sudo ./adb devices
List of devices attached

I just get no list of devices ...

I have previously used the adb tool to install apk files, but that is
after I had started the emulator from eclipse - of course even then I
always have to restart eclipse and the emulator two or three times
before I can get the connection (I am on OSX 10.5.6., eclipse
3.4.1) ...

Any suggestions greatly appreciated.

CHEERS> SAM

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

2009-04-23 Thread RodgerWilko!

Hey Gandor,

I think you need to add in your androidmanifest.xml



normally it goes after the closing application tag

Cheers

On Apr 23, 4:22 pm, gandor  wrote:
> Hi,
>
> If I want to simulate getspeed using emulator how do I do it.
>
> I used the  following code
> and it gives me
> 04-23 05:39:18.485: ERROR/AndroidRuntime(292): Caused by:
> java.lang.SecurityException: Requires ACCESS_FINE_LOCATION permission
>
> ---
>
> package gd.Speedometer;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
> import android.content.Context;
> import android.location.Location;
> import android.location.LocationListener;
> import android.location.LocationManager;
> import android.util.Log;
>
> public class Speedometer extends Activity {
>
>         private TextView tv;
>         private LocationManager lm;
>         private LocationListener ll;
>         double mySpeed, maxSpeed;
>         private final String Speed = null;
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         Log.i(Speed, "working1 ");
>         super.onCreate(savedInstanceState);
>         tv = new TextView(this);
>         setContentView(tv);
>
>         maxSpeed = mySpeed = 0;
>         Log.i(Speed, "working1 ");
>         lm = (LocationManager) getSystemService
> (Context.LOCATION_SERVICE);
>         ll = new SpeedoActionListener();
>         lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
> ll);
>     }
>
>     private class SpeedoActionListener implements LocationListener
>     {
>
>                 @Override
>                 public void onLocationChanged(Location location) {
>                         Log.i(Speed, "working2 ");
>                         if(location!=null) {
>                                 if(location.hasSpeed()){
>
>                                         mySpeed = location.getSpeed();
>
>                                         tv.setText("\nCurrent speed: "
> + mySpeed + " km/h, Max speed: " +
> maxSpeed + " km/h");
>                                 }
>                         }
>                         Log.i(Speed, "working3 ");
>                 }
>
>                 @Override
>                 public void onProviderDisabled(String provider) {
>                         // TODO Auto-generated method stub
>
>                 }
>
>                 @Override
>                 public void onProviderEnabled(String provider) {
>                         // TODO Auto-generated method stub
>
>                 }
>
>                 @Override
>                 public void onStatusChanged(String provider, int
> status, Bundle
> extras) {
>                         // 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] Emulator data connection problem

2009-04-23 Thread Farshad

When I run the emulator on my laptop with wired connection, my rtsp
player application works fine.
But when I have the laptop hooked up with a wireless network, my rtsp
player application cannot establish data connection.
My rtsp player application always works fine on G1.

Why the emulator has problem with application making data connection
when the laptop is on wireless connection and works fine when laptop
is on wired connection?

-- Farshad

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



[android-developers] write android UI by C language ?

2009-04-23 Thread zhangho

Though there is a library written by a c language,
I cannot call it from UI side because it is not a JNI library.

Please teach it though I think that I can write android UI by C
language.

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



[android-developers] Re: Failed to reopen debug port for Selected Client to:

2009-04-23 Thread kyb


On Mar 5, 8:19 pm, NWallman  wrote:
> Turns out my hosts file was messed up.  When I fixed that my problem
> was resolved.

Can you give a bit more information?  I seem to have this problem as
well.  What should my hosts file have?

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



[android-developers] Customer signature

2009-04-23 Thread Stéphane POUVRASSEAU

Hi !

In my app, I need a customer signature for prooving the customer have 
seen some informations and validate them.

- Does anybody knows the Android way for implementing a customer signature ?

With Windows CE, we can use a signature's specific component, and the 
customer can use the pen to draw lines. But how can we do this with 
finger's like mobile phone ?

It seems to be a very difficult question, and I haven't found an answer 
to my question yet.

Best regards,
Joe.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 does clicking on 'x' of the linux emulator not working?

2009-04-23 Thread Ben

I have encountered the same problem using ubuntu 9.04 RC.  Clicking
the 'x' does not terminate the emulator, I have to manually kill the
emulator process.  I tried the suggestion above "killall -9 esd" and
it does not help.  For me, this issue happens all the time and I have
manually kill the process.  Any other suggestions?

On Apr 13, 4:29 am, David Turner  wrote:
> This is not supposed to happen, unfortunately it sometimes does :-( What
> exact Linux distribution are you using ?
>
> The culprit is very probably a broken audio sound mixing daemon, generally
> you can recover by doing a "killall -9 esd" to kill the buggy EsounD daemon.
> Does this happen all the time, or only occasionally ?
>
> On Sun, Apr 12, 2009 at 1:47 PM, AK  wrote:
>
> > I have been developing on the windows Android SDK until recently i
> > have moved to the Linux SDK. Once i launch the application from
> > eclipse, i click the 'x' of the emulator window and an empty window
> > persists, whereas this does not happen in the windows.
> > I have to manually kill thru the shell (kill -9 " > id>")
> > Has anybody faced this problem on ubuntu 8.04, with android SDk 1.1 ?
> > Thanks in advance
> > AK

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

2009-04-23 Thread Moons

Hello everyone,
I'm posting here because I searched the web and found nothing about
how to HTTP POST.
What I want to do is to access a webpage (PHP) sending data with the
POST method.
I'm not interested about seeing the webpage, I just want to send the
data.
Actually, it's for a game i developed, and users are asking for online
scores, so I wrote a PHP script that takes POST data and writes the
score in an SQL database.

Thanks for your help.

Moons

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



[android-developers] Information about required permissions

2009-04-23 Thread thiagofj2000

Hi all,

I would like to know if there's documentation about what are the
required permissions for each activity, intent, broadcastReceiver,
etc.

Or maybe there is a file with this info in the SDK?

Thanks

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



[android-developers] aidl problem in building android source code

2009-04-23 Thread Jackie

hello, folks,

I'm building the android source code for the first time. I've searched
the forum for my issue but failed to find me. please kindly help me to
resolve this problem. thanks.

I'm building android source code in Ubuntu 8.10, and got the following
error message:

host C++: aidl <= out/host/linux-x86/obj/EXECUTABLES/
aidl_intermediates/aidl_language_l.cpp
frameworks/base/tools/aidl/aidl_language_l.l: In function ‘int yylex
()’:
frameworks/base/tools/aidl/aidl_language_l.l:58: error: ‘IMPORT’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:59: error: ‘IMPORT’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:63: error: ‘PACKAGE’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:64: error: ‘PACKAGE’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:82: error: ‘PARCELABLE’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:82: error: ‘PARCELABLE’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:83: error: ‘INTERFACE’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:83: error: ‘INTERFACE’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:84: error: ‘IN’ was not
declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:84: error: ‘IN’ was not
declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:85: error: ‘OUT’ was not
declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:85: error: ‘OUT’ was not
declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:86: error: ‘INOUT’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:86: error: ‘INOUT’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:87: error: ‘ONEWAY’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:87: error: ‘ONEWAY’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:89: error: ‘ARRAY’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:89: error: ‘ARRAY’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:91: error: ‘IDENTIFIER’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:91: error: ‘IDENTIFIER’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:93: error: ‘GENERIC’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:93: error: ‘GENERIC’ was
not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:98: error: ‘IDENTIFIER’
was not declared in this scope
frameworks/base/tools/aidl/aidl_language_l.l:103: warning: ignoring
return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’,
declared with attribute warn_unused_result
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/
aidl_language_l.o] Error 1

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



[android-developers] Android SDK 1.5 Voice recognition sample

2009-04-23 Thread jigyasa

VoiceRecognition in android api sample  fails with no activity
registered for intent message while running in simulator.Is there any
app that would provide me this feature for testing or i need to get
something from android source site.

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

2009-04-23 Thread Chih-Wei

Hello,
I just do repo sync and recompile the whole tree again.
When I start the emulator, it showed the android logo, and then
a window 'Power Off  shutting down' is shown.
Then the emulator window has no any response to any input. Strange...

I remember I can run the emulator correctly yesterday or the day
before yesterday.
I tried to point the system.img to an old one I backed up,
and the emulator runs fine.
So recent changes break it?

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



[android-developers] Android testing: Emulator vs G1

2009-04-23 Thread HowlettAndroid

Hello,

Hope you lot can help. I'm currently testing my application in
the SDK emulator, Great everything works perfectly. The next step was
to try the same application loaded on to the G1. After loading the
app, I'm getting some strange behaviour. Some Activities seem to be
called by intents multiple times, when in the emulator they only
appear once. Looking at the code I can't see what could be wrong. Any
help would be great.

Thanks
 HowlettAndroid

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



[android-developers] What's this problem?

2009-04-23 Thread Alex

I have written a method, like this
private Bitmap getBitmapFromUrl(String urlString)
{
  try  {
URL url = new URL(urlString);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
InputStream is = con.getInputStream();
Bitmap bmp = BitmapFactory.decodeStream(is);
return bmp;
  }catch(Exception e)
  {
return null;
  }
};

When I call this method continuously in a thread, it returns a valid
bitmap only at the first call, as for the following call, LogCat would
report "jpeg error 20 Improper call to JPEG library in state".

Actually, I think the problem is because of the connection error,
since when I debug the application, the inputstream seems invalid.

Is there anyone know what the problem is it?
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] HttpUrlConnection problem

2009-04-23 Thread Mika

Hi all,

I have a strange problem with HttpUrlConnection. I can send data (with
POST), but the receiving succeeds only every second time or after a
sufficiently long (< 5 min) pause between the sends. I basically start
a new thread where the initialization of the HttpUrlConnection,
writing/reading from output/input streams and closing the connection
is done. If I don't close the input and the output streams the sending
works correctly each time.

Any suggestions where's the problem? The same problem was discussed in
here
http://groups.google.com/group/android-developers/browse_thread/thread/bc5454ffc71f77dc/837c09f4f1f750b2?lnk=gst&q=getResponseCode#837c09f4f1f750b2
but no solution were found.

-Mika

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

2009-04-23 Thread Arnaud Weber
have you tried the OnTouch event?
I've not used mapView yet but a click is the action to touch and to
release... i think on a mapview the proper event to catch is more a touching
event than a clicking event.

2009/4/23 RodgerWilko! 

>
> Hi,
>
> I have setup a OnClickListener for a mapview and find that it's never
> called.  I have set clickable to be true but it's still not working.
> Am I missing something or is the OnClickListener not supported on a
> mapview?
>
> 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] Start native application from Java

2009-04-23 Thread Anders

Hi,

I have a native application that I would like to start from a Java
interface. Does anyone know of a good way of doing this?

I can start the application using adb, with no problems. I can also
start the application using Runtime.exec(), but that doesn't work so
well for me; I need the application to run outside of a Java Runtime
Process.
Any ideas?

Thanks,
Anders

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

2009-04-23 Thread mobilekid

> What happens when you add a println statement before the last line? Is this
> reached? Is startDocument() called and how do you know that endDocument() is
> not called? In the quoted code you're not doing anything.

Yes, startDocument() gets called, endDocument() doesn't, I know that
as I've logged it.

> Also, is it a conscious decision to use SAX here? I think SAX is a pain for
> most ordinary cases, and when you have such a small document DOM might be ok
> for you. It probably wouldn't here as the DOM parser uses SAX to build the
> tree.

Yes, I've always thought SAX is somehow quicker. I guess I will just
switch to DOM for that WS. Thanks anyway!

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



[android-developers] Re: Start native application from Java

2009-04-23 Thread Dianne Hackborn
Hi, this technically isn't part of the SDK, so would be better asked on a
group like android-porting.  (Yes, there are Java calls to do this, but
native code in any form is not supported at this time.)

On Thu, Apr 23, 2009 at 4:42 AM, Anders  wrote:

>
> Hi,
>
> I have a native application that I would like to start from a Java
> interface. Does anyone know of a good way of doing this?
>
> I can start the application using adb, with no problems. I can also
> start the application using Runtime.exec(), but that doesn't work so
> well for me; I need the application to run outside of a Java Runtime
> Process.
> Any ideas?
>
> Thanks,
> Anders
>
> >
>


-- 
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: write android UI by C language ?

2009-04-23 Thread Dianne Hackborn
You can't do android UI in C.  The UI framework is written in Java.

On Wed, Apr 22, 2009 at 9:01 PM, zhangho  wrote:

>
> Though there is a library written by a c language,
> I cannot call it from UI side because it is not a JNI library.
>
> Please teach it though I think that I can write android UI by C
> language.
>
> >
>


-- 
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: “The application xxxxxxxx (process xxxxxx) has stopped unexpectedly. Please try again .”

2009-04-23 Thread Dianne Hackborn
Have you looked at the stack crawl in the log?  Nobody can give help unless
you at least provide that.

On Wed, Apr 22, 2009 at 5:03 PM, Kenn Min Chong  wrote:

>
> Hi there!
> For some reason I can't explain, when my app runs, I will on
> occasion get the following error message:
>
> “The application  (process xx) has stopped unexpectedly.
> Please try again.”
>
> When I debug my code, it seems to break at random places that doesn't
> make sense. On top of that I tried to surround the entire code with a
> try/catch block just to try to catch the exception, but it doesn't
> work either. I'm suspecting it's the OS that is producing this error
> message but I don't know why. As far as my code goes, if there were
> exceptions caused by it, it would've been caught by the try/catch
> block.  Can someone shed some light here?
>
> >
>


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

2009-04-23 Thread Dianne Hackborn
No, I mean setting the explicit component to your broadcast receiver
component on the Intent class.  I strongly strongly recommend this for this
kind of situation where you want someone to deliver some specific thing to a
component in your app.  Please read the Intent java doc for more info.

On Thu, Apr 23, 2009 at 4:01 AM, Fuzzmonkey  wrote:

>
> Hello,
>
> By explicit component do you mean  data> in the intent filter or code in the broadcast receiver? Is that
> all i'd need?
>
> Thanks,
>
> George
>
> On Apr 23, 1:29 am, Dianne Hackborn  wrote:
> > You didn't include all of your code, but you definitely what to set an
> > explicit component for your receiver, and then the rest of the intent
> data
> > doesn't matter for deciding where or whether it will be delivered.
> >
> > On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey  wrote:
> >
> > > Done a bit more digging.
> >
> > > proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
> > > (;
> >
> > > If i add this line, the proximity alert is still triggered but the
> > > intent is never received. That is I assume it's still being fired but
> > > not received. I just get..
> >
> > > I/LocationManagerService(   57): Entered alert
> >
> > > Rather than..
> >
> > > I/LocationManagerService(   57): Entered alert
> > > D/DEBUG   (  319): Broadcast received
> > > D/MyActivity(  319): Proximity alert fired
> > > D/MyActivity(  319): 2 2
> >
> > > Those log commands are in my broadcast reciever btw. Do i need to
> > > change my intent filter with regards to the data bit? I've also logged
> > > SystemClock.elapsedRealtime to see if the pending intents were being
> > > added at the same time, they aren't.
> >
> > > Thanks,
> >
> > > George
> >
> > > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
> > > > Hmm.
> >
> > > > I'm currently using unique request codes and i'm still getting this
> > > > problem. I'm trying to add multiple proximity alerts, with each alert
> > > > containing different information. For example, i have 4 gps co-
> > > > ordinates belong to the same group. I want the intent to contain the
> > > > extra information reflecting this.
> >
> > > > Intent proxIntent = new Intent
> > > > ("android.intent.action.PROXIMITY_ALERT");
> > > > proxIntent.putExtra("goal", goalid);
> > > > proxIntent.putExtra("mgoal", mgoalid);
> >
> > > > I then add this 'unique' intent to a pending intent. r represents a
> > > > unique request code, generated at random.
> >
> > > > PendingIntent pi = PendingIntent.getBroadcast(this, r, proxIntent,
> > > > PendingIntent.FLAG_CANCEL_CURRENT);
> >
> > > > And then add this pending intent to the location manager.
> >
> > > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
> >
> > > > The problem i'm finding that if a add 4 proximity alerts quite a
> > > > distance appart, say 500m and set the radius to 50 the information
> i'm
> > > > receiving when a proximity alert is fired is always that of the last
> > > > alert added. I'm assuming this is because the pending intents are not
> > > > being seen as unique, and is being over written every time i add a
> new
> > > > proximity alert. If i had the line..
> >
> > > > i.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime(;
> >
> > > > The proximity alerts don't seem to fire at all! It's all very
> > > > confusing. Any one shed any light on this?
> >
> > > > Thanks,
> >
> > > > George
> >
> > > > On Apr 22, 9:06 pm, Rob Franz  wrote:
> >
> > > > > Yeah I agree - it is ugly, but for my purposes it worked... the
> intents
> > > > > wouldn't be fired one right after the other for me.
> >
> > > > > On Wed, Apr 22, 2009 at 4:02 PM, Tom Gibara 
> > > wrote:
> > > > > > Setting the data uniquely in this way is a bit ugly - and what if
> you
> > > post
> > > > > > two intents within the granularity of the clock?
> > > > > > I use unique request codes. I can't claim that this is the
> intended
> > > use for
> > > > > > them (the documentation is a bit sparse) but it seems to work
> well.
> > > > > > Tom.
> >
> > > > > > 2009/4/22 Rob Franz 
> >
> > > > > > Hi Dianne,I thought that the goal was to create unique
> > > pendingIntents...
> > > > > >> i.e. don't cancel or change the currently pending one.
> >
> > > > > >> For me, changing the extras didn't work - doing the setData()
> with
> > > the
> > > > > >> random value made the intent 'unique' in the eyes of the
> > > notification
> > > > > >> manager...i wanted the ability to send multiple different
> pending
> > > intents,
> > > > > >> and that's worked for me thus far.
> >
> > > > > >> -rob
> >
> > > > > >> On Wed, Apr 22, 2009 at 3:44 PM, Dianne Hackborn <
> > > hack...@android.com>wrote:
> >
> > > > > >>> I hope you aren't writing constants into real code like that.
> :}
> >
> > > > > >>> For changing the extras -- you need to use cancel, and this
> will
> > > result
> > > > > >>> in a new PendingIntent that you need to send to the
> notification
> > > manager.
> > > > > >>> As of cupcake you can alternative

[android-developers] Re: why there's no boot.img in Android-1.5

2009-04-23 Thread Dianne Hackborn
Please move this to android-porting.

On Thu, Apr 23, 2009 at 2:17 AM, david 1  wrote:

> The kernel is lost. I traced the making log, and found boot image is
> generated based on ramdisk image & kernel. So, boot image is not created
> successfully. Then I 'make ARCH=arm CROSS_COMPILE=arm-eabi-
> goldfish_defconfig & make'  and got a zImage. Then I used it as 'kernel' to
> generate a boot.img and flashed it to G1. Finally, the G1 can not boot up at
> all. I miss something else? Or zImage can't be used as a kernel for G1 at
> all?  Any hint is appreciated.
>
> david
>
> 2009/4/23 david 1 
>
> Hi All,
>>
>> I've built all android-1.5. But except for ramdisk.img, userdata.img &
>> system.img, I did not find boot.img. Why? Ramdisk.img includes or replaces
>> it? Thx.
>>
>> David
>
>
>
> >
>


-- 
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: Why the service is always to restart even if force to kill it?

2009-04-23 Thread Dianne Hackborn
On Wed, Apr 22, 2009 at 10:51 PM, Eckel  wrote:

> You can get the running prcess info with process id from
> activitymanager, then kill it by Process.KillProcess(mPid).


So wait...  you are saying you just wrote a regular application in an .apk,
and you can do this?  You really shouldn't be able to do this.  I am almost
positive you can't.  So I really want to confirm what you are actually
doing.


> Could you have a simple introduction for how to use "Force Stop"?


Er...  press the button?


> As Mike and you said, android will automatically manager the activity
> and service lifecyle and don't need task management by users. I often
> meet a case,  playback a music on background service and view a a lot
> picture on foreground,  which maybe will cause low memory, then
> android will kill the background music. You will not hear the music
> again, but if you check the music process, you will find the music
> service restart and service is still alive and still occupy system
> resource. So for this case, I think service should not be restart.
> What's your opinion?


It's basically working as intended.  If you really care about this, in
cupcake you can go in to manage applications, see the list of applications
with running processes, and force stop that one.

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

2009-04-23 Thread Rob Franz
So with all the input from this thread, what's the proper way to send x
number of pending intents that are unique?
I guess I'm doing it not 100% correctly (even though it seems to work for me
and the intents are spaced out enough not to interfere with each other).  I
was doing it
as setData((Uri.parse("custom://"+SystemClock.elapsedRealtime())).

-rob

On Thu, Apr 23, 2009 at 12:40 PM, Dianne Hackborn wrote:

> No, I mean setting the explicit component to your broadcast receiver
> component on the Intent class.  I strongly strongly recommend this for this
> kind of situation where you want someone to deliver some specific thing to a
> component in your app.  Please read the Intent java doc for more info.
>
>
> On Thu, Apr 23, 2009 at 4:01 AM, Fuzzmonkey  wrote:
>
>>
>> Hello,
>>
>> By explicit component do you mean > data> in the intent filter or code in the broadcast receiver? Is that
>> all i'd need?
>>
>> Thanks,
>>
>> George
>>
>> On Apr 23, 1:29 am, Dianne Hackborn  wrote:
>> > You didn't include all of your code, but you definitely what to set an
>> > explicit component for your receiver, and then the rest of the intent
>> data
>> > doesn't matter for deciding where or whether it will be delivered.
>> >
>> > On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey  wrote:
>> >
>> > > Done a bit more digging.
>> >
>> > > proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
>> > > (;
>> >
>> > > If i add this line, the proximity alert is still triggered but the
>> > > intent is never received. That is I assume it's still being fired but
>> > > not received. I just get..
>> >
>> > > I/LocationManagerService(   57): Entered alert
>> >
>> > > Rather than..
>> >
>> > > I/LocationManagerService(   57): Entered alert
>> > > D/DEBUG   (  319): Broadcast received
>> > > D/MyActivity(  319): Proximity alert fired
>> > > D/MyActivity(  319): 2 2
>> >
>> > > Those log commands are in my broadcast reciever btw. Do i need to
>> > > change my intent filter with regards to the data bit? I've also logged
>> > > SystemClock.elapsedRealtime to see if the pending intents were being
>> > > added at the same time, they aren't.
>> >
>> > > Thanks,
>> >
>> > > George
>> >
>> > > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
>> > > > Hmm.
>> >
>> > > > I'm currently using unique request codes and i'm still getting this
>> > > > problem. I'm trying to add multiple proximity alerts, with each
>> alert
>> > > > containing different information. For example, i have 4 gps co-
>> > > > ordinates belong to the same group. I want the intent to contain the
>> > > > extra information reflecting this.
>> >
>> > > > Intent proxIntent = new Intent
>> > > > ("android.intent.action.PROXIMITY_ALERT");
>> > > > proxIntent.putExtra("goal", goalid);
>> > > > proxIntent.putExtra("mgoal", mgoalid);
>> >
>> > > > I then add this 'unique' intent to a pending intent. r represents a
>> > > > unique request code, generated at random.
>> >
>> > > > PendingIntent pi = PendingIntent.getBroadcast(this, r, proxIntent,
>> > > > PendingIntent.FLAG_CANCEL_CURRENT);
>> >
>> > > > And then add this pending intent to the location manager.
>> >
>> > > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
>> >
>> > > > The problem i'm finding that if a add 4 proximity alerts quite a
>> > > > distance appart, say 500m and set the radius to 50 the information
>> i'm
>> > > > receiving when a proximity alert is fired is always that of the last
>> > > > alert added. I'm assuming this is because the pending intents are
>> not
>> > > > being seen as unique, and is being over written every time i add a
>> new
>> > > > proximity alert. If i had the line..
>> >
>> > > > i.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime(;
>> >
>> > > > The proximity alerts don't seem to fire at all! It's all very
>> > > > confusing. Any one shed any light on this?
>> >
>> > > > Thanks,
>> >
>> > > > George
>> >
>> > > > On Apr 22, 9:06 pm, Rob Franz  wrote:
>> >
>> > > > > Yeah I agree - it is ugly, but for my purposes it worked... the
>> intents
>> > > > > wouldn't be fired one right after the other for me.
>> >
>> > > > > On Wed, Apr 22, 2009 at 4:02 PM, Tom Gibara 
>> > > wrote:
>> > > > > > Setting the data uniquely in this way is a bit ugly - and what
>> if you
>> > > post
>> > > > > > two intents within the granularity of the clock?
>> > > > > > I use unique request codes. I can't claim that this is the
>> intended
>> > > use for
>> > > > > > them (the documentation is a bit sparse) but it seems to work
>> well.
>> > > > > > Tom.
>> >
>> > > > > > 2009/4/22 Rob Franz 
>> >
>> > > > > > Hi Dianne,I thought that the goal was to create unique
>> > > pendingIntents...
>> > > > > >> i.e. don't cancel or change the currently pending one.
>> >
>> > > > > >> For me, changing the extras didn't work - doing the setData()
>> with
>> > > the
>> > > > > >> random value made the intent 'unique' in the eyes of the
>> > > notification
>> > > > > >> manager...i wanted the abili

[android-developers] Re: Could title bar of activity listen to click event?

2009-04-23 Thread Dianne Hackborn
Implement your own custom title bar.  You will need to make this taller than
the regular title bar anyway for a decent user experience (especially if you
want DOUBLE tap...), so just bit the bullet and do your own thing.

2009/4/22 UJ 

>
> Dear Dianne,
>
> Generally speaking, I agree your opinion.
>
> But, there are some speical cases, such as:
>
> If I want to implement "double tap address bar on browser" to enter
> web address as iPhone,
> I must let the address bar can listen the click event.
> Unfortunately the address bar seems be implemented by title bar so it
> can not meet this requirement.
>
> Can you give some tips for this achievement?
>
> Thank you very much.
> UJ
>
>
> On 4月21日, 上午10時20分, Dianne Hackborn  wrote:
> > As I said, the title bar is short to save space on the screen, and with
> it
> > right up against the status bar and being short like that it is just a
> > really crummy hit target.  This isn't really worthwhile to do on a touch
> > display, in my opinion.
> >
> > 2009/4/20 milton 
> >
> >
> >
> >
> >
> >
> >
> > > Hi Joe, Dianne
> >
> > > Appreciate all your suggestions.
> >
> > > I had tried to put a textview and add an onclicklistener to it.
> > > It works fine, but I still think it's better that I could use the
> > > title bar.
> > > To trigger the action from menu is ok too, but user have to do two
> > > actions to achieve one result.
> > > menu->action->result
> > > If I could use title bar, than I could let user do what he/she want in
> > > one action.
> > > title bar -> result
> > > No matter it's onclick or long press or something else.
> > > But it looks like current framework doesn't support such behaviors. :-
> > > (
> >
> > > Regards
> > > Milton
> >
> > > On Apr 21, 1:00 am, Dianne Hackborn  wrote:
> > > > You can put an on click listener on a text view (this is a basic
> feature
> > > of
> > > > view), but please don't go digging through the view hierarchy for the
> > > title
> > > > bar text view; this is an implementation detail of the window
> > > decorations.
> >
> > > > If you want a special title bar, I would recommend just doing your
> own
> > > > custom title bar.  Alternatively, you can also supply your own custom
> > > view
> > > > for the title area, but I think there is padding above and below the
> view
> > > so
> > > > it would be even harder to hit.
> >
> > > > 2009/4/20 Joe LaPenna 
> >
> > > > > Miloh,
> >
> > > > > For a simple solution, you could request the no titlebar window
> deature
> > > and
> > > > > place a textview at the top of your layout.
> >
> > > > > I'm not sure off the top of my head if you can attach a
> onclicklistener
> > > to
> > > > > a text view thouhgh. Probably not in which case for usability
> testing
> > > > > putting a button there would help you realize if that feature is
> > > > > discoverable or perhaps if a classic menu button is more
> discoverable.
> >
> > > > > On Apr 20, 2009 2:13 AM, "milton" 
> wrote:
> >
> > > > > Hi Dianne
> >
> > > > > Thanks for your comment.
> > > > > But is there any possible way to hack current title bar to try it ?
> > > > > (Ignoring the title bar height issue)
> >
> > > > > Thanks again.
> >
> > > > > Regards
> > > > > Milton
> >
> > > > > On 4月20日, 下午4時19分, Dianne Hackborn  wrote: >
> This
> > > > > probably isn't going to be t...
> >
> > > > > > On Sun, Apr 19, 2009 at 8:38 PM, milton <
> min.hsiung.hu...@gmail.com>
> > > > > wrote: > > > Hi all > > > I w...
> > > > > > hack...@android.com
> >
> > > > > > > Note: please don't send private questions to me, as I don't
> have
> > > time
> > > > > to > provide private suppo...
> > > > > > 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.
> >
> > --
> > 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.- 隱藏被引用文字 -
> >
> > - 顯示被引用文字 -
> >
>


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

[android-developers] Re: How to HTTP Post

2009-04-23 Thread Arnaud Weber
"HttpClient"... look in google or in this group historical with that
keyword.



2009/4/23 Moons 

>
> Hello everyone,
> I'm posting here because I searched the web and found nothing about
> how to HTTP POST.
> What I want to do is to access a webpage (PHP) sending data with the
> POST method.
> I'm not interested about seeing the webpage, I just want to send the
> data.
> Actually, it's for a game i developed, and users are asking for online
> scores, so I wrote a PHP script that takes POST data and writes the
> score in an SQL database.
>
> Thanks for your help.
>
> Moons
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: “The application xxxxxxxx (process xxxxxx) has stopped unexpectedly. Please try again .”

2009-04-23 Thread Arnaud Weber
To try catch the whole code is not a good practice but... have you tried to
catch exception or throwable?

It is not necesserly the system that is bugging but your thread may
eventually be candidate to garbage collection if no reference is made to it
and your parent thread has closed.

Are you working in a thread? have you tied it's life cycle with its parent
context thread lifecycle ?



2009/4/23 Dianne Hackborn 

> Have you looked at the stack crawl in the log?  Nobody can give help unless
> you at least provide that.
>
> On Wed, Apr 22, 2009 at 5:03 PM, Kenn Min Chong  wrote:
>
>>
>> Hi there!
>> For some reason I can't explain, when my app runs, I will on
>> occasion get the following error message:
>>
>> “The application  (process xx) has stopped unexpectedly.
>> Please try again.”
>>
>> When I debug my code, it seems to break at random places that doesn't
>> make sense. On top of that I tried to surround the entire code with a
>> try/catch block just to try to catch the exception, but it doesn't
>> work either. I'm suspecting it's the OS that is producing this error
>> message but I don't know why. As far as my code goes, if there were
>> exceptions caused by it, it would've been caught by the try/catch
>> block.  Can someone shed some light here?
>>
>>
>>
>
>
> --
> 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: SharedPreferences got deleted! - What could be the problem?

2009-04-23 Thread bo

I do SharedPreferences.Editor.commit() in couple of places. 1.
Immediately after setting the preference. 2. in Activity#onStop.
Nevertheless when I restart the app the preferences are gone. Any more
ideas? I do create prefs programmaticaly after harvesting these from
user (username/pwd)

On Apr 21, 11:00 pm, Chander Pechetty  wrote:
> Sorry, I was referring to the settings created using
> PreferenceActivity screen using xml. Your actual preference values do
> not help much in diagnosing the issue.
>
> Example snippet from loadingpreferencesfrom xml:
>                                              android:title="pref1"
>                         android:summaryOn="SummaryOn"
>                         android:summaryOff="SummaryOff"
>                         android:defaultValue="true"
>                         android:persistent="true"/>
>
> Forpreferencescreated programatically, you can use
> Preference.setPersistent(true);
>
> If no Settings screen is present, and everything is through your
> program, then batch SharedPreferences.Editor.commit()'s should be
> fine.
>
> I had a similar problem as yours, but have not faced it again so far.
> Other than the known issue mentioned in the previous post, I don't
> know what else the problem could be unless you post your code
> perhaps...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SharedPreferences got deleted! - What could be the problem?

2009-04-23 Thread Mattaku Betsujin
I found that the preferences XML will break very easily if you store some
Strings containing 'special' characters. I am not sure what exactly those
are, but when I stored things like

 putString("someurl", "http://xyz/?a=b&c=d";)

the preference file becomes empty next time I try to open it.

My solution is to quote all Strings that I put into the SharedPreferences.
After that my problems seems to go away.

I couldn't find a Base64 encoder in the Android API, so I wrote a
quick-and-dirty PrefQuote class:

http://code.google.com/p/nubi/source/browse/trunk/android/nubinews/src/com/nubinews/reader/PrefQuote.java

 putString("someurl", PrefQuote.quote("http://xyz/?a=b";))

Hope this helps

On Thu, Apr 23, 2009 at 9:56 AM, bo  wrote:

>
> I do SharedPreferences.Editor.commit() in couple of places. 1.
> Immediately after setting the preference. 2. in Activity#onStop.
> Nevertheless when I restart the app the preferences are gone. Any more
> ideas? I do create prefs programmaticaly after harvesting these from
> user (username/pwd)
>
> On Apr 21, 11:00 pm, Chander Pechetty  wrote:
> > Sorry, I was referring to the settings created using
> > PreferenceActivity screen using xml. Your actual preference values do
> > not help much in diagnosing the issue.
> >
> > Example snippet from loadingpreferencesfrom xml:
> >  > android:title="pref1"
> > android:summaryOn="SummaryOn"
> > android:summaryOff="SummaryOff"
> > android:defaultValue="true"
> > android:persistent="true"/>
> >
> > Forpreferencescreated programatically, you can use
> > Preference.setPersistent(true);
> >
> > If no Settings screen is present, and everything is through your
> > program, then batch SharedPreferences.Editor.commit()'s should be
> > fine.
> >
> > I had a similar problem as yours, but have not faced it again so far.
> > Other than the known issue mentioned in the previous post, I don't
> > know what else the problem could be unless you post your code
> > perhaps...
> >
>

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

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, 0, AUDIO_SAMPLE_FREQ);
>                 }
>
>                 public void onPeriodicNotification(AudioRecord arg0) {
>                         // read PCM buffer here
>                         byte[] audioBuffer = new byte[AUDIO_SAMPLE_FREQ];
>                         arg0.read(audioBuffer, 0, AUDIO_SAMPLE_FREQ);
>                 }
>
>         public void StartRecord()
>         {
>                 recorder.startRecording();
>         }
>
>         public void StopRecord()
>         {
>                 recorder.stop();
>         }
>
>         public void ReleaseRecord()
>         {
>                 recorder.release();
>         }
>
> };
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Audio streaming/progressive download over HTTP

2009-04-23 Thread Dave Sparks

There is currently no support for Flash in Android.

On Apr 22, 7:37 pm, tainy  wrote:
> Thanks a lof , Dave.
>
> So I can use http streaming on H.264/H.263/MPEG4-SP
>and use rtsp streaming on H.263/MPEG4-SP,  the issue with H.264
> will be fixed
> thanks for your work.
>
> what is more, how about the support for flash video(flv)? Do you know
> anything about that? and will it being supported for streaming?
>
> tainy
>
> On 4月23日, 上午7时59分, Dave Sparks  wrote:
>
> > Progressive streaming using HTTP is well-supported.
>
> > RTSP support isn't great yet, but it will get better with the 1.5
> > release (Cupcake), which fixes the 302 redirect problem. There may be
> > some issues with RTSP and H.264 - we found some issues with the
> > hardware codec late in the test cycle that we're too risky to fix. H.
> > 263 and MPEG4-SP should work pretty well.
>
> > The caveat with RTSP is that carriers may block the streams.
>
> > On Apr 22, 2:04 am, tainy  wrote:
>
> > > Hi Dave:
>
> > > for audio streaming, only MPEG-4(AAC LC/LTP decoding) is supported,
> > > right?
> > > what about video streaming? I found no place saying that is not
> > > supported, but someone said video streaming is not available by now.
> > > and if it will be supported, what format will be ok for streaming?
> > > thanks!
>
> > > tainy
>
> > > On 4月16日, 上午3时40分, Dave Sparks  wrote:
>
> > > > AAC inside an MP4 file is fine. There is no support for raw AAC
> > > > streams.
>
> > > > On Apr 15, 5:53 am, patrick  wrote:
>
> > > > > When you say "no support for AAC", does it mean "no AAC support for
> > > > > pure audio stream"?
> > > > > Can we use rtspstreamingwith a MPEG-4 video containing an AAC audio
> > > > > channel?
>
> > > > > On Apr 14, 11:56 pm, Dave Sparks  wrote:
>
> > > > > > We don't have an API for progressive download yet. Technically, the
> > > > > > website should say "progressivestreaming", but from a file authoring
> > > > > > perspective there is no distinction between the two.
>
> > > > > > RTSP support is only available for MPEG-4 file formats. There is no
> > > > > > support for raw AMR, AAC, or MP3 streams.
>
> > > > > > On Apr 14, 1:12 pm, Alexander  wrote:
>
> > > > > > > Hi All,
>
> > > > > > > I have a couple questions regarding audiostreaming/progressive
> > > > > > > download over
> > > > > > > HTTP. Could you please help me?
>
> > > > > > > 1. MediaPlayer supports progressive download according to the
> > > > > > > developer guide from
> > > > > > > this 
> > > > > > > linkhttp://developer.android.com/guide/topics/media/index.html
> > > > > > > ("If you're
> > > > > > > passing a URL to an online media file, the file must be capable of
> > > > > > > progressive
> > > > > > > download."). As far as I understand progressive download means 
> > > > > > > media
> > > > > > > playback during
> > > > > > > download process with saving the media file to file system(SD 
> > > > > > > card or
> > > > > > > internal FS) after
> > > > > > > the downloading is finished (if it's a file, not a stream in the
> > > > > > > passed URL).
> > > > > > > So, I tried to set the following URL: setDataSource
> > > > > > > (http://84.204.154.49/mmapi/music.mp3). Playback is fine, but the 
> > > > > > > file
> > > > > > > isn't saved to
> > > > > > > SD card or internal phone file system. Can MediaPlayer save media
> > > > > > > content to the file system
> > > > > > > after downloading is completed? Is there a way to turn on such
> > > > > > > capability?
>
> > > > > > > 2. Does MediaPlayer support HTTPstreaming? I tried to 
> > > > > > > usehttp://217.10.32.134:8129/ultrafan128.mp3,http://62.32.66.180:8800,
> > > > > > > also AMR-, AAC-
> > > > > > > audio stream over HTTP on the local server, but playback does not
> > > > > > > work. For example,
> > > > > > > RTSPstreamingworks fine with AMR and AAC.
>
> > > > > > > Thank you,
> > > > > > >Alexander- 隐藏被引用文字 -
>
> > > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> > - 显示引用的文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Audio streaming/progressive download over HTTP

2009-04-23 Thread Dave Sparks

I'm not sure which reference you a referring to, but MPEG4-SP decode
is supported.

Encoding implies streaming upload, but the subject of this thread is
download, not upload. If you are asking about RTSP upload streaming,
that is not supported in any format today.

On Apr 23, 12:02 am, tainy  wrote:
> what is more:
>
> according to "media-formats.html" in the reference, MPEG4 SP is not
> supported for both encoding and decoding,
> so how can it support streaming?
> quite confusing.
>
> On 4月23日, 上午7时59分, Dave Sparks  wrote:
>
> > Progressive streaming using HTTP is well-supported.
>
> > RTSP support isn't great yet, but it will get better with the 1.5
> > release (Cupcake), which fixes the 302 redirect problem. There may be
> > some issues with RTSP and H.264 - we found some issues with the
> > hardware codec late in the test cycle that we're too risky to fix. H.
> > 263 and MPEG4-SP should work pretty well.
>
> > The caveat with RTSP is that carriers may block the streams.
>
> > On Apr 22, 2:04 am, tainy  wrote:
>
> > > Hi Dave:
>
> > > for audio streaming, only MPEG-4(AAC LC/LTP decoding) is supported,
> > > right?
> > > what about video streaming? I found no place saying that is not
> > > supported, but someone said video streaming is not available by now.
> > > and if it will be supported, what format will be ok for streaming?
> > > thanks!
>
> > > tainy
>
> > > On 4月16日, 上午3时40分, Dave Sparks  wrote:
>
> > > > AAC inside an MP4 file is fine. There is no support for raw AAC
> > > > streams.
>
> > > > On Apr 15, 5:53 am, patrick  wrote:
>
> > > > > When you say "no support for AAC", does it mean "no AAC support for
> > > > > pure audio stream"?
> > > > > Can we use rtspstreamingwith a MPEG-4 video containing an AAC audio
> > > > > channel?
>
> > > > > On Apr 14, 11:56 pm, Dave Sparks  wrote:
>
> > > > > > We don't have an API for progressive download yet. Technically, the
> > > > > > website should say "progressivestreaming", but from a file authoring
> > > > > > perspective there is no distinction between the two.
>
> > > > > > RTSP support is only available for MPEG-4 file formats. There is no
> > > > > > support for raw AMR, AAC, or MP3 streams.
>
> > > > > > On Apr 14, 1:12 pm, Alexander  wrote:
>
> > > > > > > Hi All,
>
> > > > > > > I have a couple questions regarding audiostreaming/progressive
> > > > > > > download over
> > > > > > > HTTP. Could you please help me?
>
> > > > > > > 1. MediaPlayer supports progressive download according to the
> > > > > > > developer guide from
> > > > > > > this 
> > > > > > > linkhttp://developer.android.com/guide/topics/media/index.html
> > > > > > > ("If you're
> > > > > > > passing a URL to an online media file, the file must be capable of
> > > > > > > progressive
> > > > > > > download."). As far as I understand progressive download means 
> > > > > > > media
> > > > > > > playback during
> > > > > > > download process with saving the media file to file system(SD 
> > > > > > > card or
> > > > > > > internal FS) after
> > > > > > > the downloading is finished (if it's a file, not a stream in the
> > > > > > > passed URL).
> > > > > > > So, I tried to set the following URL: setDataSource
> > > > > > > (http://84.204.154.49/mmapi/music.mp3). Playback is fine, but the 
> > > > > > > file
> > > > > > > isn't saved to
> > > > > > > SD card or internal phone file system. Can MediaPlayer save media
> > > > > > > content to the file system
> > > > > > > after downloading is completed? Is there a way to turn on such
> > > > > > > capability?
>
> > > > > > > 2. Does MediaPlayer support HTTPstreaming? I tried to 
> > > > > > > usehttp://217.10.32.134:8129/ultrafan128.mp3,http://62.32.66.180:8800,
> > > > > > > also AMR-, AAC-
> > > > > > > audio stream over HTTP on the local server, but playback does not
> > > > > > > work. For example,
> > > > > > > RTSPstreamingworks fine with AMR and AAC.
>
> > > > > > > Thank you,
> > > > > > >Alexander- 隐藏被引用文字 -
>
> > > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> > - 显示引用的文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Doesn't Android-1.0 support Recording Video well?

2009-04-23 Thread Dave Sparks

This forum is for application developers to discuss supported features
in the SDK. If you want to discuss Android framework, then please take
this to android-framework.

On Apr 22, 7:40 pm, david 1  wrote:
> OK, thanks. BTW, does OpenCore-2.01 or 2.02 support it?
>
> david
>
> 2009/4/21 Marco Nelissen 
>
> > 1.0 doesn't support video recording at all.
>
> > On Tue, Apr 21, 2009 at 2:56 AM, david 1  wrote:
>
> >> hi all,
>
> >> I just experienced the video recording on G1 based on the system.img of
> >> android1.0.  The process just lasts about 3 seconds, then blocks. And the
> >> generated file is empty. What's the matter? Doesn't this version support
> >> video recording, yet?
>
> >> david
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android 1.5: How do we use the AudioTrack class?

2009-04-23 Thread Moto

I'm currently initiating the AudioTrack() for MODE_STREAM.

I load some bytes using the write() and I see that it is working but
once hit the play() call nothing happens... what is the matter? should
I do something else that is not obvious??  Any tips Google friends?

My settings:
streamType - STREAM_MUSIC
sampleRateInHz - 44100
channelConfig - CHANNEL_CONFIGURATION_STEREO
audioFormat - ENCODING_PCM_16BIT
bufferSizeInBytes - 256Kthe total size (in bytes) of the buffer where
audio data is read from for playback. mode - MODE_STREAM

thanks!
-Moto!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: “The application xxxxxxxx (process xxxxxx) has stopped unexpectedly. Please try again .”

2009-04-23 Thread Fred Grott(shareme)

Best bet is to post a log and than we can help you narrow it down


On Apr 22, 7:03 pm, Kenn Min Chong  wrote:
> Hi there!
>      For some reason I can't explain, when my app runs, I will on
> occasion get the following error message:
>
> “The application  (process xx) has stopped unexpectedly.
> Please try again.”
>
> When I debug my code, it seems to break at random places that doesn't
> make sense. On top of that I tried to surround the entire code with a
> try/catch block just to try to catch the exception, but it doesn't
> work either. I'm suspecting it's the OS that is producing this error
> message but I don't know why. As far as my code goes, if there were
> exceptions caused by it, it would've been caught by the try/catch
> block.  Can someone shed some light here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: How do we use the AudioTrack class?

2009-04-23 Thread Moto

I thought you could continuously write data into the AudioTrack as
long as the buffer size specified at the creation of the AudioTrack
was not exceeded...  and you can call play() as long as there was
enough data to start playback...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: PendingIntent problem

2009-04-23 Thread Dianne Hackborn
Different request codes is a perfectly fine way to do it.

On Thu, Apr 23, 2009 at 9:48 AM, Rob Franz  wrote:

> So with all the input from this thread, what's the proper way to send x
> number of pending intents that are unique?
> I guess I'm doing it not 100% correctly (even though it seems to work for
> me and the intents are spaced out enough not to interfere with each other).
>  I was doing it
> as setData((Uri.parse("custom://"+SystemClock.elapsedRealtime())).
>
> -rob
>
> On Thu, Apr 23, 2009 at 12:40 PM, Dianne Hackborn wrote:
>
>> No, I mean setting the explicit component to your broadcast receiver
>> component on the Intent class.  I strongly strongly recommend this for this
>> kind of situation where you want someone to deliver some specific thing to a
>> component in your app.  Please read the Intent java doc for more info.
>>
>>
>> On Thu, Apr 23, 2009 at 4:01 AM, Fuzzmonkey  wrote:
>>
>>>
>>> Hello,
>>>
>>> By explicit component do you mean >> data> in the intent filter or code in the broadcast receiver? Is that
>>> all i'd need?
>>>
>>> Thanks,
>>>
>>> George
>>>
>>> On Apr 23, 1:29 am, Dianne Hackborn  wrote:
>>> > You didn't include all of your code, but you definitely what to set an
>>> > explicit component for your receiver, and then the rest of the intent
>>> data
>>> > doesn't matter for deciding where or whether it will be delivered.
>>> >
>>> > On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey  wrote:
>>> >
>>> > > Done a bit more digging.
>>> >
>>> > > proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
>>> > > (;
>>> >
>>> > > If i add this line, the proximity alert is still triggered but the
>>> > > intent is never received. That is I assume it's still being fired but
>>> > > not received. I just get..
>>> >
>>> > > I/LocationManagerService(   57): Entered alert
>>> >
>>> > > Rather than..
>>> >
>>> > > I/LocationManagerService(   57): Entered alert
>>> > > D/DEBUG   (  319): Broadcast received
>>> > > D/MyActivity(  319): Proximity alert fired
>>> > > D/MyActivity(  319): 2 2
>>> >
>>> > > Those log commands are in my broadcast reciever btw. Do i need to
>>> > > change my intent filter with regards to the data bit? I've also
>>> logged
>>> > > SystemClock.elapsedRealtime to see if the pending intents were being
>>> > > added at the same time, they aren't.
>>> >
>>> > > Thanks,
>>> >
>>> > > George
>>> >
>>> > > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
>>> > > > Hmm.
>>> >
>>> > > > I'm currently using unique request codes and i'm still getting this
>>> > > > problem. I'm trying to add multiple proximity alerts, with each
>>> alert
>>> > > > containing different information. For example, i have 4 gps co-
>>> > > > ordinates belong to the same group. I want the intent to contain
>>> the
>>> > > > extra information reflecting this.
>>> >
>>> > > > Intent proxIntent = new Intent
>>> > > > ("android.intent.action.PROXIMITY_ALERT");
>>> > > > proxIntent.putExtra("goal", goalid);
>>> > > > proxIntent.putExtra("mgoal", mgoalid);
>>> >
>>> > > > I then add this 'unique' intent to a pending intent. r represents a
>>> > > > unique request code, generated at random.
>>> >
>>> > > > PendingIntent pi = PendingIntent.getBroadcast(this, r, proxIntent,
>>> > > > PendingIntent.FLAG_CANCEL_CURRENT);
>>> >
>>> > > > And then add this pending intent to the location manager.
>>> >
>>> > > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
>>> >
>>> > > > The problem i'm finding that if a add 4 proximity alerts quite a
>>> > > > distance appart, say 500m and set the radius to 50 the information
>>> i'm
>>> > > > receiving when a proximity alert is fired is always that of the
>>> last
>>> > > > alert added. I'm assuming this is because the pending intents are
>>> not
>>> > > > being seen as unique, and is being over written every time i add a
>>> new
>>> > > > proximity alert. If i had the line..
>>> >
>>> > > > i.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime(;
>>> >
>>> > > > The proximity alerts don't seem to fire at all! It's all very
>>> > > > confusing. Any one shed any light on this?
>>> >
>>> > > > Thanks,
>>> >
>>> > > > George
>>> >
>>> > > > On Apr 22, 9:06 pm, Rob Franz  wrote:
>>> >
>>> > > > > Yeah I agree - it is ugly, but for my purposes it worked... the
>>> intents
>>> > > > > wouldn't be fired one right after the other for me.
>>> >
>>> > > > > On Wed, Apr 22, 2009 at 4:02 PM, Tom Gibara 
>>> > > wrote:
>>> > > > > > Setting the data uniquely in this way is a bit ugly - and what
>>> if you
>>> > > post
>>> > > > > > two intents within the granularity of the clock?
>>> > > > > > I use unique request codes. I can't claim that this is the
>>> intended
>>> > > use for
>>> > > > > > them (the documentation is a bit sparse) but it seems to work
>>> well.
>>> > > > > > Tom.
>>> >
>>> > > > > > 2009/4/22 Rob Franz 
>>> >
>>> > > > > > Hi Dianne,I thought that the goal was to create unique
>>> > > pendingIntents...
>>> > > > > >> i.e. don't cancel or cha

[android-developers] Re: Android SDK 1.5 Voice recognition sample

2009-04-23 Thread z

I posted exact same problem a few days back too.
Could someone help?

On Apr 23, 7:22 am, jigyasa  wrote:
> VoiceRecognition in android api sample  fails with no activity
> registered for intent message while running in simulator.Is there any
> app that would provide me this feature for testing or i need to get
> something from android source site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: PendingIntent problem

2009-04-23 Thread Rob Franz
Cool, will look into that then.  Thanks all.

On Thu, Apr 23, 2009 at 1:52 PM, Dianne Hackborn wrote:

> Different request codes is a perfectly fine way to do it.
>
>
> On Thu, Apr 23, 2009 at 9:48 AM, Rob Franz  wrote:
>
>> So with all the input from this thread, what's the proper way to send x
>> number of pending intents that are unique?
>> I guess I'm doing it not 100% correctly (even though it seems to work for
>> me and the intents are spaced out enough not to interfere with each other).
>>  I was doing it
>> as setData((Uri.parse("custom://"+SystemClock.elapsedRealtime())).
>>
>> -rob
>>
>> On Thu, Apr 23, 2009 at 12:40 PM, Dianne Hackborn wrote:
>>
>>> No, I mean setting the explicit component to your broadcast receiver
>>> component on the Intent class.  I strongly strongly recommend this for this
>>> kind of situation where you want someone to deliver some specific thing to a
>>> component in your app.  Please read the Intent java doc for more info.
>>>
>>>
>>> On Thu, Apr 23, 2009 at 4:01 AM, Fuzzmonkey  wrote:
>>>

 Hello,

 By explicit component do you mean >>> data> in the intent filter or code in the broadcast receiver? Is that
 all i'd need?

 Thanks,

 George

 On Apr 23, 1:29 am, Dianne Hackborn  wrote:
 > You didn't include all of your code, but you definitely what to set an
 > explicit component for your receiver, and then the rest of the intent
 data
 > doesn't matter for deciding where or whether it will be delivered.
 >
 > On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey  wrote:
 >
 > > Done a bit more digging.
 >
 > >
 proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
 > > (;
 >
 > > If i add this line, the proximity alert is still triggered but the
 > > intent is never received. That is I assume it's still being fired
 but
 > > not received. I just get..
 >
 > > I/LocationManagerService(   57): Entered alert
 >
 > > Rather than..
 >
 > > I/LocationManagerService(   57): Entered alert
 > > D/DEBUG   (  319): Broadcast received
 > > D/MyActivity(  319): Proximity alert fired
 > > D/MyActivity(  319): 2 2
 >
 > > Those log commands are in my broadcast reciever btw. Do i need to
 > > change my intent filter with regards to the data bit? I've also
 logged
 > > SystemClock.elapsedRealtime to see if the pending intents were being
 > > added at the same time, they aren't.
 >
 > > Thanks,
 >
 > > George
 >
 > > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
 > > > Hmm.
 >
 > > > I'm currently using unique request codes and i'm still getting
 this
 > > > problem. I'm trying to add multiple proximity alerts, with each
 alert
 > > > containing different information. For example, i have 4 gps co-
 > > > ordinates belong to the same group. I want the intent to contain
 the
 > > > extra information reflecting this.
 >
 > > > Intent proxIntent = new Intent
 > > > ("android.intent.action.PROXIMITY_ALERT");
 > > > proxIntent.putExtra("goal", goalid);
 > > > proxIntent.putExtra("mgoal", mgoalid);
 >
 > > > I then add this 'unique' intent to a pending intent. r represents
 a
 > > > unique request code, generated at random.
 >
 > > > PendingIntent pi = PendingIntent.getBroadcast(this, r, proxIntent,
 > > > PendingIntent.FLAG_CANCEL_CURRENT);
 >
 > > > And then add this pending intent to the location manager.
 >
 > > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
 >
 > > > The problem i'm finding that if a add 4 proximity alerts quite a
 > > > distance appart, say 500m and set the radius to 50 the information
 i'm
 > > > receiving when a proximity alert is fired is always that of the
 last
 > > > alert added. I'm assuming this is because the pending intents are
 not
 > > > being seen as unique, and is being over written every time i add a
 new
 > > > proximity alert. If i had the line..
 >
 > > > i.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime(;
 >
 > > > The proximity alerts don't seem to fire at all! It's all very
 > > > confusing. Any one shed any light on this?
 >
 > > > Thanks,
 >
 > > > George
 >
 > > > On Apr 22, 9:06 pm, Rob Franz  wrote:
 >
 > > > > Yeah I agree - it is ugly, but for my purposes it worked... the
 intents
 > > > > wouldn't be fired one right after the other for me.
 >
 > > > > On Wed, Apr 22, 2009 at 4:02 PM, Tom Gibara >>> >
 > > wrote:
 > > > > > Setting the data uniquely in this way is a bit ugly - and what
 if you
 > > post
 > > > > > two intents within the granularity of the clock?
 > > > > > I use unique request codes. I can't claim that this is the
 intended
 > > use for
 > > > > > them (th

[android-developers] Re: PendingIntent problem

2009-04-23 Thread Dianne Hackborn
That said...  I would be -very- suspicious about the code you posted where
you are effectively creating random identities for your pending intents.  In
most of the places where one uses a pending intent, you give it to something
that holds on to it indefinitely, so you need to be able to recover the
previous pending intent so you can give it back to have it unregistered.
That is why the API works the way it does.  This API is really not intended
to generate tons of pending intents whose lifetime is not being managed.

On Thu, Apr 23, 2009 at 10:52 AM, Dianne Hackborn wrote:

> Different request codes is a perfectly fine way to do it.
>
>
> On Thu, Apr 23, 2009 at 9:48 AM, Rob Franz  wrote:
>
>> So with all the input from this thread, what's the proper way to send x
>> number of pending intents that are unique?
>> I guess I'm doing it not 100% correctly (even though it seems to work for
>> me and the intents are spaced out enough not to interfere with each other).
>>  I was doing it
>> as setData((Uri.parse("custom://"+SystemClock.elapsedRealtime())).
>>
>> -rob
>>
>> On Thu, Apr 23, 2009 at 12:40 PM, Dianne Hackborn wrote:
>>
>>> No, I mean setting the explicit component to your broadcast receiver
>>> component on the Intent class.  I strongly strongly recommend this for this
>>> kind of situation where you want someone to deliver some specific thing to a
>>> component in your app.  Please read the Intent java doc for more info.
>>>
>>>
>>> On Thu, Apr 23, 2009 at 4:01 AM, Fuzzmonkey  wrote:
>>>

 Hello,

 By explicit component do you mean >>> data> in the intent filter or code in the broadcast receiver? Is that
 all i'd need?

 Thanks,

 George

 On Apr 23, 1:29 am, Dianne Hackborn  wrote:
 > You didn't include all of your code, but you definitely what to set an
 > explicit component for your receiver, and then the rest of the intent
 data
 > doesn't matter for deciding where or whether it will be delivered.
 >
 > On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey  wrote:
 >
 > > Done a bit more digging.
 >
 > >
 proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
 > > (;
 >
 > > If i add this line, the proximity alert is still triggered but the
 > > intent is never received. That is I assume it's still being fired
 but
 > > not received. I just get..
 >
 > > I/LocationManagerService(   57): Entered alert
 >
 > > Rather than..
 >
 > > I/LocationManagerService(   57): Entered alert
 > > D/DEBUG   (  319): Broadcast received
 > > D/MyActivity(  319): Proximity alert fired
 > > D/MyActivity(  319): 2 2
 >
 > > Those log commands are in my broadcast reciever btw. Do i need to
 > > change my intent filter with regards to the data bit? I've also
 logged
 > > SystemClock.elapsedRealtime to see if the pending intents were being
 > > added at the same time, they aren't.
 >
 > > Thanks,
 >
 > > George
 >
 > > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
 > > > Hmm.
 >
 > > > I'm currently using unique request codes and i'm still getting
 this
 > > > problem. I'm trying to add multiple proximity alerts, with each
 alert
 > > > containing different information. For example, i have 4 gps co-
 > > > ordinates belong to the same group. I want the intent to contain
 the
 > > > extra information reflecting this.
 >
 > > > Intent proxIntent = new Intent
 > > > ("android.intent.action.PROXIMITY_ALERT");
 > > > proxIntent.putExtra("goal", goalid);
 > > > proxIntent.putExtra("mgoal", mgoalid);
 >
 > > > I then add this 'unique' intent to a pending intent. r represents
 a
 > > > unique request code, generated at random.
 >
 > > > PendingIntent pi = PendingIntent.getBroadcast(this, r, proxIntent,
 > > > PendingIntent.FLAG_CANCEL_CURRENT);
 >
 > > > And then add this pending intent to the location manager.
 >
 > > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
 >
 > > > The problem i'm finding that if a add 4 proximity alerts quite a
 > > > distance appart, say 500m and set the radius to 50 the information
 i'm
 > > > receiving when a proximity alert is fired is always that of the
 last
 > > > alert added. I'm assuming this is because the pending intents are
 not
 > > > being seen as unique, and is being over written every time i add a
 new
 > > > proximity alert. If i had the line..
 >
 > > > i.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime(;
 >
 > > > The proximity alerts don't seem to fire at all! It's all very
 > > > confusing. Any one shed any light on this?
 >
 > > > Thanks,
 >
 > > > George
 >
 > > > On Apr 22, 9:06 pm, Rob Franz  wrote:
 >
 > > > > Yeah I agree - it is ugly, but for my purpose

[android-developers] Re: Information about required permissions

2009-04-23 Thread Dianne Hackborn
No, sorry.

On Thu, Apr 23, 2009 at 9:16 AM,  wrote:

>
> Hi all,
>
> I would like to know if there's documentation about what are the
> required permissions for each activity, intent, broadcastReceiver,
> etc.
>
> Or maybe there is a file with this info in the SDK?
>
> 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: AppWidget issues

2009-04-23 Thread Jeff Sharkey

So just a heads up that we won't be able to fix the onDeleted() bug
for the 1.5 SDK.  Here is a quick workaround that you can patch
against your class that extends AppWidgetProvider to correctly catch
and handle the onDeleted() event.

@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId = extras.getInt
(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId });
}
} else {
super.onReceive(context, intent);
}
}


j



On Apr 20, 4:43 pm, Jeff Sharkey  wrote:
> > In onActivityResult(), the cancellation is checked for request
> > code REQUEST_PICK_APPWIDGET whereas it should be checking
> > for REQUEST_CREATE_APPWIDGET.
>
> Oops, you're right, thanks for catching that.  For the example widgets
> I've been writing that use configuration steps, I've been keeping an
> internal CONFIGURED flag which I use to skip updates.  Because I was
> skipping non-configured widget updates, I never noticed this myself.
> (I also used this flag to skip the first update before the
> configuration step has been completed.)
>
> Also, a quick update on the fixes: most of them will be delayed until
> the next platform release because the device-bound code is already
> frozen.  We could fix it for the SDK, but it would be bad to have
> different behavior between the two.  We definitely have bugs filed for
> these, and they will be fixed.
>
> Thanks for digging in and finding them.  :)
>
> --
> 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: PendingIntent problem

2009-04-23 Thread Rob Franz
I was hoping you forgot about that piece of code...I think I saw that
somewhere (someone else posted it somewhere so I may not be the only one
using it) when I was trying to figure out why i was trying to send multiple,
different pending intents, but the data was not changing - essentially I
think that everytime I thought I was creating a new one, I was actually only
changing the one that I had just submitted.

On Thu, Apr 23, 2009 at 1:55 PM, Dianne Hackborn wrote:

> That said...  I would be -very- suspicious about the code you posted where
> you are effectively creating random identities for your pending intents.  In
> most of the places where one uses a pending intent, you give it to something
> that holds on to it indefinitely, so you need to be able to recover the
> previous pending intent so you can give it back to have it unregistered.
> That is why the API works the way it does.  This API is really not intended
> to generate tons of pending intents whose lifetime is not being managed.
>
>
> On Thu, Apr 23, 2009 at 10:52 AM, Dianne Hackborn wrote:
>
>> Different request codes is a perfectly fine way to do it.
>>
>>
>> On Thu, Apr 23, 2009 at 9:48 AM, Rob Franz  wrote:
>>
>>> So with all the input from this thread, what's the proper way to send x
>>> number of pending intents that are unique?
>>> I guess I'm doing it not 100% correctly (even though it seems to work for
>>> me and the intents are spaced out enough not to interfere with each other).
>>>  I was doing it
>>> as setData((Uri.parse("custom://"+SystemClock.elapsedRealtime())).
>>>
>>> -rob
>>>
>>> On Thu, Apr 23, 2009 at 12:40 PM, Dianne Hackborn 
>>> wrote:
>>>
 No, I mean setting the explicit component to your broadcast receiver
 component on the Intent class.  I strongly strongly recommend this for this
 kind of situation where you want someone to deliver some specific thing to 
 a
 component in your app.  Please read the Intent java doc for more info.


 On Thu, Apr 23, 2009 at 4:01 AM, Fuzzmonkey  wrote:

>
> Hello,
>
> By explicit component do you mean  data> in the intent filter or code in the broadcast receiver? Is that
> all i'd need?
>
> Thanks,
>
> George
>
> On Apr 23, 1:29 am, Dianne Hackborn  wrote:
> > You didn't include all of your code, but you definitely what to set
> an
> > explicit component for your receiver, and then the rest of the intent
> data
> > doesn't matter for deciding where or whether it will be delivered.
> >
> > On Wed, Apr 22, 2009 at 5:19 PM, Fuzzmonkey 
> wrote:
> >
> > > Done a bit more digging.
> >
> > >
> proxIntent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime
> > > (;
> >
> > > If i add this line, the proximity alert is still triggered but the
> > > intent is never received. That is I assume it's still being fired
> but
> > > not received. I just get..
> >
> > > I/LocationManagerService(   57): Entered alert
> >
> > > Rather than..
> >
> > > I/LocationManagerService(   57): Entered alert
> > > D/DEBUG   (  319): Broadcast received
> > > D/MyActivity(  319): Proximity alert fired
> > > D/MyActivity(  319): 2 2
> >
> > > Those log commands are in my broadcast reciever btw. Do i need to
> > > change my intent filter with regards to the data bit? I've also
> logged
> > > SystemClock.elapsedRealtime to see if the pending intents were
> being
> > > added at the same time, they aren't.
> >
> > > Thanks,
> >
> > > George
> >
> > > On Apr 22, 11:53 pm, Fuzzmonkey  wrote:
> > > > Hmm.
> >
> > > > I'm currently using unique request codes and i'm still getting
> this
> > > > problem. I'm trying to add multiple proximity alerts, with each
> alert
> > > > containing different information. For example, i have 4 gps co-
> > > > ordinates belong to the same group. I want the intent to contain
> the
> > > > extra information reflecting this.
> >
> > > > Intent proxIntent = new Intent
> > > > ("android.intent.action.PROXIMITY_ALERT");
> > > > proxIntent.putExtra("goal", goalid);
> > > > proxIntent.putExtra("mgoal", mgoalid);
> >
> > > > I then add this 'unique' intent to a pending intent. r represents
> a
> > > > unique request code, generated at random.
> >
> > > > PendingIntent pi = PendingIntent.getBroadcast(this, r,
> proxIntent,
> > > > PendingIntent.FLAG_CANCEL_CURRENT);
> >
> > > > And then add this pending intent to the location manager.
> >
> > > > lm.addProximityAlert(latitude, longitude, radius, -1, pi);
> >
> > > > The problem i'm finding that if a add 4 proximity alerts quite a
> > > > distance appart, say 500m and set the radius to 50 the
> information i'm
> > > > receiving when a proximity alert is fired is always th

[android-developers] Re: Information about required permissions

2009-04-23 Thread thiagofj2...@gmail.com

Ok, thanks for the answer.

On 23 abr, 14:56, Dianne Hackborn  wrote:
> No, sorry.
>
> On Thu, Apr 23, 2009 at 9:16 AM,  wrote:
>
> > Hi all,
>
> > I would like to know if there's documentation about what are the
> > required permissions for each activity, intent, broadcastReceiver,
> > etc.
>
> > Or maybe there is a file with this info in the SDK?
>
> > 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: animated GIF support in android

2009-04-23 Thread mathiastck

In BitmapDecode.java APIDemos shows how you can use Movie to display
an animated GIF.  I had partial success with it in the past.  (I
sometimes got a movie back with zero duration).

On Apr 23, 4:33 am, Mark Murphy  wrote:
> Nasam wrote:
> > Is animated GIF supported in android through SKIA library. I am not
> > able to play animated GIF which is partially updated about each frame.
>
> I do not believe anything built into Android plays animated GIFs.
>
> --
> 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: HttpUrlConnection problem

2009-04-23 Thread Streets Of Boston

I had a similar issue and i gave up.
Instead i used the DefaultHttpClient class together with HttpPut/
HttpGet/HttpResponse classes.

This works fine.

On Apr 23, 5:50 am, Mika  wrote:
> Hi all,
>
> I have a strange problem with HttpUrlConnection. I can send data (with
> POST), but the receiving succeeds only every second time or after a
> sufficiently long (< 5 min) pause between the sends. I basically start
> a new thread where the initialization of the HttpUrlConnection,
> writing/reading from output/input streams and closing the connection
> is done. If I don't close the input and the output streams the sending
> works correctly each time.
>
> Any suggestions where's the problem? The same problem was discussed in
> herehttp://groups.google.com/group/android-developers/browse_thread/threa...
> but no solution were found.
>
> -Mika
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How can I crop a Picture in android

2009-04-23 Thread Meryl Silverburgh

Hi,

If I have an instance of a  Picture object (android.graphics.Picture),
how can I crop out a section of the Picture object (0, 0, 100, 100)
(x, y, w, h)?

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: Android SDK 1.5 Voice recognition sample

2009-04-23 Thread z

And this is the error:

android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.speech.action.RECOGNIZE_SPEECH }
or with extras in you specify them.

It's a runtimeexception being caught and rethrown in ZygoteInit.java
line 788.

On Apr 23, 10:53 am, z  wrote:
> I posted exact same problem a few days back too.
> Could someone help?
>
> On Apr 23, 7:22 am, jigyasa  wrote:
>
> > VoiceRecognition in android api sample  fails with no activity
> > registered for intent message while running in simulator.Is there any
> > app that would provide me this feature for testing or i need to get
> > something from android source site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Customer signature

2009-04-23 Thread Joe

Hi !

In my app, I need a customer signature for prooving the customer have 
seen some informations and validate them.

- Does anybody knows the Android way for implementing a customer 
signature ?

With Windows CE, we can use a signature's specific component, and the 
customer can use the pen to draw lines. But how can we do this with 
finger's like mobile phone ?

It seems to be a very difficult question, and I haven't found an answer 
to my question yet.

Best regards,
Joe.

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



[android-developers] bad sqlite performance

2009-04-23 Thread skink

i was quite surprised when dealing with android's sqlite
implementation.

suppose i have db with a table counting
moro or less 4 rows.

now i do query 'select field from table'.

no 'where' clause so result set should have
all rows.

and i was surprized that Cursor 'allocates'
probably all the rows since it takes ~10
secs to db.query() + cursor.moveToFirst()

afaik sqlite on PC makes working set
'virtual' doing hard job on demand when one
wants to fetch next rows (i did the same
with python 2.5 which has sqlite support
and couldn't measure time of select +
fetching first row since it was so fast)

is my assumption correct that Cursor allocates all the rows not doing
lazy allocates?
















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

2009-04-23 Thread dan raaka
There is no ready-to-use signature widget in android.
But writing one shouldn't be too hard.
Create a custom view, see fingerpaint example in the APIdemos, and when the
user is done, take a snapshot of the view (which contains the signature).
This would very similar to a checkout machine in the malls.

The View class in the cupcake has a new function (not sure if it is public)
Bitmap createSnapshot(Bitmap.Config quality, int backgroundColor)

-Dan

2009/4/22 Stéphane POUVRASSEAU <
android_-_developer.android_w...@pouvrasseau.com>

>
> Hi !
>
> In my app, I need a customer signature for prooving the customer have
> seen some informations and validate them.
>
> - Does anybody knows the Android way for implementing a customer signature
> ?
>
> With Windows CE, we can use a signature's specific component, and the
> customer can use the pen to draw lines. But how can we do this with
> finger's like mobile phone ?
>
> It seems to be a very difficult question, and I haven't found an answer
> to my question yet.
>
> Best regards,
> Joe.
>
>
> >
>

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



[android-developers] SDK1.5 AudioRecord sample rate problem

2009-04-23 Thread szabolcs

I was trying to record sound using the MIC with the AudioRecord class:

mRecord = new AudioRecord(
MediaRecorder.AudioSource.MIC,
SAMPLE_RATE,
AudioFormat.CHANNEL_CONFIGURATION_DEFAULT,
AudioFormat.ENCODING_DEFAULT,
BUFFERSIZE
);

This call results in:

ERROR/AudioRecord(1120): Recording parameters are not supported:
sampleRate 11025, channelCount 1, format 1
ERROR/AudioRecord-JNI(1120): Error creating AudioRecord instance:
initialization check failed.
ERROR/AudioRecord-Java(1120): [ android.media.AudioRecord ] Error code
-20 when initializing native AudioRecord object.

whenever the SAMPLE_RATE is some value other than
AudioRecord::DEFAULT_SAMPLE_RATE (8000) declared in ./frameworks/base/
include/media/AudioRecord.h from GIT.
The documentation says 11025/22050/44100 should be ok too.

Am I missing something?

Thank you for your help,

-Szabolcs

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

2009-04-23 Thread havexz

You havnt clearly defined the problem. When is your activities called
again? By called again you mean these activities get restarted?

If I am guessing right this happens when you slide out the keyboard
(when the orientation is changed)?

On Apr 23, 8:44 am, HowlettAndroid 
wrote:
> Hello,
>
>         Hope you lot can help. I'm currently testing my application in
> the SDK emulator, Great everything works perfectly. The next step was
> to try the same application loaded on to the G1. After loading the
> app, I'm getting some strange behaviour. Some Activities seem to be
> called by intents multiple times, when in the emulator they only
> appear once. Looking at the code I can't see what could be wrong. Any
> help would be great.
>
> Thanks
>  HowlettAndroid
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Information about required permissions

2009-04-23 Thread havexz

Will there be some in the future? And also shouldnt be there a
document atleast for the standard activities like viberation related?

On Apr 23, 12:56 pm, Dianne Hackborn  wrote:
> No, sorry.
>
> On Thu, Apr 23, 2009 at 9:16 AM,  wrote:
>
> > Hi all,
>
> > I would like to know if there's documentation about what are the
> > required permissions for each activity, intent, broadcastReceiver,
> > etc.
>
> > Or maybe there is a file with this info in the SDK?
>
> > 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: Customer signature

2009-04-23 Thread Jeff Sharkey

btw, it might be lighter-weight to collect and package up the vector
drawing instructions, instead of a heavy image.

j

On Thu, Apr 23, 2009 at 12:30 PM, dan raaka  wrote:
> There is no ready-to-use signature widget in android.
> But writing one shouldn't be too hard.
> Create a custom view, see fingerpaint example in the APIdemos, and when the
> user is done, take a snapshot of the view (which contains the signature).
> This would very similar to a checkout machine in the malls.
>
> The View class in the cupcake has a new function (not sure if it is public)
> Bitmap createSnapshot(Bitmap.Config quality, int backgroundColor)
>
> -Dan
>
> 2009/4/22 Stéphane POUVRASSEAU
> 
>>
>> Hi !
>>
>> In my app, I need a customer signature for prooving the customer have
>> seen some informations and validate them.
>>
>> - Does anybody knows the Android way for implementing a customer signature
>> ?
>>
>> With Windows CE, we can use a signature's specific component, and the
>> customer can use the pen to draw lines. But how can we do this with
>> finger's like mobile phone ?
>>
>> It seems to be a very difficult question, and I haven't found an answer
>> to my question yet.
>>
>> Best regards,
>> Joe.
>>
>>
>>
>
>
> >
>



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



  1   2   >