[android-developers] Self-restarting service

2009-11-01 Thread Anders Feder
Hello,

I am developing a slightly mission critical Android application, and want
a Service component of it to be essentially immortal or at least
self-restarting in the event of a crash (of the service). What would be
the best way to accomplish this? I use API level 3 (Android 1.5).

Thanks in advance,
Anders Feder

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

[android-developers] Need an invitation to google Wave?

2009-11-01 Thread Auguste Lunang
Hi,
i have some google wave. invits to share. tell me if u want ..
thx

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

Re: [android-developers] Need an invitation to google Wave?

2009-11-01 Thread FFEH
Hello,
Please invite me, thanks~~


  FFEH

On Sun, Nov 1, 2009 at 2:20 PM, Auguste Lunang legraphi...@gmail.comwrote:

 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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

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

[android-developers] Re: World Of Bombs (Action Game) ADC 2 Entry

2009-11-01 Thread croco
Hi mike177,

Thank you for the feedback.

Croco

On Oct 30, 3:07 pm, mike177 mikeall...@gmail.com wrote:
 Croco, fun app!  Keep confident...  I trust this app will be among the
 20 finalist in the action game category.  It is a great game to play
 when I need to wait for something and I need a time killer.  Congrats!

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


[android-developers] Re: World Of Bombs (Action Game) ADC 2 Entry

2009-11-01 Thread croco
I've set a QR Code for facilitating installation of World of Bombs

It is available on my blog . 
http://zeugame.blogspot.com/2009/11/world-of-bombs-qrcode-for-world-of.html

Of course it will be available on the Android Market but to avoid
package rename i prefer temporally this way till the ADC2 is finished.

Good multiplayer games

Thanks.

On Nov 1, 7:52 am, croco zeug...@gmail.com wrote:
 Hi mike177,

 Thank you for the feedback.

 Croco

 On Oct 30, 3:07 pm, mike177 mikeall...@gmail.com wrote:

  Croco, fun app!  Keep confident...  I trust this app will be among the
  20 finalist in the action game category.  It is a great game to play
  when I need to wait for something and I need a time killer.  Congrats!

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


[android-developers] HTC Magic can't download donut

2009-11-01 Thread Nivek
Hi all,

My SFR (France) HTC Magic fails downloading android 1.6 update.

I did not get any notification, but the update is available in the
settings panel. When I hit the download button, a progress bar
appears, does not progress for a few seconds, and then disappears,
bringing back the download button.

Network condition does not change anything (GPRRS/3G/Wifi).

Has anybody had this problem ?

Thanks !

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


[android-developers] When I scroll a list I get the force close message

2009-11-01 Thread jax
I have an ArrayList connected to a ListView with an onclick event that
loads some extra info about each list item.

When the list fits inside the screen (no scrolling) it works fine,
however, when the list becomes long enought that I need to scroll I
get the Force Close message.

why is this?

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


Re: [android-developers] Need an invitation to google Wave?

2009-11-01 Thread li jiecong
Hi, please give me an invitation, thx!

2009/11/1 Auguste Lunang legraphi...@gmail.com

 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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


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

[android-developers] Re: When I scroll a list I get the force close message

2009-11-01 Thread Dexter#39;s Brain
A small code snippet or the stack trace would help us figure out the
problem

Dexter

http://tech-droid.blogspot.com

On Nov 1, 12:46 pm, jax jackma...@gmail.com wrote:
 I have an ArrayList connected to a ListView with an onclick event that
 loads some extra info about each list item.

 When the list fits inside the screen (no scrolling) it works fine,
 however, when the list becomes long enought that I need to scroll I
 get the Force Close message.

 why is this?

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


Re: [android-developers] Re: second dialog in activity is not showing

2009-11-01 Thread Anton Pirker
Hi Lance!

Thanks for the links! Now it's working!
(And I learned something about thread save UI in Android)

Thanks again,
Anton


Lance Nanek wrote:
 The UI is not thread safe and calling related methods from a
 background thread like that run by java.util.Timer can cause trouble.
 There's a good blog post on ways to schedule work on the UI thread or
 communicate back to it here:
 http://android-developers.blogspot.com/2009/05/painless-threading.html

 There's also an example of communicating back to the UI thread called
 Example ProgressDialog with a second thread on this page:
 http://developer.android.com/intl/fr/guide/topics/ui/dialogs.html

 On Oct 31, 4:42 pm, Anton Pirker an...@ignaz.at wrote:
   
 Hi android guys and girls!

 I have a really strange problem. I have an activity which displays a map
 and a marker with the users current location on that maps.

 Right now my code is something like this: (in onCreate of the activity)

 1) display a progress dialog with the text detecting your location,
 please wait...

 2) request location updates. (activity implements LocationListener)
 locationManager.requestLocationUpdates(provider,
 (long)Constants.MIN_TIME, (float)Constants.MIN_DISTANCE, this);

 3) right after the line above i have following:
 timer.schedule(new GetLastLocation(this), 5000);
 which means: wait 5 sec and then call GetLastLocation().run()

 GetLastLocation looks like this:

 class GetLastLocation extends TimerTask {
 private SetupActivity parent;
 public GetLastLocation(SetupActivity act) {
 parent = act;
 }
 public void run() {
 removeDialog(DIALOG_GET_POSITION);
 parent.showMessage();
 }
 }

 So if 5 seconds pass by, i dismiss(remove) the dialog i displayed in 1)

 4) now i want to show an AlertDialog with the message could not find
 your location, taking the last known
 parent.showMessage() looks like this:
 public void showMessage() {
 Log.e(###, showMessage 1/2);
 showDialog(DIALOG_GET_POSITION);
 Log.e(###, showMessage 2/2);
 }

 and here the first log message showMessage 1/2 is printed to the log,
 but not the second one showMessage 2/2.
 And there is no exception and nothing that tells me what is wrong...

 Could someone please help me?
 Maybe there is a better way to get he location and if no location is
 delivered show a message!

 Thankful for every hint,
 Anton

 --
 DI(FH) Anton Pirker

 --
 cross platform mobile software
 burggasse 123/53
 a-1070 wien
 tel: +43 699 1234 0 456
 skype: antonpirker

 http://anton-pirker.at
 

   


-- 
DI(FH) Anton Pirker

--
cross platform mobile software
burggasse 123/53
a-1070 wien
tel: +43 699 1234 0 456
skype: antonpirker

http://anton-pirker.at



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


[android-developers] Re: When I scroll a list I get the force close message

2009-11-01 Thread jax
Here is the output from logcat as I scroll down


11-01 17:04:08.979: ERROR/StatsDisplay(1355):
android.widget.textv...@4381ade8 is not a valid ListView!
11-01 17:04:08.999: DEBUG/AndroidRuntime(1355): Shutting down VM
11-01 17:04:08.999: WARN/dalvikvm(1355): threadid=3: thread exiting
with uncaught exception (group=0x4001aa28)
11-01 17:04:08.999: ERROR/AndroidRuntime(1355): Uncaught handler:
thread main exiting due to uncaught exception
11-01 17:04:09.259: DEBUG/dalvikvm(1355): GC freed 7712 objects /
415992 bytes in 220ms
11-01 17:04:09.279: ERROR/AndroidRuntime(1355):
java.lang.NullPointerException
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.setupChild(ListView.java:1683)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.addViewBelow(ListView.java:2797)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.scrollListItemsBy(ListView.java:2725)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.arrowScrollImpl(ListView.java:2225)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.arrowScroll(ListView.java:2172)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.commonKey(ListView.java:1977)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.onKeyDown(ListView.java:1924)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.KeyEvent.dispatch(KeyEvent.java:893)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.View.dispatchKeyEvent(View.java:3647)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:744)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.widget.ListView.dispatchKeyEvent(ListView.java:1909)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
(PhoneWindow.java:1197)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.app.Activity.dispatchKeyEvent(Activity.java:1967)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
(PhoneWindow.java:1684)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:
2329)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2299)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1621)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.os.Looper.loop(Looper.java:123)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
android.app.ActivityThread.main(ActivityThread.java:4203)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
java.lang.reflect.Method.invokeNative(Native Method)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
java.lang.reflect.Method.invoke(Method.java:521)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:791)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-01 17:04:09.279: ERROR/AndroidRuntime(1355): at
dalvik.system.NativeStart.main(Native Method)
11-01 17:04:09.319: INFO/Process(568): Sending signal. PID: 1355 SIG:
3
11-01 17:04:09.329: INFO/dalvikvm(1355): threadid=7: reacting to
signal 3
11-01 17:04:09.399: INFO/dalvikvm(1355): Wrote stack trace to '/data/
anr/traces.txt'
11-01 17:04:11.979: INFO/Process(1355): Sending signal. PID: 1355 SIG:
9




On Nov 1, 4:36 pm, Dexter#39;s Brain coomar@gmail.com wrote:
 A small code snippet or the stack trace would help us figure out the
 problem

 Dexter

 http://tech-droid.blogspot.com

 On Nov 1, 12:46 pm, jax jackma...@gmail.com wrote:

  I have an ArrayList connected to a ListView with an onclick event that
  loads some extra info about each list item.

  When the list fits inside the screen (no scrolling) it works fine,
  however, when the list becomes long enought that I need to scroll I
  get the Force Close message.

  why is this?



-- 
You received this message because you 

[android-developers] Re: When I scroll a list I get the force close message

2009-11-01 Thread jax
Something I did not say - actually I forgot I even did it - is that I
subclasses ArrayAdapter.  Here is the subclass.




/*
 * Subclass of ArrayAdapter to change the color of the
 * text to red if it is not 100%
 *
 */
public class ScoringAdapter extends ArrayAdapterString {

private ArrayListString items;

public ScoringAdapter(Context context, int textViewResourceId,
ArrayListString items) {
super(context, textViewResourceId, items);
this.items = items;
}

@Override
public View getView(int position, View convertView, ViewGroup
parent) {
try {
View v = (ListView)convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate
(android.R.layout.simple_list_item_1, null);
}

String item = items.get(position);
TextView tv = (TextView) v.findViewById
(android.R.id.text1);
tv.setText(item);

if(!item.contains(100%)) {
tv.setTextColor(Color.RED);
}

return v;
}
catch(ClassCastException e) {
Log.e(TAG, convertView.toString()+ is not a valid
ListView!);
}

return null;
}
}



On Nov 1, 5:05 pm, jax jackma...@gmail.com wrote:
 Here is the output from logcat as I scroll down

 11-01 17:04:08.979: ERROR/StatsDisplay(1355):
 android.widget.textv...@4381ade8 is not a valid ListView!
 11-01 17:04:08.999: DEBUG/AndroidRuntime(1355): Shutting down VM
 11-01 17:04:08.999: WARN/dalvikvm(1355): threadid=3: thread exiting
 with uncaught exception (group=0x4001aa28)
 11-01 17:04:08.999: ERROR/AndroidRuntime(1355): Uncaught handler:
 thread main exiting due to uncaught exception
 11-01 17:04:09.259: DEBUG/dalvikvm(1355): GC freed 7712 objects /
 415992 bytes in 220ms
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):
 java.lang.NullPointerException
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.setupChild(ListView.java:1683)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.addViewBelow(ListView.java:2797)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.scrollListItemsBy(ListView.java:2725)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.arrowScrollImpl(ListView.java:2225)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.arrowScroll(ListView.java:2172)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.commonKey(ListView.java:1977)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.onKeyDown(ListView.java:1924)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.KeyEvent.dispatch(KeyEvent.java:893)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.View.dispatchKeyEvent(View.java:3647)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:744)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.widget.ListView.dispatchKeyEvent(ListView.java:1909)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 com.android.internal.policy.impl.PhoneWindow
 $DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
 (PhoneWindow.java:1197)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.app.Activity.dispatchKeyEvent(Activity.java:1967)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
 (PhoneWindow.java:1684)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:
 2329)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2299)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.view.ViewRoot.handleMessage(ViewRoot.java:1621)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 11-01 17:04:09.279: ERROR/AndroidRuntime(1355):     at
 

[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread jax
yes thanks

On Nov 1, 4:26 pm, li jiecong lijiec...@gmail.com wrote:
 Hi, please give me an invitation, thx!

 2009/11/1 Auguste Lunang legraphi...@gmail.com

  Hi,
  i have some google wave. invits to share. tell me if u want ..
  thx

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



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


Re: [android-developers] Self-restarting service

2009-11-01 Thread Mark Murphy
Anders Feder wrote:
 I am developing a slightly mission critical Android application, and
 want a Service component of it to be essentially immortal or at least
 self-restarting in the event of a crash (of the service). What would
 be the best way to accomplish this? I use API level 3 (Android 1.5).

The best answer is: don't write it that way. Have it be a scheduled task
via AlarmManager. There are a vanishingly few number of services that
truly need to be running all of the time, and none of those can be
immortal anyway.

http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/

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

Android 1.6 Programming Books: http://commonsware.com/books

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread ColletJb
Yes thank you very much ;)

On 1 nov, 11:16, jax jackma...@gmail.com wrote:
 yes thanks

 On Nov 1, 4:26 pm, li jiecong lijiec...@gmail.com wrote:



  Hi, please give me an invitation, thx!

  2009/11/1 Auguste Lunang legraphi...@gmail.com

   Hi,
   i have some google wave. invits to share. tell me if u want ..
   thx

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

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


Re: [android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread Klaus Kartou
That would be great :)
Thank you!

On Sun, Nov 1, 2009 at 11:51 AM, ColletJb collet...@gmail.com wrote:

 Yes thank you very much ;)

 On 1 nov, 11:16, jax jackma...@gmail.com wrote:
  yes thanks
 
  On Nov 1, 4:26 pm, li jiecong lijiec...@gmail.com wrote:
 
 
 
   Hi, please give me an invitation, thx!
 
   2009/11/1 Auguste Lunang legraphi...@gmail.com
 
Hi,
i have some google wave. invits to share. tell me if u want ..
thx
 
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

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


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

[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread budziq


That would be awesome :)

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


Re: [android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread Shawn Brown
Please if you have any left!!!

Do you?

Shawn

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


[android-developers] Re: Does DexClassLoader works correctly?

2009-11-01 Thread mongd
So, do you mean if I use a different path for the 2nd parameter,
DexClassLoader should work properly, right?
How about data/app-private? Is it ok to use that path?
I tried the above one, but it didn't work... T^T

On 10월30일, 오전4시26분, fadden fad...@android.com wrote:
 On Oct 29, 1:02 am, mongd mongdl...@gmail.com wrote:

  DexClassLoader dLoader = new DexClassLoader(/data/app/
  com.testpackage.test2.apk, /data/dalvik-cache, null,

 Your application doesn't have write permission on /data/dalvik-cache.
 It can't create a file there.

 You should either use your app's private data area (which has the
 advantage of getting cleaned up automatically when your app is
 uninstalled), or request the WRITE_EXTERNAL_STORAGE permission and
 use /sdcard.

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


[android-developers] Re: When I scroll a list I get the force close message

2009-11-01 Thread Dexter#39;s Brain
I think.

In your getView() method, don't cast it to ListView, remove that and I
guess, I will work.

Dexter.

http://tech-droid.blogspot.com

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


[android-developers] Re: MultiAutoCompleteTextView with simpler completion and without comma

2009-11-01 Thread Dexter#39;s Brain
The best way to do it will be to subclass the
MultiAutoCompleteTextView and override it's methods.

It has 3-4 methods which need to be over-ridden.

Dexter
http://tech-droid.blogspot.com

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


[android-developers] Re: idiot's guide to using layout:gravity?

2009-11-01 Thread Dexter#39;s Brain
RelativeLayouts are easy to use once you are comfortable with them. If
you still want to use LinearLayout, this will solve your problem.

LinearLayout
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content

LinearLayout
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content
   android:layout_gravity=left

Button
android:id=@+id/auth_login_button
android:layout_height=50dip
android:layout_width=100dip
android:text=@string/auth_login_label
android:textColor=#ff
android:background=#ff
android:textStyle=bold
/
/LinearLayout

LinearLayout
android:orientation=horizontal
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=right

Button
android:id=@+id/auth_signup_button
android:layout_height=50dip
android:layout_width=100dip
android:text=@string/auth_signup_label
android:textColor=#ff
android:background=#ff
android:textStyle=bold
/
/LinearLayout
/LinearLayout


But if you use this, the UI Hierarchy will be very complex. As Mark
suggested, it is better to use a relative layout.

Dexter
http://tech-droid.blogspot.com

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


[android-developers] Re: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml

2009-11-01 Thread Jay
Try export GDK_NATIVE_WINDOWS=true before running android sdk manager.
It fixes both the save button and the install button for me.

For more details please see https://bugzilla.gnome.org/show_bug.cgi?id=598734
and https://bugs.eclipse.org/bugs/show_bug.cgi?id=290395

Jay

On Oct 31, 12:13 am, Hans hdic...@gmail.com wrote:
 Adding sdkman.force.http=true to ~/.android/androidtool.cfg allowed me
 to retrieve the Sites, Packages, and Archives via the Android SDK and
 AVD Manager.

 However, when I select, for example, SDK Platform Android 2.0, API 5,
 revision 1, and click Install Selected (button), nothing happens.

 I am running on Ubuntu version 9.10 x64 (released version).  The
 machine has 4GB RAM.  JDK 6-15-1, via the Synaptic Package Manager, is
 installed (along with the dependencies).

 On Oct 29, 1:24 pm, Xavier Ducrohet x...@android.com wrote:

  On Wed, Oct 28, 2009 at 9:23 PM, orange80 jpsw...@gmail.com wrote:

   We already know about that... our problem is that the force http
   workaround DOES NOT work for us either.

  which, frankly, is mind boggling.
  Can you give me the exact output of the status window in the SDK
  Manager when you try to update from the repository?

  Also, can you tell me which JDK you are using, OS config, etc..

  thanks!
  Xav

  --
  Xavier Ducrohet
  Android SDK Tech Lead
  Google Inc.

  Please do not send me questions directly. Thanks!

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


[android-developers] Re: app widget sizes for WVGA and FWVGA

2009-11-01 Thread sdphil
not sure I follow you here --

T-Mobile G1/G2 has the following specs -
320px x 480px (pixels)
1.77 x 2.65 (inches)
which gives about 181 dpi.

according to this --
http://developer.android.com/guide/practices/ui_guidelines/widget_design.html

4x1 widgets on T-Mobile G1 and G2 should be 320x100 in portrait
and 424x74 in landscape.

Motorola Droid has the following specs -
480px x 854px (pixels)
1.8 x 3.2 (inches)
which gives about 267 dpi.

4x1 widgets for both portrait and landscape on something like Droid
should be what?

According to what you said Multiply by 1.5

320*1.5 x 100*1.5 = 480 x 150 portrait
424*1.5 x 74*1.5 = 636 x 111 landscape

I can believe it for portrait, but for landscape, that doesn't seem
right.

tia.

On Oct 31, 3:11 pm, Dianne Hackborn hack...@android.com wrote:
 It's not the number of pixels, it's the density.



 On Sat, Oct 31, 2009 at 12:10 PM, sdphil phil.pellouch...@gmail.com wrote:
  That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
  landscape, 854 / 480 = 1.78.

  On Oct 31, 10:55 am, Dianne Hackborn hack...@android.com wrote:
   Multiply by 1.5.

   On Sat, Oct 31, 2009 at 8:23 AM, sdphil phil.pellouch...@gmail.com
  wrote:
what are the 4x1 app widget sizes for WVGA and FWVGA in both portrait
and landscape?

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

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

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

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

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

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

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


Re: [android-developers] Need an invitation to google Wave?

2009-11-01 Thread 侯玉涛
If i can get one?
Thanks,

On Sun, Nov 1, 2009 at 2:20 PM, Auguste Lunang legraphi...@gmail.comwrote:

 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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

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

[android-developers] Re: http client connect timeout

2009-11-01 Thread Jonas Alves
HttpClient httpClient = new DefaultHttpClient();
httpClient.getParams().setParameter(http.socket.timeout,
new Integer(3000)); // milliseconds



On Oct 31, 10:55 pm, Andrei gml...@gmail.com wrote:
 I try to set timeout for apache http client like this
     HttpConnectionParams.setConnectionTimeout( params, TIMEOUT );
 But it does not work
 Is there a way to set connect timeout for http client on Android?
 Thanks

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread enshrentko
please, invite me, i really want it

thx

On Nov 1, 1:20 pm, Auguste Lunang legraphi...@gmail.com wrote:
 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread ander...@phdgaming.com
Please email me one if you can - appreciate it! Thanks.

On Nov 1, 1:20 am, Auguste Lunang legraphi...@gmail.com wrote:
 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread John P.
I'd like one.  Thank you if you could send it!  =)

On Nov 1, 1:20 am, Auguste Lunang legraphi...@gmail.com wrote:
 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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


[android-developers] Re: When I scroll a list I get the force close message

2009-11-01 Thread jax
Thanks, it worked




On Nov 1, 7:58 pm, Dexter#39;s Brain coomar@gmail.com wrote:
 I think.

 In your getView() method, don't cast it to ListView, remove that and I
 guess, I will work.

 Dexter.

 http://tech-droid.blogspot.com

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


Re: [android-developers] Mystery Null Pointer Error - Seeking Opinions

2009-11-01 Thread Jason Van Anden
Mark,

Doh?  How did I miss this?

I was testing the state of an object within a service that had not yet been
restarted (resurrected?) after dying.

I think I was stuck on the onPrepareOptionsMenu part for some reason and did
not look at #377.

Thank so much for the second set of eyes!
Jason

On Sat, Oct 31, 2009 at 1:33 PM, Mark Murphy mmur...@commonsware.comwrote:

 Jason Van Anden wrote:
  10-31 14:12:03.667: ERROR/AndroidRuntime(7369): Uncaught handler: thread
  main exiting due to uncaught exception
 
  10-31 14:12:04.077: ERROR/AndroidRuntime(7369):
  java.lang.NullPointerException
  10-31 14:12:04.077: ERROR/AndroidRuntime(7369): at
  com.bubblebeats.free.Peeps.onPrepareOptionsMenu(Peeps.java:377)

 So...what's on line 377 of Peeps.java?

 Personally, I'm hoping for a sugar-coated marshmallow confection, mostly
 because Peeps are made by a local firm... ;-)

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

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

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

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

[android-developers] help with AnalogClock widget - remoteview and appwidgetprovider

2009-11-01 Thread Zi Yong Chua
Hi guys,

I am trying to develop and AnalogClock widget on the home screen that
changes depending on the time of day. I am finding problems getting to
the right code to make it happen, and will hope to seek you help and
advise here.

1) Getting the dial resource in AnalogClock to change in code
I have been trying to get the AnalogClock in my widget XML file to
change based on the system time. However, I realized that
AppWidgetProvider do not support findViewbyID and i was trying to
figure out how to make use of remoteviews to change the AnalogClock
image. Any experts can enlighten me on this issue? Now I am
implementing another method, but it is very ugly.

2) Getting onUpdate to work in appwidgetprovider
I am trying to get the onUpdate to work and change the views on set
time, say at the start of every passing hour, at time zone change, at
time change etc. Anyone know how i can get started to make onUpdate
work for that purpose?

My code is below. Thanks guys. hope to learn from all of you.
http://pastebin.com/d2f7c4200

Cheers
Zee

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


[android-developers] Re: API responsable to make transfert dwonlaod ,upload with ftp ou 3G protocol

2009-11-01 Thread Derek
Try AndFTP 1.0:

Recent changes are:
- SHIFT-JIS encoding added for Japanese server.
- Japanese support added.
- SFTP minor bug fixed.
- Microsoft office mime-types added.
- Android 1.6 and 2.0 support added.

http://www.lysesoft.com/products/andftp/index.html

Cheers.

On Oct 1, 10:55 am, midoub elmehdi.benso...@gmail.com wrote:
 hi,
 please someone know wich APIs it's are responsable to transfer data 
 onftp,download or upload.
 I want use this APIs to create application .
 any suggestions are welcome.
 thank you for your help.

 Best regards,

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


Re: [android-developers] Mystery Null Pointer Error - Seeking Opinions

2009-11-01 Thread Jason Van Anden
OK - for the record ... I think I have fixed this based upon what was going
on in line 377 (testing here that service is alive and passing false back if
not).

Thing is ... I am still perplexed as to why onPrepareOptionsMenu is getting
called in the first place.  All that is occurring here is that the Activity
is coming back into the foreground.  The menu button does not appear to have
been called.

Jason

On Sun, Nov 1, 2009 at 11:25 AM, Jason Van Anden
jason.van.an...@gmail.comwrote:

 Mark,

 Doh?  How did I miss this?

 I was testing the state of an object within a service that had not yet been
 restarted (resurrected?) after dying.

 I think I was stuck on the onPrepareOptionsMenu part for some reason and
 did not look at #377.

 Thank so much for the second set of eyes!
 Jason


 On Sat, Oct 31, 2009 at 1:33 PM, Mark Murphy mmur...@commonsware.comwrote:

 Jason Van Anden wrote:
  10-31 14:12:03.667: ERROR/AndroidRuntime(7369): Uncaught handler: thread
  main exiting due to uncaught exception
 
  10-31 14:12:04.077: ERROR/AndroidRuntime(7369):
  java.lang.NullPointerException
  10-31 14:12:04.077: ERROR/AndroidRuntime(7369): at
  com.bubblebeats.free.Peeps.onPrepareOptionsMenu(Peeps.java:377)

 So...what's on line 377 of Peeps.java?

 Personally, I'm hoping for a sugar-coated marshmallow confection, mostly
 because Peeps are made by a local firm... ;-)

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

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

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




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

Re: [android-developers] Re: app widget sizes for WVGA and FWVGA

2009-11-01 Thread Dianne Hackborn
Please read on screen density:

http://developer.android.com/guide/practices/screens_support.html

http://developer.android.com/guide/practices/screens_support.htmlJust
scale your coordinates based on the screen density.  You can't assume some
specific size for some screen -- consider the possibilities, QVGA, HVGA,
WVGA, FWVGA all have different proportions.  And then a particular app may
use the screen differently, for example in the future home will probably
have some redesign so that on a FWVGA screen there is not such a difference
in proportion between its landscape and portrait layouts.

On Sun, Nov 1, 2009 at 7:40 AM, sdphil phil.pellouch...@gmail.com wrote:

 not sure I follow you here --

 T-Mobile G1/G2 has the following specs -
 320px x 480px (pixels)
 1.77 x 2.65 (inches)
 which gives about 181 dpi.

 according to this --

 http://developer.android.com/guide/practices/ui_guidelines/widget_design.html

4x1 widgets on T-Mobile G1 and G2 should be 320x100 in portrait
 and 424x74 in landscape.

 Motorola Droid has the following specs -
 480px x 854px (pixels)
 1.8 x 3.2 (inches)
 which gives about 267 dpi.

 4x1 widgets for both portrait and landscape on something like Droid
 should be what?

 According to what you said Multiply by 1.5

 320*1.5 x 100*1.5 = 480 x 150 portrait
 424*1.5 x 74*1.5 = 636 x 111 landscape

 I can believe it for portrait, but for landscape, that doesn't seem
 right.

 tia.

 On Oct 31, 3:11 pm, Dianne Hackborn hack...@android.com wrote:
  It's not the number of pixels, it's the density.
 
 
 
  On Sat, Oct 31, 2009 at 12:10 PM, sdphil phil.pellouch...@gmail.com
 wrote:
   That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
   landscape, 854 / 480 = 1.78.
 
   On Oct 31, 10:55 am, Dianne Hackborn hack...@android.com wrote:
Multiply by 1.5.
 
On Sat, Oct 31, 2009 at 8:23 AM, sdphil phil.pellouch...@gmail.com
   wrote:
 what are the 4x1 app widget sizes for WVGA and FWVGA in both
 portrait
 and landscape?
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%2Bunsubs
   cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
--
Dianne Hackborn
Android framework engineer
hack...@android.com
 
Note: please don't send private questions to me, as I don't have time
 to
provide private support, and so won't reply to such e-mails.  All
 such
questions should be posted on public forums, where I and others can
 see
   and
answer them.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




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

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

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

[android-developers] Motorola DROID emulator skin now available for Android 2.0 SDK!

2009-11-01 Thread Tea Vui Huang
Motorola DROID emulator skin now available for Android 2.0 SDK!
http://teavuihuang.com/android

DROID by Motorola is a Smartphone powered by Android 2.0 and developed
in partnership with Google and Verizon Wireless. It was released on
28/10/2009 and will be available in Q4 2009. This emulator skin
faithfully brings the DROID to your Android 2.0 SDK in the original
WVGA854 resolution (480x854 high density, normal screen). The emulator
skin package, screenshots and installation instructions are now
available at the above website.

Tea Vui Huang's Android Page
[The No.1 website for Google Android Emulator Skins]

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


[android-developers] Widget not displayed in Android 2.0 - Initial layout displayed only.

2009-11-01 Thread Derek
Our application displays widgets that update every minute through
Alarm. It works fine under 1.5 and 1.6 but since 2.0, widget is not
displayed at all. Only initial layout is displayed.

Anyone experiment this issue ?

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


[android-developers] Re: Widget not displayed in Android 2.0 - Initial layout displayed only.

2009-11-01 Thread Derek
After investigations we've noticed that this problem occurs when you
create a new AVD with Google API 2.0 (level5) only.
On the first emulator launch with new AVD the widget stays on Initial
Layout.
Closing the emulator and restart with the same AVD seems to work.

What could be the problem ?

Adding analog clock widget works in any case.

Thanks.

On Nov 1, 6:33 pm, Derek cram.de...@gmail.com wrote:
 Our application displays widgets that update every minute through
 Alarm. It works fine under 1.5 and 1.6 but since 2.0, widget is not
 displayed at all. Only initial layout is displayed.

 Anyone experiment this issue ?

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


[android-developers] Re: http client connect timeout

2009-11-01 Thread Andrei
Thank you

Firstly your code sets read/write timeout, not connect
Secondly if done right it does same thing as my sample
Thirdly I tried it does not work

On Nov 1, 10:03 am, Jonas Alves jona...@gmail.com wrote:
 HttpClient httpClient = new DefaultHttpClient();
 httpClient.getParams().setParameter(http.socket.timeout,
                                 new Integer(3000)); // milliseconds

 On Oct 31, 10:55 pm, Andrei gml...@gmail.com wrote:

  I try to set timeout for apache http client like this
      HttpConnectionParams.setConnectionTimeout( params, TIMEOUT );
  But it does not work
  Is there a way to set connect timeout for http client on Android?
  Thanks

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread moazzamk
invite me please

On Nov 1, 11:50 am, John P. johnny.d.p...@gmail.com wrote:
 I'd like one.  Thank you if you could send it!  =)

 On Nov 1, 1:20 am, Auguste Lunang legraphi...@gmail.com wrote:

  Hi,
  i have some google wave. invits to share. tell me if u want ..
  thx

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


[android-developers] Re: app widget sizes for WVGA and FWVGA

2009-11-01 Thread sdphil
It seems that screen density alone is not sufficient to know what the
dimension should be; at some point aspect ratio has to come into
play.  For example, I could have a screen that is the same screen
density as a T-Mobile G1, but twice has tall (physical screen size;
and 2x as many pixels in that direction).  the 4x1 widget dimensions
in portrait would be fine as is, but when I went to landscape, the
width of my app widget would have to be much greater than 424 pixels
even though the screen density was the same.

and that's what is kind of happening with T-Mobile G1 and Motorola
Droid (at least it seems that way).

T-Mobile G1: 181dpi, aspect ratio in landscape is: 480/320 = 1.5
Motorola Droid: 267dpi, aspect ratio in landscape is: 854/480 = 1.78

If I just scaled everything up based on screen density, then Droid
should be: 267/181 = 1.475 scale factor.

If the aspect ratio of the phones were exactly the same, then i would
agree, you could just use the screen density scale factor.  But the
aspect ratios are not the same.

On Nov 1, 8:51 am, Dianne Hackborn hack...@android.com wrote:
 Please read on screen density:

 http://developer.android.com/guide/practices/screens_support.html

 http://developer.android.com/guide/practices/screens_support.htmlJust
 scale your coordinates based on the screen density.  You can't assume some
 specific size for some screen -- consider the possibilities, QVGA, HVGA,
 WVGA, FWVGA all have different proportions.  And then a particular app may
 use the screen differently, for example in the future home will probably
 have some redesign so that on a FWVGA screen there is not such a difference
 in proportion between its landscape and portrait layouts.



 On Sun, Nov 1, 2009 at 7:40 AM, sdphil phil.pellouch...@gmail.com wrote:
  not sure I follow you here --

  T-Mobile G1/G2 has the following specs -
  320px x 480px (pixels)
  1.77 x 2.65 (inches)
  which gives about 181 dpi.

  according to this --

 http://developer.android.com/guide/practices/ui_guidelines/widget_des...

     4x1 widgets on T-Mobile G1 and G2 should be 320x100 in portrait
  and 424x74 in landscape.

  Motorola Droid has the following specs -
  480px x 854px (pixels)
  1.8 x 3.2 (inches)
  which gives about 267 dpi.

  4x1 widgets for both portrait and landscape on something like Droid
  should be what?

  According to what you said Multiply by 1.5

  320*1.5 x 100*1.5 = 480 x 150 portrait
  424*1.5 x 74*1.5 = 636 x 111 landscape

  I can believe it for portrait, but for landscape, that doesn't seem
  right.

  tia.

  On Oct 31, 3:11 pm, Dianne Hackborn hack...@android.com wrote:
   It's not the number of pixels, it's the density.

   On Sat, Oct 31, 2009 at 12:10 PM, sdphil phil.pellouch...@gmail.com
  wrote:
That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
landscape, 854 / 480 = 1.78.

On Oct 31, 10:55 am, Dianne Hackborn hack...@android.com wrote:
 Multiply by 1.5.

 On Sat, Oct 31, 2009 at 8:23 AM, sdphil phil.pellouch...@gmail.com
wrote:
  what are the 4x1 app widget sizes for WVGA and FWVGA in both
  portrait
  and landscape?

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

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

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

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

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

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

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

  --
  

[android-developers] Problems with Bitmap.copy in Android 2.0

2009-11-01 Thread Klaus Kartou
Hi!

In our app we are adding a alpha channel to bitmaps without alpha channels
by doing this:

Bitmap dest = src.copy(Bitmap.Config.ARGB_, true);

This has been working fine until Android 2.0. Now the dest bitmap is still
created, but without a alpha channel. This happens when using the default
HVGA skin .
If we run the exact same code in the emulator with a WQVGA400 it works fine
like usual.

Did anybody experience this too?

Cheers!

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

[android-developers] MediaPlayer.setDataSource() taking a long time when the screen is off...

2009-11-01 Thread sdphil
i am trying to chase down a really unusual bug.

I have a media player object that is playing streaming url after
streaming url.

for some reason, when the screen is off, calling setDataSource() on
the media player can take a really long time (like 20-40 seconds).

however, when the screen is visible, I never see this issue.

I am wondering what could possibly be causing this call to take so
long...  I could envision prepare taking a long time, but
setDataSource() ??

Any ideas?

tia.

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


[android-developers] Re: Motorola DROID emulator skin now available for Android 2.0 SDK!

2009-11-01 Thread Moto
The skin is not good at all...
Seems like you just replaced the skin with half chopped Droid phone
picture...

You should look into matching the skin with the phone so that you can
see the whole phone...  modify I'm guessing layout file?

-Moto

On Nov 1, 12:23 pm, Tea Vui Huang tvhuangs...@gmail.com wrote:
 Motorola DROID emulator skin now available for Android 2.0 
 SDK!http://teavuihuang.com/android

 DROID by Motorola is a Smartphone powered by Android 2.0 and developed
 in partnership with Google and Verizon Wireless. It was released on
 28/10/2009 and will be available in Q4 2009. This emulator skin
 faithfully brings the DROID to your Android 2.0 SDK in the original
 WVGA854 resolution (480x854 high density, normal screen). The emulator
 skin package, screenshots and installation instructions are now
 available at the above website.

 Tea Vui Huang's Android Page
 [The No.1 website for Google Android Emulator Skins]

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


[android-developers] Since Android 2.0 the phone number in the emulator became null - how to set it?

2009-11-01 Thread Marek Urbaniak
It the earlier versions of Android SDK the emulator had the set phone
number. Visible in the phone settings and accessible to applications
through the TelephonyManager.getLine1Number method. In Android SDK 2.0
it is not set. How to set it?

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


[android-developers] Re: Android 2.0 Source code

2009-11-01 Thread AndroidKing
anyone knows when 2.0 source will be public???

On Oct 31, 12:41 pm, AndroidKing rbasso...@gmail.com wrote:
 why isn't the source code for 2.0 on the public repository..

 developing for Android without looking at the source code is
 impossible due to poor APIs and or documentations

 please make this public ASAP, or most applications will break with 2.0

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


Re: [android-developers] Re: app widget sizes for WVGA and FWVGA

2009-11-01 Thread Dianne Hackborn
Did you read my second paragraph?

On Sun, Nov 1, 2009 at 10:57 AM, sdphil phil.pellouch...@gmail.com wrote:

 It seems that screen density alone is not sufficient to know what the
 dimension should be; at some point aspect ratio has to come into
 play.  For example, I could have a screen that is the same screen
 density as a T-Mobile G1, but twice has tall (physical screen size;
 and 2x as many pixels in that direction).  the 4x1 widget dimensions
 in portrait would be fine as is, but when I went to landscape, the
 width of my app widget would have to be much greater than 424 pixels
 even though the screen density was the same.

 and that's what is kind of happening with T-Mobile G1 and Motorola
 Droid (at least it seems that way).

 T-Mobile G1: 181dpi, aspect ratio in landscape is: 480/320 = 1.5
 Motorola Droid: 267dpi, aspect ratio in landscape is: 854/480 = 1.78

 If I just scaled everything up based on screen density, then Droid
 should be: 267/181 = 1.475 scale factor.

 If the aspect ratio of the phones were exactly the same, then i would
 agree, you could just use the screen density scale factor.  But the
 aspect ratios are not the same.

 On Nov 1, 8:51 am, Dianne Hackborn hack...@android.com wrote:
  Please read on screen density:
 
  http://developer.android.com/guide/practices/screens_support.html
 
  http://developer.android.com/guide/practices/screens_support.htmlJust
  scale your coordinates based on the screen density.  You can't assume
 some
  specific size for some screen -- consider the possibilities, QVGA, HVGA,
  WVGA, FWVGA all have different proportions.  And then a particular app
 may
  use the screen differently, for example in the future home will probably
  have some redesign so that on a FWVGA screen there is not such a
 difference
  in proportion between its landscape and portrait layouts.
 
 
 
  On Sun, Nov 1, 2009 at 7:40 AM, sdphil phil.pellouch...@gmail.com
 wrote:
   not sure I follow you here --
 
   T-Mobile G1/G2 has the following specs -
   320px x 480px (pixels)
   1.77 x 2.65 (inches)
   which gives about 181 dpi.
 
   according to this --
 
  http://developer.android.com/guide/practices/ui_guidelines/widget_des.
 ..
 
  4x1 widgets on T-Mobile G1 and G2 should be 320x100 in portrait
   and 424x74 in landscape.
 
   Motorola Droid has the following specs -
   480px x 854px (pixels)
   1.8 x 3.2 (inches)
   which gives about 267 dpi.
 
   4x1 widgets for both portrait and landscape on something like Droid
   should be what?
 
   According to what you said Multiply by 1.5
 
   320*1.5 x 100*1.5 = 480 x 150 portrait
   424*1.5 x 74*1.5 = 636 x 111 landscape
 
   I can believe it for portrait, but for landscape, that doesn't seem
   right.
 
   tia.
 
   On Oct 31, 3:11 pm, Dianne Hackborn hack...@android.com wrote:
It's not the number of pixels, it's the density.
 
On Sat, Oct 31, 2009 at 12:10 PM, sdphil phil.pellouch...@gmail.com
 
   wrote:
 That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
 landscape, 854 / 480 = 1.78.
 
 On Oct 31, 10:55 am, Dianne Hackborn hack...@android.com wrote:
  Multiply by 1.5.
 
  On Sat, Oct 31, 2009 at 8:23 AM, sdphil 
 phil.pellouch...@gmail.com
 wrote:
   what are the 4x1 app widget sizes for WVGA and FWVGA in both
   portrait
   and landscape?
 
   --
   You received this message because you are subscribed to the
 Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
   android-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have
 time
   to
  provide private support, and so won't reply to such e-mails.  All
   such
  questions should be posted on public forums, where I and others
 can
   see
 and
  answer them.
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 

[android-developers] Could developers be liable for charges for using Google APIs?

2009-11-01 Thread davemac
I've been reading the Terms of Service for the Google APIs, both Maps
and AJAX APIs. I have questions regarding future consequences of using
these APIs in mobile apps that get distributed, hopefully, to many
thousands or millions of devices.

Both say that the services must be available for free, so I'm assuming
that means you cannot charge a fee for an Android app that uses these
services, unless you arrange something special with Google. Which
appears to be Google Maps API Premier, an advanced service that uses a
page-view-counter-based calculation to determine charges, and is not
cheap. Which pretty much says you'd need to charge a subscription fee
if you're going to charge at all. If you don't charge now and suddenly
get hit with a bill from Google, your free app must remain free
(according to Android Terms) so you're out of luck? I suppose it might
be possible to include a Terms of Service with the application that
says the user assumes all responsibility for any charges related to
use of the Google APIs, but that doesn't seem likely to succeed. I
think it would be difficult to manage. I also suppose that you could
ask Google to block requests that use your API key until you can get a
new version out with a fee attached.

Google also says they could charge for the use of the API in the
future. This is stated specifically in the AJAX APIs doc, and
indirectly in the Maps doc (Google can change the terms at any time).
Since the API key that is used when calling APIs belongs to the
Android developer, that tells me we could potentially be on the hook
for Google charges. The Terms say that we can decide to stop using the
APIs. Which is fairly easy when you're running a web site, much
different when your application is deployed to thousands or millions
of devices. Especially if you've distributed the application for free,
and with an expiration date as required of later than October 22,
2033.

I'm nervous now about using Google APIs in Android apps and wondered
if anyone else has thought about this. Should Google APIs be avoided?
At least until developers have some legal protection?

- dave

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


[android-developers] Can't get SurfaceView working, trying to make a simple 2D-shooter!

2009-11-01 Thread klirr
It is way to slow and in the first example it doesnt even move. How do
I make a game? With SurfaceView or OpenGL? And should I draw in a
separate thread?




package com.android.WWS;

import android.app.Activity;
import android.content.Context;
import android.graphics.*;
import android.os.Bundle;
import android.view.SurfaceView;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;
import java.lang.Runnable;
import java.lang.Thread;

public class WWS extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GameView gv = new GameView(this);
setContentView(gv);
gv.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event)
{
GameView gv = (GameView) v;
if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
gv.decrY(3);
v.invalidate();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
gv.decrX(3);
v.invalidate();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
gv.incrY(3);
v.invalidate();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
gv.incrX(3);
v.invalidate();
}
return true;
}
});
}

private static class GameView extends SurfaceView {
private Paint mPaint = new Paint();
private int x;
private int y;

public GameView(Context context) {
super(context);
x = 135;
y = 303;
setWillNotDraw(false);
setFocusable(true);
requestFocus();
}

@Override
public void onDraw(Canvas canvas) {
Paint paint = mPaint;
canvas.translate(10, 10);
canvas.drawColor(Color.rgb(184,134,11));
paint.setColor(Color.rgb(107,142,35));
paint.setStrokeWidth(1);
canvas.drawRect(x, y, x+30, y+7, paint);
canvas.drawRect(x+10, y+7, x+20, y+27, paint);
canvas.drawRect(x+5, y+27, x+25, y+32, paint);
}

public void decrY(int length) {
y -= length;
}

public void incrY(int length) {
y += length;
}

public void decrX(int length) {
x -= length;
}

public void incrX(int length) {
x += length;
}

}

private static class GameRenderer implements Thread {

public GameRenderer(GameView g) {
Thread t = new Thread();
t.start();
}

public void run() {
while(!onPause  !onStop) {

}
}

}

}








package com.android.WWS;

import android.app.Activity;
import android.content.Context;
import android.graphics.*;
import android.os.Bundle;
import android.view.SurfaceView;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;

public class WWS extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new GameView(this));
}

private static class GameView extends SurfaceView implements
OnKeyListener {
private Paint mPaint = new Paint();
private int x;
private int y;

public GameView(Context context) {
super(context);
x = 135;
y = 303;
setWillNotDraw(false);
setFocusable(true);
requestFocus();
}

@Override
public void onDraw(Canvas canvas) {
Paint paint = mPaint;
canvas.translate(10, 10);
canvas.drawColor(Color.rgb(184,134,11));
paint.setColor(Color.rgb(107,142,35));
paint.setStrokeWidth(1);
canvas.drawRect(x, y, x+30, y+7, paint);
canvas.drawRect(x+10, y+7, x+20, y+27, paint);
canvas.drawRect(x+5, y+27, x+25, y+32, paint);
}

public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
y -= 3;
invalidate();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
x -= 3;
invalidate();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
y += 3;
invalidate();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
x += 3;
invalidate();
}
return true;
}

}

-- 
You received this message because 

Re: [android-developers] top ListActivity destroyed just after a Search has been initiated from it - was: Back key after Search doesn't return to list in 2.0 as it did in all earlier versions

2009-11-01 Thread Jonas Petersson
Hi again,

Hmm, it seems even more strange to me: the onDestroy() method of the top 
ListActivity is actually called very shortly after the search has 
triggered the onCreate()+onResume() methods that creates the second 
level ListActivity (note that this is the actual same class as the top 
one, just producing a different result due to the SEARCH action).
Call Sequence:

top onCreate()
top onResume()
-- I press search and enter some text.
top onPause()
2nd onCreate()
2nd onResume()
top onDestroy()
-- This is before the second ListActivity is even displayed

So obviously, by the time I press back in the 2nd ListActivity, there is 
no top ListActivity to show. So the problem is not the Back key, but 
that some unknown force has destroyed the top activity...

Note: the code is still compiled with android:minSdkVersion=2 and the 
very same package executes as expected on previous versions. So perhaps 
I've always done something incorrectly, but up until now the result was 
what I expected. In some special cases I do in fact explicitly call 
finish() to force this very effect, but that does not happen in this 
situation.

I didn't notice anything explicitly related to this in the release 
notes, but perhaps there is something between the lines that I have not 
yet realized.

Advice appreciated / Jonas


Jonas Petersson wrote:
 Hi all,
 
 I experience something slightly confusing in the 2.0 emulators (tried 
 several variants):
 
 One of my apps is somewhat similar to Market in structure in that it is 
 a ListActivity that keeps creating new Intent(this, xxx.class); of 
 itself with various .putExtra(); that presents data in appropriate ways.
 In the Manifest there is also an intent-filter for action.SEARCH that 
 triggers onSearchRequested() and then onCreate() checks for 
 Intent.ACTION_SEARCH - pretty straight forward IMHO and it has also 
 worked exactly as intended up to and including 1.6 (where the new search 
 stuff seemed to integrate as expected).
 
 However, in 2.0 I don't get back to the previous ListActivity when I 
 have used the search key to show something and then press the Back key. 
 The back key takes yet another step back.
 
 Is this related to some other Back key issues I've seen mentioned here, 
 an intended new behaviour that I must handle differently in 2.0 or some 
 kind of bug that needs reporting. I don't have any kind if special key 
 listening going on at all.
 
   Best / Jonas
 
 PS. Lack of account handling and hardware to test Bluetooth on really 
 makes the emulation testing a pain - I'd love a Moto Droid over here. 
 Any suggestions as to how I can get my hands on one soon would be much 
 appreciated...
 

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


[android-developers] Re: Could developers be liable for charges for using Google APIs?

2009-11-01 Thread Andrei
http://code.google.com/android/add-ons/google-apis/maps-api-signup.html
5.4 says you can use it for commercial purpose

On Nov 1, 5:14 pm, davemac davemac...@gmail.com wrote:
 I've been reading the Terms of Service for the Google APIs, both Maps
 and AJAX APIs. I have questions regarding future consequences of using
 these APIs in mobile apps that get distributed, hopefully, to many
 thousands or millions of devices.

 Both say that the services must be available for free, so I'm assuming
 that means you cannot charge a fee for an Android app that uses these
 services, unless you arrange something special with Google. Which
 appears to be Google Maps API Premier, an advanced service that uses a
 page-view-counter-based calculation to determine charges, and is not
 cheap. Which pretty much says you'd need to charge a subscription fee
 if you're going to charge at all. If you don't charge now and suddenly
 get hit with a bill from Google, your free app must remain free
 (according to Android Terms) so you're out of luck? I suppose it might
 be possible to include a Terms of Service with the application that
 says the user assumes all responsibility for any charges related to
 use of the Google APIs, but that doesn't seem likely to succeed. I
 think it would be difficult to manage. I also suppose that you could
 ask Google to block requests that use your API key until you can get a
 new version out with a fee attached.

 Google also says they could charge for the use of the API in the
 future. This is stated specifically in the AJAX APIs doc, and
 indirectly in the Maps doc (Google can change the terms at any time).
 Since the API key that is used when calling APIs belongs to the
 Android developer, that tells me we could potentially be on the hook
 for Google charges. The Terms say that we can decide to stop using the
 APIs. Which is fairly easy when you're running a web site, much
 different when your application is deployed to thousands or millions
 of devices. Especially if you've distributed the application for free,
 and with an expiration date as required of later than October 22,
 2033.

 I'm nervous now about using Google APIs in Android apps and wondered
 if anyone else has thought about this. Should Google APIs be avoided?
 At least until developers have some legal protection?

 - dave

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


[android-developers] Speech Recognition

2009-11-01 Thread moa
I want to use the SR api to handle commands in my application. I know
at any given point in my application what the valid commands would be
at that point so would like to limit the results that the SR is
matched against.

For example, if the only valid commands were Yes or No I would
like to be able to restrict the SR to only try and match against those
two words. Otherwise on full vocabulary I get Snow and other false
words. Limiting the vocabulary should make matching 90%+ accurate on
limited words.

Is this possible?

Also, can I limit the SR to only match numerics for number input only?

The internal dialer seems to be able to do this sort of this, so can
I?

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


Re: [android-developers] Speech Recognition

2009-11-01 Thread Mark Murphy
moa wrote:
 I want to use the SR api to handle commands in my application. I know
 at any given point in my application what the valid commands would be
 at that point so would like to limit the results that the SR is
 matched against.
 
 For example, if the only valid commands were Yes or No I would
 like to be able to restrict the SR to only try and match against those
 two words. Otherwise on full vocabulary I get Snow and other false
 words. Limiting the vocabulary should make matching 90%+ accurate on
 limited words.
 
 Is this possible?

Not that I can tell from the RecognizerIntent options. Your only
constraints are free-form vs. Web search and what natural language to use.

 Also, can I limit the SR to only match numerics for number input only?

Again, not that I can tell from the RecognizerIntent options.

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

Android App Developer Training: http://commonsware.com/training

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


[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread mscwd01
Well Niko that may be true but it doesn't change the fact that it
works fine on an HTC Hero and some G1  Magic phones.

It should either work or not, having your application work fine on
some devices and break on other devices is rediculous and its getting
annoying now.

iPhone here I come :(

On Nov 1, 3:18 am, niko20 nikolatesl...@yahoo.com wrote:
 Wait-

 YOu are remapping the coords after rotation? Well then that's where
 the problem has to be, since clearly Mark has shown that the
 getOrientation() works correctly

 -niko

 On Oct 31, 1:25 pm, mscwd01 mscw...@gmail.com wrote:

  Well then this is extremely confusing!

  Firstly, thanks Mark for taking the time to test it.

  The only other thing which could be wrong is how the coordinate system
  is represented in each device. I draw to the screen once I have
  remapped the coordinate system i.e.:

  if(screenOrientation == 1) {  // Portrait
    SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
  SensorManager.AXIS_X, outR);}

  else { // All other send to Landscape
    SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
  SensorManager.AXIS_Z, outR);

  }

  However, this shouldn't be an issue should it?

  On Oct 31, 6:19 pm, Mark Murphy mmur...@commonsware.com wrote:

   mscwd01 wrote:
Okay this is getting really rather annoying now.

I have used both of the following methods of getting the screen
orientation and both do not work properly on different devices.

Method 1:
Display display = ((WindowManager) getSystemService
(WINDOW_SERVICE)).getDefaultDisplay();
int screenOrientation = display.getOrientation();

Method 2:
int screenOrientation = getResources().getConfiguration().orientation;

Both methods work fine on the HTC Hero; however, they both fail on the
G1 and G2 devices (according to the users of my app).

How can we be expected to make high quality applications if the API is
not supported on all devices???

I would be very greatful if someone could offer a solution to this,
its just not acceptable.

   I just tested this on a G1, and
   getResources().getConfiguration().orientation is 2 in landscape and 1 in
   portrait, just like it should be.

   I also tested it on an HTC Magic, and it works just fine.

   Heck, it even works on an ARCHOS 5 Android tablet.

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

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

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


[android-developers] Handling different screen densities vs. app installed size?

2009-11-01 Thread Moto
My concern supporting different screen sizes, in this case with the
new DROID phone.

So my question, when installing my application on a G1 phone, would it
ignore all hdpi qualifier folders?

I ask this because I'm afraid that my application will grow in size
when installed containing many unnecessary files...

Thanks in advance!
-Jona

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


[android-developers] Re: App name/icon problems on Hero after reboot

2009-11-01 Thread rooster 808
I'm seeing this frequently on my HERO HTC, but not my G1 Google Dev
phone.

Almost every power off, I lose the Desktop Icon on the App I'm
developing, just on the Hero.

Rich


On Oct 30, 10:36 pm, James W jpbwebs...@gmail.com wrote:
 For what its worth, I cannot reproduce this on a non-Sprint Hero. I
 have had mine for a couple of months now, a European version, and has
 been out in Asia for a while with no reported similar errors. I am a
 close follower of the XDA Developers board, and it has not been seen
 there either. Perhaps it is now coming to light as more people are
 getting the Sprint version?

 I have never seen this issue on my own app, but never used raw strings
 for the name.

 I installed the Coin Toss app, tried it, put a shortcut on the home
 screen, rebooted, and it was fine. I will be happy to try any other
 apps to see if this is still the case, but as I live in Hong Kong, I
 cannot try paid for apps, as it is not supported.

 My Hero is stock European, running Android 1.5, build 2.73.405.5
 146733 CL#61267 release-keys
 Software version: 1.0.0.A6288
 Kernel: 2.6.27-8dd6deee htc-ker...@and18-2)

 Hope this helps!

 On Oct 31, 3:52 am, Justin Giles jtgi...@gmail.com wrote:

  From a user standpoint, I ran across this thread on the Hero
  phandroids.comforum:

 http://androidforums.com/sprint-htc-hero/12549-handcent-shortcut-icon...

  Basically you wipe the phone  sd card, reinitialize the phone, then
  IMMEDIATELY turn off HTC Sense UI in favor of the standard Android UI.  The
  user that gave these instructions seems to not have any problems after they
  do this.

  Just a FYI and further evidence that HTC has some issues they may or may not
  be ignoring.

  On Fri, Oct 30, 2009 at 10:14 AM, Greg Donald gdon...@gmail.com wrote:

   On Fri, Oct 30, 2009 at 9:41 AM, Justin Giles jtgi...@gmail.com wrote:
I'm not entirely sure the raw string vs resource string is the full 
issue
here though.  It might be part of the problem, but not the whole
explanation.  As Greg mentioned earlier, he never had his app name set 
as
   a
raw string and he is experiencing the problem.  On one of my 
applications
I'm developing, I'm experiencing it as well with the app name always
   having
been a resource.  It's sounding more and more like HTC having done
   something
funky with the package management.  Especially since Dianne has been
   saying
that stock Android doesn't have this problem.  And all of my inquiries 
to
HTC  Sprint have resulted in nothing.

   I'm considering returning the phone, I still have a few days before my
   30 day return option has past.  I mean, who really knows when this
   might be fixed?

   What other options are there at this point?

   --
   Greg Donald
  http://destiney.com/-Hide quoted text -

  - Show quoted text -

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


[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread Phy
Okay can I just summarise my problem as I believe it is an issue which
NEEDS to be addressed...

I have confirmation from five users who either have a HTC G1 or HTC
Magic who say my application works fine. However, I have had numerous
recent comments on the Market that the orientation of my applications
interface is rotated 90 degrees on G1/Magic devices.

I use this method to get the screen orientation:
getResources().getConfiguration().orientation;

and remap the coordinate system as follows before drawing the
application interface:

if(screenOrientation == 1) {  // Portrait
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
SensorManager.AXIS_X, outR);
}
else { // All other send to Landscape
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
  SensorManager.AXIS_Z, outR);
}


How can this work fine on some phones and completely break on other
peoples phones which are the same make and model?

This is really disconcerting, and needs to be explained.


On Nov 1, 11:06 pm, mscwd01 mscw...@gmail.com wrote:
 Well Niko that may be true but it doesn't change the fact that it
 works fine on an HTC Hero and some G1  Magic phones.

 It should either work or not, having your application work fine on
 some devices and break on other devices is rediculous and its getting
 annoying now.

 iPhone here I come :(

 On Nov 1, 3:18 am, niko20 nikolatesl...@yahoo.com wrote:

  Wait-

  YOu are remapping the coords after rotation? Well then that's where
  the problem has to be, since clearly Mark has shown that the
  getOrientation() works correctly

  -niko

  On Oct 31, 1:25 pm, mscwd01 mscw...@gmail.com wrote:

   Well then this is extremely confusing!

   Firstly, thanks Mark for taking the time to test it.

   The only other thing which could be wrong is how the coordinate system
   is represented in each device. I draw to the screen once I have
   remapped the coordinate system i.e.:

   if(screenOrientation == 1) {  // Portrait
     SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
   SensorManager.AXIS_X, outR);}

   else { // All other send to Landscape
     SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
   SensorManager.AXIS_Z, outR);

   }

   However, this shouldn't be an issue should it?

   On Oct 31, 6:19 pm, Mark Murphy mmur...@commonsware.com wrote:

mscwd01 wrote:
 Okay this is getting really rather annoying now.

 I have used both of the following methods of getting the screen
 orientation and both do not work properly on different devices.

 Method 1:
 Display display = ((WindowManager) getSystemService
 (WINDOW_SERVICE)).getDefaultDisplay();
 int screenOrientation = display.getOrientation();

 Method 2:
 int screenOrientation = getResources().getConfiguration().orientation;

 Both methods work fine on the HTC Hero; however, they both fail on the
 G1 and G2 devices (according to the users of my app).

 How can we be expected to make high quality applications if the API is
 not supported on all devices???

 I would be very greatful if someone could offer a solution to this,
 its just not acceptable.

I just tested this on a G1, and
getResources().getConfiguration().orientation is 2 in landscape and 1 in
portrait, just like it should be.

I also tested it on an HTC Magic, and it works just fine.

Heck, it even works on an ARCHOS 5 Android tablet.

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

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

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


[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread mscwd01
Okay can I just summarise my problem as I believe it is an issue which
NEEDS to be addressed...

I have confirmation from five users who either have a HTC G1 or HTC
Magic who say my application works fine. However, I have had numerous
recent comments on the Market that the orientation of my applications
interface is rotated 90 degrees on G1/Magic devices.

I use this method to get the screen orientation:
getResources().getConfiguration().orientation;

and remap the coordinate system as follows before drawing the
application interface:

if(screenOrientation == 1) {  // Portrait
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
SensorManager.AXIS_X, outR);
}

else { // All other send to Landscape
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
  SensorManager.AXIS_Z, outR);

}

How can this work fine on some phones and completely break on other
peoples phones which are the same make and model?

This is really disconcerting, and needs to be explained.

On Nov 1, 11:06 pm, mscwd01 mscw...@gmail.com wrote:
 Well Niko that may be true but it doesn't change the fact that it
 works fine on an HTC Hero and some G1  Magic phones.

 It should either work or not, having your application work fine on
 some devices and break on other devices is rediculous and its getting
 annoying now.

 iPhone here I come :(

 On Nov 1, 3:18 am, niko20 nikolatesl...@yahoo.com wrote:

  Wait-

  YOu are remapping the coords after rotation? Well then that's where
  the problem has to be, since clearly Mark has shown that the
  getOrientation() works correctly

  -niko

  On Oct 31, 1:25 pm, mscwd01 mscw...@gmail.com wrote:

   Well then this is extremely confusing!

   Firstly, thanks Mark for taking the time to test it.

   The only other thing which could be wrong is how the coordinate system
   is represented in each device. I draw to the screen once I have
   remapped the coordinate system i.e.:

   if(screenOrientation == 1) {  // Portrait
     SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
   SensorManager.AXIS_X, outR);}

   else { // All other send to Landscape
     SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
   SensorManager.AXIS_Z, outR);

   }

   However, this shouldn't be an issue should it?

   On Oct 31, 6:19 pm, Mark Murphy mmur...@commonsware.com wrote:

mscwd01 wrote:
 Okay this is getting really rather annoying now.

 I have used both of the following methods of getting the screen
 orientation and both do not work properly on different devices.

 Method 1:
 Display display = ((WindowManager) getSystemService
 (WINDOW_SERVICE)).getDefaultDisplay();
 int screenOrientation = display.getOrientation();

 Method 2:
 int screenOrientation = getResources().getConfiguration().orientation;

 Both methods work fine on the HTC Hero; however, they both fail on the
 G1 and G2 devices (according to the users of my app).

 How can we be expected to make high quality applications if the API is
 not supported on all devices???

 I would be very greatful if someone could offer a solution to this,
 its just not acceptable.

I just tested this on a G1, and
getResources().getConfiguration().orientation is 2 in landscape and 1 in
portrait, just like it should be.

I also tested it on an HTC Magic, and it works just fine.

Heck, it even works on an ARCHOS 5 Android tablet.

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

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

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


Re: [android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread Mark Murphy
Phy wrote:
 I have confirmation from five users who either have a HTC G1 or HTC
 Magic who say my application works fine. However, I have had numerous
 recent comments on the Market that the orientation of my applications
 interface is rotated 90 degrees on G1/Magic devices.

Do you have any confirmation from any users who are seeing the rotation
problem? (i.e., direct email, not Market comments)

 I use this method to get the screen orientation:
 getResources().getConfiguration().orientation;

That's not what you used to do, by your own admission. Are you sure that
the comments are from people who are using your newer version?

And, again, do you have any confirmation from any users who are seeing
the rotation problem?

 How can this work fine on some phones and completely break on other
 peoples phones which are the same make and model?

It could be they are running the older version of your application. Or,
it could be a ROM version difference, with a bug in some ROMs. Or, it
could be something about the way some users are using your app that
differs from your expectations and test cases (e.g., they open the app
starting in landscape mode, and you expect them to be starting in
portrait mode).

Please bear in mind that, across a 13-post thread, you have not once
actually indicated what app this is, AFAICT.

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

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

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


[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread mscwd01
Hey Mark,

I have had one user contact me by email and he had the same issues
using the older version and the new version (using the orientation
code you supplied), so I can rule out that being the cause *I think*.

I *presume* it isn't a ROM issue as I have had 8-10 users leave
comments saying it doesn't work, in each comment they say recent
update doesn't solve the issue. I guess for most people it may work
and they dont bother leaving a message which says hey it works
instead its only the people having problems who post negative
comments.

I have tried every test case such as holding the phone in different
orientations when starting the activity and had no luck finding a bug
there, in fact I have wasted far too many hours on this.


On Nov 2, 12:17 am, Mark Murphy mmur...@commonsware.com wrote:
 Phy wrote:
  I have confirmation from five users who either have a HTC G1 or HTC
  Magic who say my application works fine. However, I have had numerous
  recent comments on the Market that the orientation of my applications
  interface is rotated 90 degrees on G1/Magic devices.

 Do you have any confirmation from any users who are seeing the rotation
 problem? (i.e., direct email, not Market comments)

  I use this method to get the screen orientation:
  getResources().getConfiguration().orientation;

 That's not what you used to do, by your own admission. Are you sure that
 the comments are from people who are using your newer version?

 And, again, do you have any confirmation from any users who are seeing
 the rotation problem?

  How can this work fine on some phones and completely break on other
  peoples phones which are the same make and model?

 It could be they are running the older version of your application. Or,
 it could be a ROM version difference, with a bug in some ROMs. Or, it
 could be something about the way some users are using your app that
 differs from your expectations and test cases (e.g., they open the app
 starting in landscape mode, and you expect them to be starting in
 portrait mode).

 Please bear in mind that, across a 13-post thread, you have not once
 actually indicated what app this is, AFAICT.

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

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

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


[android-developers] Re: Could developers be liable for charges for using Google APIs?

2009-11-01 Thread davemac
I have to admit, embarrassedly, that I was looking at the wrong Maps
API Terms. Thanks for pointing me in the correct direction regarding
Maps.

There is nothing in the Android Google Maps API Terms that says you
must make your applications free that use the Maps API. So paid apps
look okay, although there are some restrictions on exactly what type
of apps you can develop with the Maps API (see section 8.7). There's
still section 8.3 that says you can't sell the Service but I guess
that means we can't sell Google's service but we can sell our
applications that use the service.

My original post asked about the Google AJAX APIs as well. Is there an
Android equivalent to Maps for using those APIs as well? Is it even
acceptable to use a Google AJAX API from Android?

- dave

On Nov 1, 5:27 pm, Andrei gml...@gmail.com wrote:
 http://code.google.com/android/add-ons/google-apis/maps-api-signup.html
 5.4 says you can use it for commercial purpose

 On Nov 1, 5:14 pm, davemac davemac...@gmail.com wrote:

  I've been reading the Terms of Service for the Google APIs, both Maps
  and AJAX APIs. I have questions regarding future consequences of using
  these APIs in mobile apps that get distributed, hopefully, to many
  thousands or millions of devices.

  Both say that the services must be available for free, so I'm assuming
  that means you cannot charge a fee for an Android app that uses these
  services, unless you arrange something special with Google. Which
  appears to be Google Maps API Premier, an advanced service that uses a
  page-view-counter-based calculation to determine charges, and is not
  cheap. Which pretty much says you'd need to charge a subscription fee
  if you're going to charge at all. If you don't charge now and suddenly
  get hit with a bill from Google, your free app must remain free
  (according to Android Terms) so you're out of luck? I suppose it might
  be possible to include a Terms of Service with the application that
  says the user assumes all responsibility for any charges related to
  use of the Google APIs, but that doesn't seem likely to succeed. I
  think it would be difficult to manage. I also suppose that you could
  ask Google to block requests that use your API key until you can get a
  new version out with a fee attached.

  Google also says they could charge for the use of the API in the
  future. This is stated specifically in the AJAX APIs doc, and
  indirectly in the Maps doc (Google can change the terms at any time).
  Since the API key that is used when calling APIs belongs to the
  Android developer, that tells me we could potentially be on the hook
  for Google charges. The Terms say that we can decide to stop using the
  APIs. Which is fairly easy when you're running a web site, much
  different when your application is deployed to thousands or millions
  of devices. Especially if you've distributed the application for free,
  and with an expiration date as required of later than October 22,
  2033.

  I'm nervous now about using Google APIs in Android apps and wondered
  if anyone else has thought about this. Should Google APIs be avoided?
  At least until developers have some legal protection?

  - dave



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


[android-developers] Re: Speech Recognition

2009-11-01 Thread davemac
Once you get back the set of responses you could filter them down to
those in your valid commands set. Try the retainAll() method on
matches using your valid commands as the argument. You'll probably
either get one or zero elements left in matches every time. The same
thing should work for numbers.

- dave

On Nov 1, 5:36 pm, moa mich...@jixel.com wrote:
 I want to use the SR api to handle commands in my application. I know
 at any given point in my application what the valid commands would be
 at that point so would like to limit the results that the SR is
 matched against.

 For example, if the only valid commands were Yes or No I would
 like to be able to restrict the SR to only try and match against those
 two words. Otherwise on full vocabulary I get Snow and other false
 words. Limiting the vocabulary should make matching 90%+ accurate on
 limited words.

 Is this possible?

 Also, can I limit the SR to only match numerics for number input only?

 The internal dialer seems to be able to do this sort of this, so can
 I?

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


[android-developers] Re: idiot's guide to using layout:gravity?

2009-11-01 Thread Emmanuel
You can't have two different gravity in the same layout, so you can't
do it a linear Layout, without introducing a new level in the
hierarchy.

I made an entry in my blog on this subject :
http://androidblogger.blogspot.com/2009/08/tutorial-how-to-have-two-buttons-on.html

Hope it helps,

Emmanuel

On Oct 30, 12:36 am, Jason Proctor jason.android.li...@gmail.com
wrote:
 i have a linear layout with two buttons. i'd like the first to be at
 the left edge of the container, and the right to be at the... right
 edge. layout gravity is advertised to do this but i don't seem to be
 able to influence placement with it at all. i've had the gravity
 affect the text inside the buttons, which is a bit weird, but it no
 longer seems to do that...

 LinearLayout
         android:orientation=horizontal
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         
         Button
                 android:id=@+id/auth_login_button
                 android:layout_height=50dip
                 android:layout_width=100dip
                 android:layout_gravity=left
                 android:text=@string/auth_login_label
                 android:textColor=#ff
                 android:background=#ff
                 android:textStyle=bold
         /

         Button
                 android:id=@+id/auth_signup_button
                 android:layout_height=50dip
                 android:layout_width=100dip
                 android:layout_gravity=right
                 android:text=@string/auth_signup_label
                 android:textColor=#ff
                 android:background=#ff
                 android:textStyle=bold
         /
 /LinearLayout

 --
 jason.vp.engineering.particle

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


[android-developers] Re: App name/icon problems on Hero after reboot

2009-11-01 Thread mscwd01
I have an HTC Hero, have used many of the above apps and have never
seen these problems...

On Nov 1, 11:47 pm, rooster 808 rich.al...@gmail.com wrote:
 I'm seeing this frequently on my HERO HTC, but not my G1 Google Dev
 phone.

 Almost every power off, I lose the Desktop Icon on the App I'm
 developing, just on the Hero.

 Rich

 On Oct 30, 10:36 pm, James W jpbwebs...@gmail.com wrote:

  For what its worth, I cannot reproduce this on a non-Sprint Hero. I
  have had mine for a couple of months now, a European version, and has
  been out in Asia for a while with no reported similar errors. I am a
  close follower of the XDA Developers board, and it has not been seen
  there either. Perhaps it is now coming to light as more people are
  getting the Sprint version?

  I have never seen this issue on my own app, but never used raw strings
  for the name.

  I installed the Coin Toss app, tried it, put a shortcut on the home
  screen, rebooted, and it was fine. I will be happy to try any other
  apps to see if this is still the case, but as I live in Hong Kong, I
  cannot try paid for apps, as it is not supported.

  My Hero is stock European, running Android 1.5, build 2.73.405.5
  146733 CL#61267 release-keys
  Software version: 1.0.0.A6288
  Kernel: 2.6.27-8dd6deee htc-ker...@and18-2)

  Hope this helps!

  On Oct 31, 3:52 am, Justin Giles jtgi...@gmail.com wrote:

   From a user standpoint, I ran across this thread on the Hero
   phandroids.comforum:

  http://androidforums.com/sprint-htc-hero/12549-handcent-shortcut-icon...

   Basically you wipe the phone  sd card, reinitialize the phone, then
   IMMEDIATELY turn off HTC Sense UI in favor of the standard Android UI.  
   The
   user that gave these instructions seems to not have any problems after 
   they
   do this.

   Just a FYI and further evidence that HTC has some issues they may or may 
   not
   be ignoring.

   On Fri, Oct 30, 2009 at 10:14 AM, Greg Donald gdon...@gmail.com wrote:

On Fri, Oct 30, 2009 at 9:41 AM, Justin Giles jtgi...@gmail.com wrote:
 I'm not entirely sure the raw string vs resource string is the full 
 issue
 here though.  It might be part of the problem, but not the whole
 explanation.  As Greg mentioned earlier, he never had his app name 
 set as
a
 raw string and he is experiencing the problem.  On one of my 
 applications
 I'm developing, I'm experiencing it as well with the app name always
having
 been a resource.  It's sounding more and more like HTC having done
something
 funky with the package management.  Especially since Dianne has been
saying
 that stock Android doesn't have this problem.  And all of my 
 inquiries to
 HTC  Sprint have resulted in nothing.

I'm considering returning the phone, I still have a few days before my
30 day return option has past.  I mean, who really knows when this
might be fixed?

What other options are there at this point?

--
Greg Donald
   http://destiney.com/-Hidequoted text -

   - Show quoted text -

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


[android-developers] Re: what about the Android 3d module file type .gles

2009-11-01 Thread LemonDev
thanks,but where can we learn from about it?

On 11月1日, 下午1时02分, Fred Grott(Android Expert) fred.gr...@gmail.com
wrote:
 its a graphical layout engine script file, hence the name

 On Oct 31, 2:08 am,LemonDevlem...@gmail.com wrote:



  GlobalTime use this file type ,but i have found nothing about it in
  the Android documents .and also no discussions on the internet .
  so , how can we export a gles file type from others like 3DMax...

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


[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread niko20
I wouldn't be surprised if these people are running Cyanogen mods.
People also had problems with my app when they did that. In my opinion
custom ROMS are trouble for developers.

-niko

On Nov 1, 6:31 pm, mscwd01 mscw...@gmail.com wrote:
 Hey Mark,

 I have had one user contact me by email and he had the same issues
 using the older version and the new version (using the orientation
 code you supplied), so I can rule out that being the cause *I think*.

 I *presume* it isn't a ROM issue as I have had 8-10 users leave
 comments saying it doesn't work, in each comment they say recent
 update doesn't solve the issue. I guess for most people it may work
 and they dont bother leaving a message which says hey it works
 instead its only the people having problems who post negative
 comments.

 I have tried every test case such as holding the phone in different
 orientations when starting the activity and had no luck finding a bug
 there, in fact I have wasted far too many hours on this.

 On Nov 2, 12:17 am, Mark Murphy mmur...@commonsware.com wrote:

  Phy wrote:
   I have confirmation from five users who either have a HTC G1 or HTC
   Magic who say my application works fine. However, I have had numerous
   recent comments on the Market that the orientation of my applications
   interface is rotated 90 degrees on G1/Magic devices.

  Do you have any confirmation from any users who are seeing the rotation
  problem? (i.e., direct email, not Market comments)

   I use this method to get the screen orientation:
   getResources().getConfiguration().orientation;

  That's not what you used to do, by your own admission. Are you sure that
  the comments are from people who are using your newer version?

  And, again, do you have any confirmation from any users who are seeing
  the rotation problem?

   How can this work fine on some phones and completely break on other
   peoples phones which are the same make and model?

  It could be they are running the older version of your application. Or,
  it could be a ROM version difference, with a bug in some ROMs. Or, it
  could be something about the way some users are using your app that
  differs from your expectations and test cases (e.g., they open the app
  starting in landscape mode, and you expect them to be starting in
  portrait mode).

  Please bear in mind that, across a 13-post thread, you have not once
  actually indicated what app this is, AFAICT.

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

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

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


[android-developers] Re: app widget sizes for WVGA and FWVGA

2009-11-01 Thread sdphil
yeah i did, but it wasn't much help, perhaps I didn't understand what
you were saying --

Just scale your coordinates based on the screen density.
That is what I was commenting on.  Screen density does not seem
sufficient to me.

You can't assume some specific size for some screen -- consider the
possibilities, QVGA, HVGA, WVGA, FWVGA all have different
proportions.
by specific size - i assume you meant physical screen size -- which
goes back to density.  as far as different proportions I assume you
mean aspect ratio.  I'm not quite sure what that means.  Does that
mean I should create a separate graphic for each screen DENSITY and
then it looks however it looks on whatever the aspect ratio is for a
screen?  Suppose I had two devices A and B with the same screen
DENSITY.  Device A had an aspect ratio such that it was 2x as wide as
device B (but again, with the same screen density).  If I create an
app widget for device A to be 4x1 (to take up the entire width of the
screen), then when I used that widget graphic on device B (with the
same density, but 2x physical width), the widget graphic would only go
across half the screen?

On Nov 1, 1:23 pm, Dianne Hackborn hack...@android.com wrote:
 Did you read my second paragraph?



 On Sun, Nov 1, 2009 at 10:57 AM, sdphil phil.pellouch...@gmail.com wrote:
  It seems that screen density alone is not sufficient to know what the
  dimension should be; at some point aspect ratio has to come into
  play.  For example, I could have a screen that is the same screen
  density as a T-Mobile G1, but twice has tall (physical screen size;
  and 2x as many pixels in that direction).  the 4x1 widget dimensions
  in portrait would be fine as is, but when I went to landscape, the
  width of my app widget would have to be much greater than 424 pixels
  even though the screen density was the same.

  and that's what is kind of happening with T-Mobile G1 and Motorola
  Droid (at least it seems that way).

  T-Mobile G1: 181dpi, aspect ratio in landscape is: 480/320 = 1.5
  Motorola Droid: 267dpi, aspect ratio in landscape is: 854/480 = 1.78

  If I just scaled everything up based on screen density, then Droid
  should be: 267/181 = 1.475 scale factor.

  If the aspect ratio of the phones were exactly the same, then i would
  agree, you could just use the screen density scale factor.  But the
  aspect ratios are not the same.

  On Nov 1, 8:51 am, Dianne Hackborn hack...@android.com wrote:
   Please read on screen density:

  http://developer.android.com/guide/practices/screens_support.html

   http://developer.android.com/guide/practices/screens_support.htmlJust
   scale your coordinates based on the screen density.  You can't assume
  some
   specific size for some screen -- consider the possibilities, QVGA, HVGA,
   WVGA, FWVGA all have different proportions.  And then a particular app
  may
   use the screen differently, for example in the future home will probably
   have some redesign so that on a FWVGA screen there is not such a
  difference
   in proportion between its landscape and portrait layouts.

   On Sun, Nov 1, 2009 at 7:40 AM, sdphil phil.pellouch...@gmail.com
  wrote:
not sure I follow you here --

T-Mobile G1/G2 has the following specs -
320px x 480px (pixels)
1.77 x 2.65 (inches)
which gives about 181 dpi.

according to this --

   http://developer.android.com/guide/practices/ui_guidelines/widget_des.
  ..

   4x1 widgets on T-Mobile G1 and G2 should be 320x100 in portrait
and 424x74 in landscape.

Motorola Droid has the following specs -
480px x 854px (pixels)
1.8 x 3.2 (inches)
which gives about 267 dpi.

4x1 widgets for both portrait and landscape on something like Droid
should be what?

According to what you said Multiply by 1.5

320*1.5 x 100*1.5 = 480 x 150 portrait
424*1.5 x 74*1.5 = 636 x 111 landscape

I can believe it for portrait, but for landscape, that doesn't seem
right.

tia.

On Oct 31, 3:11 pm, Dianne Hackborn hack...@android.com wrote:
 It's not the number of pixels, it's the density.

 On Sat, Oct 31, 2009 at 12:10 PM, sdphil phil.pellouch...@gmail.com

wrote:
  That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
  landscape, 854 / 480 = 1.78.

  On Oct 31, 10:55 am, Dianne Hackborn hack...@android.com wrote:
   Multiply by 1.5.

   On Sat, Oct 31, 2009 at 8:23 AM, sdphil 
  phil.pellouch...@gmail.com
  wrote:
what are the 4x1 app widget sizes for WVGA and FWVGA in both
portrait
and landscape?

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

Re: [android-developers] Re: App name/icon problems on Hero after reboot

2009-11-01 Thread Greg Donald
On Sun, Nov 1, 2009 at 7:14 PM, mscwd01 mscw...@gmail.com wrote:
 I have an HTC Hero, have used many of the above apps and have never
 seen these problems...

What firmware version do you have?



-- 
Greg Donald
http://destiney.com/

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


[android-developers] Re: Since Android 2.0 the phone number in the emulator became null - how to set it?

2009-11-01 Thread Nmix
Yes it is. I can see it in Settings and I can retrieve it
with .getLine1Number().

However... if you are using a broadcast receiver for BOOT_COMPLETED, I
have found with 2.0 (and sporadically with earlier versions) that it
is not available when the receiver runs. Some delay seems to be
required before attempting to retrieve the number. I've only tested
this on the emulator, not a real phone.

On Nov 1, 3:00 pm, Marek Urbaniak marek.urban...@gmail.com wrote:
 It the earlier versions of Android SDK the emulator had the set phone
 number. Visible in the phone settings and accessible to applications
 through the TelephonyManager.getLine1Number method. In Android SDK 2.0
 it is not set. How to set it?

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


[android-developers] Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-01 Thread frantz lohier
Happy Halloween All !

The party is over and Google suddenly released the much anticipated Android
2.0 SDK.

Much improvement for sure !

That said, the party is over and I came to have to deal with the following
Ghost;

I've released an app in the market (Ambu) - so far qualified under SDK 1.5
1.6. Using the emulator for Android 2.0, things don't work anymore.

This is what I'd like to share;

- my app invokes an ACTION.PICK intent as way to extract phone contact from
the phone book and populate a database.

When compiling my app using the SDK version 1.6 and a target emulator
configured at 1.6 level, the following code WORKS:

Intent pickcontact = new Intent(Intent.ACTION_PICK,
People.CONTENT_URI);
startActivityForResult(pickcontact, CALL_CONTACTPICKED);

When running the same code (compiled with SDK 1.6) and a target emulator at
2.0 level, the above code never return the entries I have populated in my
the phone book. It's as if the phonebook was always empty.

A couple of additional observations;

- When running the emulator in 2.0 mode, the default local input type is
Japaneese. Any way to change this ?

- Under the 2.0 emulator, and setting a clean AVD image, if you launch the
dial button, press menu and select account, you'll probably immediatly get a
android.process.acore error ...

- In the most recent SDK document, I can read that People.CONTENT_URI was
deprecated after SDK 1.6. Therefore, I've changed the above code to:

Intent pickcontact = new Intent(Intent.ACTION_PICK, AUTHORITY_URI);
StartActivityForResult(pickcontact, CALL_CONTACTPICKED);

Unfortunatly, with the above, I get a crash right away when invoking
ACTION_PICK.

Question to the Google Folks (dear dianne and others, please !);

How to we properly pick a phonebook contact under the 2.0 OS using 1.6 or
2.0 compiled apps ?

Thanks !!!

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

Re: [android-developers] Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-01 Thread Andrew Zhang
Hi ,

Content uri is changed. Please have a try of
ContactsContract.Contacts.CONTENT_URI.

On Mon, Nov 2, 2009 at 9:57 AM, frantz lohier floh...@gmail.com wrote:

 Happy Halloween All !

 The party is over and Google suddenly released the much anticipated Android
 2.0 SDK.

 Much improvement for sure !

 That said, the party is over and I came to have to deal with the following
 Ghost;

 I've released an app in the market (Ambu) - so far qualified under SDK 1.5
 1.6. Using the emulator for Android 2.0, things don't work anymore.

 This is what I'd like to share;

 - my app invokes an ACTION.PICK intent as way to extract phone contact from
 the phone book and populate a database.

 When compiling my app using the SDK version 1.6 and a target emulator
 configured at 1.6 level, the following code WORKS:

 Intent pickcontact = new Intent(Intent.ACTION_PICK,
 People.CONTENT_URI);
 startActivityForResult(pickcontact, CALL_CONTACTPICKED);

 When running the same code (compiled with SDK 1.6) and a target emulator at
 2.0 level, the above code never return the entries I have populated in my
 the phone book. It's as if the phonebook was always empty.

 A couple of additional observations;

 - When running the emulator in 2.0 mode, the default local input type is
 Japaneese. Any way to change this ?

 - Under the 2.0 emulator, and setting a clean AVD image, if you launch
 the dial button, press menu and select account, you'll probably immediatly
 get a android.process.acore error ...

 - In the most recent SDK document, I can read that People.CONTENT_URI was
 deprecated after SDK 1.6. Therefore, I've changed the above code to:

 Intent pickcontact = new Intent(Intent.ACTION_PICK, AUTHORITY_URI);
 StartActivityForResult(pickcontact, CALL_CONTACTPICKED);

 Unfortunatly, with the above, I get a crash right away when invoking
 ACTION_PICK.

 Question to the Google Folks (dear dianne and others, please !);

 How to we properly pick a phonebook contact under the 2.0 OS using 1.6 or
 2.0 compiled apps ?

 Thanks !!!


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




-- 
Best regards,
Andrew Zhang

http://zhanghuangzhu.blogspot.com/

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

Re: [android-developers] Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-01 Thread Mark Murphy
frantz lohier wrote:
 - my app invokes an ACTION.PICK intent as way to extract phone contact
 from the phone book and populate a database.
 
 When compiling my app using the SDK version 1.6 and a target emulator
 configured at 1.6 level, the following code WORKS:
 
 Intent pickcontact = new Intent(Intent.ACTION_PICK,
 People.CONTENT_URI);
 startActivityForResult(pickcontact, CALL_CONTACTPICKED);
 
 When running the same code (compiled with SDK 1.6) and a target emulator
 at 2.0 level, the above code never return the entries I have populated
 in my the phone book. It's as if the phonebook was always empty.

See if this thread helps:

http://groups.google.com/group/android-developers/browse_thread/thread/91d2a62cb8120009/d834e78d456caeaf?lnk=raot

In other words, check to see what accounts you have. And, no, I don't
know how to do that just yet.

 - When running the emulator in 2.0 mode, the default local input type is
 Japaneese. Any way to change this ?

Interesting...the soft keyboard is English, but the prompt on the
Language  Keyboard settings screen is Japanese...

 - Under the 2.0 emulator, and setting a clean AVD image, if you launch
 the dial button, press menu and select account, you'll probably
 immediatly get a android.process.acore error ...

I assumed launch the dial button is the green CALL button. When you
press the green CALL button and press menu, there is no account menu
choice -- only Clear call log.

 - In the most recent SDK document, I can read that People.CONTENT_URI
 was deprecated after SDK 1.6. Therefore, I've changed the above code to:
 
 Intent pickcontact = new Intent(Intent.ACTION_PICK, AUTHORITY_URI);
 StartActivityForResult(pickcontact, CALL_CONTACTPICKED);
 
 Unfortunatly, with the above, I get a crash right away when invoking
 ACTION_PICK.

What is AUTHORITY_URI? What does your Java stack trace say?

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

Android App Developer Training: http://commonsware.com/training

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


Re: [android-developers] Re: Speech Recognition

2009-11-01 Thread Carmen Delessio
I tried to whittle down GREATER THAN responses by doing this:
queryHeard=queryHeard.replaceAll(greater than,);
queryHeard=queryHeard.replaceAll(greater then,);
queryHeard=queryHeard.replaceAll(crater than,);
queryHeard=queryHeard.replaceAll(craters than,);
queryHeard=queryHeard.replaceAll(crater then,);
queryHeard=queryHeard.replaceAll(craters then,);

I'll have to check out retainAll

Carmen
-- 
Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop


On Sun, Nov 1, 2009 at 8:57 PM, davemac davemac...@gmail.com wrote:

 Once you get back the set of responses you could filter them down to
 those in your valid commands set. Try the retainAll() method on
 matches using your valid commands as the argument. You'll probably
 either get one or zero elements left in matches every time. The same
 thing should work for numbers.

 - dave

 On Nov 1, 5:36 pm, moa mich...@jixel.com wrote:
  I want to use the SR api to handle commands in my application. I know
  at any given point in my application what the valid commands would be
  at that point so would like to limit the results that the SR is
  matched against.
 
  For example, if the only valid commands were Yes or No I would
  like to be able to restrict the SR to only try and match against those
  two words. Otherwise on full vocabulary I get Snow and other false
  words. Limiting the vocabulary should make matching 90%+ accurate on
  limited words.
 
  Is this possible?
 
  Also, can I limit the SR to only match numerics for number input only?
 
  The internal dialer seems to be able to do this sort of this, so can
  I?

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


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

[android-developers] Receiving Missed Call event

2009-11-01 Thread Marc Lester Tan
Hi folks,

anyone have idea how can I make my code receive a Missed Call event?

I know I can receive the RINGING state as well as OFFHOOK state via:

TelephonyManager telephony = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
telephony.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE);

but what I need to have is to capture the event when the calling party
terminated the call.

tia,
Marc

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

[android-developers] call for the other apk file

2009-11-01 Thread tstanly
hi guys,

Now, I have two apk in /data/app which are a.apk and b.apk,
and I want to invoke b.apk from a.apk,


so in the a.apk,
I used the Intent object to achive:
code===
Intent intent=new Intent(android.intent.action.MAIN);
intent.setClassName(com.android.b, test); //package name
and class name
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT );
startActivity(intent);
a.this.finish();
===
but with error by logcat::

error
E/AndroidRuntime(  740): android.content.ActivityNotFoundException:
Unable to fi
nd explicit activity class {com.android.b/test}; have you declared t
his activity in your AndroidManifest.xml?
===

so how can I do for that?
thanks!

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread kevin.hooke
yes please!

On Nov 1, 10:44 am, moazzamk moazz...@gmail.com wrote:
 invite me please

 On Nov 1, 11:50 am, John P. johnny.d.p...@gmail.com wrote:



  I'd like one.  Thank you if you could send it!  =)

  On Nov 1, 1:20 am, Auguste Lunang legraphi...@gmail.com wrote:

   Hi,
   i have some google wave. invits to share. tell me if u want ..
   thx

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


Re: [android-developers] call for the other apk file

2009-11-01 Thread Dianne Hackborn
The class name needs to be fully qualified, i.e. com.android.b.test.

And I am going to assume com.android.b is not the real package name you
are using, just an example. :)

On Sun, Nov 1, 2009 at 6:55 PM, tstanly tsai.sta...@gmail.com wrote:

 hi guys,

 Now, I have two apk in /data/app which are a.apk and b.apk,
 and I want to invoke b.apk from a.apk,


 so in the a.apk,
 I used the Intent object to achive:
 code===
Intent intent=new Intent(android.intent.action.MAIN);
intent.setClassName(com.android.b, test); //package name
 and class name
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT );
startActivity(intent);
a.this.finish();
 ===
 but with error by logcat::

 error
 E/AndroidRuntime(  740): android.content.ActivityNotFoundException:
 Unable to fi
 nd explicit activity class {com.android.b/test}; have you declared t
 his activity in your AndroidManifest.xml?
 ===

 so how can I do for that?
 thanks!

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




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

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

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

[android-developers] Regarding the database schema of Android native database

2009-11-01 Thread richard
Hello all,

 I want to build my own cloned databases of all or some of the
Android native databases like Contacts, Calllogs, Mediastore,
Settings, etc.  I want to know wheher it is possible and How I can
know the database schemas of these databases?  Is there any
documentation on this?


 Thank you very much.

regards
Xiaofeng

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


[android-developers] Re: call for the other apk file

2009-11-01 Thread tstanly
hi Dianne,

thanks so much!!!:)



On Nov 2, 11:11 am, Dianne Hackborn hack...@android.com wrote:
 The class name needs to be fully qualified, i.e. com.android.b.test.

 And I am going to assume com.android.b is not the real package name you
 are using, just an example. :)





 On Sun, Nov 1, 2009 at 6:55 PM, tstanly tsai.sta...@gmail.com wrote:
  hi guys,

  Now, I have two apk in /data/app which are a.apk and b.apk,
  and I want to invoke b.apk from a.apk,

  so in the a.apk,
  I used the Intent object to achive:
  code===
         Intent intent=new Intent(android.intent.action.MAIN);
         intent.setClassName(com.android.b, test); //package name
  and class name
         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
                         Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT );
         startActivity(intent);
         a.this.finish();
  ===
  but with error by logcat::

  error
  E/AndroidRuntime(  740): android.content.ActivityNotFoundException:
  Unable to fi
  nd explicit activity class {com.android.b/test}; have you declared t
  his activity in your AndroidManifest.xml?
  ===

  so how can I do for that?
  thanks!

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

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

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

 - Show quoted text -

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


[android-developers] MediaPlayer -- shoutcast radio streaming creates a lag in playback

2009-11-01 Thread Vladimir
Hello, all!

I've been working on an app to stream some radio content. I get the
stream and save it to a file. When there is enough of it to play, I
invoke MediaPlayer and pass in the file.

Here is the question...since MediaPlayer sees only the portion of the
mp3 file that has already been written when MediaPlayer was
instantiated, I have to instantiate multiple MediaPlayers and call the
seekto() method. But the reinstantiation creates a short gap in
playback -- about half a second (have been testing the app in the
emulator, but I'm guessing the same will happen on the actual phone).

I'm sure this has been solved by others -- any suggestions???

Below is the thread that's called from within my Service once the
initial buffering has been done. All this does is repeatedly calling
the play() method that just reprocessing the mp3 file (while another
thread is writing to that mp3 file).

private final Thread watchRadioPlayer = new Thread() {
public void run() {
while (isDownloading) {
curPosition = 
RadioPlayer.play(OnlineRadioRetriever.fileName,
curPosition);
int delay = curPosition - previousPosition;
previousPosition = curPosition;
try {
synchronized (this) {
wait(delay);
}
} catch (InterruptedException e) {
Log.e(watchRadioPlayer, Exception 
while calling wait: , e);
}
Log.d(watchRadioPlayer, RUNNING for :  + 
delay);
}
Log.d(watchRadioPlayer, The THREAD is dead);
}
};

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


[android-developers] any good uml creation tool for android?

2009-11-01 Thread jerryfan2000
Hi,
Is there any free or opensource Eclipce plug in avaliable for UML
diagram auto generation for Android?

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


[android-developers] Issues with SDK plugin 0.9.4

2009-11-01 Thread kevin.hooke
I recently upgraded from 0.9.2 (I think) to 0.9.4 of the SDK plugin
using Eclipse's 'Check for updates' and for a while everything seemed
ok. Now I'm getting random errors and odd behavior everywhere:

- if I try and run or debug a previously working app in the Emulator
from Eclipse, I get 'Could not find ...apk' errors.

- when the app does start in the emulator, in debug mode the app just
stays in the Emulator with the 'Waiting for debugger' message and the
debugger never attaches

- a previously running app that had a dependency to another source
project in Eclipse now builds ok, but is giving ClassNotFound
exceptions at runtime in the emulator when running.

In general it seems the SDK and the Emulator are in a messed up state.
Is there an easy way to remove the SDK from Eclipse and reinstall? Is
it as simple as removing files from Eclipse's plugins dir?

Thanks, Kevin

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


[android-developers] Re: Receiving Missed Call event

2009-11-01 Thread Nmix
The only way I know is to put an observer on the call log:

ContentResolver logObs = getContentResolver();
logObs.registerContentObserver (CallLog.Calls.CONTENT_URI, false,
new ContentObserver (new Handler()) {
public void onChange(boolean selfChange) {
super.onChange(selfChange);
//query the call log, order descending, and see if first
item is a missed call
//take care not to count each missed call more than once
(could happen)
}
});

I haven't tested this in 2.0 but hopefully it still works.

On Nov 1, 9:35 pm, Marc Lester Tan mail...@gmail.com wrote:
 Hi folks,

 anyone have idea how can I make my code receive a Missed Call event?

 I know I can receive the RINGING state as well as OFFHOOK state via:

 TelephonyManager telephony = (TelephonyManager)
 context.getSystemService(Context.TELEPHONY_SERVICE);
 telephony.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE);

 but what I need to have is to capture the event when the calling party
 terminated the call.

 tia,
 Marc

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


[android-developers] skype ,gtalk intent

2009-11-01 Thread jaimin mehta
hi.
i have some problem regarding skype and gtalk intent
i have application in which i display a list of online skype,gtalk
contacts.
Now when ever i click my online skype or gtalk contacts it should
display a default skype or gtalk chat window with that Contacts

So basically i want to know is there any intent to call Chat screen of
Skype and Gtalk online Contacts

Right now i have intent to call skype and gtalk default application
login screen

GTALK -
Intent i = new Intent(Intent.ACTION_MAIN);
i.setComponent(new ComponentName(com.google.android.talk,
com.google.android.talk.SigningInActivity));
startActivity(i);

SKYPE -
Intent i = new Intent(Intent.ACTION_MAIN);
i.setComponent(
new ComponentName(
 com.skype.android.lite,
 
com.skype.android.lite.SkypeActivity
 )

);
startActivity(i);

but i want to display chat screen of both Skype and Gtalk
can any body help me in my issue

plz its urgent

thanks
jaimin.

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


[android-developers] Re: Issues with SDK plugin 0.9.4

2009-11-01 Thread kevin.hooke
Turns out the ClassNotFound exception was from XStream for not finding
a class for some unexpected XML that was coming back from a WebService
call... completely unrelated to the SDK and the Eclipse plugin
tools...

On Nov 1, 8:05 pm, kevin.hooke kevin.ho...@gmail.com wrote:
 I recently upgraded from 0.9.2 (I think) to 0.9.4 of the SDK plugin
 using Eclipse's 'Check for updates' and for a while everything seemed
 ok. Now I'm getting random errors and odd behavior everywhere:

 - if I try and run or debug a previously working app in the Emulator
 from Eclipse, I get 'Could not find ...apk' errors.

 - when the app does start in the emulator, in debug mode the app just
 stays in the Emulator with the 'Waiting for debugger' message and the
 debugger never attaches

 - a previously running app that had a dependency to another source
 project in Eclipse now builds ok, but is giving ClassNotFound
 exceptions at runtime in the emulator when running.

 In general it seems the SDK and the Emulator are in a messed up state.
 Is there an easy way to remove the SDK from Eclipse and reinstall? Is
 it as simple as removing files from Eclipse's plugins dir?

 Thanks, Kevin

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


Re: [android-developers] Re: Eclair install choked with errors about locks and died horribly leaving corrupted install

2009-11-01 Thread Raphael
On Wed, Oct 28, 2009 at 11:25 PM, Armond Avanes armond...@yahoo.com wrote:
 After all, I'm still on my opinion. In the case of failure, the update
 process should try to COPY the contents instead of moving/renaming. And a
 warning that some garbage have been left on temp directory. For those of
 us on slow connections it's really a pain to download that much and throw it
 away!!! I guess I've downloaded 500MB worth of data so far and still
 trying...

The problem with copying is that if a file can't be replaced in the
middle of the copy operation, what do you want the installer to do?
You'd be left with half installed platform mixing some old stuff and
new stuff. Or it'd have to throw away you old install (which might
fail because of a locked folder anyway).

As for the threading issue, I can't figure it out. It's a very
sequential mode of operation right now.

On your last point, you're right, I shouldn't throw away the download
right away if the download was successful yet the install failed. It
would be easy to allow you to retry installing right away.

Still I'd really like to know what can be locking that thing :(

R/

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


[android-developers] Re: any good uml creation tool for android?

2009-11-01 Thread AJ
Try this http://www.objectaid.com/
I have tried this and its very good. Just drag and drop your java
classes and it creates all dependencies/hierarchy/relation etc.


Thanks,
AJ

On Nov 2, 8:58 am, jerryfan2000 jerryfan1...@gmail.com wrote:
 Hi,
 Is there any free or opensource Eclipce plug in avaliable for UML
 diagram auto generation for Android?

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


RE: [android-developers] Re: Eclair install choked with errors about locks and died horribly leaving corrupted install

2009-11-01 Thread Armond Avanes
Raphael,

The error message says that some files are locked in temp directory not in
destination. At least if you're doing a first-time install (not update), the
destination directory is empty and it's quite safe to copy.

Regards,
Armond

 From: Raphael [mailto:r...@android.com]
 Sent: Monday, November 02, 2009 8:57 AM
 
 On Wed, Oct 28, 2009 at 11:25 PM, Armond Avanes armond...@yahoo.com
 wrote:
  After all, I'm still on my opinion. In the case of failure, the update
  process should try to COPY the contents instead of moving/renaming. And
 a
  warning that some garbage have been left on temp directory. For those
 of
  us on slow connections it's really a pain to download that much and
 throw it
  away!!! I guess I've downloaded 500MB worth of data so far and still
  trying...
 
 The problem with copying is that if a file can't be replaced in the
 middle of the copy operation, what do you want the installer to do?
 You'd be left with half installed platform mixing some old stuff and
 new stuff. Or it'd have to throw away you old install (which might
 fail because of a locked folder anyway).
 
 As for the threading issue, I can't figure it out. It's a very
 sequential mode of operation right now.
 
 On your last point, you're right, I shouldn't throw away the download
 right away if the download was successful yet the install failed. It
 would be easy to allow you to retry installing right away.
 
 Still I'd really like to know what can be locking that thing :(
 
 R/
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Right gravity and hint in EditText is making hint disappear

2009-11-01 Thread and.pradeep
Hi,
 I am trying to apply RIGHT gravity to EditText(google search bar)
with hint and setSingleLine property to true but hint is disappearing.
Have I missing something? below is the code



   EditText mEditText = new EditText(this);

   mEditText.setGravity(Gravity.RIGHT);
   mEditText.setHint(hint);
   mEditText.setSingleLine(true); //this is required but without
this hint appears

   //mEditText.setInputType
(InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT);
   //the above line also makes the hint disappear


Regards
Pradeep

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


[android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread fulanito
I would like one as well, please :-)

fulanito

On Nov 1, 7:20 am, Auguste Lunang legraphi...@gmail.com wrote:
 Hi,
 i have some google wave. invits to share. tell me if u want ..
 thx

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


[android-developers] I want to add GLSurfaceView to SurfaceView.

2009-11-01 Thread Ring
public class CameraStream extends Activity {

private Preview preview;
private GLSurfaceView mGLSurfaceView;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// ウインドウタイトルを消す
requestWindowFeature(Window.FEATURE_NO_TITLE);

 preview = new Preview(this);
 setContentView(preview, new ViewGroup.LayoutParams(200, 200));

// overview = new OverView(this);
// addContentView(overview, new ViewGroup.LayoutParams(-1, -1));

 mGLSurfaceView = new GLSurfaceView(this);
 mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
 mGLSurfaceView.setRenderer(new CubeRenderer(true));
 mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);

 addContentView(mGLSurfaceView, new ViewGroup.LayoutParams(-1, 
-1));
}
}

SurfaceView under GLSurfaceView is displayed when describing it like
this.

I want to have them display GLSurfaceView on SurfaceView.

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


[android-developers] Supporting both 1.5 and 1.6

2009-11-01 Thread limtc
Hi,

I just got myself an Android phone running 1.6 with 240x320 screen.
This required me to use 1.6, but I wish to support 1.5 too.

According to http://d.android.com/guide/practices/screens_support.html
(Strategies for Legacy Applications):

--
Change your application's build properties, such that it compiles
against the Android 1.6 (API Level 4) library, rather than against the
Android 1.5 (or earlier) library. You will not be able to compile your
application against the older platform because of the new manifest
attribute.
...
Set up AVDs for testing your application on Android 1.5 (or earlier
platform). You need AVDs running the older platforms you are
targeting, so that you can test for compatibility and ensure that
there are no functional regressions.

Compile your application against the Android 1.6 library and run it on
the AVDs you created. Observe the way your application looks and runs,
and test all of the user interactions.
--

However, how does it work? Now my codes cannot compile on a 1.5
device, nor does the AVD 1.5 even shown up in the target list! How do
you run it on the AVDs you created?

Thanks!

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


[android-developers] Re: Error using InstrumentationTestRunner with multiple projects

2009-11-01 Thread takashi
Thank you everyone for your replies.

I was able to resolve this error. As hinted above, the problem lied in
my project settings.
In my test project, instead of referencing project B directly, I was
able to export the class files from project A.
(Under the Order and Export tab in the Java Build Path pane.)

This gave me access to all the classes I needed in my test project.

Thanks again for everyone's help.

takashi


On 10月26日, 午前4:37, Ty tseque...@hotmail.com wrote:
 Exactly...

 Let me give you my example (and you can extrapolate it to your
 situation)

 I had project B that depends on project A (a set of exception classes
 exported as an external jar)
 Android Test project C called classes in project B and raised expected
 exceptions defined in project A (depending on project A as an external
 jar) which caught (as negative tests)

 When I ran these tests (as Android JUnit tests) I got the same (cross-
 loader)error

 I removed external jar dependency of A from project C and everything
 ran perfectly after that

 Regards

 Ty

 On Oct 19, 9:27 am, Carl H. charr...@gmail.com wrote:



  I get thiserroras well, I believe it depends on the order of imports
  within your test project. If you have lib1 added to both the test and
  tested project, you ll get something of that sort Still trying to
  sort it out.

  On Oct 14, 4:31 am, Brett Chabot brettcha...@android.com wrote:

   I'm not sure what that exacterrormessage means, but my guess is the
   problem has to do with your test to project mapping. An
   instrumentation (which is what your test project uses to access
   classes in your project under test), can only be targeted to one
   android application. Try splitting up your test project into
   ProjectATest and ProjectBTest, and see if that helps.

   Regards,
   Brett.

   On Wed, Oct 7, 2009 at 10:42 PM, takashi t.hag...@gmail.com wrote:

My application is seperated into three projects in eclipse.
The first one is a client Android Project called Project A.
The second is a server Android Project called ProjectB.
Lastly, I have ProjectATest for testing that has references
dependencies to ProjectA and ProjectB.

When excuting InstrumentationTestRunner in ProjectATest, I get the
followingerrormessage:

[2009-10-08 13:11:47 - ProjectATest]Launching instrumentation
android.test.InstrumentationTestRunner on device emulator-5554
[2009-10-08 13:12:01 - ProjectATest]Test run failed: cross-loader
access from pre-verified class

This is theerroras pulled from LogCat:

10-08 04:11:44.089:ERROR/AndroidRuntime(760): Uncaught handler:
thread main exiting due to uncaught exception
10-08 04:11:44.110:ERROR/AndroidRuntime(760):
java.lang.IllegalAccessError: cross-loader access from pre-verified
class
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
org.gynoid.db.ClassMetadata.initRelation(ClassMetadata.java:181)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
org.gynoid.GynApplication.onCreate(GynApplication.java:41)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.app.Instrumentation.callApplicationOnCreate
(Instrumentation.java:1045)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:
3622)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.app.ActivityThread.access$2500(ActivityThread.java:112)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1729)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.os.Handler.dispatchMessage(Handler.java:99)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.os.Looper.loop(Looper.java:123)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
java.lang.reflect.Method.invokeNative(Native Method)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
java.lang.reflect.Method.invoke(Method.java:521)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
10-08 04:11:44.110:ERROR/AndroidRuntime(760):     at
dalvik.system.NativeStart.main(Native Method)

Has anyone been able to accomplish this or have any suggestions as to
what I am doing wrong?

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

Re: [android-developers] Re: Need an invitation to google Wave?

2009-11-01 Thread Srimal Jayawardena
Me too.. if you still have more ;)

Thanks


On Mon, Nov 2, 2009 at 5:54 PM, fulanito fulanito...@gmail.com wrote:

 I would like one as well, please :-)

 fulanito

 On Nov 1, 7:20 am, Auguste Lunang legraphi...@gmail.com wrote:
  Hi,
  i have some google wave. invits to share. tell me if u want ..
  thx

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




-- 
~
Srimal Jayawardena
BSc (Engineering), BIT, MIET
PhD Student, Australian National University.

Phone(Mobile): +61 422 684 854
Phone(Office): +61 2 6125 1771
Phone(Home): +61 2 6125 1413


ANU Contact Info : http://arp.anu.edu.au/user/3788

http://srimal.sri-lankan.net/
http://srimal-techdiary.blogspot.com/

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

[android-developers] Re: Quick Contacts popup

2009-11-01 Thread Fedor Vlasov
Can't get it working.
I placed it to xml:

QuickContactBadge xmlns:android=http://schemas.android.com/apk/res/
android
android:src=@drawable/logo
android:id=@+id/my_icon/

And the code:

QuickContactBadge tx3 = (QuickContactBadge)findViewById(R.id.my_icon);
tx3.assignContactFromEmail(myem...@gmail.com, false);

When I click over the icon no Badge is displayed. Contacts application
is started instead with contact details displayed.

On Oct 30, 11:02 pm, Jeff Sharkey jshar...@android.com wrote:
 The easiest way is using the new QuickContactBadge widget.  

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