[android-developers] setOnKeyListener problem

2008-10-15 Thread pabbot

Hi everyone,

this is my first post here so I'll try not to extend so much.

I've got a Layout with 3 EditText, called mText1, mText2 and mText3.
I want to navigate through them by pressing the ENTER KEY, so I
decided to set a onKeyListener for every of them and every time I
detect the user presses the ENTER KEY, I set the focus on the next
EditText. But it sets the focus on the next's next. If I press the
ENTER KEY on mText1, the focus is set on mText3; the same with mText2
(it is set on mText1) and so on...

I can't understand this kind of behaviour.

Any solution? Many thanks in advance.

Here, the code:
mText1.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent 
event) {
if(keyCode == KeyEvent.KEYCODE_ENTER) {
mText2.requestFocus();
return true;
}
return false;
}

});
mText2.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent 
event) {
if(keyCode == KeyEvent.KEYCODE_ENTER) {
mText3.requestFocus();
return true;
}
return false;
}

});
mText3.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent 
event) {
if(keyCode == KeyEvent.KEYCODE_ENTER) {
mText1.requestFocus();
return true;
}
return false;
}

});

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



[android-developers] JavaScript and WebView

2008-10-15 Thread Rubicks

My activity has a webview . I will be leading some html pages on that
webview which includes some JavaScript functions. I have a need to
send some data from webview to my java application based on some user
actions using javaScript functions. Is it possible or how can I do
it?

Thanks for the help.

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



[android-developers] Question regarding WebView

2008-10-15 Thread Rubicks

I had the problem with webview, i.e when I click on a link , it used
to take me to a new browser window. I wanted the link to be open on
the same window. So I used this code posted somewhere on this forum.
But now I have new problem. With this code, I am getting a
SocketException : Broken Pipe. With the Bowser, I had no such
problems.  Any one any clues???

Thanks

public class myLesson extends Activity {

 WebView myWebView;

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.layout_web);
myWebView=(WebView)findViewById(R.id.webview);
myWebView.setWebViewClient(new Callback());
loadTime();
}

void loadTime() {
//  myMMFString has a simple html string with a link
myWebView.loadDataWithBaseURL(x-data://base, myMMFString,


text/html, UTF-8,


null);
}

private class Callback extends WebViewClient {

public boolean shouldOverrideUrlLoading(WebView view, String 
url) {
loadTime();
return(false);
}
}
}

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



[android-developers] about the sdk 1.0 source code

2008-10-15 Thread gzhhong

Hi all,
I am reading the sdk 1.0 source code(decompiled by jad). It is very
strange that there are so many: throw new RuntimeException(Stub!);
in the classes.

for example, the MapView are

public class MapView extends ViewGroup
{
...
public MapView(Context context, String apiKey)
{
super((Context)null, (AttributeSet)null, 0);
throw new RuntimeException(Stub!);
}
..
public MapView(Context context, String apiKey)
{
super((Context)null, (AttributeSet)null, 0);
throw new RuntimeException(Stub!);
}
...
so where is the implementation of those methods?

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



[android-developers] About the IM to show the message received

2008-10-15 Thread zcj0429

Hi, experts:
I'm now trying to develop an IM on Android. Now the problem is
like this: I manage the connection and chat in a service. And I edit
the message in another activity. So when I receive a message, how can
I show it in the same interface which I edit the message just as the
MSN does. 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: offline topographic mapping applications?

2008-10-15 Thread Adam Estrada

Dara,
Please read the GeoPDF Blog post that can possibly lead you in the
right direction...

http://geopdf.blogspot.com/2008/10/mobile-for-people.html

Cheers,
Adam Estrada

On Oct 8, 4:17 pm, DaraParsavand [EMAIL PROTECTED] wrote:
 One of the key things I'd like to do with a GPS phone is to view
 freely downloaded USGS topographic maps (United States) along with my
 current location on the map while the phone is offline.  I don't need
 that many fancy features such as elevation profiling, just the ability
 to pan, zoom, etc.  I'd like to download maps from a PC or using the
 phone (wi-fi or 3G).

 This type of functionality is currently a simple thing to do on a
 laptop instead of a phone if you have a USB GPS device, by simply
 downloading aGeoPDFtoolbar for Adobe Reader and downloadingGeoPDF
 topo maps fromhttp://store.usgs.gov(scroll down to Map Locator).

 Does anyone know of someone already working on such a project?  Or do
 people have comments on how easy it would be to write new code for
 such a project?  I'm pretty disappointed that the iPhone has been out
 for around 3 months now and there hasn't been any talk of an app on
 that platform that would do such a thing.  Without it, the GPS isn't
 nearly as useful as it could be.  I hope the Android platform can do
 better.

 I suppose a full featured app should also handle GeoTIFF files, though
 it appears the USGS is behind theGeoPDFfile format now (with future
 maps having layers of information which will be great - I can turn off
 pointless features to me which just clutter the map).

 Dara Parsavand

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



[android-developers] Re: User Alarm Interaction when Sleeping

2008-10-15 Thread shailesh prakash

Try droidDraw, it is cool way to create GUI for android.
Also Elipse has nice layout building capability, you can try eclipse too

On 10/15/08, Brian [EMAIL PROTECTED] wrote:

 I'm playing with building a simple alarm, but it's very hard to see
 how to get a nice UI interaction when the phone is asleep.

  I have finally worked out an OK behaviour:

 a) Use the AlarmManager to set a time to wake up my application
 b) use a KeyguardManager.KeyguardLock to disable the lock
 c) pop up an AlertDialog with an OK your alarm has gone off
 button
 d) turn back on the Keyguard lock.

  But it's klunky in that the user can hit a pocket OK and clear an
 alarm once the KeyguardManager is off. And as soon as the user exits
 my alarm application, I turn the keyguardManager lock back on and I'm
 locked out.

  The interaction sequence on the iPhone is a bit better in that I can
 pop up a window (play alarms and so on) and the user has to log in to
 unset the alarm.

  Does anyone know how to get a better user interaction on the gphone?

  And while playing with this I can see a service logging called
 KeyguardViewMediator but there is no documention or group posts on
 this. Is this what is really acting as the keyguard?

  Are there any examples of this hanging around?

 


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



[android-developers] Displaying Images

2008-10-15 Thread JavaAndroid

Hi All,
Can anyone direct me to some links / tutorials that will help me to
start experimenting on displaying images in Android . Is there any way
to add Servlet/JSP API in Android Application. Can i refer image that
is residing in a web server.

Thanks in Advance

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



[android-developers] Re: Displaying Images

2008-10-15 Thread JavaAndroid

Hi Shailesh,
Thanks a lot for ur Help. Let me try that...Thanks again.

On Oct 15, 11:45 am, shailesh prakash [EMAIL PROTECTED] wrote:
 Hi,
 you may like to try this 
 :http://code.google.com/p/apps-for-android/source/browse/trunk/Photost...

 On 10/15/08, JavaAndroid [EMAIL PROTECTED] wrote:





  Hi All,
  Can anyone direct me to some links / tutorials that will help me to
  start experimenting on displaying images in Android . Is there any way
  to add Servlet/JSP API in Android Application. Can i refer image that
  is residing in a web server.

  Thanks in Advance

  Thanks
  JavaAndroid- Hide quoted text -

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



[android-developers] Re: UI Controls

2008-10-15 Thread JavaAndroid

Thanks ShaileshThat forum is really awesome...it looks to be a
best place to start withThanks a million.. :)

On Oct 15, 11:51 am, shailesh prakash [EMAIL PROTECTED] wrote:
  you can try link:http://www.anddev.org, it is a good site to start
 with Android.

 On 10/15/08, JavaAndroid [EMAIL PROTECTED] wrote:





  Hi All
  Can i add UI controls like Checkbox, Radio button, Select Box, Drop
  down menus in my Android application... If yes could you suggest some
  links/tutorials that shed light in this topic.

  Thanks in Advance

  Thanks
  JavaAndroid- Hide quoted text -

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



[android-developers] Re: UI Controls

2008-10-15 Thread shailesh prakash

 you can try link: http://www.anddev.org , it is a good site to start
with Android.

On 10/15/08, JavaAndroid [EMAIL PROTECTED] wrote:

 Hi All
 Can i add UI controls like Checkbox, Radio button, Select Box, Drop
 down menus in my Android application... If yes could you suggest some
 links/tutorials that shed light in this topic.

 Thanks in Advance

 Thanks
 JavaAndroid


 


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



[android-developers] Re: setOnKeyListener problem

2008-10-15 Thread pabbot

Ok. It's solved.

The solution is not only to detect the KEYCODE_ENTER but also the key
down. Previously it detected both the key press and the key release
and this fired two KEYCODE_ENTER events...


On 14 oct, 23:50, pabbot [EMAIL PROTECTED] wrote:
 Hi everyone,

 this is my first post here so I'll try not to extend so much.

 I've got a Layout with 3 EditText, called mText1, mText2 and mText3.
 I want to navigate through them by pressing the ENTER KEY, so I
 decided to set a onKeyListener for every of them and every time I
 detect the user presses the ENTER KEY, I set the focus on the next
 EditText. But it sets the focus on the next's next. If I press the
 ENTER KEY on mText1, the focus is set on mText3; the same with mText2
 (it is set on mText1) and so on...

 I can't understand this kind of behaviour.

 Any solution? Many thanks in advance.

 Here, the code:
 mText1.setOnKeyListener(new OnKeyListener() {

                         public boolean onKey(View v, int keyCode, KeyEvent 
 event) {
                                 if(keyCode == KeyEvent.KEYCODE_ENTER) {
                                         mText2.requestFocus();
                                         return true;
                                 }
                                 return false;
                         }

         });
 mText2.setOnKeyListener(new OnKeyListener() {

                         public boolean onKey(View v, int keyCode, KeyEvent 
 event) {
                                 if(keyCode == KeyEvent.KEYCODE_ENTER) {
                                         mText3.requestFocus();
                                         return true;
                                 }
                                 return false;
                         }

         });
 mText3.setOnKeyListener(new OnKeyListener() {

                         public boolean onKey(View v, int keyCode, KeyEvent 
 event) {
                                 if(keyCode == KeyEvent.KEYCODE_ENTER) {
                                         mText1.requestFocus();
                                         return true;
                                 }
                                 return false;
                         }

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



[android-developers] Re: Displaying Images

2008-10-15 Thread shailesh prakash

Hi,
you may like to try this :
http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/?r=73

On 10/15/08, JavaAndroid [EMAIL PROTECTED] wrote:

 Hi All,
 Can anyone direct me to some links / tutorials that will help me to
 start experimenting on displaying images in Android . Is there any way
 to add Servlet/JSP API in Android Application. Can i refer image that
 is residing in a web server.

 Thanks in Advance

 Thanks
 JavaAndroid
 


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



[android-developers] Re: Call the default mediaplayer program in Android OS

2008-10-15 Thread Baonq86

Thank you, Peli. Yourcode works well ! But when I play the
External_Content_URI, the default mediaplayer will play the first song
in the sdcard. It's a mp3 song, and the mediaplayer notice that
cannot read this format. I use default Music Application, it plays
well !! Do you have the same problems ?? What is the best format you
think default MediaPlayer plays well ?? Thank you !!

On Oct 13, 1:59 am, Peli [EMAIL PROTECTED] wrote:
 The code I sent just plays a very short ring-tone.

 You should create an SD card 
 firsthttp://code.google.com/android/reference/othertools.html#mksdcard
 so you can place longer songs there. (either copy mp3 songs there, or
 use the built-in sound recorderhttp://www.openintents.org/en/node/114
 ).

 If you want the MediaPlayer to stay open after the end of the song,
 then you should ask again and hope that someone from Google can answer
 - because I don't know the answer to that one and the
 MediaPlaybackActivity is closed source and undocumented so far...

 Peli

 On Oct 12, 5:06 pm, Baonq86 [EMAIL PROTECTED] wrote:

  Thank you, Peli. I tried your code. I use a button, when I click the
  button, my application will run your code. But immediately, I escape
  the default mediaplayer and go back my application ! Can you solve
  this problem ?

  On Oct 12, 3:28 am, Peli [EMAIL PROTECTED] wrote:

   Hi,

   Try this:

   Intent i = new Intent(Intent.ACTION_VIEW);
   Uri u =
   Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI,
   1);
   i.setData(u);
   startActivity(i);

   This will open the first audio file from the internal content provider
   in Android's media player.

   Peliwww.openintents.org

   On Oct 1, 2:20 pm, Baonq86 [EMAIL PROTECTED] wrote:

I can built my own mediaplayer but I want call the default mediaplayer
program in Android OS. Can anyone help me ?

On Oct 1, 4:58 pm, MrSnowflake [EMAIL PROTECTED] wrote:

 I recon your could fire an Intent with VIEW and set the mime type to
 your video file.

 On 1 okt, 11:03,Baonq86[EMAIL PROTECTED] wrote:

  Does anyone know to built an application to call the default
  mediaplayer program in Android OS ?


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



[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-15 Thread blindfold

 it works on both the emulator and a real G1.

So you have access to a real G1. Lucky you!!

 I'm really surprised that there is no access to the audio buffer.
 How are we supposed to write dynamic audio generation apps?

Unfortunately not supported by Android SDK 1.0 r1. See

http://code.google.com/p/android/issues/detail?id=739

and search this group for discussions on ByteArrayInputStream.

Regards


On Oct 15, 12:43 am, Robert Green [EMAIL PROTECTED] wrote:
 I used it for my game and it works on both the emulator and a real
 G1.  Just follow my example.

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



[android-developers] Re: Emulator Performance VS Real Phone Performance

2008-10-15 Thread Peli

int x; // pixel position
int xscaled = 0; // pixel position scaled by 1000
...
int movement=BULLETSPEED*deltaT;   ///   v*t = d  // don't divide by
1000 here

xscaled += movement;  // calculate movement more accurately
x = xscaled / 1000;  // scale down only when you want to plot
draw(x);

If you scale by 1024, you can also write
x = xscaled  10;  // divide by 1024. Could be faster than integer
division.

Peli
www.openintents.org

On Oct 15, 11:55 am, TjerkW [EMAIL PROTECTED] wrote:
 On 15 okt, 00:48, hackbod [EMAIL PROTECTED] wrote:

  The emulator in no way tries to emulate the performance
  characteristics of real hardware.

  For this and many other reasons, every developer should run their
  application on real hardware before considering it to be ready for for
  release to the public.

 I do not have to money to buy a android phone.
 I thought the emulator emulates a real phone, too bad.

  Re:

   I thought about decoupling the movement from the framerate (speed =
   pixels/second), but this
   requires the use for floats, which make the calculation rather slow.

  In a game you should never tie the speed of movement to the frame
  rate, because that will of course vary across different hardware.
  Even if we were doing a google phone and completely controlling the
  hardware, we'd want to release new hardware in the future that goes
  faster, and your game then wouldn't work well with it.

 I understand that.

  Also there should be no reason to need floats to deal with this, you
  can use fixed point integers.

 How should i do it.

 Supposei have the following:
 int BULLET_SPEED=30; // 30 pixels/second

 // then on a frameDraw
 long deltaT=thread.getFrameTime(); // the time it took to move to a
 new frame, in millis
 int movement=(BULLETSPEED*deltaT)/1000;   ///   v*t = d

 The problem here is that movement is always zero because the devision
 is done with 1000 (1 second).
 So either i use this:

 int movement=(int)((BULLETSPEED*deltaT)/(float)1000);

 Which required FLOATING POINT calculation.

 Or i make the bullet speed a float. But this also requires floating
 point calculation.

 So how is it done, without the need of floating points?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-15 Thread Robert Green

I just read the whole discussion.  All I can say is... What were they
thinking??  How is a developer supposed to be able to generate or
synthesize audio real time?  These are important apps.  Just look at
the guitar or harmonica app for the iPhone.  Those are very popular
and do exactly that.

I'm just dumbfounded that the API developers don't provide such basic
functionality as setting a byte stream datasource for a media player.
Media players also are not adequate at all for games other than
providing the background music.  Games often times have small samples
that are played very often and need to be layered on each other.
Maintaining a media player pool seems very heavy and cumbersome just
to achieve this, not to mention you may end up with a 100 media
players if you have 30 different samples and estimate that it would be
possible to play 3 at a time of each.

Another problem is that for racing, flying and other games which have
an engine sound, it's not possible to get the pitch of the engine to
match the speed shown on the game without being able to change the
sampling rate of the sound.  I used SoundPool for that because it
supported changing the sampling rate while playing and it does work
correctly for me right now.  Whoever designed SoundPool definitely
knew what they were doing for games because it's the right kind of API
for that but we still have the problem of not being able to produce
our own stream of audio on the fly and play it which limits what kind
of apps we can write and the general quality of the audio in games and
other applications.

Originally I was thinking that I'd go the old school route on the
sound in my game and just mix the audio in an update routine and
constantly feed the sound buffer but there is no option for this.

Unbelievable.  I find this really discouraging.  It's also very
frustrating that there is a SoundPool API which DOES WORK given a few
bugs and workarounds in the SDK 1.0 and is very suitable for 90% of
gaming applications as well as soundboard style apps and I'm sure
other things.  Why would they get rid of this?!

blindfold - Where did you find that it's not supported under 1.0 r1?
I can't find any documentation on whether it's supported, intended for
future or recently added and already deprecated.


On Oct 15, 3:01 am, blindfold [EMAIL PROTECTED] wrote:
  it works on both the emulator and a real G1.

 So you have access to a real G1. Lucky you!!

  I'm really surprised that there is no access to the audio buffer.
  How are we supposed to write dynamic audio generation apps?

 Unfortunately not supported by Android SDK 1.0 r1. See

 http://code.google.com/p/android/issues/detail?id=739

 and search this group for discussions on ByteArrayInputStream.

 Regards

 On Oct 15, 12:43 am, Robert Green [EMAIL PROTECTED] wrote:

  I used it for my game and it works on both the emulator and a real
  G1.  Just follow my example.


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



[android-developers] Re: M3 SDK: Click events on Map Overlays?

2008-10-15 Thread Matthias

anyone? still found no solution to 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android SDK / emulator working fine on Linux 64 bits ?

2008-10-15 Thread zl25drexel

I tried it briefly on a 64bit ubuntu box, it worked but it did not
feel very stable. For example, i need to do 'kill -9' to shut down
because the 'x' button will just crash the emulator. so i actually
switch back to a 32bit windows to do my development.

On Oct 15, 6:42 am, Nanard [EMAIL PROTECTED] wrote:
 Hi,

 I plan to upgrade my PC and move from Mandriva 32bits to Mandriva
 64bits.

 Are Eclispe  SDK tools  the emulator still working fine ?

 Any specific remarks on such a platform ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Question regarding WebView

2008-10-15 Thread Rubicks

Yes, I have a local server running with in the emulator, it is just a
simple socket, which can handle HTTP requests locally.

On Oct 15, 3:23 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 Rubicks wrote:
  Mark, very sorry for my impolite post. I should improve on that.

 It was a joke!

  myMMFString is assigned value some where else because it is a global
  variable. Like this for example
  html
  body
  p
  a href=http://localhost:/index.htm;This text/a is a link  on
  this web server.
  /p
  /body
  /html

 Drop the http://localhost:/;, unless you have a Web server running
 inside the emulator itself.

  But I still have the same error.  I checked that, if the request from
  the webview and the browser are different and have different length or
  so? but I see that they are the same.  I was wondering, is it  that at
  the receiving end the socket is terminating or faces some problem when
  I use the webviewclient. With the browser there has been no problem.

 There is no socket, unless you have a Web server running in the emulator
 itself.

 The example you are trying to use is strictly for loading local data.

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How do i set onClick image

2008-10-15 Thread zl25drexel

anyone?

On Oct 14, 5:14 pm, zl25drexel [EMAIL PROTECTED] wrote:
 Hi,

 Does anyone know how to set the onClick image on a button with custom
 image background? For example, with the standard android button, the
 button will turn orange on click and then return to its normal color.
 How do I do the same thing but with custom images?

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



[android-developers] Re: Comunication Server-Phone: SMS directed to an application (0.9 SDK)

2008-10-15 Thread Ricardo

Cristina,

I have the same problem... I´ve already done this with J2ME (send the
SMS to some specific port)..

but it seems that android don´t support this yet...

On 10 out, 18:49, Jonathan Herriott [EMAIL PROTECTED] wrote:
 Bump.  This needs to be addressed.

 On Aug 29, 10:31 am, Cristina [EMAIL PROTECTED] wrote:

  Hi!

  I am actually using the http client library in order to comunicate
  from my app to the server.
  The problem is that I want also the server to send some kind of
  events to the phone..so I need also to open a comunication from the
  central server to the phone... In this case, the phone will act as a
  server receiving the events...

  That is why I was thinking about sending the events from the central
  server using SMS...but if I cannot avoid others to receive those SMS,
  this option is not valid either... Gtalk was the other option, but
  there is not GTalk in 0.9..

  I do not want either to use polling (the phone asking the server for
  events from time to time)

  Any other option? wappush? sending SMS to a port associated to the app
  like in J2ME?

  On 28 ago, 20:16, Megha Joshi [EMAIL PROTECTED] wrote:

   2008/8/26 Cristina [EMAIL PROTECTED]

Hi!

We are designing an application for android phones. In our application
there is a central server, and this server must send some application
information to the phone.
So, we thought to use SMS in order to communicate with our application
in the phone.
Our application will look for messages with a particular prefix and
consume it. Other applications (including messagig applications)
should not get the application SMS messages.

In order to do that, we have implemeted a Sms BroadcastReceiver, that
get all SMS messages, but only processed the ones with the application
prefix. After processing them, we do an abortBroadcast(), in order to
stop the broadcast of the message to the Messaging application or
other applications receiving the same intent.

However, SMS Inbox is receiving the message, and is showing the
message in the notification application.

1.  Is there any way for an application to receive the SMS message,
avoiding the rest of applications to receive it? Is abortBroadcast
working for SMS broadcast intents? I understand that maybe the
abortBroadcast is not working for SMS broadcast intents, because of
security reasons (for example we could abort the broadcast of all SMS
messages ). Is there another way for an application to to receive SMS
messages in an exclusive way (the rest of applications do not
receive it)?

   I don't think you can alter the behavior of inbuilt apps, Messaging(SMS) 
   is
   an inbuilt app, so you cannot
   do anything, it will receive SMS and show the notification.

2. Is there any other way to communicate information from a external
server to the application in the phone?

For example, In other projects with other phones we have  used
transparent wappush to implement that communication..Does android
support wappush protocol?

We would not like to implement an always open connection in the phone
application (where the phone acts like a server), because that implies
that we must have a list with all the IPs of the phones in order to
communicate with them..that complicates a lot the  implementation...

   You can use the inbuilt apache http client library in Android to 
   communicate
   with your server 
   app..http://code.google.com/android/reference/org/apache/http/client/packa...

Any other idea?- Ocultar texto de la cita -

   - Mostrar texto de la cita -- Ocultar texto de la cita -

   - Mostrar texto de la cita -


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



[android-developers] Re: about the sdk 1.0 source code

2008-10-15 Thread Zhihong GUO
Ludwig,
Thank you for the answer.I found the implementation of
com.google.android.maps was moved to the
/system/framework/com.google.android.maps.jar in the emulator. So that in
the SDK of 0.9 and 1.0,  we have to indicate which library we will use for
map application by a line
uses-library android:name=com.google.android.maps / in Manifest
file.




2008/10/15 Ludwig [EMAIL PROTECTED]

 The reason for this is that the SDK does not contain a full implementation
 of Android any more, the full implementation is in the emulator and (of
 course) on the phone. The SDK only contains the stubs so that the
 libraries will link, but since the implementation of vital parts is missing
 it cannot be run. It is a way of fooling the Java compiler/linker.

 Ludwig

 2008/10/15 [EMAIL PROTECTED]


 Hi all,
 I am reading the sdk 1.0 source code(decompiled by jad). It is very
 strange that there are so many: throw new RuntimeException(Stub!);
 in the classes.

 for example, the MapView are

 public class MapView extends ViewGroup
 {
 ...
 public MapView(Context context, String apiKey)
 {
 super((Context)null, (AttributeSet)null, 0);
 throw new RuntimeException(Stub!);
 }
 ..
 public MapView(Context context, String apiKey)
 {
 super((Context)null, (AttributeSet)null, 0);
 throw new RuntimeException(Stub!);
 }
 ...
 so where is the implementation of those methods?




 


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



[android-developers] Re: Android SDK / emulator working fine on Linux 64 bits ?

2008-10-15 Thread Timbobsteve

It's just my opinion, but I still see no major point in using a 64-bit 
machine to develop for Android. 64-bit won't give you any large advantage.

I can understand that if you're already running 64-bit, then the change 
to 32-bit would seem crazy, but if you are building a box for 
development I would go with 32-bit and if you need more memory support 
use the bigmem kernel patches.

my 2 cents ;)

Nanard wrote:
 Hi,

 I plan to upgrade my PC and move from Mandriva 32bits to Mandriva
 64bits.

 Are Eclispe  SDK tools  the emulator still working fine ?

 Any specific remarks on such a platform ?
 
   

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



[android-developers] DELETE SMS FROM INBOX

2008-10-15 Thread rajesh

Is there any way to delete SMS(s) from the inbox.

i am trying out
context.getContentResolver().delete(Uri.parse(content://sms/inbox),
null, null);

[In the above case, the purpose is to delete all the SMSs in the
inbox]

But I am getting invalid URL.

I intend to delete a particualr SMS based on a particular incoming
number. Is this possible

please help


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



[android-developers] Re: Delete sms from inbox

2008-10-15 Thread rajesh

Cursor c = context.getContentResolver().query(Uri.parse(content://sms/
inbox), null ,null, null, null);

  System.out.println(c.getCount() + );


  while (c.moveToNext()) {
  System.out.println();
  for (int i = 1; i = c.getColumnCount(); i++) {
  System.out.println(i + : + 
c.getColumnName(i-1) + :);
  try {
  System.out.println(c.getString(i));
} catch (Exception e) {
System.out.println(e);
}


  }

  }

  context.getContentResolver().delete(Uri.parse(content://sms/
inbox), null, null);


I get the following error when I invoke delete

10-15 18:30:50.417: INFO/System.out(372): 13:service_center:
10-15 18:30:50.417: ERROR/CursorWindow(372): Bad request for field
slot 1,13. numRows = 2, numColumns = 13
10-15 18:30:50.417: INFO/System.out(372):
java.lang.IllegalStateException: get field slot from row 1 col 13
failed
10-15 18:30:50.446: ERROR/DatabaseUtils(127): Writing exception to
parcel
10-15 18:30:50.446: ERROR/DatabaseUtils(127):
java.lang.IllegalArgumentException: Unknown URL
10-15 18:30:50.446: ERROR/DatabaseUtils(127): at
com.android.providers.telephony.SmsProvider.delete(SmsProvider.java:
510)
10-15 18:30:50.446: ERROR/DatabaseUtils(127): at
android.content.ContentProvider$Transport.delete(ContentProvider.java:
149)
10-15 18:30:50.446: ERROR/DatabaseUtils(127): at
android.content.ContentProviderNative.onTransact(ContentProviderNative.java:
149)
10-15 18:30:50.446: ERROR/DatabaseUtils(127): at
android.os.Binder.execTransact(Binder.java:276)
10-15 18:30:50.446: ERROR/DatabaseUtils(127): at
dalvik.system.NativeStart.run(Native Method)
10-15 18:30:50.496: DEBUG/AndroidRuntime(372): Shutting down VM
10-15 18:30:50.517: WARN/dalvikvm(372): threadid=3: thread exiting
with uncaught exception (group=0x40010e28)
10-15 18:30:50.517: ERROR/AndroidRuntime(372): Uncaught handler:
thread main exiting due to uncaught exception
10-15 18:30:50.577: ERROR/AndroidRuntime(372):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{org.hsc.controller/org.hsc.controller.TESTSMS}:
java.lang.IllegalArgumentException: Unknown URL
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2140)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.os.Handler.dispatchMessage(Handler.java:88)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.os.Looper.loop(Looper.java:123)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.ActivityThread.main(ActivityThread.java:3742)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
java.lang.reflect.Method.invokeNative(Native Method)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
java.lang.reflect.Method.invoke(Method.java:515)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
dalvik.system.NativeStart.main(Native Method)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): Caused by:
java.lang.IllegalArgumentException: Unknown URL
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
128)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
110)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.content.ContentProviderProxy.delete(ContentProviderNative.java:
362)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.content.ContentResolver.delete(ContentResolver.java:386)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
org.hsc.controller.TESTSMS.onCreate(TESTSMS.java:49)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2103)
10-15 18:30:50.577: ERROR/AndroidRuntime(372): ... 11 more
10-15 18:30:50.627: INFO/Process(56): Sending signal. PID: 372 SIG: 3
10-15 18:30:50.646: INFO/dalvikvm(372): threadid=7: 

[android-developers] Re: Question regarding WebView

2008-10-15 Thread Rubicks

I will try that . I wrote my own a very simple server, using sockets.

On Oct 15, 4:07 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 Rubicks wrote:
  Yes, I have a local server running with in the emulator, it is just a
  simple socket, which can handle HTTP requests locally.

 Ah!

 You can try changing the base URL you are passing to
 loadDataWithBaseURL() to match the base URL you want
 (http://localhost:, presumably). That might help; certainly, it is
 more correct. The fake base URL in my sample code is because relative
 URLs don't work without *something* there (null doesn't work).

 By the way, if you don't mind me asking, did you use an existing Web
 server component as a base, or did you write your own Web server?

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Program Finished - Now What?

2008-10-15 Thread legerb

Use keytool and jarsigner, they come with the jdk.
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html

eventually this is what worked for me:
keytool -genkey -keystore refArchive/myKeyStore -alias somealias
jarsigner -keystore refArchive/myKeyStore -signedjar refArchive/
testapks.apk refArchive/testapk.apk somealias


On Oct 14, 2:48 pm, Ewan Grantham [EMAIL PROTECTED] wrote:
 OK, appreciate the suggestions on how to list in alternate marketplaces. The
 one thing stopping me, is that what I was also looking for was a decent
 step-by-step on how to sign my app. I gather I can change a setting in
 Eclipse to do the release build, but then I still need to do something
 with keysign. Can anyone explain that part of the process, please?

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



[android-developers] Re: Program Finished - Now What?

2008-10-15 Thread Easan
most useful post of the week.  thank you.

On Wed, Oct 15, 2008 at 2:06 AM, legerb [EMAIL PROTECTED] wrote:


 Use keytool and jarsigner, they come with the jdk.
 http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html
 http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html

 eventually this is what worked for me:
 keytool -genkey -keystore refArchive/myKeyStore -alias somealias
 jarsigner -keystore refArchive/myKeyStore -signedjar refArchive/
 testapks.apk refArchive/testapk.apk somealias


 On Oct 14, 2:48 pm, Ewan Grantham [EMAIL PROTECTED] wrote:
  OK, appreciate the suggestions on how to list in alternate marketplaces.
 The
  one thing stopping me, is that what I was also looking for was a decent
  step-by-step on how to sign my app. I gather I can change a setting in
  Eclipse to do the release build, but then I still need to do something
  with keysign. Can anyone explain that part of the process, please?
 
  Thanks!
 



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



[android-developers] Re: User Alarm Interaction when Sleeping

2008-10-15 Thread Brian

Shailesh,

 I've built this using Eclipse, it has nothing to do with the editor.
It's core
Android interactions. I'll look at droidDraw. Are you sure it actually
has
a nicer sleep/alarm interaction?

Thanks, Brian


On Oct 14, 11:34 pm, shailesh prakash [EMAIL PROTECTED] wrote:
 Try droidDraw, it is cool way to create GUI for android.
 Also Elipse has nice layout building capability, you can try eclipse too

 On 10/15/08, Brian [EMAIL PROTECTED] wrote:



  I'm playing with building a simple alarm, but it's very hard to see
  how to get a nice UI interaction when the phone is asleep.

   I have finally worked out an OK behaviour:

  a) Use the AlarmManager to set a time to wake up my application
  b) use a KeyguardManager.KeyguardLock to disable the lock
  c) pop up an AlertDialog with an OK your alarm has gone off
  button
  d) turn back on the Keyguard lock.

   But it's klunky in that the user can hit a pocket OK and clear an
  alarm once the KeyguardManager is off. And as soon as the user exits
  my alarm application, I turn the keyguardManager lock back on and I'm
  locked out.

   The interaction sequence on the iPhone is a bit better in that I can
  pop up a window (play alarms and so on) and the user has to log in to
  unset the alarm.

   Does anyone know how to get a better user interaction on the gphone?

   And while playing with this I can see a service logging called
  KeyguardViewMediator but there is no documention or group posts on
  this. Is this what is really acting as the keyguard?

   Are there any examples of this hanging around?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Does Android 1.0 support progressive download of music and video files?

2008-10-15 Thread Billsen

Thanks a lot for your response, but I don't know the meaning of hinted
here. Could you please provide some info about this?

Thanks,
Billsen

On Oct 15, 7:28 am, Guillaume Perrot [EMAIL PROTECTED] wrote:
 Yes the MediaPlayer supports progressive download.
 The files must be hinted and be one of the following formats:
 audio: mp3, m4a (and also amr which is 3gp audio)
 video: mp4 3gp
 Many mp4 based files (e.g. all foregoing formats except mp3) you'll
 find on the web won't be hinted, so they won't work on Android in
 streaming, you have to hint them (using MP4Box) if not hinted.
 There is already ton of posts on the mailing dealing with that.

 On Oct 14, 10:50 pm, Billsen [EMAIL PROTECTED] wrote:

  Hi,

  A question, does Android 1.0 support progressive download of music and
  video files?

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



[android-developers] Re: Emulator Performance VS Real Phone Performance

2008-10-15 Thread TjerkW

On 15 okt, 00:48, hackbod [EMAIL PROTECTED] wrote:
 The emulator in no way tries to emulate the performance
 characteristics of real hardware.

 For this and many other reasons, every developer should run their
 application on real hardware before considering it to be ready for for
 release to the public.


I do not have to money to buy a android phone.
I thought the emulator emulates a real phone, too bad.

 Re:

  I thought about decoupling the movement from the framerate (speed =
  pixels/second), but this
  requires the use for floats, which make the calculation rather slow.

 In a game you should never tie the speed of movement to the frame
 rate, because that will of course vary across different hardware.
 Even if we were doing a google phone and completely controlling the
 hardware, we'd want to release new hardware in the future that goes
 faster, and your game then wouldn't work well with it.


I understand that.

 Also there should be no reason to need floats to deal with this, you
 can use fixed point integers.

How should i do it.

Supposei have the following:
int BULLET_SPEED=30; // 30 pixels/second

// then on a frameDraw
long deltaT=thread.getFrameTime(); // the time it took to move to a
new frame, in millis
int movement=(BULLETSPEED*deltaT)/1000;   ///   v*t = d

The problem here is that movement is always zero because the devision
is done with 1000 (1 second).
So either i use this:

int movement=(int)((BULLETSPEED*deltaT)/(float)1000);

Which required FLOATING POINT calculation.

Or i make the bullet speed a float. But this also requires floating
point calculation.

So how is it done, without the need of floating points?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Program Finished - Now What?

2008-10-15 Thread Ewan Grantham
Thanks! That's what I was looking for!

On Wed, Oct 15, 2008 at 4:06 AM, legerb [EMAIL PROTECTED] wrote:


 Use keytool and jarsigner, they come with the jdk.
 http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html
 http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html

 eventually this is what worked for me:
 keytool -genkey -keystore refArchive/myKeyStore -alias somealias
 jarsigner -keystore refArchive/myKeyStore -signedjar refArchive/
 testapks.apk refArchive/testapk.apk somealias


 On Oct 14, 2:48 pm, Ewan Grantham [EMAIL PROTECTED] wrote:
  OK, appreciate the suggestions on how to list in alternate marketplaces.
 The
  one thing stopping me, is that what I was also looking for was a decent
  step-by-step on how to sign my app. I gather I can change a setting in
  Eclipse to do the release build, but then I still need to do something
  with keysign. Can anyone explain that part of the process, please?
 
  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: about the sdk 1.0 source code

2008-10-15 Thread Ludwig
The reason for this is that the SDK does not contain a full implementation
of Android any more, the full implementation is in the emulator and (of
course) on the phone. The SDK only contains the stubs so that the libraries
will link, but since the implementation of vital parts is missing it cannot
be run. It is a way of fooling the Java compiler/linker.

Ludwig

2008/10/15 [EMAIL PROTECTED]


 Hi all,
 I am reading the sdk 1.0 source code(decompiled by jad). It is very
 strange that there are so many: throw new RuntimeException(Stub!);
 in the classes.

 for example, the MapView are

 public class MapView extends ViewGroup
 {
 ...
 public MapView(Context context, String apiKey)
 {
 super((Context)null, (AttributeSet)null, 0);
 throw new RuntimeException(Stub!);
 }
 ..
 public MapView(Context context, String apiKey)
 {
 super((Context)null, (AttributeSet)null, 0);
 throw new RuntimeException(Stub!);
 }
 ...
 so where is the implementation of those methods?

 


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



[android-developers] Re: Program Finished - Now What?

2008-10-15 Thread Teo

That part of the documentation is a bit shady, maybe it would indeed
be good to have a relevant usage example of keytool and jarsigner. I'm
still not convinced i covered all of the things i should in my .apk
signing :)

Thanks,
Teo

On Oct 15, 1:23 pm, Ewan Grantham [EMAIL PROTECTED] wrote:
 Thanks! That's what I was looking for!

 On Wed, Oct 15, 2008 at 4:06 AM, legerb [EMAIL PROTECTED] wrote:

  Use keytool and jarsigner, they come with the jdk.
 http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html
 http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html

  eventually this is what worked for me:
  keytool -genkey -keystore refArchive/myKeyStore -alias somealias
  jarsigner -keystore refArchive/myKeyStore -signedjar refArchive/
  testapks.apk refArchive/testapk.apk somealias

  On Oct 14, 2:48 pm, Ewan Grantham [EMAIL PROTECTED] wrote:
   OK, appreciate the suggestions on how to list in alternate marketplaces.
  The
   one thing stopping me, is that what I was also looking for was a decent
   step-by-step on how to sign my app. I gather I can change a setting in
   Eclipse to do the release build, but then I still need to do something
   with keysign. Can anyone explain that part of the process, please?

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



[android-developers] Re: Question regarding WebView

2008-10-15 Thread Rubicks

Mark, very sorry for my impolite post. I should improve on that.

 1. Does your project request the INTERNET permission in the
 AndroidManifest.xml file?

Yes

 2. You have a code comment saying myMMFString has a simple html string
 with a link, yet myMMFString doesn't appear to be assigned a value
 anywhere in the code listing you provided.

myMMFString is assigned value some where else because it is a global
variable. Like this for example
html
body
p
a href=http://localhost:/index.htm;This text/a is a link  on
this web server.
/p
/body
/html

 3. You might want to download the full project for this, so you get the
 manifest and other supporting files, in case that helps. You can find
 the code by visitinghttp://commonsware.com/Android/and clicking on the
 Source Code link for Version 1.3.


Thanks, I tried your project.

 --

But I still have the same error.  I checked that, if the request from
the webview and the browser are different and have different length or
so? but I see that they are the same.  I was wondering, is it  that at
the receiving end the socket is terminating or faces some problem when
I use the webviewclient. With the browser there has been no problem.

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



[android-developers] Re: Delete sms from inbox

2008-10-15 Thread rajesh

did you get answer to it. I have to delete all the sms which has a
particular number. But I keep getting Invalid URI message.

On Oct 14, 5:24 pm, e [EMAIL PROTECTED] wrote:
 Anyone???
 what Uri use???

 On Oct 14, 1:33 pm, e [EMAIL PROTECTED] wrote:



  plz help me out..
  i use fordeletesmsfrom ininbox
  i use:

   Cursor c = 
  context.getContentResolver().query(Uri.parse(content://sms/inbox), 
  null,null, null, null);
                     Log.d(TAG, Read  + Integer.toString(c.getCount())
  + SMSmessages from content ( +
  Integer.toString(c.getColumnCount()) +  columns));
                     Log.i(eer,555==1===+c.getCount());
                     //Uri mUri=intent.getData();
                     Uri mUri=Uri.parse(content://sms/inbox/+c.getCount());
                     Log.i(uri ,deedededede+mUri);
                     c.close();
                     c = null;
                     context.getContentResolver().delete(mUri, null,
  null);

  and i have permission:

  uses-permission android:name=android.permission.RECEIVE_SMS/uses-
  permission
  uses-permission android:name=android.permission.READ_SMS/uses-
  permission
  uses-permission android:name=android.permission.SEND_SMS/uses-
  permission
  uses-permission android:name=android.permission.WRITE_SMS/uses-
  permission

  but i have error:

  10-14 13:54:41.903: INFO/eer(430): 555==1===14
  10-14 13:54:41.903: INFO/uri(430): deededededecontent://sms/inbox/14
  10-14 13:54:41.983: ERROR/DatabaseUtils(88): Writing exception to
  parcel
  10-14 13:54:41.983: ERROR/DatabaseUtils(88):
  java.lang.IllegalArgumentException: Unknown URL
  10-14 13:54:41.983: ERROR/DatabaseUtils(88):     at
  com.android.providers.telephony.SmsProvider.delete(SmsProvider.java:
  510)
  10-14 13:54:41.983: ERROR/DatabaseUtils(88):     at
  android.content.ContentProvider$Transport.delete(ContentProvider.java:
  149)
  10-14 13:54:41.983: ERROR/DatabaseUtils(88):     at
  android.content.ContentProviderNative.onTransact(ContentProviderNative.java­:
  149)
  10-14 13:54:41.983: ERROR/DatabaseUtils(88):     at
  android.os.Binder.execTransact(Binder.java:276)
  10-14 13:54:41.983: ERROR/DatabaseUtils(88):     at
  dalvik.system.NativeStart.run(Native Method)
  10-14 13:54:42.032: DEBUG/AndroidRuntime(430): Shutting down VM
  10-14 13:54:42.042: WARN/dalvikvm(430): threadid=3: thread exiting
  with uncaught exception (group=0x40010e28)
  10-14 13:54:42.042: ERROR/AndroidRuntime(430): Uncaught handler:
  thread main exiting due to uncaught exception
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):
  java.lang.RuntimeException: Unable to start receiver
  org.sms.ServerMessagesReceiver: java.lang.IllegalArgumentException:
  Unknown URL
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.app.ActivityThread.handleReceiver(ActivityThread.java:2289)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.app.ActivityThread.access$2700(ActivityThread.java:112)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:1628)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.os.Handler.dispatchMessage(Handler.java:88)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.os.Looper.loop(Looper.java:123)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.app.ActivityThread.main(ActivityThread.java:3742)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  java.lang.reflect.Method.invokeNative(Native Method)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  java.lang.reflect.Method.invoke(Method.java:515)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:739)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  dalvik.system.NativeStart.main(Native Method)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430): Caused by:
  java.lang.IllegalArgumentException: Unknown URL
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
  128)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
  110)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.content.ContentProviderProxy.delete(ContentProviderNative.java:
  362)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.content.ContentResolver.delete(ContentResolver.java:386)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  org.sms.ServerMessagesReceiver.onReceive(ServerMessagesReceiver.java:
  76)
  10-14 13:54:42.073: ERROR/AndroidRuntime(430):     at
  android.app.ActivityThread.handleReceiver(ActivityThread.java:2280)- Hide 
  quoted text -

 - Show quoted text -

[android-developers] XML through SAX - for local files in res/ --- NOT for data/data/.../files and no XmlPullParser

2008-10-15 Thread legerb

I'm also having IO exceptions when trying to parse the raw ersources:
I have a BroadCastReceiver, where:
public void onReceive(Context context, Intent intent)
{
SAXParserFactory spf = SAXParserFactory.newInstance();
try
{
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();
XMLHandler xmlHandler = new XMLHandler();
xr.setContentHandler(xmlHandler);
xr.parse(new
InputSource(context.getResources().getString(R.raw.demo_config)));
}
catch (Exception e)
{
Log.v(--, e.toString());
}

}
This line:
xr.parse(new
InputSource(context.getResources().getString(R.raw.demo_config)));
gives me java.io.IOException: Couldn't open res/raw/demo_config.xml
I've also tried:
//xr.parse(new
InputSource(context.getResources().openRawResource(R.raw.demo_config)));
which gave me the same result.
Any ideas why the io exception?

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



[android-developers] Re: Does Android 1.0 support progressive download of music and video files?

2008-10-15 Thread Guillaume Perrot

Yes the MediaPlayer supports progressive download.
The files must be hinted and be one of the following formats:
audio: mp3, m4a (and also amr which is 3gp audio)
video: mp4 3gp
Many mp4 based files (e.g. all foregoing formats except mp3) you'll
find on the web won't be hinted, so they won't work on Android in
streaming, you have to hint them (using MP4Box) if not hinted.
There is already ton of posts on the mailing dealing with that.

On Oct 14, 10:50 pm, Billsen [EMAIL PROTECTED] wrote:
 Hi,

 A question, does Android 1.0 support progressive download of music and
 video files?

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



[android-developers] Re: JavaScript and WebView

2008-10-15 Thread Rubicks

Here is what I am trying to do.
I have a Javascript (JS) given to me, which I can not change.
html
head
script type=text/javascript language=JavaScript
  var nFindAPITries = 0;
  var API = null;
  function FindAPI(win) {
while ((win.API == null)  (win.parent != null)  (win.parent !=
win)) {
  nFindAPITries ++;
  if (nFindAPITries  500) {
alert(Error in finding API -- too deeply nested.);
return null
  }
  win = win.parent
}
return win.API
  }
  function init() {
if ((window.parent)  (window.parent != window)){
  API = FindAPI(window.parent)
}
if ((API == null)  (window.opener != null)){
  API = FindAPI(window.opener)
}
if (API == null) {
  alert(No API adapter found)
} else {
  API.LMSInitialize()
}
  }
  function finish() {
if (API != null) {
  API.LMSFinish()
}
  }
/script

title/title
/head
body onload=init() onunload=finish()
h1Hello world/h1
/body
/html

Now, in my activity, I will load a webview with a HTML file which uses
this JS.
Is there a way to bind a java object from my application to satisfy
FindAPI function.
So that window.parent gets binded to my webviewclient or  a java
object from my project in which I plan to have LMSInitialize and
LMSFinish functions.

Is there a possible solution for this within android?

Thanks.

On Oct 15, 1:58 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 Rubicks wrote:
  My activity has a webview . I will be leading some html pages on that
  webview which includes some JavaScript functions. I have a need to
  send some data from webview to my java application based on some user
  actions using javaScript functions. Is it possible or how can I do
  it?

 You can try using WebView#addJavascriptInterface() to expose a Java
 object (via reflection, I assume) to your WebView under a JavaScript
 namespace.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] What happens when network (GPRS) is not enabled, and you try to open connection?

2008-10-15 Thread denismo

Say, I'm opening connection to a website using URLConnection.  GPRS is
not enabled yet.  What will happen?  Will GPRS become enabled?  Will
user be notified and asked whether she wants to enable GPRS? Or will
an exception be thrown?

On current phones (like Nokia/Symbian), when GPRS is not enabled, and
an application tries to access the internet (e.g. Maps), user is
prompted to allow/deny the request.  Will similar happen on Android?

Thanks.

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



[android-developers] Re: How I can add LinearLayout to LinearLayout programicly?

2008-10-15 Thread Ramunas

Thanks for answer. You was right, that, LinearLayout need to add
together with LayoutParams. Either to LinearLayout must be added other
items.

On Oct 3, 7:16 pm, hackbod [EMAIL PROTECTED] wrote:
 You need to add it with a LinearLayout.LayoutParams as the second
 argument.

 On Oct 3, 8:38 am, Ramunas [EMAIL PROTECTED] wrote:



  Hello,

  I have a class: = class ListAdapterView extends LinearLayout
  In this class need to add new LinearLayout. When I use this belove
  code my application crash.
          LinearLayout ll=new LinearLayout(context);
          this.addView(ll);

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



[android-developers] Re: JavaScript and WebView

2008-10-15 Thread Peli

Have you looked at apps-for-android webview-demo?
http://android-developers.blogspot.com/2008/09/using-webviews.html
http://code.google.com/p/apps-for-android/

Peli
www.openintents.org

On Oct 15, 3:04 pm, Rubicks [EMAIL PROTECTED] wrote:
 Here is what I am trying to do.
 I have a Javascript (JS) given to me, which I can not change.
 html
 head
 script type=text/javascript language=JavaScript
   var nFindAPITries = 0;
   var API = null;
   function FindAPI(win) {
     while ((win.API == null)  (win.parent != null)  (win.parent !=
 win)) {
       nFindAPITries ++;
       if (nFindAPITries  500) {
         alert(Error in finding API -- too deeply nested.);
         return null
       }
       win = win.parent
     }
     return win.API
   }
   function init() {
     if ((window.parent)  (window.parent != window)){
       API = FindAPI(window.parent)
     }
     if ((API == null)  (window.opener != null)){
       API = FindAPI(window.opener)
     }
     if (API == null) {
       alert(No API adapter found)
     } else {
       API.LMSInitialize()
     }
   }
   function finish() {
     if (API != null) {
       API.LMSFinish()
     }
   }
 /script

 title/title
 /head
 body onload=init() onunload=finish()
 h1Hello world/h1
 /body
 /html

 Now, in my activity, I will load a webview with a HTML file which uses
 this JS.
 Is there a way to bind a java object from my application to satisfy
 FindAPI function.
 So that window.parent gets binded to my webviewclient or  a java
 object from my project in which I plan to have LMSInitialize and
 LMSFinish functions.

 Is there a possible solution for this within android?

 Thanks.

 On Oct 15, 1:58 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  Rubicks wrote:
   My activity has a webview . I will be leading some html pages on that
   webview which includes some JavaScript functions. I have a need to
   send some data from webview to my java application based on some user
   actions using javaScript functions. Is it possible or how can I do
   it?

  You can try using WebView#addJavascriptInterface() to expose a Java
  object (via reflection, I assume) to your WebView under a JavaScript
  namespace.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Emulator Performance VS Real Phone Performance

2008-10-15 Thread Tjerk Wolterink
nice, thanks... didnt see it this way

2008/10/15 Peli [EMAIL PROTECTED]


 int x; // pixel position
 int xscaled = 0; // pixel position scaled by 1000
 ...
 int movement=BULLETSPEED*deltaT;   ///   v*t = d  // don't divide by
 1000 here

 xscaled += movement;  // calculate movement more accurately
 x = xscaled / 1000;  // scale down only when you want to plot
 draw(x);

 If you scale by 1024, you can also write
 x = xscaled  10;  // divide by 1024. Could be faster than integer
 division.

 Peli
 www.openintents.org

 On Oct 15, 11:55 am, TjerkW [EMAIL PROTECTED] wrote:
  On 15 okt, 00:48, hackbod [EMAIL PROTECTED] wrote:
 
   The emulator in no way tries to emulate the performance
   characteristics of real hardware.
 
   For this and many other reasons, every developer should run their
   application on real hardware before considering it to be ready for for
   release to the public.
 
  I do not have to money to buy a android phone.
  I thought the emulator emulates a real phone, too bad.
 
   Re:
 
I thought about decoupling the movement from the framerate (speed =
pixels/second), but this
requires the use for floats, which make the calculation rather slow.
 
   In a game you should never tie the speed of movement to the frame
   rate, because that will of course vary across different hardware.
   Even if we were doing a google phone and completely controlling the
   hardware, we'd want to release new hardware in the future that goes
   faster, and your game then wouldn't work well with it.
 
  I understand that.
 
   Also there should be no reason to need floats to deal with this, you
   can use fixed point integers.
 
  How should i do it.
 
  Supposei have the following:
  int BULLET_SPEED=30; // 30 pixels/second
 
  // then on a frameDraw
  long deltaT=thread.getFrameTime(); // the time it took to move to a
  new frame, in millis
  int movement=(BULLETSPEED*deltaT)/1000;   ///   v*t = d
 
  The problem here is that movement is always zero because the devision
  is done with 1000 (1 second).
  So either i use this:
 
  int movement=(int)((BULLETSPEED*deltaT)/(float)1000);
 
  Which required FLOATING POINT calculation.
 
  Or i make the bullet speed a float. But this also requires floating
  point calculation.
 
  So how is it done, without the need of floating points?
 



-- 
--
Tjerk Wolterink @ GMail

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



[android-developers] Re: What happens when network (GPRS) is not enabled, and you try to open connection?

2008-10-15 Thread atrus123

I've been wondering this too.  I guess I assumed that if an
application has permissions in the manifest that the device will
automatically connect without prompting.

On Oct 15, 6:30 am, denismo [EMAIL PROTECTED] wrote:
 Say, I'm opening connection to a website using URLConnection.  GPRS is
 not enabled yet.  What will happen?  Will GPRS become enabled?  Will
 user be notified and asked whether she wants to enable GPRS? Or will
 an exception be thrown?

 On current phones (like Nokia/Symbian), when GPRS is not enabled, and
 an application tries to access the internet (e.g. Maps), user is
 prompted to allow/deny the request.  Will similar happen on Android?

 Thanks.

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



[android-developers] Re: JavaScript and WebView

2008-10-15 Thread Mark Murphy

Rubicks wrote:
 My activity has a webview . I will be leading some html pages on that
 webview which includes some JavaScript functions. I have a need to
 send some data from webview to my java application based on some user
 actions using javaScript functions. Is it possible or how can I do
 it?

You can try using WebView#addJavascriptInterface() to expose a Java 
object (via reflection, I assume) to your WebView under a JavaScript 
namespace.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

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



[android-developers] Re: Question regarding WebView

2008-10-15 Thread Mark Murphy

Rubicks wrote:
 So I used this code posted somewhere on this forum.

I write a book, and my samples get reduced to this code posted 
somewhere on this forum?

Am I a has-been *already*?!?

pause to regain composure, complete with muted sobs

 But now I have new problem. With this code, I am getting a
 SocketException : Broken Pipe. With the Bowser, I had no such
 problems.  Any one any clues???

Three things:

1. Does your project request the INTERNET permission in the 
AndroidManifest.xml file?

2. You have a code comment saying myMMFString has a simple html string 
with a link, yet myMMFString doesn't appear to be assigned a value 
anywhere in the code listing you provided.

3. You might want to download the full project for this, so you get the 
manifest and other supporting files, in case that helps. You can find 
the code by visiting http://commonsware.com/Android/ and clicking on the 
Source Code link for Version 1.3.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

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



[android-developers] Re: Question regarding WebView

2008-10-15 Thread Mark Murphy

Rubicks wrote:
 Mark, very sorry for my impolite post. I should improve on that.

It was a joke!

 myMMFString is assigned value some where else because it is a global
 variable. Like this for example
 html
 body
 p
 a href=http://localhost:/index.htm;This text/a is a link  on
 this web server.
 /p
 /body
 /html

Drop the http://localhost:/;, unless you have a Web server running 
inside the emulator itself.

 But I still have the same error.  I checked that, if the request from
 the webview and the browser are different and have different length or
 so? but I see that they are the same.  I was wondering, is it  that at
 the receiving end the socket is terminating or faces some problem when
 I use the webviewclient. With the browser there has been no problem.

There is no socket, unless you have a Web server running in the emulator 
itself.

The example you are trying to use is strictly for loading local data.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Call the default mediaplayer program in Android OS

2008-10-15 Thread Peli

It should play mp3 just fine...

Maybe after adding an mp3 file, you first have to invoke the
MediaScanner through Dev Tools or Ze Dev Tools / MediaScanner,
so that the mp3 file gets into the content provider.

Peli

On Oct 15, 10:17 am, Baonq86 [EMAIL PROTECTED] wrote:
 Thank you, Peli. Yourcode works well ! But when I play the
 External_Content_URI, the default mediaplayer will play the first song
 in the sdcard. It's a mp3 song, and the mediaplayer notice that
 cannot read this format. I use default Music Application, it plays
 well !! Do you have the same problems ?? What is the best format you
 think default MediaPlayer plays well ?? Thank you !!

 On Oct 13, 1:59 am, Peli [EMAIL PROTECTED] wrote:

  The code I sent just plays a very short ring-tone.

  You should create an SD card 
  firsthttp://code.google.com/android/reference/othertools.html#mksdcard
  so you can place longer songs there. (either copy mp3 songs there, or
  use the built-in sound recorderhttp://www.openintents.org/en/node/114
  ).

  If you want the MediaPlayer to stay open after the end of the song,
  then you should ask again and hope that someone from Google can answer
  - because I don't know the answer to that one and the
  MediaPlaybackActivity is closed source and undocumented so far...

  Peli

  On Oct 12, 5:06 pm, Baonq86 [EMAIL PROTECTED] wrote:

   Thank you, Peli. I tried your code. I use a button, when I click the
   button, my application will run your code. But immediately, I escape
   the default mediaplayer and go back my application ! Can you solve
   this problem ?

   On Oct 12, 3:28 am, Peli [EMAIL PROTECTED] wrote:

Hi,

Try this:

Intent i = new Intent(Intent.ACTION_VIEW);
Uri u =
Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI,
1);
i.setData(u);
startActivity(i);

This will open the first audio file from the internal content provider
in Android's media player.

Peliwww.openintents.org

On Oct 1, 2:20 pm, Baonq86 [EMAIL PROTECTED] wrote:

 I can built my own mediaplayer but I want call the default mediaplayer
 program in Android OS. Can anyone help me ?

 On Oct 1, 4:58 pm, MrSnowflake [EMAIL PROTECTED] wrote:

  I recon your could fire an Intent with VIEW and set the mime type to
  your video file.

  On 1 okt, 11:03,Baonq86[EMAIL PROTECTED] wrote:

   Does anyone know to built an application to call the default
   mediaplayer program in Android OS ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Help: why can't I use com.google.api.translate in my Android application

2008-10-15 Thread ecompositor

Did you give the application INTERNET permission in the manifest?

On Oct 14, 8:58 am, redmapleleaf [EMAIL PROTECTED] wrote:
 Hi all,

 I wish to use the package com.google.api.translate to write an android
 translator application. However, I tried all day yesterday and nothing
 is working. Although I got no error warning, I am not getting anything
 back from the translator. Do you know if there is something
 fundamentally wrong with my code? Why wouldn't the package
 com.google.api.translate works in an android application environment?

 Thank you for your help,

 Redmapleleaf

 PS. Here is a copy of my code

 package com.google.android.translator;

 import com.google.api.translate.Language;
 import com.google.api.translate.Translate;

 import android.app.Activity;
 import android.os.Bundle;
 import android.widget.TextView;

 public class AndroidTranslator extends Activity {
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       TextView tv = new TextView(this);
       String translatedText=Hello World;
       translatedText = myTranslator(Hellow World);
       tv.setText(translatedText);
       setContentView(tv);

   }

   private String myTranslator(String phrase) {
           String translatedText=null;
           if(phrase==null) phrase=No Translation;
         try {
           translatedText = Translate.translate(phrase,
 Language.ENGLISH, Language.FRENCH);
         } catch (Exception ex) {
           ex.printStackTrace();
         }
         return (translatedText);
       }

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



[android-developers] Android SDK / emulator working fine on Linux 64 bits ?

2008-10-15 Thread Nanard

Hi,

I plan to upgrade my PC and move from Mandriva 32bits to Mandriva
64bits.

Are Eclispe  SDK tools  the emulator still working fine ?

Any specific remarks on such a platform ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Network Errors, No Reason?

2008-10-15 Thread Charlie Collins

I take it back, it's not a perms thing.  I still see that message once
in a while.

I also get the same socket error that Jason reports, once in a while -
in the same area as the tcp_rmem_min error:
http://groups.google.com/group/android-developers/browse_thread/thread/7c408f10d23c7dfc/.

It seems like these things go away if I use HttpClient, but occur once
in a while if I use plain java.net stuff.  My recommendation would be
to use HttpClient, that seems to clear it up - but I have no idea why
it occurs in the first place.

On Oct 12, 12:25 pm, Charlie Collins [EMAIL PROTECTED]
wrote:
 Ok, I just happened to see this same error in my log today.

 10-12 16:16:42.351: ERROR/NetworkStateTracker(50): Can't set tcp
 buffer sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/
 tcp_rmem_min

 But I also noticed in the same log PRIOR to this error, the well known
 permissions related java.net.SocketException: unknown error message.
 This was a new app I was building today, and I simply forgot the 
 uses-permission android:name=android.permission.INTERNET / 
 permission, initially.  When I ADD that permission to the manifest, I
 no longer see the tcp buffer sizes FileNotFoundException.

 Maybe this is just a perms issue for you guys too?

 In the new SDK you have to add the INERNET permission to anything that
 makes a network call, and the error message you get if you don't is
 completely unintuitive SocketException (maybe on purpose, it is
 permissions?).  Check your permissions and see if that is related.

 On Oct 8, 9:32 am, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  Actually, i have the same problem.
  I think the problem come to the :80. In fact, when I tried, in a
  browser, the URL with the port (:80) it doesn't work. Without, It
  works.

  But, the port number is put automatically, so, i don't know what to
  do.

  Somebody has an idea??

  (sorry about my English, I'm French)

  On 8 oct, 13:01, Charlie Collins [EMAIL PROTECTED] wrote:

   That error seems more involved than potentially just what your
   application is doing.  Can you browse to that URL (or others) from the
   browser on the emulator?  Leave your app out of the equation and make
   sure the platform is working as you expect first.  Might need to make
   sure you have a clean Android install and -wipe-data when you start.
   Not sure, but NetworkStateTracker(52): Can't set tcp buffer
   sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/tcp_rmem_min
   sounds like Android itself is not happy (as opposed to just an app
   error).

   Also, that looks like some of my code from the Manning book Unlocking
   Android.  If it is, that hasn't been updated yet to work in the 1.0
   SDK so you may get various errors unless you are running it on m5, or
   you have updated it.  I am in the process right now of updating the
   code and the text for the book - to get everything up to 1.0. I am
   actually re-working that particular sample code project this week, if
   you want to send me an email I can zip it and send it to you when I am
   done (it will eventually get update on the Manning MEAP site too, but
   will take longer).

   On Oct 7, 10:23 am, nichojo [EMAIL PROTECTED] wrote:

I have this:

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        /* Create a new TextView to display the parsing result later.
*/
        TextView tv = new TextView(this);
        try
        {
            /* Create a URL we want to load some xml-data from. */
            String queryString = http://weather.yahooapis.com/
forecastrss?p=36832;
            /* Replace blanks with HTML-Equivalent. */
            URL url = new URL(queryString.replace( , %20));

            /* Get a SAXParser from the SAXPArserFactory. */
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp = spf.newSAXParser();

            /* Get the XMLReader of the SAXParser we created. */
            XMLReader xr = sp.getXMLReader();
            /* Create a new ContentHandler and apply it to the XML-
Reader */
            WeatherHandler myWeatherHandler = new WeatherHandler();
            xr.setContentHandler(myWeatherHandler);

            /* Parse the xml-data from our URL. */
            xr.parse(new InputSource(url.openStream()));
            /* Parsing has finished. */
            tv.setText(myWeatherHandler.getInfo());

        } catch (Exception e)
        {
            tv.setText(Error:  + e.getMessage());
            Log.e(MY_DEBUG_TAG, WeatherQueryError, e);
        }
        /* Display the TextView. */
        setContentView(tv);
    }

For some reason I get a bunch network errors:

10-07 14:22:21.702: ERROR/NetworkStateTracker(52): Can't set tcp
buffer sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/
tcp_rmem_min
10-07 

[android-developers] Req Info abt Development Settings

2008-10-15 Thread Amit

Hello Friends,

Can u plz explain me how to use the development settings in android
especially the following features:

1. What does Debug App. do and what does Wait for debugger do ?

2. How to interpret the display when Show running processes is
selected ? what the does the three values (separated by /)mean ? Also
what does the colors red and green in background of process names
imply ?

3. What does the red and green lines in the output of Show CPU usage
imply ?

 4. What do Immediately destroy activities and Show Background
do ?

If possible, plz explain me the other features as well.
Any help appreciated.

Thanks and Regards
Amit

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



[android-developers] Re: Program Finished - Now What?

2008-10-15 Thread MojoChris

An Ant task for this would be great. Anybody got one? I'm not that
point yet in my development or I'd build one.

Thanks

C.

On Oct 15, 10:37 am, Teo [EMAIL PROTECTED] wrote:
 That part of the documentation is a bit shady, maybe it would indeed
 be good to have a relevant usage example of keytool and jarsigner. I'm
 still not convinced i covered all of the things i should in my .apk
 signing :)

 Thanks,
 Teo

 On Oct 15, 1:23 pm, Ewan Grantham [EMAIL PROTECTED] wrote:

  Thanks! That's what I was looking for!

  On Wed, Oct 15, 2008 at 4:06 AM, legerb [EMAIL PROTECTED] wrote:

   Use keytool and jarsigner, they come with the jdk.
  http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html
  http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html

   eventually this is what worked for me:
   keytool -genkey -keystore refArchive/myKeyStore -alias somealias
   jarsigner -keystore refArchive/myKeyStore -signedjar refArchive/
   testapks.apk refArchive/testapk.apk somealias

   On Oct 14, 2:48 pm, Ewan Grantham [EMAIL PROTECTED] wrote:
OK, appreciate the suggestions on how to list in alternate marketplaces.
   The
one thing stopping me, is that what I was also looking for was a decent
step-by-step on how to sign my app. I gather I can change a setting in
Eclipse to do the release build, but then I still need to do something
with keysign. Can anyone explain that part of the process, please?

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



[android-developers] Re: BroadcastReceiver not receiving PROXIMITY_ALERTs

2008-10-15 Thread churam

Does this work with multiple proximityalerts? As long as I only add
one proximityalert, everything is fine. When I try to add more no
alerts are received.

On Aug 28, 3:54 pm, woodm [EMAIL PROTECTED] wrote:
 Nevermind...it was a /stupid/ mistake.

 The PendingIntent I was supplying was fetched from
 PendingIntent.getActivity() where as it should have been called with
 PendingIntent.getBroadcast().

 It works fine now :-)

 On Aug 28, 2:43 pm, woodm [EMAIL PROTECTED] wrote:

  Thanks for getting back to me so quickly.

  I've altered my code to define my own intent
  (package_name.action.PROXIMITY_ALERT). However, doing this simply
  yielded the same results. I also added the following line:

  proxIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

  prior to creating the PendingIntent. I then modified my Manifest,
  adding an IntentFilter for the main activity:

  activity android:name=.BuddyList android:label=@string/app_name
      intent-filter
        action android:name=android.intent.action.MAIN /
        category android:name=android.intent.category.LAUNCHER /
      /intent-filter
      intent-filter
        action android:name=package_name.action.PROXIMITY_ALERT /
        category android:name=android.intent.category.DEFAULT /
      /intent-filter
  /activity

  However, for some reason, when I do this, I get the following in
  LogCat:

  08-28 13:24:19.974: INFO/LocationManagerService(53): Entered alert
  08-28 13:24:19.983: INFO/ActivityManager(53): Starting activity:
  Intent { action=package_name.action.PROXIMITY_ALERT
  comp={package_name/package_name.BuddyList} (has extras) }
  08-28 13:24:20.004: WARN/ActivityManager(53): startActivity called
  from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for:
  Intent { action=package_name.action.PROXIMITY_ALERT
  comp={package_name/package_name.BuddyList} (has extras) }

  Notice the final line -- despite me adding the new flags to my intent
  mentioned above. This causes the application to loop and start itself
  over and over and over and then in the end breaking.

  The BroadcastReceiver definitely works -- I've tried inserting the
  line sendBroadcast(proxIntent) and the receiver does get the messages
  and prints to LogCat as expected.

  Could this be a bug with the proximity alerts functionality? Has
  anyone else got proximity alerts working correctly?

  Cheers

  On Aug 28, 12:47 pm, Mark Murphy [EMAIL PROTECTED] wrote:

   woodm wrote:
Actually. after having a closer look at the Intent documentation does
PROXIMITY_ALERT even exist anymore!?

   There's nothing to say you need to use their namespace for your action.
   In fact, I'm under the impression you should use your own namespace, to
   prevent potential collisions with other apps.

   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   Warescription: All titles, revisions,  ebook formats, just $35/year

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



[android-developers] issue with android.permission.CALL_PRIVILEGED

2008-10-15 Thread MojoChris

I've added the following to my manifest:

uses-permission android:name=android.permission.CALL_PRIVILEGED/
uses-permission

Now I'm trying to use:

startActivity(new Intent(android.intent.action.CALL,
   Uri.parse(tel:911)));

And nothing...no error...nothing.

I'm looking at building a new dialer but if I can't have it call 911
then that's going to be an issue. Any ideas what I'm doing wrong?

Thanks

C.

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



[android-developers] Re: New android apps on Twitter

2008-10-15 Thread Live Crunch

Sweet, I found your website here too at http://www.tmobileg1fans.com

On Oct 9, 6:12 am, Al Sutton [EMAIL PROTECTED] wrote:
 I've hooked AndAppStore.com up totwitter, so if you want to see if
 anyone is releasing similar apps to yours you can follow AndAppStore 
 athttp://twitter.com/AndAppStore

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



[android-developers] Re: setOnKeyListener problem

2008-10-15 Thread cH3Lu eu
Maybe the requestFocus method dispatches a key press event, put some
breakpoints to see that.

2008/10/15 pabbot [EMAIL PROTECTED]


 Hi everyone,

 this is my first post here so I'll try not to extend so much.

 I've got a Layout with 3 EditText, called mText1, mText2 and mText3.
 I want to navigate through them by pressing the ENTER KEY, so I
 decided to set a onKeyListener for every of them and every time I
 detect the user presses the ENTER KEY, I set the focus on the next
 EditText. But it sets the focus on the next's next. If I press the
 ENTER KEY on mText1, the focus is set on mText3; the same with mText2
 (it is set on mText1) and so on...

 I can't understand this kind of behaviour.

 Any solution? Many thanks in advance.

 Here, the code:
 mText1.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent
 event) {
if(keyCode == KeyEvent.KEYCODE_ENTER) {
mText2.requestFocus();
return true;
}
return false;
}

});
 mText2.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent
 event) {
if(keyCode == KeyEvent.KEYCODE_ENTER) {
mText3.requestFocus();
return true;
}
return false;
}

});
 mText3.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent
 event) {
if(keyCode == KeyEvent.KEYCODE_ENTER) {
mText1.requestFocus();
return true;
}
return false;
}

});

 


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



[android-developers] Android Filesytem loading error on i.mx31 platform

2008-10-15 Thread Eric Michael

Hi all.,

 I m porting android to imx31 hardware, kernel is booting well
but  Filesystem shows some error which loading the binder information
required for the android to load...

   I ve created the file system by following the steps mentioned in
http://elinux.org/Android_on_OMAP

while booting .. I m able to get the initial red eye movement ,similar
one which we see in emulator... but after red eye screen ... I m not
getting the android screen as in emulator... red eye continuous its
state ..

My log message for the binder error is as follows..


Freeing init memory: 188K
sh: can't access tty; job control turned off
# /system/bin/a.sh
Using fallback suid method
Using fallback suid method
Failed to start message bus: The pid file /tmp/messagebus.pid
exists, if the message bus is no
t running, remove this file
binder_open: 794:794
binder_mmap: 794 4000-4040 (4096 K) vma 71 pagep 5f
+++ post-zygote
binder: 794:797 ERROR: bcREGISTER_LOOPER called without request
binder: 794:797 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder: 794:798 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder_open: 795:795
binder_mmap: 795 4265c000-42a5c000 (4096 K) vma 71 pagep 5f
binder: 795:801 ERROR: bcREGISTER_LOOPER called without request
binder: 795:801 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder: 795:802 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder: 795:795 ERROR: bcREGISTER_LOOPER called without request
binder: 795:795 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder_flush: 795 woke 3 threads
 Prepping: /system/app/AlarmProvider.apk:/system/app/Browser.apk:/
system/app/Calendar.apk:/syste
m/app/Camera.apk:/system/app/Contacts.apk:/system/app/Development.apk:/
system/app/GDataFeedsProv
ider.apk:/system/app/Gmail.apk:/system/app/GmailProvider.apk:/system/
app/GoogleApps.apk:/system/
app/GoogleAppsProvider.apk:/system/app/Home.apk:/system/app/
ImProvider.apk:/system/app/Maps.apk:
app/GoogleAppsProvider.apk:/system/app/Home.apk:/system/app/
ImProvider.apk:/system/app/Maps.apk:
/system/app/MediaPickerActivity.apk:/system/app/MediaProvider.apk:/
system/app/Phone.apk:/system/
app/PimProvider.apk:/system/app/ApiDemos.apk:/system/app/
SettingsProvider.apk:/system/app/Sms.ap
k:/system/app/SyncProvider.apk:/system/app/TelephonyProvider.apk:/
system/app/XmppService.apk:/sy
stem/app/YouTube.apk
File not found: /system/app/AlarmProvider.apk
File not found: /system/app/Calendar.apk
File not found: /system/app/Camera.apk
File not found: /system/app/GDataFeedsProvider.apk
File not found: /system/app/Gmail.apk
File not found: /system/app/GmailProvider.apk
File not found: /system/app/MediaPickerActivity.apk
File not found: /system/app/PimProvider.apk
File not found: /system/app/ApiDemos.apk
File not found: /system/app/Sms.apk
File not found: /system/app/SyncProvider.apk
File not found: /system/app/YouTube.apk
 Prep complete
fatal error opening /sys/android_power/acquire_partial_wake_lock
binder: 794:794 ERROR: bcREGISTER_LOOPER called without request
binder: 794:794 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder_open: 826:826
binder_mmap: 826 4265c000-42a5c000 (4096 K) vma 71 pagep 5f
binder: 826:834 ERROR: bcREGISTER_LOOPER called without request
binder: 826:834 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder: 826:835 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder_open: 828:828
binder_mmap: 828 4265c000-42a5c000 (4096 K) vma 71 pagep 5f
binder: 828:836 ERROR: bcREGISTER_LOOPER called without request
binder: 828:836 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
binder: 828:837 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER



Can anyone come up with the solution for this issue...

Thanks
Eric

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



[android-developers] android.permission.CALL_PRIVILEGED not working

2008-10-15 Thread MojoChris

I'm playing around with the SDK and looking at creating a new dialer
application.

One of the things I'd like to be able  to do is be able to dial 911 as
I thought it might be useful ;-)

I thought all I'd have to do is add

uses-permission android:name=android.permission.CALL_PRIVILEGED/
uses-permission

To my manifest so that when I invoke:

startActivity(new Intent(android.intent.action.CALL,
   Uri.parse(tel:911)));

It would go through. As it is now when I press my test button nothing
happens at all no error msg...no dialing.  All other numbers I've
tried seem to work.

What am I doing wrong?

Thanks

C.

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



[android-developers] Req Info abt DDMS tool

2008-10-15 Thread Amit

Hello Friends,

Can u plz tell me how to use the DDMS tool, I never get my application
in the left pane. How can i use DDMS for getting information about my
application.

Is there any documentation available for DDMS tool other than the one
provided in android documentation.

If i dont use the DDMS tool, instead use the DDMS perspective inside
eclipse, i get my application in the left pane, but dont get
Allocation Tracker Tab in the right pane, is there any option/setting
to get this tab in DDMS perspective.

Also, tell me if there is any other way to get application level
details like memory usage and timing information.

Any help appreciated.

Thanks  Regards
Amit

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



[android-developers] Computer

2008-10-15 Thread Actress Trisha

Computer parts
Take a Tour Inside Intel's First
Multicore Processor  Graphics Card

Acress Trisha Wallpaper Photos Big Size - Open the 3 Website 
Register

***
http://www.freewebs.com/arthistoris/
http://italianfriendfinder.com/go/g1024983-pmem
http://germanfriendfinder.com/go/g1024983-ppc
***


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



[android-developers] Re: Question regarding WebView

2008-10-15 Thread Mark Murphy

Rubicks wrote:
 Yes, I have a local server running with in the emulator, it is just a
 simple socket, which can handle HTTP requests locally.

Ah!

You can try changing the base URL you are passing to 
loadDataWithBaseURL() to match the base URL you want 
(http://localhost:, presumably). That might help; certainly, it is 
more correct. The fake base URL in my sample code is because relative 
URLs don't work without *something* there (null doesn't work).

By the way, if you don't mind me asking, did you use an existing Web 
server component as a base, or did you write your own Web server?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

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



[android-developers] CREATE TABLE android_metadata failed

2008-10-15 Thread [EMAIL PROTECTED]

Hi All,

 I am using SDK1.0 version. I am using database for storing
business card type information. Every thing was running fairly well.
All of a sudden I started getting following exception .

  CREATE TABLE android_metadata failed

E/Database(  479): Failed to setLocale() when constructing, closing
the database
E/Database(  479): android.database.sqlite.SQLiteException: file is
encrypted or is not a database
E/Database(  479):  at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
E/Database(  479):  at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:
1470)
E/Database(  479):  at
android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:
1424)
E/Database(  479):  at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:
537)
E/Database(  479):  at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
558)
E/Database(  479):  at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
551)
E/Database(  479):  at
android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:
427)
E/Database(  479):  at
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:
98)
E/Database(  479):  at org.now.dd.db.now.init(now.java:121)
E/Database(  479):  at
org.now.dd.helpers.ServiceHelper.getSecurityTokenData(ServiceHelper.java:
967)
E/Database(  479):  at
org.now.dd.activities.Splash.populateIntentExtras(Splash.java:154)
E/Database(  479):  at
org.now.dd.activities.Splash.launchHome(Splash.java:133)
E/Database(  479):  at org.now.dd.activities.Splash
$1.run(Splash.java:65)
E/Database(  479):  at
android.os.Handler.handleCallback(Handler.java:542)
E/Database(  479):  at
android.os.Handler.dispatchMessage(Handler.java:86)
E/Database(  479):  at android.os.Looper.loop(Looper.java:123)
E/Database(  479):  at
android.app.ActivityThread.main(ActivityThread.java:3742)
E/Database(  479):  at
java.lang.reflect.Method.invokeNative(Native Method)
E/Database(  479):  at java.lang.reflect.Method.invoke(Method.java:
515)
E/Database(  479):  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
E/Database(  479):  at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
E/Database(  479):  at dalvik.system.NativeStart.main(Native
Method)
E/now(  479): Had an issue opening up the now Database
W/System.err(  479): android.database.sqlite.SQLiteException: file is
encrypted or is not a database
W/System.err(  479):at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
W/System.err(  479):at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:
1470)
W/System.err(  479):at
android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:
1424)
W/System.err(  479):at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:
537)
W/System.err(  479):at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
558)
W/System.err(  479):at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
551)
W/System.err(  479):at
android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:
427)
W/System.err(  479):at
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:
98)
W/System.err(  479):at org.now.dd.db.now.init(now.java:121)
W/System.err(  479):at
org.now.now.helpers.ServiceHelper.getSecurityTokenData(ServiceHelper.java:
967)
W/System.err(  479):at
org.now.dd.activities.Splash.populateIntentExtras(Splash.java:154)
W/System.err(  479):at
org.now.dd.activities.Splash.launchHome(Splash.java:133)
W/System.err(  479):at org.new.dd.activities.Splash
$1.run(Splash.java:65)
W/System.err(  479):at
android.os.Handler.handleCallback(Handler.java:542)
W/System.err(  479):at
android.os.Handler.dispatchMessage(Handler.java:86)
W/System.err(  479):at android.os.Looper.loop(Looper.java:123)
W/System.err(  479):at
android.app.ActivityThread.main(ActivityThread.java:3742)
W/System.err(  479):at
java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(  479):at java.lang.reflect.Method.invoke(Method.java:
515)
W/System.err(  479):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
W/System.err(  479):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
W/System.err(  479):at dalvik.system.NativeStart.main(Native
Method)


Has anyone ever dealt with a Problem where, Database developer is not
able to open created database?


Thanks
Amit Chabra





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

[android-developers] How communicate between two activities?

2008-10-15 Thread Ramunas

Hello,

I have two activities in one application. I want call function in
activity from another activity. How I can do it? Please give me any
suggestions.

Ramunas

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



[android-developers] Re: issue with android.permission.CALL_PRIVILEGED

2008-10-15 Thread MojoChris

Sorry didn't mean to double post I didn't think my other one had shown
up.

On Oct 15, 11:26 am, MojoChris [EMAIL PROTECTED] wrote:
 I've added the following to my manifest:

 uses-permission android:name=android.permission.CALL_PRIVILEGED/
 uses-permission

 Now I'm trying to use:

         startActivity(new Intent(android.intent.action.CALL,
                        Uri.parse(tel:911)));

 And nothing...no error...nothing.

 I'm looking at building a new dialer but if I can't have it call 911
 then that's going to be an issue. Any ideas what I'm doing wrong?

 Thanks

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



[android-developers] Re: Orientation changes simulation

2008-10-15 Thread blindfold

Well, apparently not quite heresy, because Eclipse today announced a
Java preprocessor as part of the Eclipse Mobile Tools for Java Project
(MTJ):

http://www.eclipse.org/org/press-release/20081015_mtj.php

I installed the MTJ runtime from

http://download.eclipse.org/dsdp/mtj/downloads/drops/R-0.9-200810141345/

but it looks like it only works with MIDlet projects (Java ME) by
default, because the Enable Preprocessing did not show up in my
Android projects context menus under Eclipse Ganymede. From the
Eclipse Help | Search (for preprocessor), it shows that the
preprocessor has all the normal #ifdef #else #endif etc directives (to
be preceded by //), so it looks like this could suit us well once we
figure out how to enable the MTJ preprocessor for Android projects
under Eclipse. Any Eclipse experts?

Regards


On Sep 10, 1:23 pm, blindfold [EMAIL PROTECTED] wrote:
 Clever find, yes, this way we can get rid of changing the closing tags
 in global substitution such that one need only apply one global
 substitution instead of two. Without the comment coloring of Eclipse
 it does get confusing to read though. Concerning your //* method, I
 would suggest to use something like //*! such that after replacing
 this by /*! you can substitute backwards to //*! in order to re-
 activate the code segments. with //* to /* alone there is no safe
 return path. Basically here I just collapsed my earlier opening tag /
 **/ // xOpenIntents into a shorter unique comment delimiter. So this
 would give

    //*!
    int a = 1;
    int b = 1;
    /* */

 where one can flip between //*! and /*! through global substitution.
 Just as with #ifdef's, I'd rather keep the approach a little more
 general such that I can selectively activate and deactivate code
 sections in case I have more than just OpenIntents code to toggle on
 and off. So I'd then opt for something more specific to OpenIntents
 like

    //*OpenIntents
    int a = 1;
    int b = 1;
    /* */

 and flip between //*OpenIntents and /*OpenIntents  through global
 substitution. I guess all of this is considered heresy in some
 circles. :-)

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



[android-developers] Re: How communicate between two activities?

2008-10-15 Thread vallis

Hi Ramunas,

This is normally done by calling ActivityName.function(atts)
So if your second activity is called foo and the method called bar you
would use Foo.bar(attributes)
If you have problems you may want to set up bar to take and Activity
(like bar(Activity act)) then call it with bar((Activity)this, other
atts)

That may not be the clearest explenation but it should get you started.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How communicate between two activities?

2008-10-15 Thread hackbod

Generally doing direct calls between activities like this is a really
bad idea, because the system controls the lifecycle of the activity,
not you, so you have no assurance that the activity you are trying to
call even exists or is the instance you are using.

For direct interactions, the best way to represent this is as a third
class, for which you have a singleton instance in your app that both
activities call on.  Then the shared state can be there, regardless of
which activities are being created and destroyed.

If you really do need direct calls between activities, I would
strongly represent implementing one of them as a Dialog (which can be
full-screen), so that one of the activities can completely own all of
the stuff it is directly calling.

On Oct 15, 1:07 pm, Ramunas [EMAIL PROTECTED] wrote:
 Hello,

 I have two activities in one application. I want call function in
 activity from another activity. How I can do it? Please give me any
 suggestions.

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



[android-developers] Re: android.permission.CALL_PRIVILEGED not working

2008-10-15 Thread hackbod

Sorry, emergency dialing is not something we can expose to third party
applications.

On Oct 15, 7:15 am, MojoChris [EMAIL PROTECTED] wrote:
 I'm playing around with the SDK and looking at creating a new dialer
 application.

 One of the things I'd like to be able  to do is be able to dial 911 as
 I thought it might be useful ;-)

 I thought all I'd have to do is add

 uses-permission android:name=android.permission.CALL_PRIVILEGED/
 uses-permission

 To my manifest so that when I invoke:

 startActivity(new Intent(android.intent.action.CALL,
                        Uri.parse(tel:911)));

 It would go through. As it is now when I press my test button nothing
 happens at all no error msg...no dialing.  All other numbers I've
 tried seem to work.

 What am I doing wrong?

 Thanks

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



[android-developers] Re: JavaScript and WebView

2008-10-15 Thread Rubicks

Thanks Peli, That solved my problem.


On Oct 15, 3:22 pm, Peli [EMAIL PROTECTED] wrote:
 Have you looked at apps-for-android 
 webview-demo?http://android-developers.blogspot.com/2008/09/using-webviews.htmlhttp://code.google.com/p/apps-for-android/

 Peliwww.openintents.org

 On Oct 15, 3:04 pm, Rubicks [EMAIL PROTECTED] wrote:

  Here is what I am trying to do.
  I have a Javascript (JS) given to me, which I can not change.
  html
  head
  script type=text/javascript language=JavaScript
    var nFindAPITries = 0;
    var API = null;
    function FindAPI(win) {
      while ((win.API == null)  (win.parent != null)  (win.parent !=
  win)) {
        nFindAPITries ++;
        if (nFindAPITries  500) {
          alert(Error in finding API -- too deeply nested.);
          return null
        }
        win = win.parent
      }
      return win.API
    }
    function init() {
      if ((window.parent)  (window.parent != window)){
        API = FindAPI(window.parent)
      }
      if ((API == null)  (window.opener != null)){
        API = FindAPI(window.opener)
      }
      if (API == null) {
        alert(No API adapter found)
      } else {
        API.LMSInitialize()
      }
    }
    function finish() {
      if (API != null) {
        API.LMSFinish()
      }
    }
  /script

  title/title
  /head
  body onload=init() onunload=finish()
  h1Hello world/h1
  /body
  /html

  Now, in my activity, I will load a webview with a HTML file which uses
  this JS.
  Is there a way to bind a java object from my application to satisfy
  FindAPI function.
  So that window.parent gets binded to my webviewclient or  a java
  object from my project in which I plan to have LMSInitialize and
  LMSFinish functions.

  Is there a possible solution for this within android?

  Thanks.

  On Oct 15, 1:58 pm, Mark Murphy [EMAIL PROTECTED] wrote:

   Rubicks wrote:
My activity has a webview . I will be leading some html pages on that
webview which includes some JavaScript functions. I have a need to
send some data from webview to my java application based on some user
actions using javaScript functions. Is it possible or how can I do
it?

   You can try using WebView#addJavascriptInterface() to expose a Java
   object (via reflection, I assume) to your WebView under a JavaScript
   namespace.

   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MapView API Key??

2008-10-15 Thread zl25drexel

The phone is supposed to be coming out in a week, so where is the
MapView Api key registration service?

According to 
http://code.google.com/android/reference/com/google/android/maps/MapView.html

In order to run on actual devices, though, your application will need
a real authentication key

so the mapping function of my app will not work on the G1 phone when
it come out?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BroadcastReceiver not receiving PROXIMITY_ALERTs

2008-10-15 Thread churam

I found the problem. I had to specify an unique requestcode, although
it is stated in the API documentation that this is not currently used.

On Oct 15, 6:39 pm, churam [EMAIL PROTECTED] wrote:
 Does this work with multiple proximityalerts? As long as I only add
 one proximityalert, everything is fine. When I try to add more no
 alerts are received.

 On Aug 28, 3:54 pm, woodm [EMAIL PROTECTED] wrote:

  Nevermind...it was a /stupid/ mistake.

  The PendingIntent I was supplying was fetched from
  PendingIntent.getActivity() where as it should have been called with
  PendingIntent.getBroadcast().

  It works fine now :-)

  On Aug 28, 2:43 pm, woodm [EMAIL PROTECTED] wrote:

   Thanks for getting back to me so quickly.

   I've altered my code to define my own intent
   (package_name.action.PROXIMITY_ALERT). However, doing this simply
   yielded the same results. I also added the following line:

   proxIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

   prior to creating the PendingIntent. I then modified my Manifest,
   adding an IntentFilter for the main activity:

   activity android:name=.BuddyList android:label=@string/app_name
       intent-filter
         action android:name=android.intent.action.MAIN /
         category android:name=android.intent.category.LAUNCHER /
       /intent-filter
       intent-filter
         action android:name=package_name.action.PROXIMITY_ALERT /
         category android:name=android.intent.category.DEFAULT /
       /intent-filter
   /activity

   However, for some reason, when I do this, I get the following in
   LogCat:

   08-28 13:24:19.974: INFO/LocationManagerService(53): Entered alert
   08-28 13:24:19.983: INFO/ActivityManager(53): Starting activity:
   Intent { action=package_name.action.PROXIMITY_ALERT
   comp={package_name/package_name.BuddyList} (has extras) }
   08-28 13:24:20.004: WARN/ActivityManager(53): startActivity called
   from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for:
   Intent { action=package_name.action.PROXIMITY_ALERT
   comp={package_name/package_name.BuddyList} (has extras) }

   Notice the final line -- despite me adding the new flags to my intent
   mentioned above. This causes the application to loop and start itself
   over and over and over and then in the end breaking.

   The BroadcastReceiver definitely works -- I've tried inserting the
   line sendBroadcast(proxIntent) and the receiver does get the messages
   and prints to LogCat as expected.

   Could this be a bug with the proximity alerts functionality? Has
   anyone else got proximity alerts working correctly?

   Cheers

   On Aug 28, 12:47 pm, Mark Murphy [EMAIL PROTECTED] wrote:

woodm wrote:
 Actually. after having a closer look at the Intent documentation does
 PROXIMITY_ALERT even exist anymore!?

There's nothing to say you need to use their namespace for your action.
In fact, I'm under the impression you should use your own namespace, to
prevent potential collisions with other apps.

--
Mark Murphy (a Commons Guy)http://commonsware.com
Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Device unique ID, other than getDeviceId()?

2008-10-15 Thread Mark Murphy

I need a unique ID for each phone, just enough to distinguish it from 
any other Android phone. In theory, TelephonyManager#getDeviceId() would 
be fine, except that it requires READ_PHONE_DATA as a permission, and 
that seems overkill.

The catch is that I need this ID to be cross-application; two 
applications on the same device need to get the same ID.

So, two questions:

1. Is there some other API in Android-land that returns a unique value 
for each phone, that I just haven't found yet? One that does not require 
any special permission to access? I even considered a MAC address, but 
Android doesn't offer NetworkInterface#getHardwareAddress(), unfortunately.

2. If the answer to #1 is no, silly, is there a spot (that I just 
haven't found yet) where I could tuck a world-readable UUID that could 
serve this purpose? It doesn't seem like there's any good 
cross-application storage spot outside of the SD card, and I can't count 
on all devices having one.

Thanks in advance!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

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



[android-developers] Re: save file with byte[] argument

2008-10-15 Thread dai

ahh, yes..I should have used fos.write(byte[])and it does work
now..

Thank you so much Jason.

On 10月15日, 午前7:35, Jason Proctor [EMAIL PROTECTED] wrote:
 why not use fos.write(buffer) as your standard java platform example does?

 you don't want to use Writers here, because
 you're dealing with binary data. i think you
 might be confused by your corresponding read(),
 where you presumably (and properly) use Writers
 to write the encoded Base64 strings.

 also, close your streams in a finally block. that
 way they'll be closed if something inside the try
 block throws. otherwise you'll leave file
 descriptors hanging.

 hth

 does anyone have an idea? I want to set byte[] as argument..

 On 10åé13ì™, åþå“11:58, dai [EMAIL PROTECTED] wrote:
   Hi, could you anybody know how to save data using FileoutputStream
   like below with byte[] argument?
   Upon standard java platform, I could save data as zip using
   FileOutputStream with byte[] argument however on Android platform, the
   method does not have wirte(byte[]) but it does have write(byte[]).

   Is thie meaning that I can only chante byte[] to String looking around
   web pages? Or is there anything that I have to consider because of
   android specific manners like this..??

   // Android Platform
           public void write(Context context, String data){
                   byte[] outdata = Base64.decode(data);
                   FileOutputStream fos = null;
                   BufferedWriter out = null;
                   try {
                           fos = context.openFileOutput(output.zip, 0);
                           out = new
 BufferedWriter(new OutputStreamWriter(fos));
                           out.write( ? );
                           out.flush();
                           out.close();
                           fos.close();
                  } catch(

   // Standard Java Platform
           public void write(String data){
                  try {
                           byte[] outdata =
 Base64.decodeBase64(data.getBytes());

                           File of = new File(output.zip);
                           FileOutputStream osf = new FileOutputStream(of);
                           osf.write(outdata);
                           osf.flush();
                  } catch 

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



[android-developers] Re: WebView loadData limitations

2008-10-15 Thread Rubicks

I am trying to get a html file stored in my sdcard image on to
webview .
I am doing something like this

myWebView.loadUrl(/sdcard/index.html);

Then I get an error on the webview as The webpage at file:///sdcard/index.html
could not be loaded as:  The requested file was not found.
But I am sure I have index.html  on my sdcard image and it is
available to the emulator. Because I see it on the File explorer.
I tried myWebView.loadUrl(file:///sdcard/index.html); as well. Still
the same problem exists.

If I have to use loadDataWithBaseUrl(), then I think, I need to
convert index.html  to a string, which I don't want to.

I could not figure out the problem.

Any one any thoughts?

Thanks.

On Oct 3, 8:37 pm, schmielson [EMAIL PROTECTED] wrote:
 Thanks a ton for your comments, Mark.  I've filed a 
 bug:http://code.google.com/p/android/issues/detail?id=929.

 Best,
 Dave

 On Oct 1, 5:29 am, Mark Murphy [EMAIL PROTECTED] wrote:

  schmielson wrote:
   As it turns out, the android:layout_height=wrap_content used along
   with android:layout_weight=1 of the WebView was preventing the
   WebView from properly receiving events!  After changing the WebView's
   layout_height attribute to 0px instead of wrap_content,
   shouldOverrideUrlLoading is being called and things work like a
   charm.  This bug was particularly insidious, however, since I never
   would have expected that these attributes would have altered the
   view's ability to process clicks/touches in this way.

  That is definitely strange. There might be a method to the madness
  there, but off the cuff, I don't see it.

   Do you think this is an SDK bug or a documentation bug?

  Ummm...yes. ;-)

  In other words, it depends a little on why it's not working. The fact
  that you not only see the WebView, but can interact with it, suggests to
  me it's an SDK bug. However, one man's SDK bug can be an Android team
  member's documentation bug, if this is somehow expected behavior.

  I do recommend filing a bug, though, just to get this in the queue to
  get looked at.

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

  Android Training on the Ranch! -- Mar 16-20, 
  2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView loadData limitations

2008-10-15 Thread Mike Reed

The Browser app does not have permission to load a page from the SD  
card. You can write an app with a WebView, and give yourself that  
permission, but the Browser is built explicitly w/o that right for  
security reasons.

On Oct 15, 2008, at 3:41 PM, Rubicks wrote:


I am trying to get a html file stored in my sdcard image on to
webview .
I am doing something like this

myWebView.loadUrl(/sdcard/index.html);

Then I get an error on the webview as The webpage at file:///sdcard/index.html
could not be loaded as:  The requested file was not found.
But I am sure I have index.html  on my sdcard image and it is
available to the emulator. Because I see it on the File explorer.
I tried myWebView.loadUrl(file:///sdcard/index.html); as well. Still
the same problem exists.

If I have to use loadDataWithBaseUrl(), then I think, I need to
convert index.html  to a string, which I don't want to.

I could not figure out the problem.

Any one any thoughts?

Thanks.

On Oct 3, 8:37 pm, schmielson [EMAIL PROTECTED] wrote:
 Thanks a ton for your comments, Mark.  I've filed a 
 bug:http://code.google.com/p/android/issues/detail?id=929 
 .

 Best,
 Dave

 On Oct 1, 5:29 am, Mark Murphy [EMAIL PROTECTED] wrote:

 schmielson wrote:
 As it turns out, the android:layout_height=wrap_content used along
 with android:layout_weight=1 of the WebView was preventing the
 WebView from properly receiving events!  After changing the  
 WebView's
 layout_height attribute to 0px instead of wrap_content,
 shouldOverrideUrlLoading is being called and things work like a
 charm.  This bug was particularly insidious, however, since I never
 would have expected that these attributes would have altered the
 view's ability to process clicks/touches in this way.

 That is definitely strange. There might be a method to the madness
 there, but off the cuff, I don't see it.

 Do you think this is an SDK bug or a documentation bug?

 Ummm...yes. ;-)

 In other words, it depends a little on why it's not working. The fact
 that you not only see the WebView, but can interact with it,  
 suggests to
 me it's an SDK bug. However, one man's SDK bug can be an Android team
 member's documentation bug, if this is somehow expected behavior.

 I do recommend filing a bug, though, just to get this in the queue to
 get looked at.

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml



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



[android-developers] Re: WebView loadData limitations

2008-10-15 Thread Rubicks

ok.  I have a webview which is used just by my application. Now, how
do I give permission? Is it done in Androidmanifest file? If that is
the case, I have already done that
uses-permission android:name=android.permission.INTERNET /

On Oct 16, 12:50 am, Mike Reed [EMAIL PROTECTED] wrote:
 The Browser app does not have permission to load a page from the SD  
 card. You can write an app with a WebView, and give yourself that  
 permission, but the Browser is built explicitly w/o that right for  
 security reasons.

 On Oct 15, 2008, at 3:41 PM, Rubicks wrote:

 I am trying to get a html file stored in my sdcard image on to
 webview .
 I am doing something like this

 myWebView.loadUrl(/sdcard/index.html);

 Then I get an error on the webview as The webpage at 
 file:///sdcard/index.html
 could not be loaded as:  The requested file was not found.
 But I am sure I have index.html  on my sdcard image and it is
 available to the emulator. Because I see it on the File explorer.
 I tried myWebView.loadUrl(file:///sdcard/index.html); as well. Still
 the same problem exists.

 If I have to use loadDataWithBaseUrl(), then I think, I need to
 convert index.html  to a string, which I don't want to.

 I could not figure out the problem.

 Any one any thoughts?

 Thanks.

 On Oct 3, 8:37 pm, schmielson [EMAIL PROTECTED] wrote:

  Thanks a ton for your comments, Mark.  I've filed a 
  bug:http://code.google.com/p/android/issues/detail?id=929
  .

  Best,
  Dave

  On Oct 1, 5:29 am, Mark Murphy [EMAIL PROTECTED] wrote:

  schmielson wrote:
  As it turns out, the android:layout_height=wrap_content used along
  with android:layout_weight=1 of the WebView was preventing the
  WebView from properly receiving events!  After changing the  
  WebView's
  layout_height attribute to 0px instead of wrap_content,
  shouldOverrideUrlLoading is being called and things work like a
  charm.  This bug was particularly insidious, however, since I never
  would have expected that these attributes would have altered the
  view's ability to process clicks/touches in this way.

  That is definitely strange. There might be a method to the madness
  there, but off the cuff, I don't see it.

  Do you think this is an SDK bug or a documentation bug?

  Ummm...yes. ;-)

  In other words, it depends a little on why it's not working. The fact
  that you not only see the WebView, but can interact with it,  
  suggests to
  me it's an SDK bug. However, one man's SDK bug can be an Android team
  member's documentation bug, if this is somehow expected behavior.

  I do recommend filing a bug, though, just to get this in the queue to
  get looked at.

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

  Android Training on the Ranch! -- Mar 16-20, 
  2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Vertical tabs

2008-10-15 Thread Rohit Mordani

I have the following layout for tabs:

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent android:orientation=horizontal
TabHost android:id=@+id/TabHost01
android:layout_width=wrap_content
android:layout_height=wrap_content
TabWidget android:layout_width=wrap_content
android:layout_height=wrap_content 
android:id=@android:id/tabs
android:orientation=vertical
/TabWidget
FrameLayout android:layout_width=wrap_content
android:layout_height=wrap_content 
android:id=@android:id/
tabcontent
TextView android:layout_width=wrap_content
android:layout_height=wrap_content
android:id=@+id/TempContent
/TextView
/FrameLayout
/TabHost
/LinearLayout

Even though I set the orientation to vertical on the tabwidget, I
still get horizontal tabs. Is there a way to make the tabs vertical
(one below the other instead of side by side) ?

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



[android-developers] Emulator bug: Intent action/categories is null

2008-10-15 Thread Anm


When an intention is invoked remotely, such as from the Eclipse
plugin, the Intent that invokes the Launcher/Main Activity does have
either an action name or a category set.

I would expect that the default execution from the emulator would
mimic invocation from the Launcher, thus including both ACTION_MAIN
and CATEGORY_LAUNCHER (or possibly some CATEGORY_REMOTE).


Which leads me to a question: What is the exact process the Eclipse
plug-in uses to remotely invoke an application?  Is it general enough
to invoke any type of Intent?


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



[android-developers] Re: MapView API Key??

2008-10-15 Thread Anm

Is this not it:
   http://code.google.com/apis/maps/signup.html


Same key used by any Google Maps mash-up.


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



[android-developers] Contacts.Phones.getDisplayName

2008-10-15 Thread Brian

Hello does anybody know what the following method actually does

Contacts.Phones.getDisplayLabel

public static final CharSequence getDisplayLabel(Context context, int
type, CharSequence label)

the documentation does not really say?
http://code.google.com/android/reference/android/provider/Contacts.Phones.html#getDisplayLabel(android.content.Context,
int, java.lang.CharSequence)

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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread John Spurlock

Re: 2 - Isn't that what MODE_WORLD_READABLE is for?

http://code.google.com/android/reference/android/content/Context.html#openFileOutput(java.lang.String,%20int)

MODE_WORLD_READABLE = File creation mode: allow all other
applications to have read access to the created file.

Hope that helps,
- John

On Oct 15, 5:58 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 I need a unique ID for each phone, just enough to distinguish it from
 any other Android phone. In theory, TelephonyManager#getDeviceId() would
 be fine, except that it requires READ_PHONE_DATA as a permission, and
 that seems overkill.

 The catch is that I need this ID to be cross-application; two
 applications on the same device need to get the same ID.

 So, two questions:

 1. Is there some other API in Android-land that returns a unique value
 for each phone, that I just haven't found yet? One that does not require
 any special permission to access? I even considered a MAC address, but
 Android doesn't offer NetworkInterface#getHardwareAddress(), unfortunately.

 2. If the answer to #1 is no, silly, is there a spot (that I just
 haven't found yet) where I could tuck a world-readable UUID that could
 serve this purpose? It doesn't seem like there's any good
 cross-application storage spot outside of the SD card, and I can't count
 on all devices having one.

 Thanks in advance!

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.3 Published!

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



[android-developers] Re: How communicate between two activities?

2008-10-15 Thread pskink



On 15 Paź, 21:07, Ramunas [EMAIL PROTECTED] wrote:
 Hello,

 I have two activities in one application. I want call function in
 activity from another activity. How I can do it? Please give me any
 suggestions.

 Ramunas
class Application is your friend

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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread Mark Murphy

John Spurlock wrote:
 Re: 2 - Isn't that what MODE_WORLD_READABLE is for?
 
 http://code.google.com/android/reference/android/content/Context.html#openFileOutput(java.lang.String,%20int)
 
 MODE_WORLD_READABLE = File creation mode: allow all other
 applications to have read access to the created file.

Yes, but that implies a spot to put the file.

Thanks, though!

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread John Spurlock

Not sure if you're implying that the context application storage
area (obtainable via Context) is stored on the sdcard.  At least on
the emulator this is not the case - this data is stored on internal
storage, with or without an sdcard.

On Oct 15, 7:56 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 John Spurlock wrote:
  Re: 2 - Isn't that what MODE_WORLD_READABLE is for?

 http://code.google.com/android/reference/android/content/Context.html...)

  MODE_WORLD_READABLE = File creation mode: allow all other
  applications to have read access to the created file.

 Yes, but that implies a spot to put the file.

 Thanks, though!

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Socket exception-unknown error from HttpClient execute() method

2008-10-15 Thread androidian

Same problem here.  Anyone?


On Oct 8, 8:25 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I have the same problem.
 So, if someone has clue or solution...
 that will be nice to share it :)

 On 1 sep, 16:50, Vp [EMAIL PROTECTED] wrote:

  Hi,
  I tired all above mentioned options of settinghttp-proxy and adding
  permissions in AndroidManifest.xml file but still I am not able to
  clear the proxy as well as I am facing following errors:

  09-01 20:13:59.645: ERROR/GpsLocationProvider(54): Could not open GPS
  configuration file /etc/gps.conf

  09-01 20:14:08.245: WARN/System.err(151):
  java.net.UnknownHostException: Host is unresolved:www.google.com:80

  Am missing out something or I need to add any other option?

  Thanks in advance,
  Vp

  On Aug 22, 11:59 pm, Megha Joshi [EMAIL PROTECTED] wrote:

   Did you try configuring emulator proxy connection as discussed 
   below:http://groups.google.com/group/android-developers/browse_thread/threa...

   On Fri, Aug 22, 2008 at 1:51 AM, Graeme [EMAIL PROTECTED] wrote:

hi sacoskun

Thanks for your suggestion. Yes I had not set the INTERNET permission
in my
AndroidManifest.xml. I have updated that now and the socket exception
has changed
to being about being unable to resolve the domain name of ahttpproxy
server
I am located behind. I have noticed other threads wherehttp-proxy
usage has been
problematic.

Thanks for your tip.
Best Regards
Graeme

On Aug 22, 7:30 am, sacoskun [EMAIL PROTECTED] wrote:
 Did you add uses-permission
 android:name=android.permission.INTERNET / tag to your
 AndroidManifest.xml?
 The new SDK requires that permission for network calls.

 sacoskun

 On Aug 21, 6:13 pm, Graeme [EMAIL PROTECTED] wrote:

  Hi everyone

  I'm trying to figure out how to use HttpClient 4.x to do POST 
  requests
  routed via
  a Proxy server. I'm seeing a socket exception triggered by calling

  DefaultHttpClient.execute(HttpHost target, HttpRequest method). My
  HttpPoster class looks like

  package com.bt.gcto.android.testhttp;

  import java.io.IOException;
  import java.util.Hashtable;

  import org.apache.http.Header;
  import org.apache.http.HttpEntity;
  import org.apache.http.HttpHost;
  import org.apache.http.HttpResponse;
  import org.apache.http.HttpVersion;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.methods.HttpPost;
  import org.apache.http.conn.ClientConnectionManager;
  import org.apache.http.conn.params.ConnRoutePNames;
  import org.apache.http.conn.scheme.PlainSocketFactory;
  import org.apache.http.conn.scheme.Scheme;
  import org.apache.http.conn.scheme.SchemeRegistry;
  import org.apache.http.conn.scheme.SocketFactory;
  import org.apache.http.conn.ssl.SSLSocketFactory;
  import org.apache.http.impl.client.DefaultHttpClient;
  import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
  import org.apache.http.params.BasicHttpParams;
  import org.apache.http.params.HttpParams;
  import org.apache.http.params.HttpProtocolParams;
  import org.apache.http.util.EntityUtils;

  import android.net.Uri;
  import android.util.Log;

  public class HttpPoster {
         private final String TAG=HttpPoster;
             private final String NETWORK_DEVICE_SIDE_TRUE =
  ;deviceside=true;
             private final String NETWORK_DEVICE_SIDE_FALSE =
  ;deviceside=false;
             private final String NETWORK_WIFI = ;interface=wifi;
             //private final String proxy=proxy.intra.bt.com:8080;
             private boolean useWifi;
             private boolean deviceSide;
             // Apache HttpClient 4.x stuff
             private static HttpParams defaultParameters = null;
             private static SchemeRegistry supportedSchemes = null;

             /**
               * Performs general setup.
               * This should be called only once.
               */
              private final static void setup() {

                  supportedSchemes = new SchemeRegistry();

                  // Register the http and https protocol schemes,
they are
                  // required by the default operator to look up 
  socket
  factories.
                  SocketFactory sf =
PlainSocketFactory.getSocketFactory();
                  supportedSchemes.register(new Scheme(http, 
  sf,80));
                  sf = SSLSocketFactory.getSocketFactory();
                  supportedSchemes.register(new Scheme(https, 
  sf,80));

                  // prepare parameters
                  HttpParams params = new BasicHttpParams();
                  HttpProtocolParams.setVersion(params,
HttpVersion.HTTP_1_1);
                  

[android-developers] Re: WebView loadData limitations

2008-10-15 Thread Rubicks

May be this is what you meant?  myActivityLauncher  is an Activity
where I have a webview to load html file from sdcard.
public void startMyActivityLauncher() {
Intent i = new Intent(this, myActivityLauncher.class);
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
i.addFlags(Intent. FLAG_GRANT_WRITE_URI_PERMISSION);
i.setFlags(Intent. FLAG_GRANT_WRITE_URI_PERMISSION);
startActivity(i);
}
It doen't work either. What am I missing here?

On Oct 16, 1:08 am, Rubicks [EMAIL PROTECTED] wrote:
 ok.  I have a webview which is used just by my application. Now, how
 do I give permission? Is it done in Androidmanifest file? If that is
 the case, I have already done that
 uses-permission android:name=android.permission.INTERNET /

 On Oct 16, 12:50 am, Mike Reed [EMAIL PROTECTED] wrote:

  The Browser app does not have permission to load a page from the SD  
  card. You can write an app with a WebView, and give yourself that  
  permission, but the Browser is built explicitly w/o that right for  
  security reasons.

  On Oct 15, 2008, at 3:41 PM, Rubicks wrote:

  I am trying to get a html file stored in my sdcard image on to
  webview .
  I am doing something like this

  myWebView.loadUrl(/sdcard/index.html);

  Then I get an error on the webview as The webpage at 
  file:///sdcard/index.html
  could not be loaded as:  The requested file was not found.
  But I am sure I have index.html  on my sdcard image and it is
  available to the emulator. Because I see it on the File explorer.
  I tried myWebView.loadUrl(file:///sdcard/index.html); as well. Still
  the same problem exists.

  If I have to use loadDataWithBaseUrl(), then I think, I need to
  convert index.html  to a string, which I don't want to.

  I could not figure out the problem.

  Any one any thoughts?

  Thanks.

  On Oct 3, 8:37 pm, schmielson [EMAIL PROTECTED] wrote:

   Thanks a ton for your comments, Mark.  I've filed a 
   bug:http://code.google.com/p/android/issues/detail?id=929
   .

   Best,
   Dave

   On Oct 1, 5:29 am, Mark Murphy [EMAIL PROTECTED] wrote:

   schmielson wrote:
   As it turns out, the android:layout_height=wrap_content used along
   with android:layout_weight=1 of the WebView was preventing the
   WebView from properly receiving events!  After changing the  
   WebView's
   layout_height attribute to 0px instead of wrap_content,
   shouldOverrideUrlLoading is being called and things work like a
   charm.  This bug was particularly insidious, however, since I never
   would have expected that these attributes would have altered the
   view's ability to process clicks/touches in this way.

   That is definitely strange. There might be a method to the madness
   there, but off the cuff, I don't see it.

   Do you think this is an SDK bug or a documentation bug?

   Ummm...yes. ;-)

   In other words, it depends a little on why it's not working. The fact
   that you not only see the WebView, but can interact with it,  
   suggests to
   me it's an SDK bug. However, one man's SDK bug can be an Android team
   member's documentation bug, if this is somehow expected behavior.

   I do recommend filing a bug, though, just to get this in the queue to
   get looked at.

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

   Android Training on the Ranch! -- Mar 16-20, 
   2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to select text in a TextView?

2008-10-15 Thread Lazyworm

Hey, i know i can long click a field and click select all in the pop-
up menu, but how can i select one word?
i also notice that i can only pop the menu on EditText but not
TextView, is that the way or i need to change some attributes?

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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread Mark Murphy

John Spurlock wrote:
 Not sure if you're implying that the context application storage
 area (obtainable via Context) is stored on the sdcard.  At least on
 the emulator this is not the case - this data is stored on internal
 storage, with or without an sdcard.

You are absolutely correct.

However, that implies that I know, up front, what applications I'm 
dealing with. I'm implementing a library, not an application, and the 
library could be used by arbitrary developers with arbitrary applications.

So, let's suppose my library is integrated into AppA, AppB, and AppC. 
While each of those have their own application storage area, AppA 
doesn't know about AppB or AppC, etc.

On a desktop PC, we have common storage areas for program settings (/etc 
files in Linux, Registry in Windows, etc.). In those cases, I'd stick 
this UUID in there someplace the first time any of those app tried to 
use it. Android doesn't appear to have such a facility, possibly in the 
interests of security and minimizing cruft.

I may be able to cook up a way of bootstrapping this via Intents. AppA 
registers a BroadcastReceiver on some Intent, after determining there 
are no listeners on that Intent. AppB discovers there is a listener on 
that Intent and uses it to get the UUID information. Unfortunately, I 
think this approach has holes (e.g., user installs AppC but doesn't 
launch it before powering down the phone; on power-up, user runs AppC 
first, so it thinks it's the first app on the phone and cooks up another 
UUID).

I'm just trying to figure out if I'm missing some obvious solution for this.

Thanks again!

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread jtaylor

Hello Mark,

I'd venture to say that impossible what you're asking. With #1 you
would have a problem with privacy/security. With #2, having a storage
spot would mean you wouldn't need Content Providers. It's intuitive
for there to be a permission placed on this info. So just do the
Overkill, putting a permission in there shouldn't be a problem.


- Juan T.

On Oct 15, 5:58 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 I need a unique ID for each phone, just enough to distinguish it from
 any other Android phone. In theory, TelephonyManager#getDeviceId() would
 be fine, except that it requires READ_PHONE_DATA as a permission, and
 that seems overkill.

 The catch is that I need this ID to be cross-application; two
 applications on the same device need to get the same ID.

 So, two questions:

 1. Is there some other API in Android-land that returns a unique value
 for each phone, that I just haven't found yet? One that does not require
 any special permission to access? I even considered a MAC address, but
 Android doesn't offer NetworkInterface#getHardwareAddress(), unfortunately.

 2. If the answer to #1 is no, silly, is there a spot (that I just
 haven't found yet) where I could tuck a world-readable UUID that could
 serve this purpose? It doesn't seem like there's any good
 cross-application storage spot outside of the SD card, and I can't count
 on all devices having one.

 Thanks in advance!

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Filesytem loading error on i.mx31 platform

2008-10-15 Thread Andrew Stadler

You'll probably find more answers to this question in the
android-internals mailing list.

http://groups.google.com/group/android-internals



On Wed, Oct 15, 2008 at 7:42 AM, Eric Michael [EMAIL PROTECTED] wrote:

 Hi all.,

 I m porting android to imx31 hardware, kernel is booting well
 but  Filesystem shows some error which loading the binder information
 required for the android to load...

   I ve created the file system by following the steps mentioned in
 http://elinux.org/Android_on_OMAP

 while booting .. I m able to get the initial red eye movement ,similar
 one which we see in emulator... but after red eye screen ... I m not
 getting the android screen as in emulator... red eye continuous its
 state ..

 My log message for the binder error is as follows..


 Freeing init memory: 188K
 sh: can't access tty; job control turned off
 # /system/bin/a.sh
 Using fallback suid method
 Using fallback suid method
 Failed to start message bus: The pid file /tmp/messagebus.pid
 exists, if the message bus is no
 t running, remove this file
 binder_open: 794:794
 binder_mmap: 794 4000-4040 (4096 K) vma 71 pagep 5f
 +++ post-zygote
 binder: 794:797 ERROR: bcREGISTER_LOOPER called without request
 binder: 794:797 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder: 794:798 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder_open: 795:795
 binder_mmap: 795 4265c000-42a5c000 (4096 K) vma 71 pagep 5f
 binder: 795:801 ERROR: bcREGISTER_LOOPER called without request
 binder: 795:801 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder: 795:802 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder: 795:795 ERROR: bcREGISTER_LOOPER called without request
 binder: 795:795 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder_flush: 795 woke 3 threads
  Prepping: /system/app/AlarmProvider.apk:/system/app/Browser.apk:/
 system/app/Calendar.apk:/syste
 m/app/Camera.apk:/system/app/Contacts.apk:/system/app/Development.apk:/
 system/app/GDataFeedsProv
 ider.apk:/system/app/Gmail.apk:/system/app/GmailProvider.apk:/system/
 app/GoogleApps.apk:/system/
 app/GoogleAppsProvider.apk:/system/app/Home.apk:/system/app/
 ImProvider.apk:/system/app/Maps.apk:
 app/GoogleAppsProvider.apk:/system/app/Home.apk:/system/app/
 ImProvider.apk:/system/app/Maps.apk:
 /system/app/MediaPickerActivity.apk:/system/app/MediaProvider.apk:/
 system/app/Phone.apk:/system/
 app/PimProvider.apk:/system/app/ApiDemos.apk:/system/app/
 SettingsProvider.apk:/system/app/Sms.ap
 k:/system/app/SyncProvider.apk:/system/app/TelephonyProvider.apk:/
 system/app/XmppService.apk:/sy
 stem/app/YouTube.apk
 File not found: /system/app/AlarmProvider.apk
 File not found: /system/app/Calendar.apk
 File not found: /system/app/Camera.apk
 File not found: /system/app/GDataFeedsProvider.apk
 File not found: /system/app/Gmail.apk
 File not found: /system/app/GmailProvider.apk
 File not found: /system/app/MediaPickerActivity.apk
 File not found: /system/app/PimProvider.apk
 File not found: /system/app/ApiDemos.apk
 File not found: /system/app/Sms.apk
 File not found: /system/app/SyncProvider.apk
 File not found: /system/app/YouTube.apk
  Prep complete
 fatal error opening /sys/android_power/acquire_partial_wake_lock
 binder: 794:794 ERROR: bcREGISTER_LOOPER called without request
 binder: 794:794 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder_open: 826:826
 binder_mmap: 826 4265c000-42a5c000 (4096 K) vma 71 pagep 5f
 binder: 826:834 ERROR: bcREGISTER_LOOPER called without request
 binder: 826:834 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder: 826:835 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder_open: 828:828
 binder_mmap: 828 4265c000-42a5c000 (4096 K) vma 71 pagep 5f
 binder: 828:836 ERROR: bcREGISTER_LOOPER called without request
 binder: 828:836 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER
 binder: 828:837 ERROR: bcENTER_LOOPER called after bcREGISTER_LOOPER



 Can anyone come up with the solution for this issue...

 Thanks
 Eric

 


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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread Mark Murphy

jtaylor wrote:
 It's intuitive for there to be a permission placed on this info.

It's definitely intuitive for there to be a permission on the IMEI. I am 
not quibbling that point at all.

The problem is I'm porting something originally done on the iPhone, 
which has a UUID or something for each device independent of the IMEI 
(as I understand it) and definitely not requiring some special 
permission. Hence, the customer has...expectations.

  So just do the
 Overkill, putting a permission in there shouldn't be a problem.

I sure hope it's not a problem. That permission, unfortunately, also 
covers things like read access to the device's phone number. And, until 
I get my paws on a G1, I don't even really know what the user is going 
to see when the permission request is presented, unless there's a way to 
test that in the emulator that I'm not aware of.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: AliasActivity: Two Questions

2008-10-15 Thread jtaylor

I noticed the Photostream app has alias activities.

(This comment is in androidmanifest.xml)
!-- Alias activity used to set the wallpaper on Home. The alias is
used
 simply to have a different label. --

http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/Photostream


- Juan

On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote:
 The AliasActivity looks interesting, as a way to redirect a user to
 another activity/intent under a different name.  I can see this being
 used to put a launcher icon to a document/url. But I don't see any
 examples of it, or documentation of the XML to configure it.  (From
 the docs: To use this activity, you should include in the manifest
 for the associated component an entry named android.app.alias. It is
 a reference to an XML resource describing an intent that launches the
 real application. )

 Does anyone have any pointers?

 Secondly, I think I want to make a something that acts similar to the
 AliasActivity as my app's entry point, but redirects to the most
 recently used activity.  Calling startActivity() followed by finish()
 still invokes the activity after returning from the child activity
 (its still on the activity stack, despite the finish() call), leading
 to a loop that re-enters the child.  What should I be doing instead?
 (I.e., What does AliasActivity do?)

 Anxiously awaiting the sources so I can answer these types of
 questions on my own.

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



[android-developers] Re: Contacts DataBase

2008-10-15 Thread dailyLife
Query:
public Cursor queryAll(String[] returnSequence) {
  Cursor cusor = null;
  ContentResolver contentResolver = mContext.getContentResolver();
  cusor = contentResolver.query(Contacts.People.CONTENT_URI, returnSequence, 
null, null, null);// DEFAULT_SORT_ORDER
  return cusor;
 }
 public Cursor queryByName(String[] returnSequence, String name) {
  Cursor cusor = null;
  ContentResolver contentResolver = mContext.getContentResolver();
  cusor = contentResolver.query(Contacts.People.CONTENT_URI, returnSequence, 
Contacts.People.NAME + =?, new String[] { name }, Contacts.People.NAME +  
ASC);// DEFAULT_SORT_ORDER
  return cusor;
 }
update:
String[] projection = new String[] { Contacts.People._ID, Contacts.People.NAME, 
Contacts.People.NUMBER };
   cusor = contentResolver.query(Contacts.People.CONTENT_URI, projection, 
Contacts.People.NAME + =?, new String[] { oldName }, Contacts.People.NAME +  
ASC);
   cusor.moveToFirst();
   ContentValues values = new ContentValues();
   Uri uri = Uri.withAppendedPath(Contacts.People.CONTENT_URI, 
cusor.getString(cusor.getColumnIndex(Contacts.People._ID)));
   values.put(Contacts.People.NAME, newName);
   values.put(Contacts.People.STARRED, 0);
   contentResolver.update(uri, values, null, null);

[EMAIL PROTECTED]
2008年10月16日 
- Original Message - 
From: Alexandru Mos 
To: android-developers 
Sent: 2008-10-02, 23:32:49
Subject: [android-developers] Contacts DataBase


I have 2 questions. Do you know why I can't update the contact phone
numbers and how can I read an IM (Instant message) account in the new
version of sdk (v 1.0) ?

-- 
Ing. Alexandru Mos



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



[android-developers] Re: nullPointer/thread error when reading contacts

2008-10-15 Thread dailyLife
use the String selection = People.NUMBER + = ? + telNo;replace !



[EMAIL PROTECTED]
2008年10月16日 
- Original Message - 
From: vallis 
To: Android Developers 
Sent: 2008-10-13, 23:37:59
Subject: [android-developers] nullPointer/thread error when reading contacts


Hi all,
I've been trying to read the contacts list so that I can compare phone
numbers in it against the number on an incomming SMS message.
I've been getting an error that I just can't fix.

The method is:
public String checkContacts(String telNo)
{
  String[] projection = new String[] {People.NAME, People.NUMBER};
  Uri mContacts = People.CONTENT_URI;
  String selection = People.NUMBER + = + telNo;
  String sort = People.NAME +  ASC;

  Cursor managedCursor = managedQuery(mContacts, projection,
selection, null, sort);
  startManagingCursor(managedCursor);

  if(managedCursor.getCount()  0)
  {
managedCursor.moveToFirst();
return managedCursor.getString(0);
  }
  else
  {
return telNo;
  }
}

Output from LogCat looks like this:
10-13 16:37:35.966: DEBUG/AndroidRuntime(292): Shutting down VM
10-13 16:37:35.966: WARN/dalvikvm(292): threadid=3: thread exiting
with uncaught exception (group=0x40010e28)
10-13 16:37:35.976: ERROR/AndroidRuntime(292): Uncaught handler:
thread main exiting due to uncaught exception
10-13 16:37:35.996: ERROR/AndroidRuntime(292):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{napier.vallis/napier.vallis.SMSClient}:
java.lang.NullPointerException
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2140)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.os.Handler.dispatchMessage(Handler.java:88)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.os.Looper.loop(Looper.java:123)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.ActivityThread.main(ActivityThread.java:3742)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
java.lang.reflect.Method.invokeNative(Native Method)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
java.lang.reflect.Method.invoke(Method.java:515)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
dalvik.system.NativeStart.main(Native Method)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): Caused by:
java.lang.NullPointerException
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.content.ContextWrapper.getContentResolver(ContextWrapper.java:
89)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.Activity.managedQuery(Activity.java:1442)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
napier.vallis.Functions.checkContacts(Functions.java:70)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
napier.vallis.SMSClient.onCreate(SMSClient.java:34)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2103)
10-13 16:37:35.996: ERROR/AndroidRuntime(292): ... 11 more

If any further information is needed I can easily post it up.

Any advice or guidance would be greatly appreciated.
Thanks,

V.

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



[android-developers] Re: AliasActivity: Two Questions

2008-10-15 Thread Romain Guy

Photostream uses an activity-alias, not an AliasActivity (they are different :)

On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote:

 I noticed the Photostream app has alias activities.

 (This comment is in androidmanifest.xml)
 !-- Alias activity used to set the wallpaper on Home. The alias is
 used
 simply to have a different label. --

 http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/Photostream


 - Juan

 On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote:
 The AliasActivity looks interesting, as a way to redirect a user to
 another activity/intent under a different name.  I can see this being
 used to put a launcher icon to a document/url. But I don't see any
 examples of it, or documentation of the XML to configure it.  (From
 the docs: To use this activity, you should include in the manifest
 for the associated component an entry named android.app.alias. It is
 a reference to an XML resource describing an intent that launches the
 real application. )

 Does anyone have any pointers?

 Secondly, I think I want to make a something that acts similar to the
 AliasActivity as my app's entry point, but redirects to the most
 recently used activity.  Calling startActivity() followed by finish()
 still invokes the activity after returning from the child activity
 (its still on the activity stack, despite the finish() call), leading
 to a loop that re-enters the child.  What should I be doing instead?
 (I.e., What does AliasActivity do?)

 Anxiously awaiting the sources so I can answer these types of
 questions on my own.

 Anm
 




-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread jtaylor

It's hard to answer your questions when you know just about
everything.


- Juan T.

On Oct 15, 9:38 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 jtaylor wrote:
  It's intuitive for there to be a permission placed on this info.

 It's definitely intuitive for there to be a permission on the IMEI. I am
 not quibbling that point at all.

 The problem is I'm porting something originally done on the iPhone,
 which has a UUID or something for each device independent of the IMEI
 (as I understand it) and definitely not requiring some special
 permission. Hence, the customer has...expectations.

   So just do the

  Overkill, putting a permission in there shouldn't be a problem.

 I sure hope it's not a problem. That permission, unfortunately, also
 covers things like read access to the device's phone number. And, until
 I get my paws on a G1, I don't even really know what the user is going
 to see when the permission request is presented, unless there's a way to
 test that in the emulator that I'm not aware of.

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Contacts.Phones.getDisplayName

2008-10-15 Thread Jeff Hamilton

You pass it the type and label fields from the contacts content
provider and it reads the localized labels for the non-custom types
and returns the proper value. If the type is custom it will return the
label value you pass in. The last parameter allows you to pass in your
own array of strings to describe the built-in type values, but if you
pass null it will use the default system values that will be localized
properly.

-Jeff

On Wed, Oct 15, 2008 at 3:44 PM, Brian [EMAIL PROTECTED] wrote:

 Hello does anybody know what the following method actually does

 Contacts.Phones.getDisplayLabel

 public static final CharSequence getDisplayLabel(Context context, int
 type, CharSequence label)

 the documentation does not really say?
 http://code.google.com/android/reference/android/provider/Contacts.Phones.html#getDisplayLabel(android.content.Context,
 int, java.lang.CharSequence)

 


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



[android-developers] Re: Device unique ID, other than getDeviceId()?

2008-10-15 Thread jtaylor

Hopefully in Android Market there'll be a way to, maybe through
analytics, to see if the user didn't accept the app because of fear of
the permissions. That's the only way to see and know for sure, through
some kind of analytics.


- Juan T.

On Oct 15, 9:38 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 jtaylor wrote:
  It's intuitive for there to be a permission placed on this info.

 It's definitely intuitive for there to be a permission on the IMEI. I am
 not quibbling that point at all.

 The problem is I'm porting something originally done on the iPhone,
 which has a UUID or something for each device independent of the IMEI
 (as I understand it) and definitely not requiring some special
 permission. Hence, the customer has...expectations.

   So just do the

  Overkill, putting a permission in there shouldn't be a problem.

 I sure hope it's not a problem. That permission, unfortunately, also
 covers things like read access to the device's phone number. And, until
 I get my paws on a G1, I don't even really know what the user is going
 to see when the permission request is presented, unless there's a way to
 test that in the emulator that I'm not aware of.

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >