[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Dianne Hackborn
You need to set the theme in the manifest.  The code sample is missing the @
in front of android.  There are various examples in ApiDemos of dialog and
translucent themed activities.

On Mon, Sep 21, 2009 at 10:26 PM, Karthik P  wrote:

> I saw the below portion in the documentation,
> "By setting the theme of an activity to
> android:theme="android:style/Theme.Dialog", your activity will take on the
> appearance of a normal dialog, floating on top of whatever was underneath
> it. You usually set the theme through the android:theme attribute in your
> Android Manifest.xml. The advantage of this over Dialg and AlertDialog is
> that Application has a much better managed."
>
> I tried to follow this but it throwed up an error saying unable to parse
> AndroidManifest.xml. I guess you are saying in the similar lines to make it
> translucent.
>
> My AndroidManifest.xml looked like this
> 
> http://schemas.android.com/apk/res/android";
>   package="com.sample.window"
>   android:versionCode="1"
>   android:versionName="1.0">
>  android:label="@string/app_name">
>android:label="@string/app_name"
> android:theme="android:style/Theme.Dialog">
> 
> 
>  />
> 
> 
> 
> 
> 
>
> then I tried thru the code using
> setTheme(android.R.style.Theme_Dialog);
>
> Above piece of code has built successfully but still I couldnt see any
> floating app, the app was occupying full screen. The same experiment I did
> with Theme.Translucent as well. Any light on this?
>
> Karthik
>
> On Tue, Sep 22, 2009 at 8:47 AM, Dianne Hackborn wrote:
>
>> There is no need to use SurfaceView for that, just make your own activity
>> transparent such as with Theme.Translucent.
>> Anyway, the UI model is designed around having one main fullscreen
>> activity visible to the user (any number of non-fullscreen or translucent
>> activities can be stacked on top of it).  There is no way to have two
>> running side-by-side without significant deep cooperation between the two
>> apps.
>>
>> On Mon, Sep 21, 2009 at 8:05 PM, Rud  wrote:
>>
>>>
>>> Just speculating but maybe using SurfaceView with a transparent
>>> region? The background app might show through the transparent area of
>>> the foreground app.
>>>
>>> Rud
>>>
>>>
>>> On Sep 21, 7:43 am, Karthik P  wrote:
>>> > Does anyone has an idea of how to split the screen into two? Is it
>>> possible
>>> > for me to run an application in one screen and another app in other
>>> screen?
>>> > Any help in this regard will be of great help.
>>> > Karthik
>>>
>>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>>
>>
>>
>>
>
> >
>


-- 
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] HTC Magic Keyboard compatibility issue

2009-09-21 Thread Lee

I've been testing my application on a HTC magic and it's incompatible
with the keyboard that ships with the magic.

My application allows the on-screen keyboard to be displayed when the
user clicks on icon on the screen.  When using the emulator the way
that I determine that the keyboard has been hidden is through
responding to the KEYCODE_BACK keyevent.

On the HTC keyboard there is an additional key that allows the
keyboard to be hidden.  When this key is pressed the keyboard is
hidden but no KeyEvent is sent to the application with the result that
the application is now out of sync with the keyboard state.

In general is there a way to detect software keyboard hide / show
events in a non-vendor specific manner? This would be highly useful
for any application that is implementing custom views.

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



[android-developers] ProgressDialog doesnt show when called...?

2009-09-21 Thread Feras

I have 2 questions actually, while we're on the subject :)

1.  I have some code in my program that processes some stuff, and
takes a few seconds. So I thought logically I can place my dialog show
at the beginning before processing begins, and cancel it at the end.
What ACTUALLY seems to be happening is my dialog shows after the
processing is done... Some demo code to show what I mean with a simple
sleep:

ProgressDialog p = ProgressDialog.show(v.getContext(), "updating
things" "things are updating");
try{
   Thread.sleep(4000);
}catch(Exception e){}
p.cancel();

You would assume it'd show the dialog, process/sleep for 4 seconds,
then cancel it. but it doesnt.


2. How can I remove the title bar entirely from the dialog? I've seen
some apps that do this, and am wondering if there's a simple way to do
this programatically, since I dont see that option in the docs.

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



[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Karthik P
I saw the below portion in the documentation,
"By setting the theme of an activity to
android:theme="android:style/Theme.Dialog", your activity will take on the
appearance of a normal dialog, floating on top of whatever was underneath
it. You usually set the theme through the android:theme attribute in your
Android Manifest.xml. The advantage of this over Dialg and AlertDialog is
that Application has a much better managed."

I tried to follow this but it throwed up an error saying unable to parse
AndroidManifest.xml. I guess you are saying in the similar lines to make it
translucent.

My AndroidManifest.xml looked like this

http://schemas.android.com/apk/res/android";
  package="com.sample.window"
  android:versionCode="1"
  android:versionName="1.0">











then I tried thru the code using
setTheme(android.R.style.Theme_Dialog);

Above piece of code has built successfully but still I couldnt see any
floating app, the app was occupying full screen. The same experiment I did
with Theme.Translucent as well. Any light on this?

Karthik

On Tue, Sep 22, 2009 at 8:47 AM, Dianne Hackborn wrote:

> There is no need to use SurfaceView for that, just make your own activity
> transparent such as with Theme.Translucent.
> Anyway, the UI model is designed around having one main fullscreen activity
> visible to the user (any number of non-fullscreen or translucent activities
> can be stacked on top of it).  There is no way to have two running
> side-by-side without significant deep cooperation between the two apps.
>
> On Mon, Sep 21, 2009 at 8:05 PM, Rud  wrote:
>
>>
>> Just speculating but maybe using SurfaceView with a transparent
>> region? The background app might show through the transparent area of
>> the foreground app.
>>
>> Rud
>>
>>
>> On Sep 21, 7:43 am, Karthik P  wrote:
>> > Does anyone has an idea of how to split the screen into two? Is it
>> possible
>> > for me to run an application in one screen and another app in other
>> screen?
>> > Any help in this regard will be of great help.
>> > Karthik
>>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

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



[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-21 Thread Dianne Hackborn
In fact they are two different applications, running in two different
processes, with two different VMs.  It is just physically impossible to
access each others' objects like that.

On Mon, Sep 21, 2009 at 8:59 PM, Mark Murphy wrote:

>
> > Suppose that my friend has written an activity called A1. And then I
> > install it in my phone and run the application. I don't know what he
> > has done in that Activity. I just have runtime Intent object that used
> > to start A1. But I need to obtain the Activity object for doing some
> > thing on that screen. How can I obtain the reference to that
> > Activity???
>
> You can't. That would be a security violation.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
> >
>


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

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

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



[android-developers] Re: Is it possible to update a widget from an Activity?

2009-09-21 Thread Mark Murphy

> It seems like
> the *only* way a widget can be updated is upon its interval, or when
> the user interacts with it.

That is is incorrect.

> Is there any way to update a widget upon a system event?

The same way you update a widget any other time -- call updateAppWidget()
on your AppWidgetManager.

Here is a sample application that updates a widget either due to the
updateTimeMillis value or due to a user clicking a refresh button on the
widget itself:

http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/TwitterWidget/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Best practice - passing info to new intent

2009-09-21 Thread Mark Murphy

> I am creating a database driven app for managing people.  I am showing
> a list of people with each name in a TextView.  When a TextView is
> clicked, I launch a new intent to show the detail for the person.
>
> My question:  What's the best practices for passing the id of the
> person to the new intent?  The TextView is displaying the name of the
> person, so how do I know the id of the person?  Once I know the id, I
> know how to pass it to the new intent, but I don't know what the best
> way to associate the id of the person to the TextView.  Is there a
> best practice for this?

If you use a ListView with a CursorAdapter, you will have the _ID of the
database row supplied to you in onListItemClick().

If, for some reason, you do not wish to use ListView, you could put the
_ID of the database row in the TextView's "tag" via setTag(), then
retrieve it upon a click via getTag().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Best practice - passing info to new intent

2009-09-21 Thread malandro95

Hi,

I am creating a database driven app for managing people.  I am showing
a list of people with each name in a TextView.  When a TextView is
clicked, I launch a new intent to show the detail for the person.

My question:  What's the best practices for passing the id of the
person to the new intent?  The TextView is displaying the name of the
person, so how do I know the id of the person?  Once I know the id, I
know how to pass it to the new intent, but I don't know what the best
way to associate the id of the person to the TextView.  Is there a
best practice for this?

thanks!

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



[android-developers] Is it possible to update a widget from an Activity?

2009-09-21 Thread Mafian911

Hello all,

I have been looking for a way to update a widget asynchronously, for
example, when the phone receives a text message. I have a broadcast
receiver set up with code that runs upon receiving a message. I also
have an AppWidgetProvider that is set up and running. It seems like
the *only* way a widget can be updated is upon its interval, or when
the user interacts with it.

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



[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-21 Thread Mark Murphy

> Suppose that my friend has written an activity called A1. And then I
> install it in my phone and run the application. I don't know what he
> has done in that Activity. I just have runtime Intent object that used
> to start A1. But I need to obtain the Activity object for doing some
> thing on that screen. How can I obtain the reference to that
> Activity???

You can't. That would be a security violation.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: How to get the InputMethodService to focus on Dialog after dispatch a KeyEvent on Spinner???

2009-09-21 Thread HandsomeboyIT

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

2009-09-21 Thread Brett Chabot

The TouchUtils class sounds like it may be useful to you.

http://developer.android.com/reference/android/test/TouchUtils.html

On Wed, Sep 16, 2009 at 3:05 AM, Arul Deepak
 wrote:
>
> I am building a test automation suite using Instrumentation.
>
> I could not find the key definitions for the following actions in
> android.view.KeyEvent class:
>
> -Drag screen to right.
> -Drag app tab up.
> -Drag status bar down.
> -Slide keyboard out.
> -Slide keyboard in.
>
> Is there a method for generating these actions as key events?  Is
> there any other method of simulating these actions in the program?
>
> I am using android.test.InstrumentationTestCase.sendKeys(int... keys)
> function.
>
> >
>

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



[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-21 Thread HandsomeboyIT

hi Roman,
Thanks for your reply. But your answer is not thing as I expected.
Suppose that my friend has written an activity called A1. And then I
install it in my phone and run the application. I don't know what he
has done in that Activity. I just have runtime Intent object that used
to start A1. But I need to obtain the Activity object for doing some
thing on that screen. How can I obtain the reference to that
Activity???
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Multiple notifications with one status bar icon

2009-09-21 Thread Dianne Hackborn
No there is not, and the space in the notification panel is so limited that
we really don't want applications doing that kind of stuff.  Have one item
that the user can tap to get to all the details.

On Mon, Sep 21, 2009 at 2:45 PM, liordav  wrote:

>
> hi
> how is that gonna help?
> I have the same problem, I would like to have several notifications
> but only one icon on the status bar
>
> did someone find a solution for that?
>
>
> On 21 ספטמבר, 03:14, Bryan  wrote:
> > Make that trigger a different intent, not action.
> >
> > On Sep 21, 5:09 am, Bryan  wrote:
> >
> >
> >
> > > Is there a way to have one status bar icon, but multiple entries in
> > > the notification pull down?
> > > I need to generate a few notifications that each trigger a different
> > > action when clicked, but I don't want to fill the status bar with
> > > useless icons in the process. Being able to create a notification
> > > without an icon at all would work too.
>
> >
>


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

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

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



[android-developers] Re: How to turn off screen

2009-09-21 Thread Dianne Hackborn
Do you know of any devices that actually have a proximity sensor?  The G1
and myTouch certainly don't, and thus the current platform doesn't have
support for doing anything with the sensor.  If there is some device that
does, this is not a standard platform feature.

On Mon, Sep 21, 2009 at 3:14 PM, James Chou wrote:

>
> I have an application that needs to turn on/off the screen using the
> proximity sensor like what most dialer applications do when a user is
> making a phone call.
>
> I cannot seem to find a way to turn on/off the screen at will.
>
> Any ideas?
>
> >
>


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

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

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



[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Dianne Hackborn
There is no need to use SurfaceView for that, just make your own activity
transparent such as with Theme.Translucent.
Anyway, the UI model is designed around having one main fullscreen activity
visible to the user (any number of non-fullscreen or translucent activities
can be stacked on top of it).  There is no way to have two running
side-by-side without significant deep cooperation between the two apps.

On Mon, Sep 21, 2009 at 8:05 PM, Rud  wrote:

>
> Just speculating but maybe using SurfaceView with a transparent
> region? The background app might show through the transparent area of
> the foreground app.
>
> Rud
>
>
> On Sep 21, 7:43 am, Karthik P  wrote:
> > Does anyone has an idea of how to split the screen into two? Is it
> possible
> > for me to run an application in one screen and another app in other
> screen?
> > Any help in this regard will be of great help.
> > Karthik
> >
>


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

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

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



[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Rud

Just speculating but maybe using SurfaceView with a transparent
region? The background app might show through the transparent area of
the foreground app.

Rud


On Sep 21, 7:43 am, Karthik P  wrote:
> Does anyone has an idea of how to split the screen into two? Is it possible
> for me to run an application in one screen and another app in other screen?
> Any help in this regard will be of great help.
> Karthik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android-bluetooth api issue

2009-09-21 Thread Breese.Kay

hi,all.
 I use the android-bluetooth control my T-mobile G1 phone.But when I
scan remotedevice I cause an ?null? Exception. this is the part of
code.

try {
  if(localBtDev.isScanning() == false){
   //localBtDev.scan();
}
} catch (Exception e1) {
 // TODO Auto-generated catch block
 tv.setText("cann't init scanner "+e1.getMessage());
//return;
}

this code always output "cann't init scanner null".

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



[android-developers] Issue updating ListView content - display does not get updated

2009-09-21 Thread Florent Chauveau

Hello everyone,

I have a 3 activity app. The third activity displays a ListView with a
custom Adapter. Data comes from a custom built List. On the
activity, I have 3 ToggleButtons and one ListView. Each togglebutton
is supposed to change the content of the ListView.

I tried this differents ways (explained below), but the bug is always
the same : the list does not get updated UNLESS I tap the HOME button,
and then go back to the app. After doing this, my app is working fine,
and the content is changing.

Here's what I tried :

- using 3 ListViews with 3 instances of my custom adapter.
(the rest is with 1 ListView)
- having 3 instances of my custom adapter,
- having 1 instance of my custom adapter, changing the content, and
calling notifyDataSetChanged(),
- disabling the drawing caches (setDrawingCacheEnabled,
setScrollingCacheEnabled),
- calling invalidate(), requestLayout(), scrollTo() on the ListView...
- extending my custom adapter from BaseAdapter and from ArrayAdapter,
- extending my activity from ListActivity and using setListAdapter.

None of the above worked.

I must do something wrong, but what ?

Here is some code :

// my custom Adapter
public class GroupedValueAdapter extends BaseAdapter {
private Context mContext;
private List mItems;

public GroupedValueAdapter(Context context, List items)
{
mContext = context;
mItems = items;
}
public View getView(int position, View convertView, ViewGroup parent)
{
View row = convertView;
if (row == null) {
LayoutInflater inflater = (LayoutInflater) mContext

.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
row = inflater.inflate(R.layout.listitem, null);
}
TextView label = (TextView) row.findViewById(R.id.txtItemLabel);
GroupedValue group = (GroupedValue) this.getItem(position);
label.setText(group.value);
ImageView icon = (ImageView) row.findViewById(R.id.img1);
icon.setVisibility(group.onFirst ? View.VISIBLE : View.GONE);
icon = (ImageView) row.findViewById(R.id.img2);
icon.setVisibility(group.onSecond ? View.VISIBLE : View.GONE);
icon = (ImageView) row.findViewById(R.id.img3);
icon.setVisibility(group.onThree ? View.VISIBLE : View.GONE);
return row;
}
public int getCount() {
return mItems.size();
}
public void updateItems(List items) {
mItems = items;
notifyDataSetChanged();
}
public Object getItem(int position) {
return mItems.get(position);
}
public long getItemId(int position) {
return position;
}
}

In my activity :

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.viewpeoplegroup);
Intent intent = getIntent();
mGroup = (PeopleGroup) intent

.getSerializableExtra("com.digitrad.organip.PeopleGroup");
/* HEADER */
if (mGroup.photo.length() > 0) {
setPhoto();
}
TextView tv = (TextView) findViewById(R.id.txtPName);
tv.setText(mGroup.name);
tv = (TextView) findViewById(R.id.txtPLocation);
tv.setText(mGroup.location);
Button btn = (Button) findViewById(R.id.btnCall);
btn.setOnClickListener(mFakeTabClickListener);
btn = (Button) findViewById(R.id.btnInvite);
btn.setOnClickListener(mFakeTabClickListener);
btn = (Button) findViewById(R.id.btnVoicemail);
btn.setOnClickListener(mFakeTabClickListener);
/* LIST */
mList = getListView();
// mList.setAdapter(new GroupedValueAdapter(this, 
mGroup.numbers));
setListAdapter(new GroupedValueAdapter(this, mGroup.numbers));
mList.setDrawingCacheEnabled(false);
mList.setScrollingCacheEnabled(false);
if (mGroup.canInvite) {
showList("INVITE");
} else if (mGroup.canEmail && mGroup.canCall == false) {
showList("VOICEMAIL");
} else {
showList("CALL");
}
}

private void showList(String s) {
GroupedValueAdapter adapter = (GroupedValueAdapter) 
mList.getAdapter
();
if (s == "CALL") {
mList.setOnItemClickListener(mCallClickListener);
adapter.updateItems(mGroup.numbers);
} else if (s == "V

[android-developers] How to turn off screen

2009-09-21 Thread James Chou

I have an application that needs to turn on/off the screen using the
proximity sensor like what most dialer applications do when a user is
making a phone call.

I cannot seem to find a way to turn on/off the screen at will.

Any ideas?

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



[android-developers] Re: Multiple notifications with one status bar icon

2009-09-21 Thread liordav

hi
how is that gonna help?
I have the same problem, I would like to have several notifications
but only one icon on the status bar

did someone find a solution for that?


On 21 ספטמבר, 03:14, Bryan  wrote:
> Make that trigger a different intent, not action.
>
> On Sep 21, 5:09 am, Bryan  wrote:
>
>
>
> > Is there a way to have one status bar icon, but multiple entries in
> > the notification pull down?
> > I need to generate a few notifications that each trigger a different
> > action when clicked, but I don't want to fill the status bar with
> > useless icons in the process. Being able to create a notification
> > without an icon at all would work too.

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



[android-developers] Re: How to show a dialog in thread.run()

2009-09-21 Thread xing.ye

Thank you Mike!
I changed my code like this:
public class GameView extends SurfaceView implements
SurfaceHolder.Callback {
...
Dialog dialog = new Dialog(app);
class GameThread extends Thread {
public void run() {
Looper.prepare();
while (bRun) {
switch(flag){
case 0:
break;
case 1:
app.runOnUiThread(new Runnable() {
@Override
public void run() {
dialog.show();
}
});
flag=0;
break;
}
}
}
}
...
}

It works fine! Thanks All!

On Sep 22, 4:36 am, Mike  wrote:
> Hello,
>
> One thing that you'll need to make sure to do is run this code on the
> UI thread.  You should do this any time you are dealing with Android
> Views/Widgets.  One way you can do this by wrapping the code in case 1
> in a Runnable and then use your Activity's runOnUiThread method.
>
> - Mike
>
> On Sep 21, 11:41 am, xingye  wrote:
>
> > My code:
> > public class GameView extends SurfaceView implements
> > SurfaceHolder.Callback {
> >         ...
> >         Dialog dialog = new Dialog(app);
> >         class GameThread extends Thread {
> >                 public void run() {
> >                         Looper.prepare();
> >                         while (bRun) {
> >                                 switch(flag){
> >                                 case 0:
> >                                         break;
> >                                 case 1:
> >                                         dialog.show();
> >                                         flag=0;
> >                                         break;
> >                                 }
> >                         }
> >                 }
> >         }
> >         ...}
>
> > The dialog.show() was called, but noting happened.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView - disallow breaking out

2009-09-21 Thread Jason Proctor

(what i meant was, the WebView should follow redirects and keep them 
in the same frame.)

so -- do you have a WebViewClient installed in this WebView instance?

if not, install a new one. this will get rid of the default one which 
opens links in the main browser. what's probably happening is that 
the WebView is handling the redirect as a click on a link, and going 
through the installed WebViewClient. suboptimal, IMHO.



>Jason - I do want to redirect. What I also want is to stay in the
>original WebView window, right now it starts there but then app pops-
>up mobile browser and page is displayed in that browser rather than
>the app


-- 
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] how to avoid texture wrapping in glDrawTexiOES ?

2009-09-21 Thread Max R.

Hi, I'm basically trying to resize 512x512 texture into 200x200 at
(0,100).

So, I use this function.
((GL11Ext) gl).glDrawTexiOES(0, 100, 0, 200, 200);

It shows what I want but it also displays the mirror portion of upper
image on top screen (0,0) size = 200x100.

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



[android-developers] Re: WebView - disallow breaking out

2009-09-21 Thread droidin.net

Jason - I do want to redirect. What I also want is to stay in the
original WebView window, right now it starts there but then app pops-
up mobile browser and page is displayed in that browser rather than
the app

On Sep 21, 3:45 pm, Jason Proctor 
wrote:
> do you have a WebViewClient installed in this WebView instance?
>
> (personally i think that WebView should follow redirects, as that's
> usually the intent of the user/caller, but defeating the default
> behaviour ain't so bad, so...)
>
> >I'm using WebView#loadUrl() to load page inside my app. Unfortunately,
> >the original URL redirects to some other URL and that 2nd redirect
> >(302) basically opens external browser and loads final page into it. I
> >really don't want to do anything with the page I'm loading and don't
> >want to add any code e.g. load page with HttpClient and use
> >WebView#loadDataWithBaseURL since then I have to deal with relative
> >vs. absolute URL
> >BTW - I don't think that it's JS that breaks out of original WebView,
> >it seem to be a byproduct of redirect. How can I stay within the
> >original WebView?
>
> --
> 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] how can i use my kml file in a html file

2009-09-21 Thread Stefan

Hello,

i have found a nice javascript (google-api), where i can make an
overlay on a map:
...
function initialize() {
  if (GBrowserIsCompatible()) {
geoXml = new GGeoXml("http://mapgadgets.googlepages.com/cta.kml";);

map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(41.875696,-87.624207), 11);
map.addControl(new GLargeMapControl());
map.addOverlay(geoXml);
 ...

My question is, how can i use my kml file (on a sd card) istead of the
link in the GGeoXML object

geoXml = new GGeoXml("http://mapgadgets.googlepages.com/cta.kml";);


My idea is to use:

HttpGet get = new HttpGet("A_HTML_FILE_WITH_HTMLGOOGLEAPI.html");
client.execute(get);

In this html file i load the javascript. Must i append "?
param=THE_KML_FILE_IN_A_BUFFERED_READER_OBJECT_OR_SOMETHING_LIKE_THAT"
to get the data available?

Thanks,
Stefan

PS: I don't find a GGeoXml function in the "google api for android".
So i decide to use the "html google api". And i can search for a
direction between two point in the "html google-api"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL 2D Game Framework

2009-09-21 Thread rich...@stickycoding.com

Alright, I'll take it on board and think about changing it. I really
don't mind if people do whatever they want to with the code, just
thought it might encourage a little more of a push on the
contributions. But considering it, you might be right that its putting
people off.

Maybe change things next update :)

Richard

On Sep 22, 12:28 am, Dan Sherman  wrote:
> I'm not gunna try to talk you out of it, it's your code, and you should pick
> the license that suits your ambitions for the project.
>
> However, I can see it putting off a lot of users that might be interested in
> working with it, who can't justify sinking weeks of time into a planned
> commercial game, with no real way of knowing if/when the license will change
> to be favorable enough to release the game.
>
> I'm not too knowledgable on the LGPL, but the Mozilla license would be
> something to look into.
>
> Regardless, the project looks good.
>
> - Dan
>
> On Mon, Sep 21, 2009 at 7:21 PM, Jason Proctor <
>
>
>
> jason.android.li...@gmail.com> wrote:
>
> > IMHO, this purpose would be better served by adopting a more liberal
> > "library" type licence like LGPL or Mozilla.
>
> > full GPL puts a lot of people off, for reasons already covered.
>
> > >Thanks for the suggestions guys, really appreciate it. I've had dozens
> > >of suggestions and thankyou's emailed in today alone.
>
> > >In regards to licensing, I was going to keep it as GPL for a little
> > >while longer.
>
> > >I figured, with the engine at the state its in now, its unlikely you
> > >will be able to make a profitable, stable game ready for the market
> > >without fixing some of the bugs and issues that it has. Which would
> > >mean an encouragement for people to make suggestions and
> > >contributions.
>
> > >When the engine is in a better shape, I have full intentions of making
> > >it totally free to use in any of your commercial games.
>
> > >Richard
>
> > --
> > 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: My app is getting killed while I launch an external intent

2009-09-21 Thread Dianne Hackborn
Your activity will be restarted before it is given the data.  You need to
remember in your saved state whatever information you need to be able to
handle the received data.

On Mon, Sep 21, 2009 at 1:41 PM, Timothy DeWees wrote:

>
> It's not just what I need to remember, the other action is sending me
> data which I get in onActionComplete.  Any thoughts?
>
> On Aug 22, 3:05 pm, Dianne Hackborn  wrote:
> > That is the normal behavior -- your app is in the background, not
> relevant
> > to what the user is currently doing, so its process may be killed to use
> > memory elsewhere.  You deal with this by implementing
> onSaveInstanceState()
> > to note anything to need to remember and collecting that from the state
> you
> > later receive in onCreate().
> >
> > On Fri, Aug 21, 2009 at 6:47 PM, Timothy DeWees  >wrote:
> >
> >
> >
> >
> >
> > > Hello,
> >
> > > I'm hoping for some help on ways to solve a problem.  From my
> > > application, I launch an intent that returns a result I need to read
> > > (Zebra Crossing).  But if the user takes a while to scan the barcode
> > > (low light, wobbly hands, etc), my main intent is getting killed.
> > > When the app re-launches, I'm not hitting the event for the intent
> > > returning.
> >
> > > Is there some start parameter to tell me the app is being re-launched
> > > and returning from a child intent?
> >
> > > Any suggestions on this would be helpful!
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
> >
>


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

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

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

2009-09-21 Thread Dianne Hackborn
These are new permissions introduced in 1.6, so they have to be
automatically be given to old applications.  If you set
android:targetSdkVersion="4" then your app will be considered a newer app
and you need to explicitly request the permissions.

On Mon, Sep 21, 2009 at 5:19 PM, Christopher  wrote:

>
> I have a widget that updates every hour and is working fine.
>
> However does anyone else have the problem that on install on a 1.6
> system that their app asks for permission to phone calls and storage?
> Not a problem in 1.5, but even "Hello World" asks for it on 1.6 roms.
>
> Chris
>
> On Sep 20, 4:15 pm, BoD  wrote:
> > Hi!
> > I'm developing a Widget that updates every 10 seconds
> > (android:updatePeriodMillis="1").
> > On the 1.5 emulator, as well as on my adp1, it works as expected.
> > On the 1.6 emulator, my widgets are not updated. Apparently,
> > AppWidgetProvider.onUpdate(...) is never called.
> >
> > Is there something I missed?
> >
> > Thanks a lot,
> >
> > BoD
> >
>


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

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

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



[android-developers] Re: Widgets changes with 1.6?

2009-09-21 Thread Christopher

I have a widget that updates every hour and is working fine.

However does anyone else have the problem that on install on a 1.6
system that their app asks for permission to phone calls and storage?
Not a problem in 1.5, but even "Hello World" asks for it on 1.6 roms.

Chris

On Sep 20, 4:15 pm, BoD  wrote:
> Hi!
> I'm developing a Widget that updates every 10 seconds
> (android:updatePeriodMillis="1").
> On the 1.5 emulator, as well as on my adp1, it works as expected.
> On the 1.6 emulator, my widgets are not updated. Apparently,
> AppWidgetProvider.onUpdate(...) is never called.
>
> Is there something I missed?
>
> Thanks a lot,
>
> BoD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to upgrade the ant build.xml file from 1.1 project to 1.5

2009-09-21 Thread Xavier Ducrohet

Hi Paul,

the  task import the actual build rules from the platform
folder. For example if you are targeting android 1.6 it will import
/platforms/android-1.6/templates/android_rules.xml
This is the file that declares the 'debug' and 'release' and other targets.

If you want to customize the build script, do the following (btw, most
of this is in the build.xml comments, which were improved for 1.6)

* change  to . This will run the
setup task to only set some properties, but not import the rules file.
* copy paste the content of the android_rules.xml file from the
platform you are targetting (minus the top level  node), and
paste it all in your build.xml file, *after* the call to the setup
task.
* modify the pasted targets to fit your needs.

Xav

On Mon, Sep 21, 2009 at 3:08 PM, Paul Ling Yun  wrote:
>
> Thank you firstly for your reply.
>
> But I still didn't get it. What does the update project process do?
> How many default tasks it will generate? Could it use to build the
> project with ant if I have not my special customize task? What i got
> from this process is an almost empty build.xml with two property
> files. There were only three property tags, one path tags, one taskdef
> tag and one setup tag, neither debug task, nor release task. how can
> it run with ant?
>
> In SDK 1.1, I remember there was a tool that generated most of build
> script for me and I only change the apk sign part. so I can run it
> with ANT to build my project soon.
>
> What's the  Ant plugins?
>
> Paul
>
> On Sep 21, 12:44 pm, "Mark Murphy"  wrote:
>> > I followed the instruction in 1.5 SDK upgrading at link
>> >http://developer.android.com/sdk/1.5_r3/upgrading.html, but i cannot
>> > got the whole build.xml file because there is not any task in it. I
>> > thought the update project process will copy tasks from the
>> > build.xml.old to new build.xml, but it didn't. There is not any hint
>> > mention I should copy it myself in that document. Was the process
>> > failed or I have to copy it myself?
>>
>> The tasks that Android supplies are now held in Ant plugins, so you will
>> not see them in the build.xml file itself. If you created your own Ant
>> tasks, you will need to copy those over.
>>
>> > Do i need do any change for my old
>> > tasks in the new build.xml?
>>
>> That would depend, I suppose, on what those tasks did.
>>
>> --
>> Mark Murphy (a Commons Guy)http://commonsware.com
>> Android App Developer Books:http://commonsware.com/books.html
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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



[android-developers] Re: OpenGL 2D Game Framework

2009-09-21 Thread Dan Sherman
I'm not gunna try to talk you out of it, it's your code, and you should pick
the license that suits your ambitions for the project.

However, I can see it putting off a lot of users that might be interested in
working with it, who can't justify sinking weeks of time into a planned
commercial game, with no real way of knowing if/when the license will change
to be favorable enough to release the game.

I'm not too knowledgable on the LGPL, but the Mozilla license would be
something to look into.

Regardless, the project looks good.

- Dan

On Mon, Sep 21, 2009 at 7:21 PM, Jason Proctor <
jason.android.li...@gmail.com> wrote:

>
> IMHO, this purpose would be better served by adopting a more liberal
> "library" type licence like LGPL or Mozilla.
>
> full GPL puts a lot of people off, for reasons already covered.
>
>
>
> >Thanks for the suggestions guys, really appreciate it. I've had dozens
> >of suggestions and thankyou's emailed in today alone.
> >
> >In regards to licensing, I was going to keep it as GPL for a little
> >while longer.
> >
> >I figured, with the engine at the state its in now, its unlikely you
> >will be able to make a profitable, stable game ready for the market
> >without fixing some of the bugs and issues that it has. Which would
> >mean an encouragement for people to make suggestions and
> >contributions.
> >
> >When the engine is in a better shape, I have full intentions of making
> >it totally free to use in any of your commercial games.
> >
> >
> >Richard
> >
>
> --
> 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: OpenGL 2D Game Framework

2009-09-21 Thread rich...@stickycoding.com

Thanks for the suggestions guys, really appreciate it. I've had dozens
of suggestions and thankyou's emailed in today alone.

In regards to licensing, I was going to keep it as GPL for a little
while longer.

I figured, with the engine at the state its in now, its unlikely you
will be able to make a profitable, stable game ready for the market
without fixing some of the bugs and issues that it has. Which would
mean an encouragement for people to make suggestions and
contributions.

When the engine is in a better shape, I have full intentions of making
it totally free to use in any of your commercial games.


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



[android-developers] OpenGL 2D Game Framework

2009-09-21 Thread Jason Proctor

IMHO, this purpose would be better served by adopting a more liberal 
"library" type licence like LGPL or Mozilla.

full GPL puts a lot of people off, for reasons already covered.



>Thanks for the suggestions guys, really appreciate it. I've had dozens
>of suggestions and thankyou's emailed in today alone.
>
>In regards to licensing, I was going to keep it as GPL for a little
>while longer.
>
>I figured, with the engine at the state its in now, its unlikely you
>will be able to make a profitable, stable game ready for the market
>without fixing some of the bugs and issues that it has. Which would
>mean an encouragement for people to make suggestions and
>contributions.
>
>When the engine is in a better shape, I have full intentions of making
>it totally free to use in any of your commercial games.
>
>
>Richard
>

-- 
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: Widgets changes with 1.6?

2009-09-21 Thread BoD

Well, I tried to remove the onReceive() hack to fix the 1.5 onDelete
bug, but it didn't change anything.
When adding logging, it really shows that onReceive() is actually
never called by the system every x milliseconds as it should. Which
is... worrying!

Anybody from Android team? :)

Thanks a lot!

BoD


On Sep 21, 5:33 pm, Norbert  wrote:
> Hi BoD,
>
> I'm having the same issue with my widget. It's working fine in 1.5
> I'm wondering if this has to do with the bugfix for the onDelete()-
> Call in 1.5.
>
> Norbert
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: WebView - disallow breaking out

2009-09-21 Thread Jason Proctor

do you have a WebViewClient installed in this WebView instance?

(personally i think that WebView should follow redirects, as that's 
usually the intent of the user/caller, but defeating the default 
behaviour ain't so bad, so...)



>I'm using WebView#loadUrl() to load page inside my app. Unfortunately,
>the original URL redirects to some other URL and that 2nd redirect
>(302) basically opens external browser and loads final page into it. I
>really don't want to do anything with the page I'm loading and don't
>want to add any code e.g. load page with HttpClient and use
>WebView#loadDataWithBaseURL since then I have to deal with relative
>vs. absolute URL
>BTW - I don't think that it's JS that breaks out of original WebView,
>it seem to be a byproduct of redirect. How can I stay within the
>original WebView?
>

-- 
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] WebView - disallow breaking out

2009-09-21 Thread droidin.net

I'm using WebView#loadUrl() to load page inside my app. Unfortunately,
the original URL redirects to some other URL and that 2nd redirect
(302) basically opens external browser and loads final page into it. I
really don't want to do anything with the page I'm loading and don't
want to add any code e.g. load page with HttpClient and use
WebView#loadDataWithBaseURL since then I have to deal with relative
vs. absolute URL
BTW - I don't think that it's JS that breaks out of original WebView,
it seem to be a byproduct of redirect. How can I stay within the
original WebView?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to upgrade the ant build.xml file from 1.1 project to 1.5

2009-09-21 Thread Paul Ling Yun

Thank you firstly for your reply.

But I still didn't get it. What does the update project process do?
How many default tasks it will generate? Could it use to build the
project with ant if I have not my special customize task? What i got
from this process is an almost empty build.xml with two property
files. There were only three property tags, one path tags, one taskdef
tag and one setup tag, neither debug task, nor release task. how can
it run with ant?

In SDK 1.1, I remember there was a tool that generated most of build
script for me and I only change the apk sign part. so I can run it
with ANT to build my project soon.

What's the  Ant plugins?

Paul

On Sep 21, 12:44 pm, "Mark Murphy"  wrote:
> > I followed the instruction in 1.5 SDK upgrading at link
> >http://developer.android.com/sdk/1.5_r3/upgrading.html, but i cannot
> > got the whole build.xml file because there is not any task in it. I
> > thought the update project process will copy tasks from the
> > build.xml.old to new build.xml, but it didn't. There is not any hint
> > mention I should copy it myself in that document. Was the process
> > failed or I have to copy it myself?
>
> The tasks that Android supplies are now held in Ant plugins, so you will
> not see them in the build.xml file itself. If you created your own Ant
> tasks, you will need to copy those over.
>
> > Do i need do any change for my old
> > tasks in the new build.xml?
>
> That would depend, I suppose, on what those tasks did.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Question about API Demo Remote Service example

2009-09-21 Thread n179911

Hi,

I am studying RemoteService example in Android's APISample.  In the
manifest file, it declares the service like this:
My question is how can I specify the service to be 'auto-start', i.e.
it gets start whenever the phone start?











Thank you.

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



[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Mike

Yeah - as far as I know, the current activity for the currently
running foreground app is the one that has claim to the entire
screen.  So, I don't think this is possible either.


- Mike

On Sep 21, 11:05 am, "Mark Murphy"  wrote:
> > Does anyone has an idea of how to split the screen into two? Is it
> > possible
> > for me to run an application in one screen and another app in other
> > screen?
>
> That is not presently possible in Android.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Bug in GL10.texSubImage2D?

2009-09-21 Thread Robert Green

Mark,

1)  It depends.  It may be fastest, but the lag you're noticing is
probably the resource manager loading the bitmap.  Do whatever you can
to preload stuff.  If you can fit all of your textures into vram at
once, do it.  Canvas.drawBitmap is pretty fast.  texImage2D is pretty
fast on a G1 but slow on the emulator.  I'd make sure that when you
switch textures, you're not loading it from disk (should already be
loaded somehow) and you're not allocating new bitmaps or allocating
new texture space.  I have animating textures but I put every frame of
the animation onto a 512x512 texture and animate by switching which
group of texture coordinates I use.  It works for animating on a quad
but would be much harder on a complex object.

2)  Does the problem happen on both the emulator and a real device?
If so, it's probably not a bug but is something wrong with what you're
doing.  The emulator has a different opengl implementation than a
device, which is a hardware implementation.

On Sep 21, 11:15 am, Mark Gjøl  wrote:
> Thank you for that elaborate response. Your assumptions were all
> correct (and I _did_ do a little too much work when I called
> texImage2D, I only really needed to do that once, not every time I
> updated the texture).
>
> I now make a Canvas, which I draw my dynamic bitmap to, and just bind
> that texture with texImage2D without using texSubImage2D. This works
> perfectly, however, I feel a slight lag (although I haven't done any
> performance tests on it) when I change the texture, that I didn't
> notice before. I am certain my textures are at most 100x100 but
> usually smaller on one dimension. As I don't replace the entire
> texture, but only a portion of it, texSubImage2D might be the faster
> choice - if only it worked. Also, I didn't get any GL errors
> (gl.getError()) when using texSubImage2D.
>
> So what's left for me is this:
> * Is drawing the image to a canvas using drawBitmap the fastest way to
> make a npot texture pot?
> * Is texSubImage2D broken, in which case I should report it?
>
> Regards, Mark Gjøl
>
> On Sep 21, 2:32 am, Robert Green  wrote:
>
> > I'm a little confused by what you're doing.
>
> > You're first calling texImage2D, which uploads mImg to vram as your
> > texture.
> > The very next call you make is texSubImage2D with an offset of 0 and
> > 0, which uploads "texture" to vram, overwriting mImg.
>
> > I'm assuming that:
>
> > 1)  mImg is 128x128
> > 2)  You first upload mImg to allocate a space as big as mImg
> > 3)  None of your textures are greater than mImg's width or height
>
> > I'm going to suggest you change your code to do the following:
>
> > 1)  Create a bitmap of 128x128 or whatever size is appropriate for
> > each dynamic texture, unless you have many different images you want
> > to use.
> > 2)  Draw your texture to that bitmap
> > 3)  Upload that texture using regular texImage2D (in my tests, it's
> > faster for full-size updates than using texSubImage2D).
> > 4)  If using one "scratchpad" bitmap, just erase it and reuse.
> > Remember to .recycle() when done with it.
>
> > basically, I suggest that you only upload once to vram and do any pre-
> > processing on the client-side using a Bitmap or many Bitmaps depending
> > on your app/game.  That's how I do it.  You can texImage2D the same
> > textureId as many times as you like.
>
> > Also, I recommend using GL_NICEST for perspective correction when
> > dealing with large projected quads.  It's not as fast as GL_FASTEST
> > but for big triangles, it's the only way to guarantee they won't get
> > really weird when cut off at near-Z.
>
> > I have "renderer" classes that render game objects for my games.  My
> > renderers all look like this:
>
> > public MyRenderer(GL10 gl) {
> >   // read geometry from disk resource
> >   reInit(gl);
>
> > }
>
> > public void reInit(GL10 gl) {
> >   // create VBOIds
> >   // upload VBOs
> >   // create textureIds
> >   // upload textures
>
> > }
>
> > public void draw(GL10 gl, GameObject obj) {
> >   // bind VBOs and TextureIds
> >   // transform for obj
> >   // draw elements
>
> > }
>
> > so if I wanted a dynamic texture, I'd just add in this:
>
> > public void setTexture(GL10 gl, Bitmap texture) {
> >   // bind to appropriate textureId
> >   // upload whichTex
>
> > }
>
> > though I'd never let the main renderer hang on to bitmaps that an
> > object render will be drawing - I would be managing that in the object
> > renderer, so probably passing a sort of pointer or configuration,
> > usually in the form of an int constant, like:
>
> > public static final int TEXTURE_HAPPY_FACE = 0;
> > public static final int TEXTURE_ANGRY_FACE = 1;
>
> > public void setTexture(GL10 gl, int whichTex) {
> >   // bind to appropriate textureId
> >   // upload bitmap associated with whichTex
> >   if (whichTex == TEXTURE_HAPPY_FACE) {
> >     // upload happy face bitmap that we loadad probably in our
> > constructor or somewhere before runtime.
> >   }
>
> > }
>
> > I know I'm not so

[android-developers] Re: OpenGL and pause/resume

2009-09-21 Thread Robert Green

Check to make sure that at the time of resume, you're not hanging on
to old surface holders or anything like that.  I use GLSurfaceView
onPause and onResume and they work correctly for me on the G1 and
Emulator.

On Sep 21, 8:18 am, Guian  wrote:
> well, I did put those lines in the onPause/onResume methods but still
> have the black screen with this error in the logcat:
>
> ERROR/SurfaceComposerClient(15353): using an invalid surface id=0,
> identity=1431 should be 1435
>
> Doesn't seem exactly the same error...
> can anybody help please ?
>
> On 30 août, 09:59, Cor  wrote:
>
> > In the mean time I found this was a classic RTFM case ;-)
>
> > If you use GLSurfaceView you have to call view.onPause() and
> > view.onResume() respectively in the activities onPause() and anResume
> > () methods
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 Toast Duration

2009-09-21 Thread alkar

I've been trying to make a custom Toast-like Dialog and went with the
theme-d constructor, but for some reason the view expands from top to
bottom and the theme looks all weird.

Also, Jason, if you made it already, could you tell me how you managed
to position the Toast-like Dialog near the bottom of the screen, just
as a normal toast does?

Finally, is it possible to duplicate the non-selectable, non-
interfering-with-UI behaviour of the Toast? I thought it would be done
by setting the Dialog non-focusable, but apparantly can't do that.

Thanks in advance,
alkar

On Sep 21, 5:00 am, Dianne Hackborn  wrote:
> Dialog has a constructor taking a theme.
>
> On Sun, Sep 20, 2009 at 4:07 PM, Jason Van Anden
> wrote:
>
>
>
>
>
> > I was hoping I could simply apply the theme in xml rather than have to
> > create an Activity and apply it in onCreate.
>
> > Thanks for clearing that up.
>
> > Jason
>
> > On Sat, Sep 19, 2009 at 3:08 PM, Dianne Hackborn 
> > wrote:
> > > (Btw, Api demos has one or two examples of creating custom themed
> > dialogs, I
> > > believe in the app section.)
>
> > > On Sat, Sep 19, 2009 at 12:07 PM, Dianne Hackborn 
> > > wrote:
>
> > >> You are making a theme, which is a kind of style that applies to an
> > entire
> > >> context, but just a UI element.  You need to use it as the theme for an
> > >> activity take or the second argument to the Dialog constructor, however
> > you
> > >> are creating the window.
>
> > >> On Sat, Sep 19, 2009 at 11:26 AM, Jason Van Anden
> > >>  wrote:
>
> > >>> Dear Dianne et al,
>
> > >>> My feedback was meant as constructive criticism in general -
> > >>> definitely not as a dis directed at you.  I believe that an example is
> > >>> worth a thousand words - it works or it don't.
>
> > >>> I appreciate the time you spend with the board.  I make it a point to
> > >>> star pretty much anything you write here so I can review it later.
> > >>> This particular thread was recalled exactly because of this.  Your
> > >>> suggestion of altering the style of a dialog seems perfect for a step
> > >>> by step walk through of an app - which is what I am working on.
> > >>> Clearly we need more generous experts like yourself helping Android
> > >>> along.
>
> > >>> That being said ... I thought I had figured it out - but I am still
> > >>> stumped.  If someone out there could help, it will help save at least
> > >>> one Android developer's weekend ...
>
> > >>> Here is my code:
>
> > >>> Within my theme.xml I have:
>
> > >>> 
> > >>>    
> > >>>         > >>> name="android:windowBackground">@android:drawable/toast_frame
> > >>>        
> > name="android:windowAnimationStyle">@android:style/Animation.Toast
> > >>>    
> > >>> 
>
> > >>> Within my dialog layout I have:
>
> > >>> 
>
> > >>> http://schemas.android.com/apk/res/android";
> > >>>    android:layout_width="fill_parent"
> > >>>    android:layout_height="wrap_content"
> > >>>    android:orientation="vertical"
> > >>>    style="@style/ToastyDialog"
>
> > >>>         > >>>                  android:layout_width="wrap_content"
> > >>>                  android:layout_height="wrap_content"
> > >>>                  android:text="@string/hello_world"
>
> > >>>    
> > >>> 
>
> > >>> NOTE: The Eclipse interface gives you a choice to pick a theme, and my
> > >>> theme does appear.  Thing is, it does not write it in the XML.  I
> > >>> added the style tag based upon this post:
>
> >http://brainflush.wordpress.com/2009/03/15/understanding-android-them...
>
> > >>> I sincerely hope that I am making a stupid, obvious mistake.
>
> > >>> Thank You,
> > >>> Jason
>
> > >>> On Sat, Sep 19, 2009 at 1:25 PM, Dianne Hackborn 
> > >>> wrote:
> > >>> > On Sat, Sep 19, 2009 at 9:47 AM, Jason Van Anden
> > >>> > 
> > >>> > wrote:
>
> > >>> >> There are a few threads on this topic that offer advice where an
> > >>> >> example would be more useful (IMHO).
>
> > >>> > I post to this list in my (oh so copious) spare time; I can either
> > post
> > >>> > answers that I can do quickly, or just not post at all if it is going
> > >>> > to
> > >>> > take me time to put together and test an example.  Your choice.
> > >>> > --
> > >>> > Dianne Hackborn
> > >>> > Android framework engineer
> > >>> > hack...@android.com
>
> > >>> > Note: please don't send private questions to me, as I don't have time
> > >>> > to
> > >>> > provide private support, and so won't reply to such e-mails.  All
> > such
> > >>> > questions should be posted on public forums, where I and others can
> > see
> > >>> > and
> > >>> > answer them.
>
> > >> --
> > >> Dianne Hackborn
> > >> Android framework engineer
> > >> hack...@android.com
>
> > >> Note: please don't send private questions to me, as I don't have time to
> > >> provide private support, and so won't reply to such e-mails.  All such
> > >> questions should be posted on public forums, where I and others can see
> > and
> > >> answer them.
>
> > > --
> > > Dianne Hackborn
> > > Android framew

[android-developers] Re: how to use gluUnProject

2009-09-21 Thread Robert Green

If you want to pick a rendered object, just check for collisions with
a primitive bounding box and a casted ray.

1)  Keep a copy of the matrix you use for the projection.
2)  Implement this, using that matrix that you kept.

For iPhone but easily portable to Android, so long as you know that
you can't get the projection matrix normally.

http://eigenclass.blogspot.com/2008/10/opengl-es-picking-using-ray-boundingbox.html

On Sep 7, 10:11 am, Gameboy  wrote:
> I'm trying to use gluUnProject for checking touch selection on a 3D
> object, but seems I can not do with current 1.5 emulator.
>
> The method needs to know current viewport, model view matrix and
> project matrix, I'm trying to use G11 gl to query but get nothing with
> below codes:
>
> int[] viewport = new int[4] ;
> gl.glGetIntegerv(GL11.GL_VIEWPORT, viewport, 0) ;
> float[] modelview = new float[16] ;
> gl.glGetFloatv(gl.GL_MODELVIEW_MATRIX, modelview, 0) ;
> float[] project = new float[16] ;
> gl.glGetFloatv(gl.GL_PROJECTION_MATRIX, project, 0) ;
>
> Questions:
> 1) Is there other way to get these params?
> 2) Does current 1.5 emulator support these G11 feature?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to show a dialog in thread.run()

2009-09-21 Thread Jason Proctor

you can do this with a very long-running AsyncTask which causes 
dialogs to be shown via the reportProgress() mechanism.

i know i sound like a stuck record, but AsyncTask is very well 
thought out. props.


>Hello,
>
>One thing that you'll need to make sure to do is run this code on the
>UI thread.  You should do this any time you are dealing with Android
>Views/Widgets.  One way you can do this by wrapping the code in case 1
>in a Runnable and then use your Activity's runOnUiThread method.
>
>- Mike
>
>On Sep 21, 11:41 am, xingye  wrote:
>>  My code:
>>  public class GameView extends SurfaceView implements
>>  SurfaceHolder.Callback {
>>  ...
>>  Dialog dialog = new Dialog(app);
>>  class GameThread extends Thread {
>>  public void run() {
>>  Looper.prepare();
>>  while (bRun) {
>>  switch(flag){
>>  case 0:
>>  break;
>>  case 1:
>>  dialog.show();
>>  flag=0;
>>  break;
>>  }
>>  }
>>  }
>>  }
>>  ...}
>>
>>  The dialog.show() was called, but noting happened.
>

-- 
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: My app is getting killed while I launch an external intent

2009-09-21 Thread Timothy DeWees

It's not just what I need to remember, the other action is sending me
data which I get in onActionComplete.  Any thoughts?

On Aug 22, 3:05 pm, Dianne Hackborn  wrote:
> That is the normal behavior -- your app is in the background, not relevant
> to what the user is currently doing, so its process may be killed to use
> memory elsewhere.  You deal with this by implementing onSaveInstanceState()
> to note anything to need to remember and collecting that from the state you
> later receive in onCreate().
>
> On Fri, Aug 21, 2009 at 6:47 PM, Timothy DeWees wrote:
>
>
>
>
>
> > Hello,
>
> > I'm hoping for some help on ways to solve a problem.  From my
> > application, I launch an intent that returns a result I need to read
> > (Zebra Crossing).  But if the user takes a while to scan the barcode
> > (low light, wobbly hands, etc), my main intent is getting killed.
> > When the app re-launches, I'm not hitting the event for the intent
> > returning.
>
> > Is there some start parameter to tell me the app is being re-launched
> > and returning from a child intent?
>
> > Any suggestions on this would be helpful!
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to show a dialog in thread.run()

2009-09-21 Thread Mike
Hello,

One thing that you'll need to make sure to do is run this code on the
UI thread.  You should do this any time you are dealing with Android
Views/Widgets.  One way you can do this by wrapping the code in case 1
in a Runnable and then use your Activity's runOnUiThread method.

- Mike

On Sep 21, 11:41 am, xingye  wrote:
> My code:
> public class GameView extends SurfaceView implements
> SurfaceHolder.Callback {
>         ...
>         Dialog dialog = new Dialog(app);
>         class GameThread extends Thread {
>                 public void run() {
>                         Looper.prepare();
>                         while (bRun) {
>                                 switch(flag){
>                                 case 0:
>                                         break;
>                                 case 1:
>                                         dialog.show();
>                                         flag=0;
>                                         break;
>                                 }
>                         }
>                 }
>         }
>         ...}
>
> The dialog.show() was called, but noting happened.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL 2D Game Framework

2009-09-21 Thread pro

Thanks Dan, thanks everyone ...

That is what I thought. If the license allows that I've to publish any
modification/addition to this, then perhaps that is okay ( also
depends on how truly it can be used just as a framework). Since it is
hard labor ( on both side, framework developer, as well as game
developer who uses it), I think it would be nice if the whole thing
does not get under the GPL umbrella. I, for sure, want to make some
money (if possible) from my development side because it takes about 4
to 6 months even to craft an engine for the work I'm doing... The fear
is this, if I've to publish all of the code then another person will
take my code, change some modifications, and place another product
( basically same game) with price is half of original price...

I think, I will have to avoid this rat hole of licensing issues

-pro

On Sep 21, 10:26 am, Dan Sherman  wrote:
> You can technically.  Nothing prevents your from selling the game you make,
> you do have to release all of the source however, which makes doing anything
> that you might want hidden (network protocols, etc) a bit tougher.  :)
>
> - Dan
>
> On Mon, Sep 21, 2009 at 1:07 PM, polyclefsoftware  wrote:
>
> > Yes, the description in Google Code for the project says "powerful
> > enough to create a highly polished commercial game". But you can't
> > exactly create a commercial game with code licensed under the GPL,
> > right?
>
> > On Sep 21, 11:46 am, "nEx.Software" 
> > wrote:
> > > Dan, that's what I was thinking as well (regarding the GPLv3).
>
> > > On Sep 21, 9:42 am, Dan Sherman  wrote:
>
> > > > The library looks great (after a few hours of playing with it),
> > definitely
> > > > has some improvements that could be made, but very well laid out and
> > easy to
> > > > work with.
>
> > > > However, the GPLv3 does make game development a bit of an issue, if the
> > > > games need to be released as GPLv3 as well...
>
> > > > - Dan
>
> > > > On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu 
> > wrote:
>
> > > > > I noticed on the google code pagehttp://code.google.com/p/rokon/that
> > > > > the license is GPL 3, which means anyone who uses it must open source
> > > > > their app.
>
> > > > > Richard, have you given some thought to changing the license to
> > > > > something more permissive? Either way, impressive work. Good job.
>
> > > > > On Sep 21, 10:21 am, pro  wrote:
> > > > > > Hi Richard,
>
> > > > > > What is the terms & conditions for using it? I mean copyright
> > etc...
>
> > > > > > I'm developing some games ( my area of interest is AI type games ),
> > > > > > but I might be able to take some fragments of code for animations,
> > > > > > placement of objects etc. But for commercial side, I don't want to
> > get
> > > > > > into something that has some weired licensing ...
>
> > > > > > No doubt this framework has some very very good stuff that possibly
> > > > > > can be used as cut&paste or simply dropping those class definition
> > > > > > files ...
>
> > > > > > -pro
>
> > > > > > On Sep 18, 6:08 am, "rich...@stickycoding.com"
>
> > > > > >  wrote:
> > > > > > > I've been working on a game framework for a little while, and
> > while
> > > > > > > its far from perfect, I've put the current version online.
>
> > > > > > > To be honest, I haven't used much OpenGL in the past. Before last
> > week
> > > > > > > I had never tried using it.
> > > > > > > If anyone would like to take a look, please do, I'd appreciate
> > all the
> > > > > > > help possible on speeding it up.
> > > > > > > There are many features I have in mind and am planning at the
> > minute,
> > > > > > > but so far it supports:
>
> > > > > > > # Texture and Sprite management
> > > > > > > # Text, using TTF fonts
> > > > > > > # Organised layers
> > > > > > > # Two audio management classes, one optimized for music, the
> > other for
> > > > > > > sound effects
> > > > > > > # Sprite dynamics (acceleration, terminal velocity, collisions)
> > > > > > > # Animation
> > > > > > > # Handlers to manage events fired through movement, animation,
> > screen
> > > > > > > touches, accelerometer input, device shaking and collisions
> > > > > > > # Several minor features aimed at speeding development, such as
> > screen
> > > > > > > settings and vibration
>
> > > > > > > The code is athttp://code.google.com/p/rokon/
>
> > > > > > > Again, I'd very much appreciate advice or help with any bugs you
> > can
> > > > > > > see, 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] wrap around with textview in a tablelayout broken

2009-09-21 Thread Fabian Sturm

Hi!

I have a very simple layout, a table with a single row containing two
textviews. The first textview has a short text and the second a long
text which needs to be wrapped around.

Unfortunately the wrap around does not work. In the first line of the
wrapped text the last word is missing a letter and in the second line
another letter is missing and even the word "3" is missing. 
So I get the text:

"Ein ganz langer Text der umgebrochen werde
 muss, der so lange ist, dass er auf mindesten
 zeilen verteilt werden muss"

instead of this text:

"Ein ganz langer Text der umgebrochen 
 werden muss, der so lange ist, dass 
 er auf mindestens 3 zeilen verteilt 
 werden muss"

Any ideas what I need to activate for the correct wrap around?
I tried many layout parameters but none helped.

I know I could get the same layout easier, but this is just a broken
down example. I want to use a table with maybe 5 rows and 2 columns
later on.

Thanks a lot, Fabian



http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>











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



[android-developers] File Downloads in Android Web Browser

2009-09-21 Thread Al

For a little while now, I've been trying to figure out why I couldn't
download video files from the website i'm working with the Android OS
web browser, although I have found a work-around solution.  For some
reason, it seems as if the Android web browser (default OS web
browser) does not properly handle the "Content-Disposition:
attachment;" header from the webserver (in this case, Lighttpd).  When
attempting to download a file, all I was seeing with both HTC Dream
and HTC Magic (most recent OS version) was that it attempted to
download the file, but it couldn't detect the file name and the file
had no content.  Now after looking through the HTTP 1.1 RFC
documentation, I've noticed that they state that the "Content-
Disposition" directive is not part of the HTTP standard (Section 15.5
of RFC2616).

I thought that this issue was possibly due to the fact that no
attachment file name was being specified, but then I came across
another section in the Hypertext Transfer Protocol specification
(RFC2616) that states the following:

"RFC 1945 and RFC 2068 document protocol elements used by some
existing HTTP implementations, but not consistently and correctly
across most HTTP/1.1 applications. Implementors are advised to be
   aware of these features, but cannot rely upon their presence in, or
interoperability with, other HTTP/1.1 applications. Some of these
describe proposed experimental features, and some describe features
that experimental deployment found lacking that are now addressed in
the base HTTP/1.1 specification." (Section 19.5 RFC 2616)  As the
grammar for that directive shows (Section 19.5.1), there can be 0 or
more disposition parameters after the "Content-Disposition:
attachment" directive.  So basically, to remedy this issue, i've had
the "Content-Disposition: attachment" directive removed from the web
server, but what I'd really like to know is if this could possibly be
a bug with the Android web browser or if it's something the developers
purposely did because that directive is not officially part of the
HTTP standard?

If anyone could give me an answer on that, it would be greatly
appreciated!  Also, if I am getting any facts mixed up or if there is
something else i'm unaware of, please let me know.

Thanks

Al

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

2009-09-21 Thread Max_well

Same things here.

A bug have been open : http://code.google.com/p/android/issues/detail?id=3972


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



[android-developers] Re: How to upgrade the ant build.xml file from 1.1 project to 1.5

2009-09-21 Thread Mark Murphy

> I followed the instruction in 1.5 SDK upgrading at link
> http://developer.android.com/sdk/1.5_r3/upgrading.html, but i cannot
> got the whole build.xml file because there is not any task in it. I
> thought the update project process will copy tasks from the
> build.xml.old to new build.xml, but it didn't. There is not any hint
> mention I should copy it myself in that document. Was the process
> failed or I have to copy it myself?

The tasks that Android supplies are now held in Ant plugins, so you will
not see them in the build.xml file itself. If you created your own Ant
tasks, you will need to copy those over.

> Do i need do any change for my old
> tasks in the new build.xml?

That would depend, I suppose, on what those tasks did.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] How to upgrade the ant build.xml file from 1.1 project to 1.5

2009-09-21 Thread Ling Yun

I followed the instruction in 1.5 SDK upgrading at link
http://developer.android.com/sdk/1.5_r3/upgrading.html, but i cannot
got the whole build.xml file because there is not any task in it. I
thought the update project process will copy tasks from the
build.xml.old to new build.xml, but it didn't. There is not any hint
mention I should copy it myself in that document. Was the process
failed or I have to copy it myself? Do i need do any change for my old
tasks in the new build.xml?

In addition, from http://developer.android.com/guide/developing/other-ide.html,
it never mentions how to generate debug/release tasks, they seems be
generated automatically by creating project or updating project
process. But I can't get those two tasks.

Is anybody can explain this for me? thanks!

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

2009-09-21 Thread Marco Nelissen

On Mon, Sep 21, 2009 at 10:36 AM, Wouter  wrote:
>
> Ok I had to place android:singleLine="true" (http://code.google.com/p/
> android/issues/detail?id=882)
>
> and now it is working :)
>
> Other question:
>
> when you look at this picture: http://snapplr.com/stxg you can see
> that there are weird symbols in my text. The text is in dutch but if
> there are symbols used like é or à ... android places a symbol with a
> "?"
> I am consuming a web service (xml rpc) and in this response the text
> is good!
>
> How can i fix this?

Make sure you're using the right text encoding, and convert if needed.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: ADC2 - We're running out of days in Sept

2009-09-21 Thread RainBow

I _guess_ this week we should expect the below page getting updated:

http://code.google.com/android/adc/

:-)

On Sep 21, 11:25 am, dadical  wrote:
> I'm guessing Google is going to have to let the dates slip, or cut
> some of the rounds short.  Has anyone heard how things are progressing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL 2D Game Framework

2009-09-21 Thread Carmen Delessio
I think this library looks great and I see how I can use it in apps that
need great graphics features, not just games.

Regarding licensing, it would be great to figure out a way encourage lots of
solid libraries to be built and made available to the Android community.

For that to happen, I think it makes sense for code to be open-source so
that people can see it and improve it.
I also think it is reasonable for the developer to make money from the
library.

Some people may see that as controversial, but I hope it could be beneficial
for everyone.

The first link below provides some reasons NOT to LGPL code.
The second link is one projects explanation of dual licensing with both GPL
and commercial options.

http://www.fsf.org/licensing/licenses/why-not-lgpl.html
http://www.extjs.com/company/dual.php

Does dual licensing make sense for libraries in the Android Community?
What's the right price for a library?
Should the same license apply if I build 1 app with the license or 50?

-- 
Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto (Facebook  Photo App)
http://www.twitter.com/DroidDrop (Drop.io private file sharing app)


On Mon, Sep 21, 2009 at 1:26 PM, Dan Sherman  wrote:

> You can technically.  Nothing prevents your from selling the game you make,
> you do have to release all of the source however, which makes doing anything
> that you might want hidden (network protocols, etc) a bit tougher.  :)
>
> - Dan
>
>
> On Mon, Sep 21, 2009 at 1:07 PM, polyclefsoftware wrote:
>
>>
>> Yes, the description in Google Code for the project says "powerful
>> enough to create a highly polished commercial game". But you can't
>> exactly create a commercial game with code licensed under the GPL,
>> right?
>>
>> On Sep 21, 11:46 am, "nEx.Software" 
>> wrote:
>> > Dan, that's what I was thinking as well (regarding the GPLv3).
>> >
>> > On Sep 21, 9:42 am, Dan Sherman  wrote:
>> >
>> > > The library looks great (after a few hours of playing with it),
>> definitely
>> > > has some improvements that could be made, but very well laid out and
>> easy to
>> > > work with.
>> >
>> > > However, the GPLv3 does make game development a bit of an issue, if
>> the
>> > > games need to be released as GPLv3 as well...
>> >
>> > > - Dan
>> >
>> > > On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu 
>> wrote:
>> >
>> > > > I noticed on the google code pagehttp://
>> code.google.com/p/rokon/that
>> > > > the license is GPL 3, which means anyone who uses it must open
>> source
>> > > > their app.
>> >
>> > > > Richard, have you given some thought to changing the license to
>> > > > something more permissive? Either way, impressive work. Good job.
>> >
>> > > > On Sep 21, 10:21 am, pro  wrote:
>> > > > > Hi Richard,
>> >
>> > > > > What is the terms & conditions for using it? I mean copyright
>> etc...
>> >
>> > > > > I'm developing some games ( my area of interest is AI type games
>> ),
>> > > > > but I might be able to take some fragments of code for animations,
>> > > > > placement of objects etc. But for commercial side, I don't want to
>> get
>> > > > > into something that has some weired licensing ...
>> >
>> > > > > No doubt this framework has some very very good stuff that
>> possibly
>> > > > > can be used as cut&paste or simply dropping those class definition
>> > > > > files ...
>> >
>> > > > > -pro
>> >
>> > > > > On Sep 18, 6:08 am, "rich...@stickycoding.com"
>> >
>> > > > >  wrote:
>> > > > > > I've been working on a game framework for a little while, and
>> while
>> > > > > > its far from perfect, I've put the current version online.
>> >
>> > > > > > To be honest, I haven't used much OpenGL in the past. Before
>> last week
>> > > > > > I had never tried using it.
>> > > > > > If anyone would like to take a look, please do, I'd appreciate
>> all the
>> > > > > > help possible on speeding it up.
>> > > > > > There are many features I have in mind and am planning at the
>> minute,
>> > > > > > but so far it supports:
>> >
>> > > > > > # Texture and Sprite management
>> > > > > > # Text, using TTF fonts
>> > > > > > # Organised layers
>> > > > > > # Two audio management classes, one optimized for music, the
>> other for
>> > > > > > sound effects
>> > > > > > # Sprite dynamics (acceleration, terminal velocity, collisions)
>> > > > > > # Animation
>> > > > > > # Handlers to manage events fired through movement, animation,
>> screen
>> > > > > > touches, accelerometer input, device shaking and collisions
>> > > > > > # Several minor features aimed at speeding development, such as
>> screen
>> > > > > > settings and vibration
>> >
>> > > > > > The code is athttp://code.google.com/p/rokon/
>> >
>> > > > > > Again, I'd very much appreciate advice or help with any bugs you
>> can
>> > > > > > see, thanks.
>>
>>
>
> >
>

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

[android-developers] ADC2 - We're running out of days in Sept

2009-09-21 Thread dadical

I'm guessing Google is going to have to let the dates slip, or cut
some of the rounds short.  Has anyone heard how things are progressing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-21 Thread Roman ( T-Mobile USA)

When you are able to get the handle for the intent, you should be able
to use

 intent.getExtras();

The API returns a bundle object which you should have used to send
your complex object.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 21, 1:02 am, HandsomeboyIT  wrote:
> I have an Activity that running on system. I can get the Intent that
> is used to start the activity. But i don't know how to get the
> Activity object from the Intent object or something else. Can anyone
> tell me how to do this??? Note that, I don't use Instrumentation
> object. Thanks so much...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Searchable Dictionary Example: R.raw.definitions cannot be resolved

2009-09-21 Thread Mike Collins

Nope, built straight off for me, ran properly also.

  mike

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

2009-09-21 Thread Jason Proctor

quick correction here -- i don't use WebViews inside ListViews. i 
meant a regular LinearLayout with a dynamic number of WebViews.

sorry for any wasted keystrokes along the lines of "*don't* do this"


>hi all,
>
>I'm getting fairly regular crashes using WebView's in the underlying C
>code (sigsegv's). There isn't
>a _whole_ lot of rhyme or reason to it, but one thing that is somewhat
>suspicious is that I have
>more than one webview active (only one is one the screen at any one
>time, but if this has anything
>to do with my problem it may not matter since it appears that webkit
>widgets run asynchronously
>from the main UI thread).
>
>Here's the stack dump. I've looked through the archives and it appears
>that there are other
>dumps, but it's really hard to tell from my vantagepoint whether they
>have anything to do with
>one another.
>
>This is pretty easily reproducible (especially with one particular url
>of mine) so it should be
>relatively easy to track down.
>
>Thanks, Mike
>
>I/DEBUG   (   32): *** *** *** *** *** *** *** *** *** *** *** *** ***
>*** *** ***
>I/DEBUG   (   32): Build fingerprint:
>'tmobile/kila/dream/trout:1.5/CRC1/150275:user/ota-rel-keys,release-keys'
>I/DEBUG   (   32): pid: 911, tid: 922  >>> com.phresheez.phresheez <<<
>I/DEBUG   (   32): signal 11 (SIGSEGV), fault addr 000c
>I/DEBUG   (   32):  r0 445d986c  r1 445d9998  r2 445d9998  r3 00534318
>I/DEBUG   (   32):  r4   r5 004548c8  r6 445d9998  r7 007f
>I/DEBUG   (   32):  r8 445d9da0  r9 41046e18  10 41046e04  fp 0001
>I/DEBUG   (   32):  ip aa3dbb38  sp 445d97f0  lr aa181c7b  pc aa0bdd48
>  cpsr 2030
>W/InputManagerService(   59): Window already focused, ignoring focus
>gain of: com.android.internal.view.iinputmethodclient$stub$pr...@432ca120
>I/DEBUG   (   32):  #00  pc 000bdd48  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #01  pc 00181c78  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #02  pc 00182c56  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #03  pc 0018e66e  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #04  pc 0018ba62  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #05  pc 0018c0d0  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #06  pc 0018c7ae  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #07  pc 0017de08  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #08  pc 00180402  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #09  pc 001853ce  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #10  pc 0018540c  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #11  pc 00186146  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #12  pc 00186408  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #13  pc 001867d6  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #14  pc 00186832  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #15  pc 00186874  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #16  pc 00259d04  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #17  pc e3b4  /system/lib/libdvm.so
>I/DEBUG   (   32):  #18  pc 00040a8a  /system/lib/libdvm.so
>I/DEBUG   (   32):  #19  pc 00013118  /system/lib/libdvm.so
>I/DEBUG   (   32):  #20  pc 00017b1c  /system/lib/libdvm.so
>I/DEBUG   (   32):  #21  pc 00017560  /system/lib/libdvm.so
>I/DEBUG   (   32):  #22  pc 000520ec  /system/lib/libdvm.so
>I/DEBUG   (   32):  #23  pc 0005210a  /system/lib/libdvm.so
>I/DEBUG   (   32):  #24  pc 00047144  /system/lib/libdvm.so
>I/DEBUG   (   32):  #25  pc f880  /system/lib/libc.so
>I/DEBUG   (   32):  #26  pc f3f4  /system/lib/libc.so
>I/DEBUG   (   32): stack:
>I/DEBUG   (   32): 445d97b0  005574c0  [heap]
>I/DEBUG   (   32): 445d97b4  003f
>I/DEBUG   (   32): 445d97b8  
>I/DEBUG   (   32): 445d97bc  a9a9a475
>I/DEBUG   (   32): 445d97c0  001a6d30  [heap]
>I/DEBUG   (   32): 445d97c4  aa1e37b1  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97c8  445d9814
>I/DEBUG   (   32): 445d97cc  aa1e41b9  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97d0  445d97d8
>I/DEBUG   (   32): 445d97d4  aa1dec3d  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97d8  aa3db598
>I/DEBUG   (   32): 445d97dc  445d9824
>I/DEBUG   (   32): 445d97e0  00557620  [heap]
>I/DEBUG   (   32): 445d97e4  aa1dee0d  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97e8  df002777
>I/DEBUG   (   32): 445d97ec  e3a070ad
>I/DEBUG   (   32): #00 445d97f0  445d9da0
>I/DEBUG   (   32): 445d97f4  aa3db598
>I/DEBUG   (   32): 445d97f8  aa3db598
>I/DEBUG   (   32): 445d97fc  445d9998
>I/DEBUG   (   32): 445d9800  445d9998
>I/DEBUG   (   32): 445d9804  445d986c
>I/DEBUG   (   32): 445d9808  0003
>I/DEBUG   (   32): 445d980c  00534318  [heap]
>I/DEBUG   (   32): 445d9810  007f
>I/DEBUG   (   32): 445d9814  aa3db598
>

[android-developers] Re: How to force soft keyboard to be visible?

2009-09-21 Thread Mike Collins


I have removed all the code around putting up or taking down or
otherwise trying to
influence the soft keyboard.  This is running on a stock G1 with 1.5

I have two activities reachable from one main activity.  All three
activites have
a single AutoCompleteTextView.  All 3 edit boxes have InputType set,
the main
activity is set to "text" the two subactivity edit boxes are set to
"number".  The
manifest makes no keyboard statements.

If the soft keyboard is not visible in the main window transitions to
the sub windows
work as expected.

However, if the soft keyboard is visible in the main activity because
the user has
touched the AutoCompleteTextView transitioning to one of the sub
activities takes
the soft keyboard down, transitioning to the other sub activity leaves
it up.

Is this expected behavior?  Do I have any control over this?  If so
what?

tia,
  mike

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



[android-developers] How to show a dialog in thread.run()

2009-09-21 Thread xingye

My code:
public class GameView extends SurfaceView implements
SurfaceHolder.Callback {
...
Dialog dialog = new Dialog(app);
class GameThread extends Thread {
public void run() {
Looper.prepare();
while (bRun) {
switch(flag){
case 0:
break;
case 1:
dialog.show();
flag=0;
break;
}
}
}
}
...
}
The dialog.show() was called, but noting happened.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: fit text on 1 line

2009-09-21 Thread Wouter

Ok I had to place android:singleLine="true" (http://code.google.com/p/
android/issues/detail?id=882)

and now it is working :)

Other question:

when you look at this picture: http://snapplr.com/stxg you can see
that there are weird symbols in my text. The text is in dutch but if
there are symbols used like é or à ... android places a symbol with a
"?"
I am consuming a web service (xml rpc) and in this response the text
is good!

How can i fix this?

Wouter

On Sep 21, 7:28 pm, "Mark Murphy"  wrote:
> > Hey,
>
> > I am working on a project and i need to fit a text (string) on line at
> > a textView.
> > I know I can work with maxLines but if the text does not fit the view,
> > it has to end with "..."
> > so for example directed by brad pitt an...
>
> > So can users see that it is not the end of the text they are seeing
> > but that there is more ;)
>
> android:ellipsize="end" at least used to work for this...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: fit text on 1 line

2009-09-21 Thread Wouter

I have tried this but the ellipsis (...) is not appearing..

On Sep 21, 7:28 pm, "Mark Murphy"  wrote:
> > Hey,
>
> > I am working on a project and i need to fit a text (string) on line at
> > a textView.
> > I know I can work with maxLines but if the text does not fit the view,
> > it has to end with "..."
> > so for example directed by brad pitt an...
>
> > So can users see that it is not the end of the text they are seeing
> > but that there is more ;)
>
> android:ellipsize="end" at least used to work for this...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Please help me !

2009-09-21 Thread Jason Proctor

we have this thing called Google now. a simple search led me to this article --

http://developer.android.com/guide/tutorials/views/hello-mapview.html

-- which was enough for me to get Maps and Overlays going.

hth


>I want to display a overlay in maps ( as Overlay of MyLocation - The
>circle which can flash ).
>How to do ?
>Thanks in advance.


-- 
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: webview crashes

2009-09-21 Thread Jason Proctor

i'm also seeing some occasional WebView crashes with multiple views 
up. seems to have calmed down without any code changes from me.

my app contains a regular ListView which has a dynamic number of 
WebViews in it depending on various factors. most of the time it 
works splendidly, and WebView even tells the layout manager when it's 
changing size, so i don't have to guess. points there!

but every now and again.. bang.


>hi all,
>
>I'm getting fairly regular crashes using WebView's in the underlying C
>code (sigsegv's). There isn't
>a _whole_ lot of rhyme or reason to it, but one thing that is somewhat
>suspicious is that I have
>more than one webview active (only one is one the screen at any one
>time, but if this has anything
>to do with my problem it may not matter since it appears that webkit
>widgets run asynchronously
>from the main UI thread).
>
>Here's the stack dump. I've looked through the archives and it appears
>that there are other
>dumps, but it's really hard to tell from my vantagepoint whether they
>have anything to do with
>one another.
>
>This is pretty easily reproducible (especially with one particular url
>of mine) so it should be
>relatively easy to track down.
>
>Thanks, Mike
>
>I/DEBUG   (   32): *** *** *** *** *** *** *** *** *** *** *** *** ***
>*** *** ***
>I/DEBUG   (   32): Build fingerprint:
>'tmobile/kila/dream/trout:1.5/CRC1/150275:user/ota-rel-keys,release-keys'
>I/DEBUG   (   32): pid: 911, tid: 922  >>> com.phresheez.phresheez <<<
>I/DEBUG   (   32): signal 11 (SIGSEGV), fault addr 000c
>I/DEBUG   (   32):  r0 445d986c  r1 445d9998  r2 445d9998  r3 00534318
>I/DEBUG   (   32):  r4   r5 004548c8  r6 445d9998  r7 007f
>I/DEBUG   (   32):  r8 445d9da0  r9 41046e18  10 41046e04  fp 0001
>I/DEBUG   (   32):  ip aa3dbb38  sp 445d97f0  lr aa181c7b  pc aa0bdd48
>  cpsr 2030
>W/InputManagerService(   59): Window already focused, ignoring focus
>gain of: com.android.internal.view.iinputmethodclient$stub$pr...@432ca120
>I/DEBUG   (   32):  #00  pc 000bdd48  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #01  pc 00181c78  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #02  pc 00182c56  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #03  pc 0018e66e  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #04  pc 0018ba62  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #05  pc 0018c0d0  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #06  pc 0018c7ae  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #07  pc 0017de08  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #08  pc 00180402  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #09  pc 001853ce  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #10  pc 0018540c  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #11  pc 00186146  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #12  pc 00186408  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #13  pc 001867d6  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #14  pc 00186832  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #15  pc 00186874  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #16  pc 00259d04  /system/lib/libwebcore.so
>I/DEBUG   (   32):  #17  pc e3b4  /system/lib/libdvm.so
>I/DEBUG   (   32):  #18  pc 00040a8a  /system/lib/libdvm.so
>I/DEBUG   (   32):  #19  pc 00013118  /system/lib/libdvm.so
>I/DEBUG   (   32):  #20  pc 00017b1c  /system/lib/libdvm.so
>I/DEBUG   (   32):  #21  pc 00017560  /system/lib/libdvm.so
>I/DEBUG   (   32):  #22  pc 000520ec  /system/lib/libdvm.so
>I/DEBUG   (   32):  #23  pc 0005210a  /system/lib/libdvm.so
>I/DEBUG   (   32):  #24  pc 00047144  /system/lib/libdvm.so
>I/DEBUG   (   32):  #25  pc f880  /system/lib/libc.so
>I/DEBUG   (   32):  #26  pc f3f4  /system/lib/libc.so
>I/DEBUG   (   32): stack:
>I/DEBUG   (   32): 445d97b0  005574c0  [heap]
>I/DEBUG   (   32): 445d97b4  003f
>I/DEBUG   (   32): 445d97b8  
>I/DEBUG   (   32): 445d97bc  a9a9a475
>I/DEBUG   (   32): 445d97c0  001a6d30  [heap]
>I/DEBUG   (   32): 445d97c4  aa1e37b1  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97c8  445d9814
>I/DEBUG   (   32): 445d97cc  aa1e41b9  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97d0  445d97d8
>I/DEBUG   (   32): 445d97d4  aa1dec3d  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97d8  aa3db598
>I/DEBUG   (   32): 445d97dc  445d9824
>I/DEBUG   (   32): 445d97e0  00557620  [heap]
>I/DEBUG   (   32): 445d97e4  aa1dee0d  /system/lib/libwebcore.so
>I/DEBUG   (   32): 445d97e8  df002777
>I/DEBUG   (   32): 445d97ec  e3a070ad
>I/DEBUG   (   32): #00 445d97f0  445d9da0
>I/DEBUG   (   32): 445d97f4  aa3db598
>I/DEBUG   (   32): 445d97f8  aa3db598
>I/DEBUG   (   32): 445d97fc  445d9998
>I/DEBUG   (   32): 445d9800  445d9998

[android-developers] Re: fit text on 1 line

2009-09-21 Thread Mark Murphy


>
> Hey,
>
> I am working on a project and i need to fit a text (string) on line at
> a textView.
> I know I can work with maxLines but if the text does not fit the view,
> it has to end with "..."
> so for example directed by brad pitt an...
>
> So can users see that it is not the end of the text they are seeing
> but that there is more ;)

android:ellipsize="end" at least used to work for this...

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: OpenGL 2D Game Framework

2009-09-21 Thread Dan Sherman
You can technically.  Nothing prevents your from selling the game you make,
you do have to release all of the source however, which makes doing anything
that you might want hidden (network protocols, etc) a bit tougher.  :)

- Dan

On Mon, Sep 21, 2009 at 1:07 PM, polyclefsoftware  wrote:

>
> Yes, the description in Google Code for the project says "powerful
> enough to create a highly polished commercial game". But you can't
> exactly create a commercial game with code licensed under the GPL,
> right?
>
> On Sep 21, 11:46 am, "nEx.Software" 
> wrote:
> > Dan, that's what I was thinking as well (regarding the GPLv3).
> >
> > On Sep 21, 9:42 am, Dan Sherman  wrote:
> >
> > > The library looks great (after a few hours of playing with it),
> definitely
> > > has some improvements that could be made, but very well laid out and
> easy to
> > > work with.
> >
> > > However, the GPLv3 does make game development a bit of an issue, if the
> > > games need to be released as GPLv3 as well...
> >
> > > - Dan
> >
> > > On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu 
> wrote:
> >
> > > > I noticed on the google code pagehttp://code.google.com/p/rokon/that
> > > > the license is GPL 3, which means anyone who uses it must open source
> > > > their app.
> >
> > > > Richard, have you given some thought to changing the license to
> > > > something more permissive? Either way, impressive work. Good job.
> >
> > > > On Sep 21, 10:21 am, pro  wrote:
> > > > > Hi Richard,
> >
> > > > > What is the terms & conditions for using it? I mean copyright
> etc...
> >
> > > > > I'm developing some games ( my area of interest is AI type games ),
> > > > > but I might be able to take some fragments of code for animations,
> > > > > placement of objects etc. But for commercial side, I don't want to
> get
> > > > > into something that has some weired licensing ...
> >
> > > > > No doubt this framework has some very very good stuff that possibly
> > > > > can be used as cut&paste or simply dropping those class definition
> > > > > files ...
> >
> > > > > -pro
> >
> > > > > On Sep 18, 6:08 am, "rich...@stickycoding.com"
> >
> > > > >  wrote:
> > > > > > I've been working on a game framework for a little while, and
> while
> > > > > > its far from perfect, I've put the current version online.
> >
> > > > > > To be honest, I haven't used much OpenGL in the past. Before last
> week
> > > > > > I had never tried using it.
> > > > > > If anyone would like to take a look, please do, I'd appreciate
> all the
> > > > > > help possible on speeding it up.
> > > > > > There are many features I have in mind and am planning at the
> minute,
> > > > > > but so far it supports:
> >
> > > > > > # Texture and Sprite management
> > > > > > # Text, using TTF fonts
> > > > > > # Organised layers
> > > > > > # Two audio management classes, one optimized for music, the
> other for
> > > > > > sound effects
> > > > > > # Sprite dynamics (acceleration, terminal velocity, collisions)
> > > > > > # Animation
> > > > > > # Handlers to manage events fired through movement, animation,
> screen
> > > > > > touches, accelerometer input, device shaking and collisions
> > > > > > # Several minor features aimed at speeding development, such as
> screen
> > > > > > settings and vibration
> >
> > > > > > The code is athttp://code.google.com/p/rokon/
> >
> > > > > > Again, I'd very much appreciate advice or help with any bugs you
> can
> > > > > > see, 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: Android 1.6 SDK is here!

2009-09-21 Thread Dianne Hackborn
I am personally pretty opposed to including source in the formal -SDK- for a
couple reasons:
1. The source is not documentation.  You should be coding your application
against the SDK specification in the documentation, not whatever some
current implementation is in the platform.
2. Yes, the documentation can be improved.  It is important to get feedback
on where the pain points are in the documentation, rather than providing
source code to cover up those problems.

On Mon, Sep 21, 2009 at 8:36 AM, Eric M. Burke  wrote:

>
> I do understand that sources are available at source.android.com, but
> it would save people time if a src JAR were bundled with the SDK
> download.
>
> http://code.google.com/p/android/issues/detail?id=979
>
> This seems like a reasonable request. I know I've personally spent
> many hours on previous SDKs trying to learn how to check out the
> source and configure it properly in Eclipse.
>
>
> On Sep 16, 1:15 am, Romain Guy  wrote:
> > > Guys, is there any particular reason for you not to include sources in
> > > 1.6 as well?
> >
> > Sources are available at source.android.com.
> >
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
> >
>
> >
>


-- 
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] fit text on 1 line

2009-09-21 Thread Wouter

Hey,

I am working on a project and i need to fit a text (string) on line at
a textView.
I know I can work with maxLines but if the text does not fit the view,
it has to end with "..."
so for example directed by brad pitt an...

So can users see that it is not the end of the text they are seeing
but that there is more ;)

How can I do that?

Thanx,

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

2009-09-21 Thread Dianne Hackborn
Don't use animations.  This is not what they are for.  They are for
performing transitions between different states of a UI, not for writing
game-like interactions.

On Mon, Sep 21, 2009 at 1:56 AM, HVT  wrote:

>
> Hello All,
>
> I'm facing a problem while clicking the objects while they animate.
> Please help me identify the click on the objects while they are
> animating.
>
> My requirement is to randomly move a ball around the screen and the
> user should be able to click this ball any time.
>
> Also this ball changes colours. For this is i have 3 different images
> of different colours and I want to create a frame by frame animation
> between them while they are animating.
>
> This makes it 2 animations at a time. a frame-by-frame animated image/
> object has to animated may be a /translate animation and this should
> be click able.
>
> Please help me fix this. I have stuck on this part for almost over a
> month now.
>
> Thanks,
> HVT
>
> >
>


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

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

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



[android-developers] Re: How to force soft keyboard to be visible?

2009-09-21 Thread Dianne Hackborn
Oh also it doesn't show by default if the IME needs to run in fullscreen
(typically because the device is in landscape).  Both of these are because
showing the IME is these cases is much more disruptive than showing it when
the target window can resize nicely to show all of its important UI in
conjunction with the IME.

On Mon, Sep 21, 2009 at 10:15 AM, Dianne Hackborn wrote:

> All I can say is the edit contacts activity in the standard platform does
> this just fine, using the standard API.  Either you are doing something
> different than it, or HTC's IME has some different behavior, but I don't
> know much about either of those.  Do note that normally the system will not
> show the IME by default if it has to use panning on the target window
> (instead of resize), and the only way to get around this would be to
> explicitly show the IME when you receive focus.
>
>
> On Mon, Sep 21, 2009 at 6:13 AM, James W  wrote:
>
>>
>> I have exactly the same requirement.
>>
>> Running on a Hero, which only has a soft keyboard. The above code is
>> copied exactly, yet it doesnt work. The keyboard is not shown no
>> matter where I put the code, before or after SetContentView().
>>
>> This seems like a pretty standard thing to want to do, is there some
>> other way of doing this?
>>
>> Thanks in advance..
>> James
>>
>> On Sep 19, 8:42 am, Dianne Hackborn  wrote:
>> > The G1 has a keyboard, so it works as I said -- the IME is not shown by
>> > default.  This is a policy decision of the platform.
>> >
>> > On a myTouch, since it doesn't have a keyboard, the IME will be shown by
>> > default in various cases (for example when you enter the edit contacts
>> > screen) when the app has indicated that is desired with the input
>> options.
>> >
>> > On Fri, Sep 18, 2009 at 4:13 PM, Mike Collins > >wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > The behavior I'm talking about is on a locked G1 with 1.5, I did not
>> > > expect the
>> > > emulator to be very useful.
>> >
>> > > The behavior on a myTouch (locked, 1.5) is really bizarre.
>> >
>> > > I'm beginning to think that I'm going to pull all the soft keyboard
>> > > code out
>> > > and let the user do the extra work.
>> >
>> > >  mike
>> >
>> > --
>> > 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 -
>>
>> >>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>


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

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

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



[android-developers] Re: How to force soft keyboard to be visible?

2009-09-21 Thread Dianne Hackborn
All I can say is the edit contacts activity in the standard platform does
this just fine, using the standard API.  Either you are doing something
different than it, or HTC's IME has some different behavior, but I don't
know much about either of those.  Do note that normally the system will not
show the IME by default if it has to use panning on the target window
(instead of resize), and the only way to get around this would be to
explicitly show the IME when you receive focus.

On Mon, Sep 21, 2009 at 6:13 AM, James W  wrote:

>
> I have exactly the same requirement.
>
> Running on a Hero, which only has a soft keyboard. The above code is
> copied exactly, yet it doesnt work. The keyboard is not shown no
> matter where I put the code, before or after SetContentView().
>
> This seems like a pretty standard thing to want to do, is there some
> other way of doing this?
>
> Thanks in advance..
> James
>
> On Sep 19, 8:42 am, Dianne Hackborn  wrote:
> > The G1 has a keyboard, so it works as I said -- the IME is not shown by
> > default.  This is a policy decision of the platform.
> >
> > On a myTouch, since it doesn't have a keyboard, the IME will be shown by
> > default in various cases (for example when you enter the edit contacts
> > screen) when the app has indicated that is desired with the input
> options.
> >
> > On Fri, Sep 18, 2009 at 4:13 PM, Mike Collins  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > The behavior I'm talking about is on a locked G1 with 1.5, I did not
> > > expect the
> > > emulator to be very useful.
> >
> > > The behavior on a myTouch (locked, 1.5) is really bizarre.
> >
> > > I'm beginning to think that I'm going to pull all the soft keyboard
> > > code out
> > > and let the user do the extra work.
> >
> > >  mike
> >
> > --
> > 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 -
>
> >
>


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

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

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



[android-developers] Re: is there anything wrong with the function camera.takePicture()???

2009-09-21 Thread Mark Murphy

> when i use the Camera class to make a little app to get a bitmap,but
> when it run,there'll be a problem:
> .
> 09-21 12:56:06.913: ERROR/AndroidRuntime(6083): at
> android.hardware.Camera.takePicture(Camera.java:362)
> .
>
> is anything wrong with this function
> takePicture(Camera.ShutterCallback shutter, Camera.PictureCallback
> raw, Camera.PictureCallback jpeg)?

That method works, at least on Android 1.5r3 (have not tried on Android
1.6 since I have no Android 1.6 device).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Problem running on 1.6 SDK.

2009-09-21 Thread Spencer Riddering

I found the problem.

My view (CheckableRelativeLayout) was inadvertently declared abstract.
Apparently this isn't a problem for the 1.5 platform but is a problem
for the 1.6 platform.

Depending on when carriers release 1.6, this change could cause my app
to start acting unreliably before the ADC2 judging is complete. Is
there anything that can be done about this?


On Sep 21, 2:33 am, Spencer Riddering  wrote:
> I'm testing my app with the new 1.6 SDK, and I ran into the error
> below. The InstantiationException doesn't give me much details. I'm
> wondering if anyone can give me a tip for how to debug this type of
> situation. Also, if someone could point me to the source for
> PhoneLayoutInflater I'd appreciate it.
>
> Note: This application works well using the 1.5 SDK. I've tested the
> 1.5 SDK version a lot in preparation for the ADC2.
>
> This problem occurs on a 1.6 Platform, HVGA, API Level 4, Google APIs
> AVD.
>
> I'll describe the code a bit, and give the actual lines which are
> involved.
>
> First, I've sub-classed RelativeLayout. I've only dynamically added a
> view to the layout after inflation is complete. This RelativeLayout
> sub-class is used in a ListView.
>
> Here are the bits that actually do stuff:
>
> package com.flingtap.done;
>
>     public CheckableRelativeLayout(Context context, AttributeSet
> attrs, int defStyle) {
>         super(context, attrs, defStyle);
>         try{
>                 TypedArray a = context.obtainStyledAttributes(attrs,
>                                 R.styleable.CheckableRelativeLayout, 
> defStyle, 0);
>
>                 mRadioButtonResourceId = a.getResourceId
> (R.styleable.CheckableRelativeLayout_radioButton, 0);
>                 if( 0 == mRadioButtonResourceId ){
>                         throw new RuntimeException("You must supply a 
> radioButton
> attribute.");
>                 }
>                 a.recycle();
>         }catch(Exception exp){
>                 Log.e(TAG, "ERR00019", exp);
>         }
>     }
>
>     protected void onFinishInflate() {
>         Log.v(TAG, "onFinishInflate() called");
>         super.onFinishInflate();
>         try{
>                 View radioButtonView = findViewById(mRadioButtonResourceId);
>                 assert null != radioButtonView;
>
>                 mRadioButton = (RadioButton) radioButtonView;
>                 assert null != mRadioButton;
>                 setMinimumHeight(mRadioButton.getHeight());
>         }catch(Exception exp){
>                 Log.e(TAG, "ERR0001A", exp);
>         }
>     }
>
> I've put a break point at the first line of both the
> CheckableRelativeLayout constructor and onFinishInflate method, but
> neither method seems to be reached.
>
> I instantiate this class from an XML layout like so:
>
>      xmlns:android="http://schemas.android.com/apk/res/android";
>     xmlns:app="http://schemas.android.com/apk/res/com.flingtap.done";
>     android:layout_width="fill_parent"
>     android:layout_height="?android:attr/listPreferredItemHeight"
>     android:drawSelectorOnTop="false"
>     app:radioButton="@+id/priority_options_list_item_radio_button"
>     android:paddingLeft="6dip"
>     android:paddingRight="6dip">
>
> 
>     
>         
>     
> ..
>
> I also added a Java exception breakpoint for InflateException and I
> get this stack:
>
> PhoneLayoutInflater(LayoutInflater).createView(String, String,
> AttributeSet) line: 516
> PhoneLayoutInflater(LayoutInflater).createViewFromTag(String,
> AttributeSet) line: 564
> PhoneLayoutInflater(LayoutInflater).inflate(XmlPullParser, ViewGroup,
> boolean) line: 385
> ...
>
> I searched the GIT repository for the PhoneLayoutInflater, but could
> not find it. Anyone know where I can find the source for this
> PhoneLayoutInflater?
>
> Finally, here is the error:
>
> 09-21 00:41:58.154: DEBUG/AndroidRuntime(773): Shutting down VM
> 09-21 00:41:58.154: WARN/dalvikvm(773): threadid=3: thread exiting
> with uncaught exception (group=0x4001aa28)
> 09-21 00:41:58.234: ERROR/AndroidRuntime(773): Uncaught handler:
> thread main exiting due to uncaught exception
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):
> android.view.InflateException: Binary XML file line #7: Error
> inflating class java.lang.reflect.Constructor
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):     at
> android.view.LayoutInflater.createView(LayoutInflater.java:512)
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):     at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:564)
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):     at
> android.view.LayoutInflater.inflate(LayoutInflater.java:385)
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):     at
> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):     at
> com.flingtap.done.LeanAdapter.newView(LeanAdapter.java:48)
> 09-21 00:41:58.264: ERROR/AndroidRuntime(773):     at
> com.flingtap.done.LeanAdapter.getView(LeanAdapter.java:37)
> 09-21 00:41:

[android-developers] Re: OpenGL 2D Game Framework

2009-09-21 Thread polyclefsoftware

Yes, the description in Google Code for the project says "powerful
enough to create a highly polished commercial game". But you can't
exactly create a commercial game with code licensed under the GPL,
right?

On Sep 21, 11:46 am, "nEx.Software" 
wrote:
> Dan, that's what I was thinking as well (regarding the GPLv3).
>
> On Sep 21, 9:42 am, Dan Sherman  wrote:
>
> > The library looks great (after a few hours of playing with it), definitely
> > has some improvements that could be made, but very well laid out and easy to
> > work with.
>
> > However, the GPLv3 does make game development a bit of an issue, if the
> > games need to be released as GPLv3 as well...
>
> > - Dan
>
> > On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu  wrote:
>
> > > I noticed on the google code pagehttp://code.google.com/p/rokon/that
> > > the license is GPL 3, which means anyone who uses it must open source
> > > their app.
>
> > > Richard, have you given some thought to changing the license to
> > > something more permissive? Either way, impressive work. Good job.
>
> > > On Sep 21, 10:21 am, pro  wrote:
> > > > Hi Richard,
>
> > > > What is the terms & conditions for using it? I mean copyright etc...
>
> > > > I'm developing some games ( my area of interest is AI type games ),
> > > > but I might be able to take some fragments of code for animations,
> > > > placement of objects etc. But for commercial side, I don't want to get
> > > > into something that has some weired licensing ...
>
> > > > No doubt this framework has some very very good stuff that possibly
> > > > can be used as cut&paste or simply dropping those class definition
> > > > files ...
>
> > > > -pro
>
> > > > On Sep 18, 6:08 am, "rich...@stickycoding.com"
>
> > > >  wrote:
> > > > > I've been working on a game framework for a little while, and while
> > > > > its far from perfect, I've put the current version online.
>
> > > > > To be honest, I haven't used much OpenGL in the past. Before last week
> > > > > I had never tried using it.
> > > > > If anyone would like to take a look, please do, I'd appreciate all the
> > > > > help possible on speeding it up.
> > > > > There are many features I have in mind and am planning at the minute,
> > > > > but so far it supports:
>
> > > > > # Texture and Sprite management
> > > > > # Text, using TTF fonts
> > > > > # Organised layers
> > > > > # Two audio management classes, one optimized for music, the other for
> > > > > sound effects
> > > > > # Sprite dynamics (acceleration, terminal velocity, collisions)
> > > > > # Animation
> > > > > # Handlers to manage events fired through movement, animation, screen
> > > > > touches, accelerometer input, device shaking and collisions
> > > > > # Several minor features aimed at speeding development, such as screen
> > > > > settings and vibration
>
> > > > > The code is athttp://code.google.com/p/rokon/
>
> > > > > Again, I'd very much appreciate advice or help with any bugs you can
> > > > > see, thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Mark Murphy


> Does anyone has an idea of how to split the screen into two? Is it
> possible
> for me to run an application in one screen and another app in other
> screen?

That is not presently possible in Android.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: How to force soft keyboard to be visible?

2009-09-21 Thread James W

I have exactly the same requirement.

Running on a Hero, which only has a soft keyboard. The above code is
copied exactly, yet it doesnt work. The keyboard is not shown no
matter where I put the code, before or after SetContentView().

This seems like a pretty standard thing to want to do, is there some
other way of doing this?

Thanks in advance..
James

On Sep 19, 8:42 am, Dianne Hackborn  wrote:
> The G1 has a keyboard, so it works as I said -- the IME is not shown by
> default.  This is a policy decision of the platform.
>
> On a myTouch, since it doesn't have a keyboard, the IME will be shown by
> default in various cases (for example when you enter the edit contacts
> screen) when the app has indicated that is desired with the input options.
>
> On Fri, Sep 18, 2009 at 4:13 PM, Mike Collins wrote:
>
>
>
>
>
>
>
> > The behavior I'm talking about is on a locked G1 with 1.5, I did not
> > expect the
> > emulator to be very useful.
>
> > The behavior on a myTouch (locked, 1.5) is really bizarre.
>
> > I'm beginning to think that I'm going to pull all the soft keyboard
> > code out
> > and let the user do the extra work.
>
> >  mike
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- Hide quoted text -
>
> - Show quoted text -

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



[android-developers] Re: Widgets changes with 1.6?

2009-09-21 Thread Norbert

Hi BoD,

I'm having the same issue with my widget. It's working fine in 1.5
I'm wondering if this has to do with the bugfix for the onDelete()-
Call in 1.5.

Norbert

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



[android-developers] Making UPNP work for Android

2009-09-21 Thread Satish Kota
Hi Guys,

I am in this BIG BIG problem...getting UPNP working on my computer and for
many reasons...it doesn't seem to be working...

Any body has any clue on how to get it working? Are there any one who has
any kind of code that could help me on this?

I believe Andromote is the only person who has done it...but dunno how did
he do it?

Before I ask this great great help..I want to explain what all I have
done...

I am supposed to build an android remote to control a UPNP device... and I
have done some research on UPNPtoolkits on Java...there were about 2 or 3
(Clink, SBBI, libupnp, etc.,) and the one which I seem to be more
comfortable is the CyberGarage's clink upnp toolkit (
http://cgupnpjava.sourceforge.net/). Clink uses xerces xml
reader/converter... I followed the pdf file he attached (
http://sourceforge.net/projects/cgupnpjava/files/) and went through the
samples... However looking and using them on a java app... it worked fine
and did good too..however the similar code failed on Android..

When I ran it on Android...I was able to do the Discover but could not get
the devices list...and thats the one I need...

Can someone help me do this part? I believe I just need to achieve on how to
get the correct device from UPNP...Once I  have the UPNP, I believe I can
always get the actions...

CAN SOMEONE PLEASE HELP ME?

*My  Environment:* Windows XP and Android 1.5 & 1.1 ( but I am working this
on 1.1)

Thanks and Regards
Satish N Kota

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



[android-developers] Re: Where did platform/packages/apps/Sync.git go?

2009-09-21 Thread Matt

Does anyone know the answer to this?  Has Google made it proprietary,
like their G-Mail application?

On Sep 18, 1:09 pm, Matt  wrote:
> I noticed that the Data Synchronization app was removed from the Donut
> branch; all of the files were deleted.  However, the Donut device
> still has Data Synchronization in its Settings.
>
> So where did the com.android.sync package go to?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] bug in FileInputStream for some chars?

2009-09-21 Thread Jan Zach

Hi,

I am trying to parse an xml file from the /sdcard/... directory using
the XmlPullParser. For a file containing a mixture of Czech and
Japanese (czech national chars + kana + kanji) I am getting exception:
position:END_TAG so that it looks that the parser cannot recognize
tags properly. I have tried a few configurations:

1) no android, java and the xpp3-1.1.4b_all.tgz - works for all cases,
also other parsers are ok
2) android and the xml as a resource stream inside the archive - works
3) android and the xml located at the sdcard - FAILS! (also it seems
it depends on the order of chars inside the xml)

All files are published at ezach.cz/parsertest.tgz, the xml is android/
test/test.xml.

I will appreciate any help as I am getting a bit frustrated and cannot
fully enjoy my new phone with Android :-) Thanks,

Jan

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



[android-developers] How to split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Karthik P
Does anyone has an idea of how to split the screen into two? Is it possible
for me to run an application in one screen and another app in other screen?
Any help in this regard will be of great help.
Karthik

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



[android-developers] updateTimeMillis not called for home screen widgets in 1.6

2009-09-21 Thread Norbert

Hi,

I came accross the issue that my widgets aren't working anymore when I
use the updateTimeMillis is used for home screen widgets.
Same code works fine on 1.5 but on 1.6 it's just not calling the
onUpdate() method any more.

The bug, that onDelete isn't called seems to be fixed. Could the other
bug result in the other bugfix?
Does anyone else have this problem or even better: a solution for it?
I know it's better to use the AlarmManager to give the user the chance
to configure the update periode, but still: This should be working,
shouldn't it?

Thx for your replies,
Norbert

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



[android-developers] How to split a screen into two?

2009-09-21 Thread Zombie

How do I run two apps by splitting a screen into two?

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



[android-developers] Re: Is it possible to extend resources xml with custom views?

2009-09-21 Thread kalikali

Hi,

Following this topic, if i customized a view in "A" application, and
want to re-use this view in other "B" or "C"... apps. As i know the
resource ( the default background image or string in custom view )
can't be used in other apps. Advanced, if i want to release this view
to other android platform, how to deal this case?

Best regards

On 8月31日, 上午6時14分, Mark Murphy  wrote:
> Daber wrote:
> > Does anybody knows if (and how ) I can write a custom view/widget and
> > then use it in resources in layout defintions?
>
> In terms of "if", yes, it is very doable.
>
> In terms of "how", I suspect there is at least one of the API demos on
> the subject, though I can't remember which one off the top of my head.
>
> Here's one blog post series I found in a Google Search:
>
> http://whyandroid.com/android/tutorial/43-tutorial/93-android-tutoria...
>
> (there's a few more posts in the series)
>
> and this:
>
> http://www.curious-creature.org/2009/03/01/android-layout-tricks-3-op...
>
> (doesn't discuss techniques, but the one example project has a custom
> widget)
>
> It's covered in some of the Android books, including (*cough*) two of mine.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year

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



[android-developers] Query...

2009-09-21 Thread nisha.devit

How can apply motion like touch screen animation in android...
I apply the following code

  ViewFlipper vf = (ViewFlipper) findViewById(R.id.details);
// Set an animation from res/anim: I pick push left out

vf.setAnimation(AnimationUtils.loadAnimation(view.getContext(),
R.anim.push_left_out));
vf.showPrevious();

But by using this I cant get the output like sequence in motion. So
what would be the actul code?



-Regards,

Nisha

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



[android-developers] Animation

2009-09-21 Thread HVT

Hello All,

I'm facing a problem while clicking the objects while they animate.
Please help me identify the click on the objects while they are
animating.

My requirement is to randomly move a ball around the screen and the
user should be able to click this ball any time.

Also this ball changes colours. For this is i have 3 different images
of different colours and I want to create a frame by frame animation
between them while they are animating.

This makes it 2 animations at a time. a frame-by-frame animated image/
object has to animated may be a /translate animation and this should
be click able.

Please help me fix this. I have stuck on this part for almost over a
month now.

Thanks,
HVT

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



[android-developers] Searchable Dictionary Example: R.raw.definitions cannot be resolved

2009-09-21 Thread Huanghuan

Hi there,

I am trying to compile the Searchable Dictionary example on my Eclipse
(OS: XP)

http://developer.android.com/guide/samples/SearchableDictionary/index.html

but it complians about "R.raw.temp" cannot be resolved at line 92 of
Dictionary.java file:

InputStream inputStream = context.getResources().openRawResource
(R.raw.temp);

Has anyone had similar problem and any solution please?

Many thanks,

Huan

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

2009-09-21 Thread neverland...@gmail.com

Hi,I can also see the market app, but when I sign in with a google
account , an error go out, "You don't have a network connection".
hmm..

On Sep 12, 4:32 am, dhr  wrote:
> Finally managed to make it work. Instead of copying the image file
> directly to the avd directory, had to copy image to /platforms/
> android-1.5/images the recreated the avd. Now android market is on the
> emulator!
>
> On Sep 11, 6:39 pm, dhr  wrote:
>
>
>
> > Looking for the same thing. This is what I found so 
> > far:http://forum.xda-developers.com/archive/index.php/t-529170.htmlAfter
> > copying system.img to the avd folder and running the simulator, a
> > message appears on the screen. It says "Welcome toAndroidDev Phone
> > 1. Tap theandroidto begin" And two buttons below. Clicking
> > everywhere does not help.
>
> > If you find out what to do next please post it here.
>
> > On Sep 7, 11:56 am, amit singh  wrote:
>
> > > Any pointers people? Thanks :)
>
> > > On Sep 4, 3:48 pm, amit singh  wrote:
>
> > > > How do I get theAndroidmarketapplicationonemulator? I dont have
> > > > the actual device.
>
> > > > I searched forums - but no one seems to have discussed this.
>
> > > > Thanks

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



[android-developers] How to update expandable view when adapter's data changed

2009-09-21 Thread lunatic

I have an activity that extends ExpandableListActivity. I use
SimpleCursorTreeAdapter to fill ExpandableListView.
My layout contains list view and empty view.
On app start ExpandableListActivity automatically chooses the right
view to display.

My steps:
1. App starts, there is no data. (empty view on the screen)
2. Insert some data into db.
3. Call adapter.notifyDataSetChanged(); But empty view is still on the
screen and there is no any item in my list view.

Then I restart app:
5. List view appears. I expand all groups and scroll to the bottom.
6. I click on the item in the list. New activity appears.
7. Click back button. All groups are collapsed and we are at the top
of the screen. Scroll position and expanded groups are not
remembered.
8. Delete all data from db and call adapter.notifyDataSetChanged();
9. Child views have disappeared, but top-level groups are still
visible.

Questions:
1. What can I do to replace empty view with list view?
2. What can I do to do to save state of groups and scroll position of
the list view?

Code:
public class MainActivity extends ExpandableListActivity {

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

dbHelper = new DBOpenHelper(this);

rubricsDbAdapter = new RubricsDBAdapter(dbHelper);
rubricsDbAdapter.open();

itemsDbAdapter = new ItemsDBAdapter(dbHelper);
itemsDbAdapter.open();

rubricsCursor = rubricsDbAdapter.getAllItemsCursor();
startManagingCursor(rubricsCursor);

// Cache the ID column index
rubricIdColumnIndex = rubricsCursor.getColumnIndexOrThrow
(RubricsDBAdapter.KEY_ID);

// Set up our adapter
mAdapter = new MyExpandableListAdapter(rubricsCursor,
this,
android.R.layout.simple_expandable_list_item_1,
android.R.layout.simple_expandable_list_item_1,
new String[] {RubricsDBAdapter.KEY_NAME},
new int[] {android.R.id.text1},
new String[] {ItemsDBAdapter.KEY_NAME},
new int[] {android.R.id.text1});

setListAdapter(mAdapter);
}

public boolean onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id) {
Intent i = new Intent(this, ItemViewActivity.class);
i.putExtra(ItemsDBAdapter.KEY_ID, id);
startActivity(i);

return super.onChildClick(parent, v, groupPosition,
childPosition, id);
}

private void updateMyData() {
int i;
int k;
long rubricId;

for (i = 1; i <= 5; i++) {
rubricId = rubricsDbAdapter.insert("rubric " + i);
for (k = 1; k <= 5; k++) {
itemsDbAdapter.insert("item " + i + "-" + k,
rubricId);
}
}

mAdapter.notifyDataSetChanged();
}

private void deleteMyData() {
rubricsDbAdapter.deleteAll();
itemsDbAdapter.deleteAll();

mAdapter.notifyDataSetChanged();
}

public class MyExpandableListAdapter extends
SimpleCursorTreeAdapter
{
public MyExpandableListAdapter(Cursor cursor, Context context,
int groupLayout,
int childLayout, String[] groupFrom, int[] groupTo,
String[] childrenFrom,
int[] childrenTo) {
super(context, cursor, groupLayout, groupFrom, groupTo,
childLayout, childrenFrom,
childrenTo);
}

@Override
protected Cursor getChildrenCursor(Cursor notebookCursor) {
// Given the group, we return a cursor for all the
children within that group
long id = notebookCursor.getLong(rubricIdColumnIndex);

Cursor itemsCursor = itemsDbAdapter.getRubricItemsCursor
(id);
startManagingCursor(itemsCursor);
return itemsCursor;
}

}
}

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



[android-developers] DHCP request failed wifi with WEP2 enterprise

2009-09-21 Thread John

I got a problem when I try to connect the wifi with WEP2 enterprise.
In the log, I found it failed when doing DHCP request. I don't know
why. Is any place I can get detail log. Or anything wrong with my
config, Or it is not supported by Android 1.5

Here is my config in /data/misc/wifi/wpa_supplicant.conf
---
ctrl_interface=tiwlan0
update_config=1

network={
ssid="TP-LINK"
key_mgmt=NONE
group=WEP104 WEP40
auth_alg=OPEN SHARED
wep_key0="1AY&S"
priority=1
disabled=1

}

network={
ssid="IBM"
identity="x...@xxx.com"
password="XX"
scan_ssid=1
proto=WPA2
key_mgmt=WPA-EAP
eap=LEAP
}

-

Ouput log - get by "adb logcat"
-
/WifiMonitor(   69): Event [CTRL-EVENT-STATE-CHANGE id=1 state=7]
/WifiMonitor(   69): Event [CTRL-EVENT-CONNECTED - Connection to
00:1e:bd:65:39:a0 completed (auth)
id=1 id_str=]]
/WifiStateTracker(   69): Changing supplicant state: GROUP_HANDSHAKE
==> COMPLETED
/WifiStateTracker(   69): New network state is CONNECTED
/WifiStateTracker(   69): DhcpHandler: DHCP request started
/SettingsWifiEnabler(  190): Received network state changed to
NetworkInfo: type: WIFI[], state: CON
ECTING/OBTAINING_IPADDR, reason: (unspecified), extra: (none),
roaming: false, failover: false, isAv
ilable: true
/WifiStateTracker(   69): DhcpHandler: DHCP request failed: DHCP
result was failed
/WifiMonitor(   69): Event [CTRL-EVENT-STATE-CHANGE id=1 state=8]
/WifiStateTracker(   69): Changing supplicant state: COMPLETED ==>
DORMANT
/WifiStateTracker(   69): Deconfiguring interface and stopping DHCP
/WifiMonitor(   69): Event [CTRL-EVENT-DISCONNECTED - Disconnect event
- remove keys]
/WifiMonitor(   69): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=8]
/WifiStateTracker(   69): New network state is DISCONNECTED
/WifiStateTracker(   69): Changing supplicant state: DORMANT ==>
DORMANT
/SettingsWifiEnabler(  190): Received network state changed to
NetworkInfo: type: WIFI[], state: DIS
ONNECTED/FAILED, reason: (unspecified), extra: (none), roaming: false,
failover: false, isAvailable:
true
/GpsLocationProvider(   69): updateNetworkState unavailable
/WifiMonitor(   69): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1]
/WifiStateTracker(   69): Changing supplicant state: DORMANT ==>
INACTIVE
/GpsLocationProvider(   69): updateNetworkState unavailable


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

2009-09-21 Thread HVT

I know its too late but Thanks for the reply.

Basically what I want is a combination of Translate and rotate
animation.

I dont know if i chose the right thing as i'm very new to android.

I want to animate a object on a random curve (like a freehand drawn
curve which has no specific shape).So for this i chose a animation set
of translate and rotate animatinos.

I hope it makes sense.

and also i want to capture clicks on the object while it animates.

Do you think you can help me?

Probably i chose the wrong approach kindly correct me if so.

Actually if you have a little idea of iPhone development, this kind of
animation can be achieved by making a image animate on a "Path". And
this path can be created by us by supplying random values.

Its a cake walk in iPhone.



On Aug 11, 10:36 pm, jhoffman  wrote:
> I'm not sure about the coordinates thing, but if you are trying to use
> rotateAnimation to rotate something such that it looks like it is
> spinning in-place, then 0,0 are not the coordinates you want. The
> coordinates are a 'pivot point'; you could think of them as the
> 'middle' of the rotation.
>
> If you want an object to rotate or spin without moving up/down/left/
> right, then what you actually want is:  RotateAnimation spin = new
> RotateAnimation(0.0f, 360.0f,Animation.RELATIVE_TO_SELF, 
> 0.5f,Animation.RELATIVE_TO_SELF, 0.5f);
>
> This gives the middle of the image as the 'pivot' so it doesn't move
> in an arc. Hope this helps!
>
> On Aug 11, 1:59 am, HVT  wrote:
>
>
>
> > Hello All,
>
> > I'm new to Android and trying to develop an app that has loads of
> >animation.
> > Its a small game.
>
> > Currently i have a object (image) moving around the canvas. I used
> >animationto animate it around the screen.
>
> > But the problem here is i dont have the X&Y coordinates of that object
> > while its animating.
> > I want to get the coordinates of the bitmap whenever i want during the
> >animation.
>
> > I think if there was some way where i can read the presentation layer
> > probably i could get the cordinates of the object.
>
> > Please help me guys i'm stuck here now for like a week.
>
> > My another problem is with rotateanimation, i some how dont seem to
> > understand its functionality.
> > I have played with it for a couple of days but no luck, i'm still new
> > to it and dont get anything.
>
> > The object makes big arcs even if the  x,y values are  0,0 and the
> > object jumps around when i try to give it random values.
>
> > Any help would be highly appreciated.
>
> > Thanks in advance.
>
> > HVT

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



[android-developers] is there anything wrong with the function camera.takePicture()???

2009-09-21 Thread lu

when i use the Camera class to make a little app to get a bitmap,but
when it run,there'll be a problem:
.
09-21 12:56:06.913: ERROR/AndroidRuntime(6083): at
android.hardware.Camera.takePicture(Camera.java:362)
.

is anything wrong with this function
takePicture(Camera.ShutterCallback shutter, Camera.PictureCallback
raw, Camera.PictureCallback jpeg)?

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



[android-developers] Android Dev Phone 1 Out Of Stock :-(

2009-09-21 Thread AJs

It was frustrating to pay $25 only to find out that the ADP 1 is out
of stock.
The page says it will be available early September ! I guess thats not
true as
September is ending now.

Does anyone know when will the device be available ?

-Thanks much
AJs

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



[android-developers] Fwd: [android-porting] How to add multiple frame buffer support in Android?

2009-09-21 Thread தங்கமணி அருண்
please help him

-- Forwarded message --
From: Pankaj 
Date: 2009/9/16
Subject: [android-porting] How to add multiple frame buffer support in
Android?
To: android-porting 



Hi all,

We are looking for one serious change in the Android's SurfaceFlinger,
as of now Android supports only one display thorugh framebuffer 0 (/
dev/graphics/fb0), but we want to add support for multiple frame
buffer (fb0/fb1/fb2). After looking into the surfaceflinger and
related module we came to know that we need to change the
surfaceflinger, following are some of the changes we have found to be
done (although I am not quite sure about these)
1: From SurfaceFlinger::readyToRun() we have to create secondary
displays and initialize them.
2: Make size of mGraphicsPlane (array of GraphicsPlane) as 2 (or n=no
of display)
3: From DisplayHardware::init while creating the EGLDisplayHardware
pass the dpy value and open the corresponding fb (0 or 1) depending on
dpy value.


But what I am not getting is that does we need to change the
initialization of EGLDisplay depending on this dpy values. Basically
what changes related with egl we need to do if we want to initialize
multiple displays.

In surfaceFlinger.cpp in many of the APIs (such as threadLoop,
handlePageFlip), the reference of HardwareDisplay is obtained from
graphicsPlane(0), so what if we have mulitple graphics plane?

If any body have worked or have any idea about this please share ...
or correct me if I am wrong somewhere..

Thanks
Pankaj





-- 
அன்புடன்
அருண்
--
http://ubuntu-tam.org
http://lists.ubuntu.com/ubuntu-l10n-tam
http://lists.ubuntu.com/ubuntu-tam
--

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



[android-developers] Re: Is it possible to extend resources xml with custom views?

2009-09-21 Thread kalikali

Hi..

Following this topic, If i customized a view in "A" application and
want to reuse in other "B" or "C" applications, as i know, the
resource file ( the default background image and string... in custom
view class ) can't be used by other apps. Advanced, If we want to
release this custom view class to other android platform, how to deal
this case?

Best regards

On 8月31日, 上午6時07分, Romain Guy  wrote:
> Yes you can, there are examples in the SDK (ApiDemos, Home.)
>
> On Sun, Aug 30, 2009 at 1:51 PM, Daber wrote:
>
> > Does anybody knows if (and how ) I can write a custom view/widget and
> > then use it in resources in layout defintions?
>
> > All the best,
> > Michał Dąbrowski
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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



[android-developers] Re: Hierarchy Viewer

2009-09-21 Thread Mark Murphy


> What this link repository?? You know?

http://source.android.com

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: OpenGL 2D Game Framework

2009-09-21 Thread nEx.Software

Dan, that's what I was thinking as well (regarding the GPLv3).

On Sep 21, 9:42 am, Dan Sherman  wrote:
> The library looks great (after a few hours of playing with it), definitely
> has some improvements that could be made, but very well laid out and easy to
> work with.
>
> However, the GPLv3 does make game development a bit of an issue, if the
> games need to be released as GPLv3 as well...
>
> - Dan
>
> On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu  wrote:
>
> > I noticed on the google code pagehttp://code.google.com/p/rokon/that
> > the license is GPL 3, which means anyone who uses it must open source
> > their app.
>
> > Richard, have you given some thought to changing the license to
> > something more permissive? Either way, impressive work. Good job.
>
> > On Sep 21, 10:21 am, pro  wrote:
> > > Hi Richard,
>
> > > What is the terms & conditions for using it? I mean copyright etc...
>
> > > I'm developing some games ( my area of interest is AI type games ),
> > > but I might be able to take some fragments of code for animations,
> > > placement of objects etc. But for commercial side, I don't want to get
> > > into something that has some weired licensing ...
>
> > > No doubt this framework has some very very good stuff that possibly
> > > can be used as cut&paste or simply dropping those class definition
> > > files ...
>
> > > -pro
>
> > > On Sep 18, 6:08 am, "rich...@stickycoding.com"
>
> > >  wrote:
> > > > I've been working on a game framework for a little while, and while
> > > > its far from perfect, I've put the current version online.
>
> > > > To be honest, I haven't used much OpenGL in the past. Before last week
> > > > I had never tried using it.
> > > > If anyone would like to take a look, please do, I'd appreciate all the
> > > > help possible on speeding it up.
> > > > There are many features I have in mind and am planning at the minute,
> > > > but so far it supports:
>
> > > > # Texture and Sprite management
> > > > # Text, using TTF fonts
> > > > # Organised layers
> > > > # Two audio management classes, one optimized for music, the other for
> > > > sound effects
> > > > # Sprite dynamics (acceleration, terminal velocity, collisions)
> > > > # Animation
> > > > # Handlers to manage events fired through movement, animation, screen
> > > > touches, accelerometer input, device shaking and collisions
> > > > # Several minor features aimed at speeding development, such as screen
> > > > settings and vibration
>
> > > > The code is athttp://code.google.com/p/rokon/
>
> > > > Again, I'd very much appreciate advice or help with any bugs you can
> > > > see, 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: OpenGL 2D Game Framework

2009-09-21 Thread Dan Sherman
The library looks great (after a few hours of playing with it), definitely
has some improvements that could be made, but very well laid out and easy to
work with.

However, the GPLv3 does make game development a bit of an issue, if the
games need to be released as GPLv3 as well...

- Dan

On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu  wrote:

>
> I noticed on the google code page http://code.google.com/p/rokon/ that
> the license is GPL 3, which means anyone who uses it must open source
> their app.
>
> Richard, have you given some thought to changing the license to
> something more permissive? Either way, impressive work. Good job.
>
> On Sep 21, 10:21 am, pro  wrote:
> > Hi Richard,
> >
> > What is the terms & conditions for using it? I mean copyright etc...
> >
> > I'm developing some games ( my area of interest is AI type games ),
> > but I might be able to take some fragments of code for animations,
> > placement of objects etc. But for commercial side, I don't want to get
> > into something that has some weired licensing ...
> >
> > No doubt this framework has some very very good stuff that possibly
> > can be used as cut&paste or simply dropping those class definition
> > files ...
> >
> > -pro
> >
> > On Sep 18, 6:08 am, "rich...@stickycoding.com"
> >
> >  wrote:
> > > I've been working on a game framework for a little while, and while
> > > its far from perfect, I've put the current version online.
> >
> > > To be honest, I haven't used much OpenGL in the past. Before last week
> > > I had never tried using it.
> > > If anyone would like to take a look, please do, I'd appreciate all the
> > > help possible on speeding it up.
> > > There are many features I have in mind and am planning at the minute,
> > > but so far it supports:
> >
> > > # Texture and Sprite management
> > > # Text, using TTF fonts
> > > # Organised layers
> > > # Two audio management classes, one optimized for music, the other for
> > > sound effects
> > > # Sprite dynamics (acceleration, terminal velocity, collisions)
> > > # Animation
> > > # Handlers to manage events fired through movement, animation, screen
> > > touches, accelerometer input, device shaking and collisions
> > > # Several minor features aimed at speeding development, such as screen
> > > settings and vibration
> >
> > > The code is athttp://code.google.com/p/rokon/
> >
> > > Again, I'd very much appreciate advice or help with any bugs you can
> > > see, 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
-~--~~~~--~~--~--~---



  1   2   >