[android-developers] Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Al Sutton

OK, I'm going to float an idea that I'd like some feedback on from 
developers and (hopefully) someone at Google (Justin, I'd appreciate any 
clarification you can give on this).

My company (Funky Android) is a UK Registered company and I would be 
willing to allow it to act as a publisher for *some* non-US/UK 
developers in order to get their paid apps into the app store. What I'd 
look for is a 2% cut of the app sales price on top of the Markets 30% 
cut in order to cover support and admin costs (i.e. forwarding user 
queries, paying the accountant to make sure the money flow is tax 
efficient and legal, etc.).

Is this something developers would want and Google would allow?

Al.

Mads Kristiansen wrote:
> I'd like to see someone create a solution like armadillo - i.e. a 
> wrapper to make apps available in the Android Market while using an 
> external DRM/payment solution. There is no word on when I will be able 
> to publish priced apps form my country, so that could be anywhere from 
> 1 month to years from now (well, probably not, but just to make a 
> point). That's a bit of a problem. I'll probably just publish my first 
> app and then do some shameless self promotion in it ;) instead of 
> charging, see what happens with the priced apps and then concentrate a 
> bit on the iPhone development.
>
> BR, Mads
>
> On Sat, Feb 14, 2009 at 8:28 AM, Mariano Kamp  > wrote:
>
> > Google checkout has been working since 2006
> It might be operational since then, but did anyone see Google's
> checkout in the wild?
> It is in Google's the best interest to finally do something about
> it and make it mandatory to use for people so that they will
> finally start using it, but I don't think it is in the best
> interest of developers to be forced to use an exotic payment
> system that no user has ever used before.
> Given that non-us/uk developers are not allowed to publish their
> apps makes the story worse, at least for those developers.
>
> That's the beauty of Apple's solution. They also don't provide
> paypal, but at least most user already have an iTunes account and
> things go very smoothly.
>
> On Sat, Feb 14, 2009 at 12:21 AM, Ivan Soto  > wrote:
>
> I've been reading a lot about this whole Google Merchant thing
> and it's actually that Google Checkout only allows to sell
> goods from US and UK. It's not an Android thing, it's their
> system is not even complete and operational for all countries.
>
> Well, I know they will add more countries like they said in
> the email but I wonder what is the ETA on Canada. Google
> checkout has been working since 2006 I believe and people have
> been whining since then. Still nothing has been done. So
> seeing how slow is this going, I wonder if they will actually
> add Canada (or more countries) in a matter of months or years
> or what?
>
>
>
> On Fri, Feb 13, 2009 at 4:06 PM, Mariano Kamp
> mailto:mariano.k...@gmail.com>> wrote:
>
> Yeah, that is really really bad and even worse and too
> late communicated. I wonder why?
>
> On Fri, Feb 13, 2009 at 7:55 PM, Ivan Soto
> mailto:ivanso...@gmail.com>> wrote:
>
> I knew you wouldn't be able to buy or sell IN Canada.
> But I had no idea that if I was IN Canada I wouldn't
> be able to sell to another countries.
>
> Now I'm sad.
>
>
> On Fri, Feb 13, 2009 at 11:29 AM, Al Sutton
> mailto:a...@funkyandroid.com>> wrote:
>
>
> Does Canada appear in the list in the email?
>
> Agus wrote:
> > no Canada?
> >
> > On Fri, Feb 13, 2009 at 10:24 AM, Al Sutton
> mailto:a...@funkyandroid.com>>
> wrote:
> >
> >> Google have already stated UK & US first, then
> Germany, Austria, and the
> >> Netherlands, followed by France, Italy, and Spain.
> >>
> >> It was all in an email Google sent out at the
> end of last year
> >>
> 
> (http://www.talkandroid.com/526-android-market-paid-apps-2009/).
> >>
> >> Al.
> >>
> >> Ivan Soto wrote:
> >>
> >>> I wonder the same.
> >>>
> >>> Will it be possible to sell from Canada to the
> rest of the world?
> >>>
> >>> On Fri, Feb 13, 2009 at 10:33 AM, Evgeny V
> mailto:evgen...@gmail.com>
> 

[android-developers] Re: Margin-problem with changed layout for titlebar

2009-02-14 Thread $§Kalle§$

I uploaded a screenshot, which shows the problem, I have with the
changed titlebar

http://hphone.eu/Android/Titlebar.html

KalLe

On 11 Feb., 21:09, $§Kalle§$ <__kalle...@hphone.eu> wrote:
> I am using the following Layout for thetitlebarwith a blue backround
> color
>
>          android:id="@+id/RelativeLayout01"
>         xmlns:android="http://schemas.android.com/apk/res/android";
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:background="#ff99">
>                          android:id="@+id/TextView01"
>                 android:layout_height="wrap_content"
>                 android:text="@string/app_name"
>                 android:textColor="#"
>                 android:textStyle="bold"
>                 android:gravity="center_vertical"
>                 android:layout_centerVertical="true"
>                 android:layout_width="wrap_content">
>         
> 
>
> In onCreate I got:
> ...
>         requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
>         setContentView(R.layout.main);
>         getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
> R.layout.title);
> ...
>
> With that I get a changedtitlebarfor my HelloWorlApp, that is fine.
> But somehow on the left and right side there is some margin and I
> still can see some Grey from the originaltitlebar.
>
> What did I wrong?
>
> KalLe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Mads Kristiansen
That's an interesting idea - I might sign up for something like that. In any
case it will be very interesting first of all to see how well the paid apps
will perform compared to a certain other Application Store.
Another option for me personally would be to take a "field trip" to Germany
and register a company if I get really desperate. I already have bank
accounts setup there and I go there often, so it's not a big deal, but it
really depends on when I can expect Denmark to join the "paid apps club".
/ Mads

On Sat, Feb 14, 2009 at 9:48 AM, Al Sutton  wrote:

>
> OK, I'm going to float an idea that I'd like some feedback on from
> developers and (hopefully) someone at Google (Justin, I'd appreciate any
> clarification you can give on this).
>
> My company (Funky Android) is a UK Registered company and I would be
> willing to allow it to act as a publisher for *some* non-US/UK
> developers in order to get their paid apps into the app store. What I'd
> look for is a 2% cut of the app sales price on top of the Markets 30%
> cut in order to cover support and admin costs (i.e. forwarding user
> queries, paying the accountant to make sure the money flow is tax
> efficient and legal, etc.).
>
> Is this something developers would want and Google would allow?
>
> Al.
>
> Mads Kristiansen wrote:
> > I'd like to see someone create a solution like armadillo - i.e. a
> > wrapper to make apps available in the Android Market while using an
> > external DRM/payment solution. There is no word on when I will be able
> > to publish priced apps form my country, so that could be anywhere from
> > 1 month to years from now (well, probably not, but just to make a
> > point). That's a bit of a problem. I'll probably just publish my first
> > app and then do some shameless self promotion in it ;) instead of
> > charging, see what happens with the priced apps and then concentrate a
> > bit on the iPhone development.
> >
> > BR, Mads
> >
> > On Sat, Feb 14, 2009 at 8:28 AM, Mariano Kamp  > > wrote:
> >
> > > Google checkout has been working since 2006
> > It might be operational since then, but did anyone see Google's
> > checkout in the wild?
> > It is in Google's the best interest to finally do something about
> > it and make it mandatory to use for people so that they will
> > finally start using it, but I don't think it is in the best
> > interest of developers to be forced to use an exotic payment
> > system that no user has ever used before.
> > Given that non-us/uk developers are not allowed to publish their
> > apps makes the story worse, at least for those developers.
> >
> > That's the beauty of Apple's solution. They also don't provide
> > paypal, but at least most user already have an iTunes account and
> > things go very smoothly.
> >
> > On Sat, Feb 14, 2009 at 12:21 AM, Ivan Soto  > > wrote:
> >
> > I've been reading a lot about this whole Google Merchant thing
> > and it's actually that Google Checkout only allows to sell
> > goods from US and UK. It's not an Android thing, it's their
> > system is not even complete and operational for all countries.
> >
> > Well, I know they will add more countries like they said in
> > the email but I wonder what is the ETA on Canada. Google
> > checkout has been working since 2006 I believe and people have
> > been whining since then. Still nothing has been done. So
> > seeing how slow is this going, I wonder if they will actually
> > add Canada (or more countries) in a matter of months or years
> > or what?
> >
> >
> >
> > On Fri, Feb 13, 2009 at 4:06 PM, Mariano Kamp
> > mailto:mariano.k...@gmail.com>> wrote:
> >
> > Yeah, that is really really bad and even worse and too
> > late communicated. I wonder why?
> >
> > On Fri, Feb 13, 2009 at 7:55 PM, Ivan Soto
> > mailto:ivanso...@gmail.com>> wrote:
> >
> > I knew you wouldn't be able to buy or sell IN Canada.
> > But I had no idea that if I was IN Canada I wouldn't
> > be able to sell to another countries.
> >
> > Now I'm sad.
> >
> >
> > On Fri, Feb 13, 2009 at 11:29 AM, Al Sutton
> > mailto:a...@funkyandroid.com>>
> wrote:
> >
> >
> > Does Canada appear in the list in the email?
> >
> > Agus wrote:
> > > no Canada?
> > >
> > > On Fri, Feb 13, 2009 at 10:24 AM, Al Sutton
> > mailto:a...@funkyandroid.com>>
> > wrote:
> > >
> > >> Google have already stated UK & US first, then
> > Germany, Austria, and the
> > >> Netherlands, followed by France, Italy, an

[android-developers] Re: Setup Merchant Account link now available

2009-02-14 Thread Mariano Kamp
You wouldn't be on equal footing with us/uk developers. The category winners
could already be picked when you are allowed to finally publish your app.

On Sat, Feb 14, 2009 at 8:41 AM, Mads Kristiansen <
mads.kristian...@nullwire.com> wrote:

> I'd like to see someone create a solution like armadillo - i.e. a wrapper
> to make apps available in the Android Market while using an external
> DRM/payment solution. There is no word on when I will be able to publish
> priced apps form my country, so that could be anywhere from 1 month to years
> from now (well, probably not, but just to make a point). That's a bit of a
> problem. I'll probably just publish my first app and then do some shameless
> self promotion in it ;) instead of charging, see what happens with the
> priced apps and then concentrate a bit on the iPhone development.
>
> BR, Mads
>
>
> On Sat, Feb 14, 2009 at 8:28 AM, Mariano Kamp wrote:
>
>> > Google checkout has been working since 2006
>> It might be operational since then, but did anyone see Google's checkout
>> in the wild?
>> It is in Google's the best interest to finally do something about it and
>> make it mandatory to use for people so that they will finally start using
>> it, but I don't think it is in the best interest of developers to be forced
>> to use an exotic payment system that no user has ever used before.
>> Given that non-us/uk developers are not allowed to publish their apps
>> makes the story worse, at least for those developers.
>>
>> That's the beauty of Apple's solution. They also don't provide paypal, but
>> at least most user already have an iTunes account and things go very
>> smoothly.
>>
>> On Sat, Feb 14, 2009 at 12:21 AM, Ivan Soto  wrote:
>>
>>> I've been reading a lot about this whole Google Merchant thing and it's
>>> actually that Google Checkout only allows to sell goods from US and UK. It's
>>> not an Android thing, it's their system is not even complete and operational
>>> for all countries.
>>> Well, I know they will add more countries like they said in the email but
>>> I wonder what is the ETA on Canada. Google checkout has been working since
>>> 2006 I believe and people have been whining since then. Still nothing has
>>> been done. So seeing how slow is this going, I wonder if they will actually
>>> add Canada (or more countries) in a matter of months or years or what?
>>>
>>>
>>>
>>> On Fri, Feb 13, 2009 at 4:06 PM, Mariano Kamp wrote:
>>>
 Yeah, that is really really bad and even worse and too late
 communicated. I wonder why?

 On Fri, Feb 13, 2009 at 7:55 PM, Ivan Soto  wrote:

> I knew you wouldn't be able to buy or sell IN Canada. But I had no idea
> that if I was IN Canada I wouldn't be able to sell to another countries.
> Now I'm sad.
>
>
> On Fri, Feb 13, 2009 at 11:29 AM, Al Sutton wrote:
>
>>
>> Does Canada appear in the list in the email?
>>
>> Agus wrote:
>> > no Canada?
>> >
>> > On Fri, Feb 13, 2009 at 10:24 AM, Al Sutton 
>> wrote:
>> >
>> >> Google have already stated UK & US first, then Germany, Austria,
>> and the
>> >> Netherlands, followed by France, Italy, and Spain.
>> >>
>> >> It was all in an email Google sent out at the end of last year
>> >> (http://www.talkandroid.com/526-android-market-paid-apps-2009/).
>> >>
>> >> Al.
>> >>
>> >> Ivan Soto wrote:
>> >>
>> >>> I wonder the same.
>> >>>
>> >>> Will it be possible to sell from Canada to the rest of the world?
>> >>>
>> >>> On Fri, Feb 13, 2009 at 10:33 AM, Evgeny V > >>> > wrote:
>> >>>
>> >>>
>> >>> But it's available for US and UK countires!
>> >>>
>> >>> Means it that only US and UK citizen could be a sellers?
>> >>>
>> >>> On Fri, Feb 13, 2009 at 7:24 PM, g1bb > >>> > wrote:
>> >>>
>> >>>
>> >>> Woah, now I can specify a price!
>> >>>
>> >>>
>> >>> On Feb 13, 10:12 am, g1bb > >>> > wrote:
>> >>> > I noticed a 'Setup a Merchant Account at Google
>> >>> CheckoutFree' is now
>> >>>
>> >>> > available at market.android.com
>> >>> , but not functional yet.
>> We're
>> >>> getting
>> >>> > closer! Is the link working for anyone?
>> >>>
>> >>>
>> >>>
>> >>>
>> >> --
>> >> ==
>> >> Funky Android Limited is registered in England & Wales with the
>> >> company number  6741909. The registered head office is Kemp House,
>> >> 152-160 City Road, London,  EC1V 2NX, UK.
>> >>
>> >> The views expressed in this email are those of the author and not
>> >> necessarily those of Funky Android Limited, it's associates, or
>> it's
>> >> subsidiaries.
>> >>
>> >>
>> >>
>> >
>>

[android-developers] Re: Setup Merchant Account link now available

2009-02-14 Thread Mads Kristiansen
Yes, well hopefully I can create apps that are able to compete with the
other really skillful developers out there. What happens is that I'll
probably just give it away for free and make it my mission in life
ruin it for somebody else trying to sell a similar app until I can charge
myself. ;) .. Well, not quite - I'll probably figure something
out.

On Sat, Feb 14, 2009 at 10:22 AM, Mariano Kamp wrote:

> You wouldn't be on equal footing with us/uk developers. The category
> winners could already be picked when you are allowed to finally publish your
> app.
>
>
> On Sat, Feb 14, 2009 at 8:41 AM, Mads Kristiansen <
> mads.kristian...@nullwire.com> wrote:
>
>> I'd like to see someone create a solution like armadillo - i.e. a wrapper
>> to make apps available in the Android Market while using an external
>> DRM/payment solution. There is no word on when I will be able to publish
>> priced apps form my country, so that could be anywhere from 1 month to years
>> from now (well, probably not, but just to make a point). That's a bit of a
>> problem. I'll probably just publish my first app and then do some shameless
>> self promotion in it ;) instead of charging, see what happens with the
>> priced apps and then concentrate a bit on the iPhone development.
>>
>> BR, Mads
>>
>>
>> On Sat, Feb 14, 2009 at 8:28 AM, Mariano Kamp wrote:
>>
>>> > Google checkout has been working since 2006
>>> It might be operational since then, but did anyone see Google's checkout
>>> in the wild?
>>> It is in Google's the best interest to finally do something about it and
>>> make it mandatory to use for people so that they will finally start using
>>> it, but I don't think it is in the best interest of developers to be forced
>>> to use an exotic payment system that no user has ever used before.
>>> Given that non-us/uk developers are not allowed to publish their apps
>>> makes the story worse, at least for those developers.
>>>
>>> That's the beauty of Apple's solution. They also don't provide paypal,
>>> but at least most user already have an iTunes account and things go very
>>> smoothly.
>>>
>>> On Sat, Feb 14, 2009 at 12:21 AM, Ivan Soto  wrote:
>>>
 I've been reading a lot about this whole Google Merchant thing and it's
 actually that Google Checkout only allows to sell goods from US and UK. 
 It's
 not an Android thing, it's their system is not even complete and 
 operational
 for all countries.
 Well, I know they will add more countries like they said in the email
 but I wonder what is the ETA on Canada. Google checkout has been working
 since 2006 I believe and people have been whining since then. Still nothing
 has been done. So seeing how slow is this going, I wonder if they will
 actually add Canada (or more countries) in a matter of months or years or
 what?



 On Fri, Feb 13, 2009 at 4:06 PM, Mariano Kamp 
 wrote:

> Yeah, that is really really bad and even worse and too late
> communicated. I wonder why?
>
> On Fri, Feb 13, 2009 at 7:55 PM, Ivan Soto wrote:
>
>> I knew you wouldn't be able to buy or sell IN Canada. But I had no
>> idea that if I was IN Canada I wouldn't be able to sell to another
>> countries.
>> Now I'm sad.
>>
>>
>> On Fri, Feb 13, 2009 at 11:29 AM, Al Sutton wrote:
>>
>>>
>>> Does Canada appear in the list in the email?
>>>
>>> Agus wrote:
>>> > no Canada?
>>> >
>>> > On Fri, Feb 13, 2009 at 10:24 AM, Al Sutton 
>>> wrote:
>>> >
>>> >> Google have already stated UK & US first, then Germany, Austria,
>>> and the
>>> >> Netherlands, followed by France, Italy, and Spain.
>>> >>
>>> >> It was all in an email Google sent out at the end of last year
>>> >> (http://www.talkandroid.com/526-android-market-paid-apps-2009/).
>>> >>
>>> >> Al.
>>> >>
>>> >> Ivan Soto wrote:
>>> >>
>>> >>> I wonder the same.
>>> >>>
>>> >>> Will it be possible to sell from Canada to the rest of the world?
>>> >>>
>>> >>> On Fri, Feb 13, 2009 at 10:33 AM, Evgeny V >> >>> > wrote:
>>> >>>
>>> >>>
>>> >>> But it's available for US and UK countires!
>>> >>>
>>> >>> Means it that only US and UK citizen could be a sellers?
>>> >>>
>>> >>> On Fri, Feb 13, 2009 at 7:24 PM, g1bb <
>>> corymgibb...@gmail.com
>>> >>> > wrote:
>>> >>>
>>> >>>
>>> >>> Woah, now I can specify a price!
>>> >>>
>>> >>>
>>> >>> On Feb 13, 10:12 am, g1bb >> >>> > wrote:
>>> >>> > I noticed a 'Setup a Merchant Account at Google
>>> >>> CheckoutFree' is now
>>> >>>
>>> >>> > available at market.android.com
>>> >>> , but not functional yet.
>>> We're
>>> >>>

[android-developers] SimpleCursorAdapter and ListView.setTextFilterEnabled()

2009-02-14 Thread Parakoos

I want to display all contacts with a phone number in a list. I got
the data, it is displayed in the list but my problem is that I can't
get the text filter functionality to work. E.g. when the user types
'fre' it should filter out all entries not containing 'fre'.

This is what I've got in the ListActivity.onCreate()

[syntax="java"]
Cursor c = this.getContentResolver().query(People.CONTENT_URI,
new String[] { People._ID, People.DISPLAY_NAME },
People.PRIMARY_PHONE_ID + " IS NOT NULL",
null,
People.DISPLAY_NAME + " asc");
this.startManagingCursor(c);

SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_1,
c,
new String[] { People.DISPLAY_NAME },
new int[] { android.R.id.text1 });
adapter.setStringConversionColumn(adapter.getCursor().getColumnIndex
(People.DISPLAY_NAME));
adapter.bindView(getListView(), this, c);
setListAdapter(adapter);
this.getListView().setTextFilterEnabled(true);
[/syntax]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 force MediaStore to rescan the SD card

2009-02-14 Thread info.sktechnol...@gmail.com

If I progammatically store new media files on the SD card, the
MediaStore does not know about them until I remove and reinsert the SD
card.  Is there a way to tell the MediaStore to rescan the SD card
without first unmounting the SD card?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting location with multiple providers

2009-02-14 Thread Aaron Smith
Aha. I didn't know it was possible to register more than one provider at a
time. I'll give that a go. Cheers.

On Feb 13, 2009 5:47 PM, "Timo Bruck"  wrote:

I believe you have to register for multiple location providers (network,
gps).

In my code, I call requestLocationUpdates() on each provider, but they all
share the same LocationListener. My LocationListener keeps track of the
highest quality fix received so far (via getAccuracy()) and discards fixes
that are worse than that.

-Timo

On Fri, Feb 13, 2009 at 4:06 AM, muckwarrior  wrote:
> > > I want my app to...
-- 
-Timo


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



[android-developers] Share component as APK file

2009-02-14 Thread kevin

I am working on couple android applications which share a common
component. The component has Activities, Service and own
AndroidManifest.xml. After research, it seems there is no concept of
run time share library among applications in Android. So I am looking
for a way to linked the share component with other applications at
compile time.

Applications which will use the component can come from external,
therefore I will only provided the compiled file. I would like to
build the component into own apk or jar file, can external application
include my jar/apk file into their package and be able to start my
activity? Please share your experience and advice.

Thanks,
Kevin

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



[android-developers] Re: Share component as APK file

2009-02-14 Thread Mark Murphy

kevin wrote:
> I am working on couple android applications which share a common
> component. The component has Activities, Service and own
> AndroidManifest.xml. After research, it seems there is no concept of
> run time share library among applications in Android. So I am looking
> for a way to linked the share component with other applications at
> compile time.
> 
> Applications which will use the component can come from external,
> therefore I will only provided the compiled file. I would like to
> build the component into own apk or jar file, can external application
> include my jar/apk file into their package and be able to start my
> activity? 

JAR, yes. It is possible to build Android-aware JARs, containing only
classes compiled against the Android SDK JAR. Those Android-aware JARs
can define activities, services, etc. Those Android-aware JARs can, in
turn, be put in the libs/ directory of an Android APK project and be
compiled in.

A couple of limits:

-- You cannot define resources in Android-aware JARs, because resources
are packaged in APKs, not JARs. To compensate, refactor your API to
accept resource IDs as parameters, so the calling application can supply
you with resource IDs to use.

-- You cannot declare a manifest in Android-aware JARs, because the
manifest is packaged in the APK. This means your calling application
will need to declare any JAR-provided activities, services, etc. on your
behalf.

My book-in-progress _The Busy Coder's Guide to *Advanced* Android
Development_ has a section on this technique.

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

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



[android-developers] Re: Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Mark Murphy

Al Sutton wrote:
> OK, I'm going to float an idea that I'd like some feedback on from 
> developers and (hopefully) someone at Google (Justin, I'd appreciate any 
> clarification you can give on this).
> 
> My company (Funky Android) is a UK Registered company and I would be 
> willing to allow it to act as a publisher for *some* non-US/UK 
> developers in order to get their paid apps into the app store. What I'd 
> look for is a 2% cut of the app sales price on top of the Markets 30% 
> cut in order to cover support and admin costs (i.e. forwarding user 
> queries, paying the accountant to make sure the money flow is tax 
> efficient and legal, etc.).
> 
> Is this something developers would want and Google would allow?

I had much the same thought late last night: developers residing outside
of Android Market-served areas need an agent to distribute the products
in the Market on their behalf. For some developers, this might need to
be a permanent arrangement, if Google Checkout never reaches their
country for whatever reason.

IANAL, but a quick read of the Developer Distribution Agreement didn't
turn up anything that would prohibit agents from acting on a developer's
behalf. The only thing lightly sticky is that I think the agent's
"contact information will be displayed in each application detail page
and made available to users for customer support purposes."

The big-time headache, of course, is tax considerations. The agent would
have to deal with the same tax considerations that Checkout has
struggled with...which isn't a problem if the agent had to figure that
out already.

An agent could bundle this into a larger service, of course --
distribution through multiple channels, PR and blogger relations,
front-line support (to deal with the "contact information" clause
mentioned above), etc.

A spin on the same concept would be to set up a US- or UK-based
non-profit cooperative whose mission would be to provide those agent
services to its members.

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

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



[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?

2009-02-14 Thread kolby

Mark,

thanks for the tip on the URI encoding of the data for loadData. It
worked like a charm. Apparently, I'm not the only one with this
problem though. API documentation would go along way.

Michael


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: [Split the Android screen into two parts and run 2 applications simultaneously on both screen]

2009-02-14 Thread सरोज
Hello Faber,

One more thing you told that
"you can combine App A and App B into App C and have each sub App write into
their own view which would be contained in another view".

How to do this .can you show some example/sample ?

Thanking you.

Regards,
Saroj


On Sat, Feb 14, 2009 at 6:33 PM, Saroj (सरोज)  wrote:

> Hello Faber,
>
> Here App A and App B are system apps like contacts, dialer, browser, etc.
> I want to run these two apps simultaneously in two separate part/view of
> the android screen.
>
> Regards,
> Saroj K Pradhan
>
>
> On Sat, Feb 14, 2009 at 1:12 AM, Faber Fedor  wrote:
>
>> Are App A and App B your own apps (as opposed to say, system apps like
>> Dialer and Maps)?  I would try combining App A and App B into App C and have
>> each (sub)App write to their own View which would be contained in another
>> view.
>>
>> On Fri, Feb 13, 2009 at 8:52 AM, saroj  wrote:
>>
>>>
>>> Hello all,
>>>
>>> I need to split the Android screen into two parts and run 2
>>> applications (app A and app B) simultaneously. app A will run on
>>> screen 1 and app B will run on screen 2. Both are visible to the
>>> users. I need to implement this thing in the Android Framework.
>>>
>>> How to do it ?
>>>
>>> Waiting for your valuable inputs.
>>>
>>>
>>> Regards,
>>> Saroj K Pradhan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Faber Fedor
>> Linux New Jersey
>> http://linuxnj.com
>>
>> >>
>>
>
>
> --
> Regards,
> Saroj K Pradhan
>
>
> "My formula for living is quite simple. I get up in the morning and I go to
> bed at night. In between, I occupy myself as best I can. "
>



-- 
Regards,
Saroj K Pradhan


"My formula for living is quite simple. I get up in the morning and I go to
bed at night. In between, I occupy myself as best I can. "

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

2009-02-14 Thread for android
any help?

On Fri, Feb 13, 2009 at 4:00 PM, for android  wrote:

> I donot have a device.I am testing on the emulator.
>
> When i send a message(problematically and through the device) with special
> characters i am not able to view them  properly.
>
> For eg: when i send a message from one emulator to another say "~Ha".I see
> only the character "~" in the other emulator.
>
> But when i send the same message from the DDMS ,i donot see the problem.
>
> Is this a problem with the emulator or am i missing somthing..
>
>
> sm.sendTextMessage("5556", null, "~Ha", null, 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] Re: [Split the Android screen into two parts and run 2 applications simultaneously on both screen]

2009-02-14 Thread सरोज
Hello Faber,

Here App A and App B are system apps like contacts, dialer, browser, etc.
I want to run these two apps simultaneously in two separate part/view of the
android screen.

Regards,
Saroj K Pradhan

On Sat, Feb 14, 2009 at 1:12 AM, Faber Fedor  wrote:

> Are App A and App B your own apps (as opposed to say, system apps like
> Dialer and Maps)?  I would try combining App A and App B into App C and have
> each (sub)App write to their own View which would be contained in another
> view.
>
> On Fri, Feb 13, 2009 at 8:52 AM, saroj  wrote:
>
>>
>> Hello all,
>>
>> I need to split the Android screen into two parts and run 2
>> applications (app A and app B) simultaneously. app A will run on
>> screen 1 and app B will run on screen 2. Both are visible to the
>> users. I need to implement this thing in the Android Framework.
>>
>> How to do it ?
>>
>> Waiting for your valuable inputs.
>>
>>
>> Regards,
>> Saroj K Pradhan
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Faber Fedor
> Linux New Jersey
> http://linuxnj.com
>
> >
>


-- 
Regards,
Saroj K Pradhan


"My formula for living is quite simple. I get up in the morning and I go to
bed at night. In between, I occupy myself as best I can. "

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: [Split the Android screen into two parts and run 2 applications simultaneously on both screen]

2009-02-14 Thread Mark Murphy

Saroj (सरोज) wrote:
> Here App A and App B are system apps like contacts, dialer, browser, etc.
> I want to run these two apps simultaneously in two separate part/view of
> the android screen.

I do not believe that is possible, especially if they are not your
applications (e.g., dialer, browser).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training in Sweden -- http://www.sotrium.com/training.php

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



[android-developers] Re: [Split the Android screen into two parts and run 2 applications simultaneously on both screen]

2009-02-14 Thread सरोज
Hello Faber,

I want to implement these idea in the android framework.The android screen
is divided into two parts called dual screen. The android framework would
manage the 2 system application and run first application on first part of
screen and run second application on second part of screen of the android.
How to do it ?
waiting for your inputs.

Thanking you,

Regards,
Saroj K Pradhan


On Sat, Feb 14, 2009 at 6:35 PM, Saroj (सरोज)  wrote:

> Hello Faber,
>
> One more thing you told that
> "you can combine App A and App B into App C and have each sub App write
> into their own view which would be contained in another view".
>
> How to do this .can you show some example/sample ?
>
> Thanking you.
>
> Regards,
> Saroj
>
>
>
> On Sat, Feb 14, 2009 at 6:33 PM, Saroj (सरोज)  wrote:
>
>> Hello Faber,
>>
>> Here App A and App B are system apps like contacts, dialer, browser, etc.
>> I want to run these two apps simultaneously in two separate part/view of
>> the android screen.
>>
>> Regards,
>> Saroj K Pradhan
>>
>>
>> On Sat, Feb 14, 2009 at 1:12 AM, Faber Fedor wrote:
>>
>>> Are App A and App B your own apps (as opposed to say, system apps like
>>> Dialer and Maps)?  I would try combining App A and App B into App C and have
>>> each (sub)App write to their own View which would be contained in another
>>> view.
>>>
>>> On Fri, Feb 13, 2009 at 8:52 AM, saroj  wrote:
>>>

 Hello all,

 I need to split the Android screen into two parts and run 2
 applications (app A and app B) simultaneously. app A will run on
 screen 1 and app B will run on screen 2. Both are visible to the
 users. I need to implement this thing in the Android Framework.

 How to do it ?

 Waiting for your valuable inputs.


 Regards,
 Saroj K Pradhan







>>>
>>>
>>> --
>>> Faber Fedor
>>> Linux New Jersey
>>> http://linuxnj.com
>>>
>>> >>>
>>>
>>
>>
>> --
>> Regards,
>> Saroj K Pradhan
>>
>>
>> "My formula for living is quite simple. I get up in the morning and I go
>> to bed at night. In between, I occupy myself as best I can. "
>>
>
>
>
> --
> Regards,
> Saroj K Pradhan
>
>
> "My formula for living is quite simple. I get up in the morning and I go to
> bed at night. In between, I occupy myself as best I can. "
>



-- 
Regards,
Saroj K Pradhan


"My formula for living is quite simple. I get up in the morning and I go to
bed at night. In between, I occupy myself as best I can. "

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?

2009-02-14 Thread Fred Grott(shareme)

Kolby, Someone just updated javadocs for webview and etc in
source..its in code review..

I found a lot of more answers ot webview question i had..hold on link
is

http://review.source.android.com/Gerrit#patch,sidebyside,8267,1,core/java/android/webkit/WebView.java

On Feb 14, 7:55 am, kolby  wrote:
> Mark,
>
> thanks for the tip on the URI encoding of the data for loadData. It
> worked like a charm. Apparently, I'm not the only one with this
> problem though. API documentation would go along way.
>
> Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Identifying a Phone By A Unique ID?

2009-02-14 Thread Mark Hansen

Is there some method in which i can identify a phone, a serial number
or something similar that's accessible by code?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Sunil . Maharana

Hi Hans, Thanks for your help Hans, i have created two projects same as your project name and added your files, the TestService project is fine, but for  ServiceMonitor project it is giving error at the import statement only.It is not allowing to import the TestService as  "The import 'com.android.TestService.*' cannot be resolved"import com.android.TestService.*;I have created two projects as C:\Project\Andriod\workspace  for TestServiceC:\Project\Andriod\workspace1  for Service MonitorDo i need to setup some kind of settings in my windows,could you plz give some clue about how i have to keep those files so that when i will run those it won't give me the import error.As per my knowledge the AIDL files we have to execute at both the end , i mean at TestService and Service Monitor site, but yoiu have execiuted it only TestService site, plz correct me if i am wrong.Thanks n RegardsSunil-android-develop...@googlegroups.com wrote: -To: Android Developers From: Hans Sent by: android-developers@googlegroups.comDate: 02/13/2009 07:39PMSubject: [android-developers] Re: Unable to start service Intent error in Client-Server projectHere's the URL: http://www.plugin-factory.com/storage/workspace.zipThere are two projects in it:    (1)ServiceMonitor - a simple activity that has 3 buttons and atext view.  One buttons starts and binds to the service, the otherstops and unbinds from the service, the third is a query button thatwas used to test some functions of the service that were related tochecking network status (but that's not important now and I erasedthat code to keep it clearer.)    (2)TestService - an out of process service that exposes twointerfaces (there are 3 AIDL files in the project, one for eachinterface, and another interface that exposes the callback mechanismto interested clients), the first interface allows you to register/unregister for callbacks, the second is just a test interface to showyou can expose multiple interfaces and on a service and bind to theones you want.That's pretty much it.The ServiceMonitor project imports from the TestService in order touse the interfaces, and the TestService project manifest specifies aglobal service reference name of "TEST_SERVICE" and also denotes thatthe service runs in its own process.    Hope this helps :).    Hans
__


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



[android-developers] Unable to start service Intent error in Client-Server project

2009-02-14 Thread Android



Hi Hans,

Thanks for your help Hans, i have created two projects same as your
project name and added your files, the TestService project is fine,
but for  ServiceMonitor project it is giving error at the import
statement only.
It is not allowing to import the TestService as  "The import
'com.android.TestService.*' cannot be resolved"
import com.android.TestService.*;

I have created two projects as
C:\Project\Andriod\workspace  for TestService

C:\Project\Andriod\workspace1  for Service Monitor

Do i need to setup some kind of settings in my windows,could you plz
give some clue about how i have to keep those files so that when i
will run those it won't give me the import error.

As per my knowledge the AIDL files we have to execute at both the
end , i mean at TestService and Service Monitor site, but yoiu have
execiuted it only TestService site, plz correct me if i am wrong.

Thanks n Regards
Sunil

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

2009-02-14 Thread Mark Murphy

Mark Hansen wrote:
> Is there some method in which i can identify a phone, a serial number
> or something similar that's accessible by code?

That depends on how you define "identify" and "phone". ;-)

You can get at the IMEI number via android.telephony.TelephonyManager's
getDeviceId() method...but I think that's tied to the SIM, and I don't
know what will occur if/when Android is ported to non-GSM devices. This
one also requires a security permission, IIRC.

You can get ANDROID_ID from android.provider.Settings.System, which is
"a unique 64-bit value as a hex string"...except on the emulator, where
it is null.

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

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

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



[android-developers] Re: Identifying a Phone By A Unique ID?

2009-02-14 Thread sm1

There are a few such serial numbers in a G1. For example, using the
TelephonyManager you can obtain the SIM Serial Number and also the
Device ID.

Application {Device Internals for r1} will show you these, as well as
other data.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Identifying a Phone By A Unique ID?

2009-02-14 Thread Mark Hansen

Basically I'm reporting a score via a webservice, instead of having a
login password I was just wanting to use a unqiue phone id to track
the user.

Is ANDRIOD_ID just an accesible global type variable?

Thanks for the help.

Mark

On Feb 14, 10:50 am, Mark Murphy  wrote:
> Mark Hansen wrote:
> > Is there some method in which i can identify a phone, a serial number
> > or something similar that's accessible by code?
>
> That depends on how you define "identify" and "phone". ;-)
>
> You can get at the IMEI number via android.telephony.TelephonyManager's
> getDeviceId() method...but I think that's tied to the SIM, and I don't
> know what will occur if/when Android is ported to non-GSM devices. This
> one also requires a security permission, IIRC.
>
> You can get ANDROID_ID from android.provider.Settings.System, which is
> "a unique 64-bit value as a hex string"...except on the emulator, where
> it is null.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Identifying a Phone By A Unique ID?

2009-02-14 Thread Mark Murphy

Mark Hansen wrote:
> Basically I'm reporting a score via a webservice, instead of having a
> login password I was just wanting to use a unqiue phone id to track
> the user.
> 
> Is ANDRIOD_ID just an accesible global type variable?

It's a static public field on android.provider.Settings.System.

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

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



[android-developers] Re: Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Al Sutton

The first step is, of course, Google saying that they won't shut down 
the agents account as soon as they list someone elses app

Al.

Mark Murphy wrote:
> Al Sutton wrote:
>   
>> OK, I'm going to float an idea that I'd like some feedback on from 
>> developers and (hopefully) someone at Google (Justin, I'd appreciate any 
>> clarification you can give on this).
>>
>> My company (Funky Android) is a UK Registered company and I would be 
>> willing to allow it to act as a publisher for *some* non-US/UK 
>> developers in order to get their paid apps into the app store. What I'd 
>> look for is a 2% cut of the app sales price on top of the Markets 30% 
>> cut in order to cover support and admin costs (i.e. forwarding user 
>> queries, paying the accountant to make sure the money flow is tax 
>> efficient and legal, etc.).
>>
>> Is this something developers would want and Google would allow?
>> 
>
> I had much the same thought late last night: developers residing outside
> of Android Market-served areas need an agent to distribute the products
> in the Market on their behalf. For some developers, this might need to
> be a permanent arrangement, if Google Checkout never reaches their
> country for whatever reason.
>
> IANAL, but a quick read of the Developer Distribution Agreement didn't
> turn up anything that would prohibit agents from acting on a developer's
> behalf. The only thing lightly sticky is that I think the agent's
> "contact information will be displayed in each application detail page
> and made available to users for customer support purposes."
>
> The big-time headache, of course, is tax considerations. The agent would
> have to deal with the same tax considerations that Checkout has
> struggled with...which isn't a problem if the agent had to figure that
> out already.
>
> An agent could bundle this into a larger service, of course --
> distribution through multiple channels, PR and blogger relations,
> front-line support (to deal with the "contact information" clause
> mentioned above), etc.
>
> A spin on the same concept would be to set up a US- or UK-based
> non-profit cooperative whose mission would be to provide those agent
> services to its members.
>
>   


-- 
==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-02-14 Thread Mark Hansen

That should work nicely.. thanks for the information.

On Feb 14, 11:02 am, Mark Murphy  wrote:
> Mark Hansen wrote:
> > Basically I'm reporting a score via a webservice, instead of having a
> > login password I was just wanting to use a unqiue phone id to track
> > the user.
>
> > Is ANDRIOD_ID just an accesible global type variable?
>
> It's a static public field on android.provider.Settings.System.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Programmatically get resource information

2009-02-14 Thread stanchat

I have a SQLite database and one of the tables has a column that is
the string name of a jpeg file..

For instance the column is called "PhotoID" and a record value is say
"photoone.jpg"
I have strored all the actual jpegs in the drawable resouce directory.

I would like to be able to programmatically access the resources with
having to prep or setup the link.  I have about 100 photos but do want
to setup a link to the actual resource id.

For instance the R class has the following setting
==

 public static final int david_beckham=0x7f020011;

I have created a record in my DB as follows;

"INSERT INTO Celebrity_Trump_Raw_Data (Rank, CelebrityName, PayMil,
WebRank, PressRank, TVRank, PhotoId) VALUES ('5',  '  David Beckham',
50, '10', '3', '18', 'David_Beckham.jpg');",

I would like to do something like this:

int curr_pic_res = R.drawable.(String.tolower(Celeb.PhotoID));

Is this possible or do I have to create the resource links manaully.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

Make sure you have added TestService to your build path for the
service monitor :).

I'm new to Eclipse myself :).

The two projects are in the same workspace, yes?  Just different
folders I presume?

The zip file I provided was the contents of my workspace, it had those
two folders in it.

You should be able to create a blank workspace in Eclipse, put the
contents of the zip file (the two base project folders) into that
blank workspace through your file manager/explorer in your OS, then
back in Eclipse, choose File|Import|General|Existing Project and
import both projects.  It should build after that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can I bind to the MediaPlaybackService?

2009-02-14 Thread info.sktechnol...@gmail.com

The MediaPlaybackService has exported=true but no intent filters.
How do I create an Intent to bind to it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

You should only need the AIDL file to reside in the TestService's
folder because the IDL compiler will find it there.  Again, make sure
you have your build path setup properly for Service Monitor.

Iirc, I tested this on a laptop I'd not used for anything and it built
for me straight away when I put the zip contents into a blank
workspace and then imported the two projects.

Good luck! :)

P.S. If problems continue, let me know and we'll work it out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] howto access music file properties?

2009-02-14 Thread robotissues

I would like to retrieve the properties that describe an mp3 file's
properties (ie: author, album, title ...).  I was not able to use
javax.sound.sampled.AudioFileFormat to do this.  Advice super
appreciated.

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



[android-developers] Need some help at testing an Android game

2009-02-14 Thread LuchoLaf

Hi from Argentina! we are a little team working on a tower defense-
like game for Android. Our problem is that it's really complicated to
get a real Android device here and we need it in order to see how the
game performs.

So this is a little help request for those who own a G1 or similar:
here is a demo that plays alone and after a few seconds it stops and
print the minFps, maxFps and avgFps of the game.

http://www.wikiupload.com/download_page.php?id=97986

If you can just run it and give me the results I would really
appreciate it.

Thanks a ton,

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



[android-developers] Re: Need some help at testing an Android game

2009-02-14 Thread Al

Hi, here are the results I got:

Min fps: 8
Max fps: 43
avg fps: 24

The game looks quite interesting, good luck.

On Feb 14, 5:02 pm, LuchoLaf  wrote:
> Hi from Argentina! we are a little team working on a tower defense-
> like game for Android. Our problem is that it's really complicated to
> get a real Android device here and we need it in order to see how the
> game performs.
>
> So this is a little help request for those who own a G1 or similar:
> here is a demo that plays alone and after a few seconds it stops and
> print the minFps, maxFps and avgFps of the game.
>
> http://www.wikiupload.com/download_page.php?id=97986
>
> If you can just run it and give me the results I would really
> appreciate it.
>
> Thanks a ton,
>
> Lucho
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: G1 detected as 'offline' by Eclipse plugin

2009-02-14 Thread GiladH

Hi,

If you're ALWAYS having this problem - your best bet it so go to the
driver manager and look for yellow (i.e. incompletely installed) USB
drivers

If you're having this problem every now & again - just boot your PC
when it happens. couldn't figure out anything smarter than that..

GiladH



On Jan 27, 10:56 pm, Hypercreature  wrote:
> Hey GiladH,
> I'm having the same problem. How did you fix it? A restart or
> something? Thanks.
>
> On Dec 2 2008, 10:15 am, GiladH  wrote:
>
> > Problem resolved.
> > Probably due to improper USB driver installation.
>
> > On Dec 1, 10:34 pm, GiladH  wrote:
>
> > > Guys,
>
> > > I can debug my app just fine with the emulator.
>
> > > However, when I connect my G1 device to desktop via USB and attempt
> > > to run/debug my app on it (after following "Developing on Device
> > > Hardware" steps in android docs) I fail.
>
> > > The error msg I get: "Failed to upload MyAppName.apk on device
> > > 'HT841LC09904':Unabletoopensyncconnection!"
>
> > > Running "adb devices" displays the G1 device is as 'offline'.
>
> > > The G1 relevant configuration values are:
> > >      - Wireless controls>Airplain mode==true
> > >      - SDCard >Use for USB storage==false
> > >      - Application>Unknown Resources==true
> > >      - Development>USB Debugging==true
>
> > > Also - application section of manifest app contains:
> > > android:debuggable="true"
>
> > > Any helpful idea will be welcomed.
>
> > > GiladH
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Need some help at testing an Android game

2009-02-14 Thread LuchoLaf

Ups, I get avg fps: 38 on the emulator. Anyway, does it feel right the
motion and animations or does it look choppy?

Thanks buddy!

On 14 feb, 14:10, Al  wrote:
> Hi, here are the results I got:
>
> Min fps: 8
> Max fps: 43
> avg fps: 24
>
> The game looks quite interesting, good luck.
>
> On Feb 14, 5:02 pm, LuchoLaf  wrote:
>
> > Hi from Argentina! we are a little team working on a tower defense-
> > like game for Android. Our problem is that it's really complicated to
> > get a real Android device here and we need it in order to see how the
> > game performs.
>
> > So this is a little help request for those who own a G1 or similar:
> > here is a demo that plays alone and after a few seconds it stops and
> > print the minFps, maxFps and avgFps of the game.
>
> >http://www.wikiupload.com/download_page.php?id=97986
>
> > If you can just run it and give me the results I would really
> > appreciate it.
>
> > Thanks a ton,
>
> > Lucho
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 MediaStore to rescan the SD card

2009-02-14 Thread kolby

You can make an android.media.MediaScannerConnection, connect to it,
and provide a client to scan a directory.

Michael

On Feb 14, 7:05 am, "info.sktechnol...@gmail.com"
 wrote:
> If I progammatically store new media files on the SD card, the
> MediaStore does not know about them until I remove and reinsert the SD
> card.  Is there a way to tell the MediaStore to rescan the SD card
> without first unmounting the SD card?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?

2009-02-14 Thread kolby

Apparently the problem was not documentation, but my lack of
understanding of the data: scheme.
My bad,
Michael

On Feb 14, 10:08 am, "Fred Grott(shareme)" 
wrote:
> Kolby, Someone just updated javadocs for webview and etc in
> source..its in code review..
>
> I found a lot of more answers ot webview question i had..hold on link
> is
>
> http://review.source.android.com/Gerrit#patch,sidebyside,8267,1,core/...
>
> On Feb 14, 7:55 am, kolby  wrote:
>
> > Mark,
>
> > thanks for the tip on the URI encoding of the data for loadData. It
> > worked like a charm. Apparently, I'm not the only one with this
> > problem though. API documentation would go along way.
>
> > Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 defining selector drawable

2009-02-14 Thread Meryl Silverburgh

Hi,

I am trying to setup a selector drawable in my asset file like this:
* 2 different images for 'on'/'off' mode in rest mode (i.e. it does
not has focus)
* another 2 different images for 'on'/'off' mode in focus mode (i.e.
it has the focus).

In my case, the rest mode works, but the 'focus' mode does not.

Can you please tell me what am I missing in the focus mode? Thank you.


http://schemas.android.com/apk/res/android";>






  





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



[android-developers] Re: Playing video in android

2009-02-14 Thread Ash

Thank u so much for the reply but The program does Not execute at
all.. Can u please help

On Feb 9, 2:53 am, Dilli  wrote:
>  Hi
>
>  i think you fixed the size ofvideodisplay
>
>     >>  mHolder.setFixedSize(176, 144);
>
>   it may cause the problem of  videodisplaying
>
>  use   mHolder.setFixedSize(mp.getVideoWidth(),
> mp.getVideoHeight());
>
>  Regards
>
> On Feb 9, 3:58 am, Ash  wrote:
>
> > Playvideoonandroid
> > -
>
> > I'm trying toplayvideofiles onandroid...can anyone please help
> > me...
> > I'm not able to see thevideobut audio works fine... here is the code
>
> > PLEASE HELP ME... BY GUIDING ME.. BY CORRECTING THE CODE
> > OR WITH ANY NEW CODE
>
> > package com.vi3;
>
> > import java.io.IOException;
> > importandroid.app.Activity;
> > importandroid.os.Bundle;
> > importandroid.content.Context;
> > importandroid.graphics.PixelFormat;
> > importandroid.media.MediaPlayer;
> > importandroid.media.MediaPlayer.OnBufferingUpdateListener;
> > importandroid.media.MediaPlayer.OnCompletionListener;
> > importandroid.media.MediaPlayer.OnErrorListener;
> > importandroid.util.Log;
> > importandroid.view.Menu;
> > importandroid.view.SurfaceHolder;
> > importandroid.view.SurfaceView;
> > importandroid.view.Surface;
> > importandroid.view.Window;
> > //importandroid.view.Menu.Item;
>
> > public class vi3 extends Activity
> > {
> >    private static final String LOG_TAG = "|";
> >    private MediaPlayer mp;
>
> >    private Preview mPreview;
> >    //private myAcListener myListener = new myAcListener()this;
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle icicle)
> >    {
> >       super.onCreate(icicle);
> >       Log.i(LOG_TAG, "CameraApp.onCreate");
> >       mPreview = new Preview(this);
> >       //requestWindowFeature(W);
>
> >     //  stopMedia();
> >        //     releaseMedia();
> >       setContentView(R.layout.main);
>
> >       //setContentView(mPreview);
> >       playMedia("");
>
> >    }
>
> >    private void playMedia(String s_filePath)
> >    {
> >       setContentView(mPreview);
> >       //s_filePath = "/tmp/mp4.mp4";
> >       s_filePath =  "/data/local/video/test_qcif_200_aac_64.mp4";
> >       //s_filePath = "/tmp/test.mpg";
> >       //s_filePath = "/tmp/3.3gp";
> >       Log.i(LOG_TAG, "CameraApp.playMedia");
> >       mp = new MediaPlayer();
> >       try
> >       {
> >          mp.setDataSource(s_filePath);
> >       }
> >       catch (IllegalArgumentException e)
> >       {
> >          // TODO Auto-generated catch block
> >          Log.v(LOG_TAG,
> > "CameraApp.playMedia:IllegalArgumentException");
> >          e.printStackTrace();
> >       }
> >       catch (IOException e)
> >       {
> >          Log.v(LOG_TAG, "CameraApp.playMedia:IOException");
> >          // TODO Auto-generated catch block
> >          e.printStackTrace();
> >       }
> >       try
> >       {
>
> >          //mp.setDisplay(mPreview.getHolder().getSurface());
> >          mp.prepare();
> >          int i = mp.getDuration();
> >          Log.i(LOG_TAG, "Duration:" + String.valueOf(i));
> >          mp.start();
> >       }
> >       catch (Exception e)
> >       {
> >          Log.v(LOG_TAG, e.toString());
> >          mp.stop();
> >          mp.release();
> >       }
> >       //setContentView(mPreview);
> >    }
>
> >    private void pauseMedia()
> >    {
> >       Log.i(LOG_TAG, "CameraApp.pauseMedia");
> >       if (null != mp)
> >       {
> >          mp.pause();
> >       }
> >    }
>
> >    private void stopMedia()
> >    {
> >       Log.i(LOG_TAG, "CameraApp.stopMedia");
> >       if (null != mp)
> >       {
> >          mp.stop();
> >       }
> >    }
> >    private void releaseMedia()
> >    {
> >       Log.i(LOG_TAG, "CameraApp.releaseMedia");
> >       if (null != mp)
> >       {
> >          mp.release();
> >       }
> >    }
> >    class Preview extends SurfaceView implements
> > SurfaceHolder.Callback
> >    {
> >        SurfaceHolder   mHolder;
> >        private boolean         mHasSurface;
> >        Preview(Context context) {
> >            super(context);
>
> >            mHolder = getHolder();
> >            mHolder.addCallback(this);
> >            mHasSurface = false;
>
> >            //mHolder.setFixedSize(320, 240);
> >            mHolder.setFixedSize(176, 144);
> >            //mHolder.setFixedSize(192, 242);
> >        }
>
> >        public void surfaceCreated(SurfaceHolder holder) {
> >            // The Surface has been created, start our main acquisition
> > thread.
> >            mHasSurface = true;
> >        }
>
> >        public void surfaceDestroyed(SurfaceHolder holder) {
> >            // Surface will be destroyed when we return. Stop the
> > preview.
> >            mHasSurface = false;
> >        }
>
> >        public void surfaceChanged(SurfaceHolder holder, int format,int
> > w, int h) {
> >            // Surface size or format

[android-developers] Re: Playing video in android

2009-02-14 Thread Ash

Thank u so much for the reply but The program does not work even
after changing

Thank you for much for the replyCan you please help me..


On Feb 9, 12:04 pm, Dave Sparks  wrote:
> First, the surface type needs to be push buffers. In your Preview
> constructor, add the following:
>
>     getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
>
> Second, you need to tell the media player where to display thevideo.
> You have a line commented out:
>
>     //mp.setDisplay(mPreview.getHolder().getSurface());
>
> It should look like this:
>
>     mp.setDisplay(mPreview.getHolder());
>
> If you get stuck, take a look at the VideoView.java widget source code
> on android.git.kernel.org. It's in the frameworks/base project at core/
> java/widget/VideoView.java
>
> On Feb 8, 2:58 pm, Ash  wrote:
>
> > Playvideoon android
> > -
>
> > I'm trying to playvideofiles on android...can anyone please help
> > me...
> > I'm not able to see thevideobut audio works fine... here is the code
>
> > PLEASE HELP ME... BY GUIDING ME.. BY CORRECTING THE CODE
> > OR WITH ANY NEW CODE
>
> > package com.vi3;
>
> > import java.io.IOException;
> > import android.app.Activity;
> > import android.os.Bundle;
> > import android.content.Context;
> > import android.graphics.PixelFormat;
> > import android.media.MediaPlayer;
> > import android.media.MediaPlayer.OnBufferingUpdateListener;
> > import android.media.MediaPlayer.OnCompletionListener;
> > import android.media.MediaPlayer.OnErrorListener;
> > import android.util.Log;
> > import android.view.Menu;
> > import android.view.SurfaceHolder;
> > import android.view.SurfaceView;
> > import android.view.Surface;
> > import android.view.Window;
> > //import android.view.Menu.Item;
>
> > public class vi3 extends Activity
> > {
> >    private static final String LOG_TAG = "|";
> >    private MediaPlayer mp;
>
> >    private Preview mPreview;
> >    //private myAcListener myListener = new myAcListener()this;
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle icicle)
> >    {
> >       super.onCreate(icicle);
> >       Log.i(LOG_TAG, "CameraApp.onCreate");
> >       mPreview = new Preview(this);
> >       //requestWindowFeature(W);
>
> >     //  stopMedia();
> >        //     releaseMedia();
> >       setContentView(R.layout.main);
>
> >       //setContentView(mPreview);
> >       playMedia("");
>
> >    }
>
> >    private void playMedia(String s_filePath)
> >    {
> >       setContentView(mPreview);
> >       //s_filePath = "/tmp/mp4.mp4";
> >       s_filePath =  "/data/local/video/test_qcif_200_aac_64.mp4";
> >       //s_filePath = "/tmp/test.mpg";
> >       //s_filePath = "/tmp/3.3gp";
> >       Log.i(LOG_TAG, "CameraApp.playMedia");
> >       mp = new MediaPlayer();
> >       try
> >       {
> >          mp.setDataSource(s_filePath);
> >       }
> >       catch (IllegalArgumentException e)
> >       {
> >          // TODO Auto-generated catch block
> >          Log.v(LOG_TAG,
> > "CameraApp.playMedia:IllegalArgumentException");
> >          e.printStackTrace();
> >       }
> >       catch (IOException e)
> >       {
> >          Log.v(LOG_TAG, "CameraApp.playMedia:IOException");
> >          // TODO Auto-generated catch block
> >          e.printStackTrace();
> >       }
> >       try
> >       {
>
> >          //mp.setDisplay(mPreview.getHolder().getSurface());
> >          mp.prepare();
> >          int i = mp.getDuration();
> >          Log.i(LOG_TAG, "Duration:" + String.valueOf(i));
> >          mp.start();
> >       }
> >       catch (Exception e)
> >       {
> >          Log.v(LOG_TAG, e.toString());
> >          mp.stop();
> >          mp.release();
> >       }
> >       //setContentView(mPreview);
> >    }
>
> >    private void pauseMedia()
> >    {
> >       Log.i(LOG_TAG, "CameraApp.pauseMedia");
> >       if (null != mp)
> >       {
> >          mp.pause();
> >       }
> >    }
>
> >    private void stopMedia()
> >    {
> >       Log.i(LOG_TAG, "CameraApp.stopMedia");
> >       if (null != mp)
> >       {
> >          mp.stop();
> >       }
> >    }
> >    private void releaseMedia()
> >    {
> >       Log.i(LOG_TAG, "CameraApp.releaseMedia");
> >       if (null != mp)
> >       {
> >          mp.release();
> >       }
> >    }
> >    class Preview extends SurfaceView implements
> > SurfaceHolder.Callback
> >    {
> >        SurfaceHolder   mHolder;
> >        private boolean         mHasSurface;
> >        Preview(Context context) {
> >            super(context);
>
> >            mHolder = getHolder();
> >            mHolder.addCallback(this);
> >            mHasSurface = false;
>
> >            //mHolder.setFixedSize(320, 240);
> >            mHolder.setFixedSize(176, 144);
> >            //mHolder.setFixedSize(192, 242);
> >        }
>
> >        public void surfaceCreated(SurfaceHolder holder) {
> >            // The Surface has been created, start our

[android-developers] Re: Playing video in android

2009-02-14 Thread Dave Sparks

We can't help you if you can't describe the errors you are seeing.
What is in the log?

On Feb 14, 10:01 am, Ash  wrote:
> Thank u so much for the reply but The program does Not execute at
> all.. Can u please help
>
> On Feb 9, 2:53 am, Dilli  wrote:
>
> >  Hi
>
> >  i think you fixed the size ofvideodisplay
>
> > >>  mHolder.setFixedSize(176, 144);
>
> >   it may cause the problem of  videodisplaying
>
> >  use   mHolder.setFixedSize(mp.getVideoWidth(),
> > mp.getVideoHeight());
>
> >  Regards
>
> > On Feb 9, 3:58 am, Ash  wrote:
>
> > > Playvideoonandroid
> > > -
>
> > > I'm trying toplayvideofiles onandroid...can anyone please help
> > > me...
> > > I'm not able to see thevideobut audio works fine... here is the code
>
> > > PLEASE HELP ME... BY GUIDING ME.. BY CORRECTING THE CODE
> > > OR WITH ANY NEW CODE
>
> > > package com.vi3;
>
> > > import java.io.IOException;
> > > importandroid.app.Activity;
> > > importandroid.os.Bundle;
> > > importandroid.content.Context;
> > > importandroid.graphics.PixelFormat;
> > > importandroid.media.MediaPlayer;
> > > importandroid.media.MediaPlayer.OnBufferingUpdateListener;
> > > importandroid.media.MediaPlayer.OnCompletionListener;
> > > importandroid.media.MediaPlayer.OnErrorListener;
> > > importandroid.util.Log;
> > > importandroid.view.Menu;
> > > importandroid.view.SurfaceHolder;
> > > importandroid.view.SurfaceView;
> > > importandroid.view.Surface;
> > > importandroid.view.Window;
> > > //importandroid.view.Menu.Item;
>
> > > public class vi3 extends Activity
> > > {
> > >private static final String LOG_TAG = "|";
> > >private MediaPlayer mp;
>
> > >private Preview mPreview;
> > >//private myAcListener myListener = new myAcListener()this;
> > >/** Called when the activity is first created. */
> > >@Override
> > >public void onCreate(Bundle icicle)
> > >{
> > >   super.onCreate(icicle);
> > >   Log.i(LOG_TAG, "CameraApp.onCreate");
> > >   mPreview = new Preview(this);
> > >   //requestWindowFeature(W);
>
> > > //  stopMedia();
> > >// releaseMedia();
> > >   setContentView(R.layout.main);
>
> > >   //setContentView(mPreview);
> > >   playMedia("");
>
> > >}
>
> > >private void playMedia(String s_filePath)
> > >{
> > >   setContentView(mPreview);
> > >   //s_filePath = "/tmp/mp4.mp4";
> > >   s_filePath =  "/data/local/video/test_qcif_200_aac_64.mp4";
> > >   //s_filePath = "/tmp/test.mpg";
> > >   //s_filePath = "/tmp/3.3gp";
> > >   Log.i(LOG_TAG, "CameraApp.playMedia");
> > >   mp = new MediaPlayer();
> > >   try
> > >   {
> > >  mp.setDataSource(s_filePath);
> > >   }
> > >   catch (IllegalArgumentException e)
> > >   {
> > >  // TODO Auto-generated catch block
> > >  Log.v(LOG_TAG,
> > > "CameraApp.playMedia:IllegalArgumentException");
> > >  e.printStackTrace();
> > >   }
> > >   catch (IOException e)
> > >   {
> > >  Log.v(LOG_TAG, "CameraApp.playMedia:IOException");
> > >  // TODO Auto-generated catch block
> > >  e.printStackTrace();
> > >   }
> > >   try
> > >   {
>
> > >  //mp.setDisplay(mPreview.getHolder().getSurface());
> > >  mp.prepare();
> > >  int i = mp.getDuration();
> > >  Log.i(LOG_TAG, "Duration:" + String.valueOf(i));
> > >  mp.start();
> > >   }
> > >   catch (Exception e)
> > >   {
> > >  Log.v(LOG_TAG, e.toString());
> > >  mp.stop();
> > >  mp.release();
> > >   }
> > >   //setContentView(mPreview);
> > >}
>
> > >private void pauseMedia()
> > >{
> > >   Log.i(LOG_TAG, "CameraApp.pauseMedia");
> > >   if (null != mp)
> > >   {
> > >  mp.pause();
> > >   }
> > >}
>
> > >private void stopMedia()
> > >{
> > >   Log.i(LOG_TAG, "CameraApp.stopMedia");
> > >   if (null != mp)
> > >   {
> > >  mp.stop();
> > >   }
> > >}
> > >private void releaseMedia()
> > >{
> > >   Log.i(LOG_TAG, "CameraApp.releaseMedia");
> > >   if (null != mp)
> > >   {
> > >  mp.release();
> > >   }
> > >}
> > >class Preview extends SurfaceView implements
> > > SurfaceHolder.Callback
> > >{
> > >SurfaceHolder   mHolder;
> > >private boolean mHasSurface;
> > >Preview(Context context) {
> > >super(context);
>
> > >mHolder = getHolder();
> > >mHolder.addCallback(this);
> > >mHasSurface = false;
>
> > >//mHolder.setFixedSize(320, 240);
> > >mHolder.setFixedSize(176, 144);
> > >//mHolder.setFixedSize(192, 242);
> > >}
>
> > >public void surfaceCreated(SurfaceHolder holder) {
> > >// The Surface has been created, start our main acquisi

[android-developers] Re: G1 detected as 'offline' by Eclipse plugin

2009-02-14 Thread Al Sutton

If you're running Vista you may just be stuffed.

I have two machines, an XP one and a Vista one. The Vista one always 
lists the G1 as being offline and reports no problems with the driver 
installation (no yellow triangle, no error message, just a "This device 
is working properly." in the Device Status box).

Take the same G1, same cable, and plug it into the XP box, and use the 
same SDK revision, and everything just works.

Al.
http://andappstore.com/

GiladH wrote:
> Hi,
>
> If you're ALWAYS having this problem - your best bet it so go to the
> driver manager and look for yellow (i.e. incompletely installed) USB
> drivers
>
> If you're having this problem every now & again - just boot your PC
> when it happens. couldn't figure out anything smarter than that..
>
> GiladH
>
>
>
> On Jan 27, 10:56 pm, Hypercreature  wrote:
>   
>> Hey GiladH,
>> I'm having the same problem. How did you fix it? A restart or
>> something? Thanks.
>>
>> On Dec 2 2008, 10:15 am, GiladH  wrote:
>>
>> 
>>> Problem resolved.
>>> Probably due to improper USB driver installation.
>>>   
>>> On Dec 1, 10:34 pm, GiladH  wrote:
>>>   
 Guys,
 
 I can debug my app just fine with the emulator.
 
 However, when I connect my G1 device to desktop via USB and attempt
 to run/debug my app on it (after following "Developing on Device
 Hardware" steps in android docs) I fail.
 
 The error msg I get: "Failed to upload MyAppName.apk on device
 'HT841LC09904':Unabletoopensyncconnection!"
 
 Running "adb devices" displays the G1 device is as 'offline'.
 
 The G1 relevant configuration values are:
  - Wireless controls>Airplain mode==true
  - SDCard >Use for USB storage==false
  - Application>Unknown Resources==true
  - Development>USB Debugging==true
 
 Also - application section of manifest app contains:
 android:debuggable="true"
 
 Any helpful idea will be welcomed.
 
 GiladH
 
> >
>   


-- 
==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-02-14 Thread Dave Sparks

I'm pretty sure that OpenCore is going to reject the mms URI.

On Feb 13, 8:57 pm, Rob Franz  wrote:
> I believe this is WMA on the other end.  Does this present a problem?
>
> On Feb 13, 2009 11:13 PM, "Rob Franz"  wrote:
>
> Hi all
> I'm trying to get an RTSP stream going with a verified source - I know
> there's something on the other end in this case.
>
> However, the format of the URL is like this:
>
> mms://
> a757.l1265761171.c12657.g.lm.akamaistream.net/D/757/12657/v0001/reflector:61171?auth=daEdLa4adcAc2aoc1bYceclcFcQdfbwckcA-bjLJ8.-b4-NvGjptD
>
> I admit I'm new to RTSP in general but I think I understand how it
> works - for my purposes, all I need to do is pass the RTSP URL to the
> mediaPlayer.setDataSource() method, prepare it, and start.  That
> should be pretty much it, if I understand correctly.
>
> No matter what I do, I always get "Prepare failed.:
> status=0xFFFC" ,etc. I try to modify different things, but I can
> never prepare the stream, and so I can't start it.
>
> Does the above URL qualify as an rtsp stream (i.e. remove the mms and
> put in rtsp)?
>
> As I understood it, RTSP obsoleted MMS, and MMS has been completely
> phased out, but apparently some services are still passing out that
> URL.
>
> Anyone seen anything like this before?
>
> 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] local classes and starting new activity

2009-02-14 Thread automerc

I am having trouble running my application as every time i try to run
it the simulator gives me a an error. I looked through the
Documentation but I couldn't find anything on user created classes.


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class survey extends Activity {
private EditText questions;
private EditText answers;
private Button next;
private Button done;
private OnClickListener nextListener;
private OnClickListener doneListener;
private Forms list = new Forms();
 int t;

/** Called when the activity is first created. */
@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.questions_app);
questions = (EditText) findViewById(R.id.questions);
answers = (EditText) findViewById(R.id.answers);
next = (Button) findViewById(R.id.next);
done = (Button) findViewById(R.id.done);
t = 0;
nextListener = new OnClickListener(){
public void onClick(View v) {
// TODO Auto-generated method stub
String qtemp = questions.getText().toString();
list.setA(t, qtemp);
String atemp = answers.getText().toString();
String[] answer = atemp.split("|");
list.setQ(t, answer);
t++;
questions.setText("");
answers.setText("");
}

};
doneListener = new OnClickListener(){

public void onClick(View v) {
// TODO Auto-generated method stub
   //starting temp and finishing the
current activity
Q_end temp = new Q_end();
temp.startActivity(null);
finish();
}
};
done.setOnClickListener(doneListener);
}
}

I figure out that the instance of the Forms class is the cause but I'm
not sure why. Forms is a class that I created in the same package.
Also when I try to start the activity Q-end and finish the current
activity, it also gives me a error. Can some1 tell me what i'm doing
wrong?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: howto access music file properties?

2009-02-14 Thread Jason Van Anden
I sorted this out.  MusicDroid example is a bit of a red herring.
MusicStore is clearly the way to go!

On another note ... can the Music App pre loaded with Android be accessed as
a service?  Essentially I would like to have the selected song pass back to
my app.


On Sat, Feb 14, 2009 at 11:36 AM, robotissues wrote:

>
> I would like to retrieve the properties that describe an mp3 file's
> properties (ie: author, album, title ...).  I was not able to use
> javax.sound.sampled.AudioFileFormat to do this.  Advice super
> appreciated.
>
> Thank you,
> i++
> >
>

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



[android-developers] Re: Android 1.1_r1 SDK released and developer.android.com launched

2009-02-14 Thread Guillaume Perrot

Sadly, the javadoc is not included in the new android.jar, so we can't
have the doc in Eclipse anymore when auto-completing... Is there a way
to restore that ?

On Feb 14, 12:27 am, Mark Murphy  wrote:
> DavidLanz wrote:
> > do you guys know what's the different from 1.0.r2 to 1.1r1?
> > is there a reference or documentation about the difference?
>
> http://developer.android.com/sdk/android-1.1.html
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Dumb question about SMS - what port does a normal text SMS come in...

2009-02-14 Thread Hans

...on?

Is that defined by the carrier or whoever has 'branded' the phone?

For example, on the G1 in the US, does T-Mobile define that?

If so, does anyone know?

I was hoping that I could find out more information about where an SMS
message came from when I received an Intent but it seems to just carry
the PDU data (so I can get the phone number, but not what port it came
in on.)

Thanks,

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?

2009-02-14 Thread Chister Nordvik

Thanks! That did the trick :-)

Seems like they changed the behavior in RC33, but now it works
perfectly again.

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

2009-02-14 Thread Dave Sparks

You want something like this in your activity:

import android.media.MediaScannerConnection;
import
android.media.MediaScannerConnection.MediaScannerConnectionClient;

private static class MediaScannerNotifier implements
MediaScannerConnectionClient {
private Context mContext;
private MediaScannerConnection mConnection;
private String mPath;
private String mMimeType;

public MediaScannerNotifier(Context context, String path, String
mimeType) {
mContext = context;
mPath = path;
mMimeType = mimeType;
mConnection = new MediaScannerConnection(context, this);
mConnection.connect();
}

public void onMediaScannerConnected() {
mConnection.scanFile(mPath, mMimeType);
}

public void onScanCompleted(String path, Uri uri) {
// OPTIONAL: scan is complete, this will cause the viewer to
render it
try {
if (uri != null) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
mContext.startActivity(intent);
}
} finally {
mConnection.disconnect();
mContext = null;
}
}
}

To scan a file, you just create a new MediaScannerNotifier:

new MediaScannerNotifier(path, mimeType);

On Feb 14, 9:45 am, kolby  wrote:
> You can make an android.media.MediaScannerConnection, connect to it,
> and provide a client to scan a directory.
>
> Michael
>
> On Feb 14, 7:05 am, "info.sktechnol...@gmail.com"
>
>  wrote:
> > If I progammatically store new media files on the SD card, the
> > MediaStore does not know about them until I remove and reinsert the SD
> > card.  Is there a way to tell the MediaStore to rescan the SD card
> > without first unmounting the SD card?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ViewFlipper & bringChildToFront(View v)

2009-02-14 Thread gsmd

I have this ViewFlipper populated with views via addView(View v). Now,
the simple task is to bring specific (not just next or previous) view
to the top. Looks like bringChildToFront(View v) with a passed
reference to a View should do this. It doesn't, the "top" view doesn't
change.
Plz suggest what am I doing wrong. TIA.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Dianne Hackborn
There apparently is an implementation of that class in your local client
.apk.  It is very clear from the logs that the client is trying to interact
with -some- component in its package, as you can see right in the component
name.

On Thu, Feb 12, 2009 at 2:37 PM, Hans  wrote:

>
> On Feb 12, 5:09 pm, Dianne Hackborn  wrote:
> > I replied to this in the other thread, but if you want to explicitly
> > reference a component from one package that is in another, you need to
> > explicitly build the ComponentName of both the package and class name of
> the
> > target.  The shorthand new Intent(this, ...) creates ComponentName
> objects
> > whose package is your own -- it is only for references components in your
> > own package.
>
> Then how was it starting the service, binding it, and calling methods
> on the service's interface if the constructor for Intent was somehow
> mangling TestService.class?
>
> TestService.class resolves directly to
> com.android.TestService.TestService anyhow.
>
> Hans
>
> >
>


-- 
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.  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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Dianne Hackborn
On Sat, Feb 14, 2009 at 7:38 AM,  wrote:

> import com.android.TestService.*;


Is this code part of the android platform?  No?  Then please don't use this
namespace.  Thanks. :)

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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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: [Split the Android screen into two parts and run 2 applications simultaneously on both screen]

2009-02-14 Thread Dianne Hackborn
This list is for programming with the SDK, please use android-framework or
android-platform for talking about changes to the system.

That said, doing this is extremely non-trivial.  Your first step is to go
into ActivityManagerService and WindowManagerService and have a good
understanding of that code.  Have fun. :)

On Fri, Feb 13, 2009 at 5:52 AM, saroj  wrote:

>
> Hello all,
>
> I need to split the Android screen into two parts and run 2
> applications (app A and app B) simultaneously. app A will run on
> screen 1 and app B will run on screen 2. Both are visible to the
> users. I need to implement this thing in the Android Framework.
>
> How to do it ?
>
> Waiting for your valuable inputs.
>
>
> Regards,
> Saroj K Pradhan
>
>
>
>
>
> >
>


-- 
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.  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: ViewFlipper & bringChildToFront(View v)

2009-02-14 Thread Mark Murphy

gsmd wrote:
> I have this ViewFlipper populated with views via addView(View v). Now,
> the simple task is to bring specific (not just next or previous) view
> to the top. Looks like bringChildToFront(View v) with a passed
> reference to a View should do this. It doesn't, the "top" view doesn't
> change.
> Plz suggest what am I doing wrong. TIA.

Try setDisplayedChild().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training in Sweden -- http://www.sotrium.com/training.php

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



[android-developers] Re: Comments/Ratings need to expire!

2009-02-14 Thread Dianne Hackborn
How about publishing it as a new app?  As a user, I certainly wouldn't want
ratings dropped quickly just because someone uninstalls an app.

On Fri, Feb 13, 2009 at 10:32 PM, Beshoy  wrote:

>
> A scenario:
> You release an app... brand new.. tested locally, but not globally...
> you receive some good reviews, some bad -- so you get to work to make
> it perfect.
>
> A month later, the app/game is 1000 times better
>
> Problem: Many players have rated you a 1 star and uninstalled.  You've
> fixed the problems they've complained about, but you have no way of
> contacting them to let them know that the problem that bothered them
> is fixed so you sit there with all those bad stars that are
> affecting your CURRENT score, but are irrelevant after all the
> updating you did.
>
> Solution: I propose that comments/ratings expire in about a month
> after the user uninstalls an application.  You can even add another
> criteria (only if developer has updated app since comment posting) so
> that you're not deleting useful comments...
>
> This is a hard subject, but I think it can be another big step towards
> a perfect market :)
> >
>


-- 
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.  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: Playing video in android

2009-02-14 Thread Marco Nelissen
>  s_filePath =  "/data/local/video/test_qcif_200_aac_64.mp4";


This is probably not going to work, since playback is actually handled by a
different process, which probably doesn't have permissions to access that
file. The preferred way of handling this is to get a FileDescriptor for the
file in question, and then using the version of MediaPlayer.setDataSource()
that takes a file descriptor.

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

2009-02-14 Thread Timothy DeWees

Preach IT  I'm glad we can now mark ratings as spam but they still
need to expire.  I've released something like 20+ updates to my
application and I am still dinged for version 1.0 because a user rated
me 1 star and said "needs this feature".  I've since added that
feature but I'm still dinged for it.

On Feb 14, 1:32 am, Beshoy  wrote:
> A scenario:
> You release an app... brand new.. tested locally, but not globally...
> you receive some good reviews, some bad -- so you get to work to make
> it perfect.
>
> A month later, the app/game is 1000 times better
>
> Problem: Many players have rated you a 1 star and uninstalled.  You've
> fixed the problems they've complained about, but you have no way of
> contacting them to let them know that the problem that bothered them
> is fixed so you sit there with all those bad stars that are
> affecting your CURRENT score, but are irrelevant after all the
> updating you did.
>
> Solution: I propose that comments/ratings expire in about a month
> after the user uninstalls an application.  You can even add another
> criteria (only if developer has updated app since comment posting) so
> that you're not deleting useful comments...
>
> This is a hard subject, but I think it can be another big step towards
> a perfect market :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: ViewFlipper & bringChildToFront(View v)

2009-02-14 Thread gsmd

Thanks, Mark, that worked.
bringChildToFront(View v) seems to be a non-functional inheritance
legacy for ViewFlipper.

For anyone who will implement smth like this later, I suggest adding
the views with addView(View v, int index), just a safety net; indexes
MUST be sequential & increasing. Otherwise you'll get an outofbound
exception. Somewhat weird compared to Swing CardLayout.

On Feb 14, 10:17 pm, Mark Murphy  wrote:
> gsmd wrote:
> > I have this ViewFlipper populated with views via addView(View v). Now,
> > the simple task is to bring specific (not just next or previous) view
> > to the top. Looks like bringChildToFront(View v) with a passed
> > reference to a View should do this. It doesn't, the "top" view doesn't
> > change.
> > Plz suggest what am I doing wrong. TIA.
>
> Try setDisplayedChild().
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android Training in Sweden --http://www.sotrium.com/training.php
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ViewFlipper & bringChildToFront(View v)

2009-02-14 Thread Romain Guy

> For anyone who will implement smth like this later, I suggest adding
> the views with addView(View v, int index), just a safety net; indexes
> MUST be sequential & increasing.

Just use addView(View), it guarantees that it will work.

-- 
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: orange in R.color ?

2009-02-14 Thread gsmd

Thanks.
Unfortunately, this doesn't seem to work out.
Here's a sample TextView that I inflate:
--
http://schemas.android.com/apk/res/android";
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center"
android:background="@android:drawable/list_selector_background"
android:padding="23sp" android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
--

The background doesn't change. Why?

On Jan 29, 4:42 pm, Chander Pechetty  wrote:
> android:background="@android:drawable/list_selector_background" and
> use it as indicated by Dianne above...
>
> Cheers
> Chander
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: ViewFlipper & bringChildToFront(View v)

2009-02-14 Thread gsmd

Yeah, but if the view order changes, you'll get an unexpected
behavior.

On Feb 14, 10:58 pm, Romain Guy  wrote:
> > For anyone who will implement smth like this later, I suggest adding
> > the views with addView(View v, int index), just a safety net; indexes
> > MUST be sequential & increasing.
>
> Just use addView(View), it guarantees that it will work.
>
> --
> 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: Can I bind to the MediaPlaybackService?

2009-02-14 Thread Marco Nelissen
On Sat, Feb 14, 2009 at 8:33 AM, info.sktechnol...@gmail.com <
info.sktechnol...@gmail.com> wrote:

>
> The MediaPlaybackService has exported=true but no intent filters.
> How do I create an Intent to bind to it?


You don't :)
MediaPlaybackService is internal the music player at this point. With some
hackery you can probably bind to it, but your application would break with
the next update.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

I'm not trying to be argumentative for the sake of being argumentative
Dianne, but if that was the case, how could the IPC calls to the
remote process be resolved if they are only declared in the manifest
for the service project which is in a different *.apk?  This would
mean that android was accidentally (presumably) bypassing the
requirement to declare your exposed service interfaces in your
manifest.

BTW, I would presume that there is an implementation of the class in
the local client's *.apk because otherwise the client would have to
use late/explicit binding to the interfaces exposed by the service...
This should be true anytime you write a client.

The bone of contention appears to be one of two things.

Either it should be impossible to start a remote service from a class
name or some other local to the client reference, or
the operating system should handle starting a remote service from a
class name 'properly' so that the main service thread can callback
into the client instead of just the service's thread pool being able
to.

In either case, it would be nice if the documentation about starting
services recommended using a global service name for starting remote
services, although I would certainly know less about Android if that
were the case, lol...

Is there a formal specification for the behavior of services in this
regard?

I certainly don't mean any of my comments to sound critical of
Android, it really is fantastic (if given to renaming things that had
perfectly valid names before :) ), and VERY easy to use.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

On Feb 14, 3:12 pm, Dianne Hackborn  wrote:
> On Sat, Feb 14, 2009 at 7:38 AM,  wrote:
> > import com.android.TestService.*;
>
> Is this code part of the android platform?  No?  Then please don't use this
> namespace.  Thanks. :)
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com

Apologies, just for my first two tests :).

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Jon Colverson

On Feb 14, 4:21 pm, Al Sutton  wrote:
> The first step is, of course, Google saying that they won't shut down
> the agents account as soon as they list someone elses app

I don't see why Google would have a problem with this, as long as the
"agent" is willing to accept legal responsibility for the app. What
you and Mark are talking about here really just boils down to a normal
software publishing arrangement, where the software is developed by
one business and then published by another.

At the minimum you would have to vet the applications to make sure
that they comply with the Market Distribution Agreement and Content
Policy. Then you would face the question of whether you want to
discriminate based on app quality, and there are arguments to be made
either way on that one. If you do discriminate on quality then you'd
basically be in a very similar position to that of Apple with its
iPhone App Store.

It's not a bad idea, but if I was doing it I'd probably want more than
2% of the revenue, and I'm not sure how long it would last, because I
presume that a squad of Google lawyers are working their dark magic as
quickly as possible to allow people from other countries to sell
directly on the Market.

--
Jon

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



[android-developers] Re: Comments/Ratings need to expire!

2009-02-14 Thread Marco Nelissen
If a single 1-star rating brings your average rating down noticeably, you've
got bigger problems :)
In any case, this could be dealt with by weighing recent comments heavier
than older comments, no need to remove old comments/ratings. This would be
more fair to the customers who took the time to comment, and would still
result in an overall rating that better reflects what people think of the
most recent version.


On Sat, Feb 14, 2009 at 12:52 PM, Timothy DeWees wrote:

>
> Preach IT  I'm glad we can now mark ratings as spam but they still
> need to expire.  I've released something like 20+ updates to my
> application and I am still dinged for version 1.0 because a user rated
> me 1 star and said "needs this feature".  I've since added that
> feature but I'm still dinged for it.
>
> On Feb 14, 1:32 am, Beshoy  wrote:
> > A scenario:
> > You release an app... brand new.. tested locally, but not globally...
> > you receive some good reviews, some bad -- so you get to work to make
> > it perfect.
> >
> > A month later, the app/game is 1000 times better
> >
> > Problem: Many players have rated you a 1 star and uninstalled.  You've
> > fixed the problems they've complained about, but you have no way of
> > contacting them to let them know that the problem that bothered them
> > is fixed so you sit there with all those bad stars that are
> > affecting your CURRENT score, but are irrelevant after all the
> > updating you did.
> >
> > Solution: I propose that comments/ratings expire in about a month
> > after the user uninstalls an application.  You can even add another
> > criteria (only if developer has updated app since comment posting) so
> > that you're not deleting useful comments...
> >
> > This is a hard subject, but I think it can be another big step towards
> > a perfect market :)
> >
>

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



[android-developers] MediaPlayer plays sound but screen is black

2009-02-14 Thread Brendan

I'm just trying to play a local video that is a resource with the
MediaPlayer class in the most simple way possible. I have confirmed
that the video works with players that I download from the
marketplace, so I'm assuming that's not the issue.

The problem is that I just get a black screen with no video. There is
audio from the file playing though, so I know that the file resource
is being accessed correctly, it's just not showing anything on the
screen in the emulator.

The one other note is that at any time whenever I try to access
getVideoWidth() or getVideoHeight() I get this (non-blocking) error:

ERROR/MediaPlayerService(24): getVideoSize returned -1

Any ideas as to what I could be doing wrong?



import android.app.Activity;
import android.os.Bundle;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
import android.media.MediaPlayer;

public class Example extends Activity {

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

   SurfaceView sv = new SurfaceView(this);
   setContentView(sv);

   SurfaceHolder holder = sv.getHolder();
   holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

   new MediaPlayer();
   MediaPlayer mp = MediaPlayer.create(this, R.raw.video);
   //holder.setFixedSize(mp.getVideoWidth(), mp.getVideoHeight
());
   mp.setDisplay(holder);
   mp.start();
   }
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Dumb question about SMS - what port does a normal text SMS come in...

2009-02-14 Thread Marco Nelissen
SMS normally doesn't travel over an IP connection (note that you can
send/receive SMS messages with phones that don't otherwise have a network
connection), so there is no associated port.


On Sat, Feb 14, 2009 at 11:25 AM, Hans  wrote:

>
> ...on?
>
> Is that defined by the carrier or whoever has 'branded' the phone?
>
> For example, on the G1 in the US, does T-Mobile define that?
>
> If so, does anyone know?
>
> I was hoping that I could find out more information about where an SMS
> message came from when I received an Intent but it seems to just carry
> the PDU data (so I can get the phone number, but not what port it came
> in on.)
>
> Thanks,
>
> Hans :)
> >
>

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



[android-developers] Re: MediaPlayer plays sound but screen is black

2009-02-14 Thread Marco Nelissen
Several things potentially wrong with your code:
- you're using MediaPlayer.create(), which calls prepare() for you. IIRC,
setDisplay() needs to be called *before* prepare(), so you won't be able to
use any of the MediaPlayer.create convenience methods.
- the way you create and use the SurfaceView, you'll probably end up with a
0-sized Surface, so try specifying the SurfaceView in an xml layout and
using that.
- depending on the type of video, size information may not be available
until decoding has started. There's a callback/listener for that.


On Sat, Feb 14, 2009 at 1:24 PM, Brendan  wrote:

>
> I'm just trying to play a local video that is a resource with the
> MediaPlayer class in the most simple way possible. I have confirmed
> that the video works with players that I download from the
> marketplace, so I'm assuming that's not the issue.
>
> The problem is that I just get a black screen with no video. There is
> audio from the file playing though, so I know that the file resource
> is being accessed correctly, it's just not showing anything on the
> screen in the emulator.
>
> The one other note is that at any time whenever I try to access
> getVideoWidth() or getVideoHeight() I get this (non-blocking) error:
>
> ERROR/MediaPlayerService(24): getVideoSize returned -1
>
> Any ideas as to what I could be doing wrong?
>
>
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.view.SurfaceView;
> import android.view.SurfaceHolder;
> import android.media.MediaPlayer;
>
> public class Example extends Activity {
>
>   @Override
>   public void onCreate(Bundle savedInstanceState) {
>   super.onCreate(savedInstanceState);
>
>   SurfaceView sv = new SurfaceView(this);
>   setContentView(sv);
>
>   SurfaceHolder holder = sv.getHolder();
>   holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
>
>   new MediaPlayer();
>   MediaPlayer mp = MediaPlayer.create(this, R.raw.video);
>   //holder.setFixedSize(mp.getVideoWidth(), mp.getVideoHeight
> ());
>   mp.setDisplay(holder);
>   mp.start();
>   }
> }
> >
>

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



[android-developers] Re: MediaPlayer plays sound but screen is black

2009-02-14 Thread Marco Nelissen
On Sat, Feb 14, 2009 at 1:32 PM, Marco Nelissen  wrote:

> Several things potentially wrong with your code:
> - you're using MediaPlayer.create(), which calls prepare() for you. IIRC,
> setDisplay() needs to be called *before* prepare(), so you won't be able to
> use any of the MediaPlayer.create convenience methods.


Scratch that. There's actually a version of MediaPlayer.create() that allows
you to specify the SurfaceHolder. Use that one instead of the one you're
using currently.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

Crud Suni - I accidentally left an error call (from when I was testing
out the weirdness of service creation the 'wrong' way) in the
"StartService" method in the Service Monitor class...

Right below the comment "//Attempt to start the service" there's a
call:

startService( new Intent( this, TestService.class ) );

THAT is not supposed to be there because it is started properly right
below it using the TEST_SERVICE name.

Sincerest apologies, I was using the other line to trace behavior when
it was created 'incorrect' (although the framework didn't complain.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

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



[android-developers] Re: Android 1.1_r1 SDK released and developer.android.com launched

2009-02-14 Thread blake

Justin,
  For those of us following along at home, is there a tag or branch,
in the source that corresponds to the 1.1 release?

Thanks!
  -blake

On Feb 9, 2:31 pm, "Justin (Google Employee)"  wrote:
> Hey developers, today we released the new, 1.1_r1 SDK. This SDK
> includes some minor updates that you can read more about on the 
> blog,http://android-developers.blogspot.com/2009/02/android-11-sdk-release...
> . Also, we've launched the new developer site athttp://developer.android.com
> which has updated documentation for the 1.1_r1 SDK.
>
> Cheers,
> Justin
> Android Team @ Google
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: sound effect using SoundPool

2009-02-14 Thread Sundog

I am using your class and setting it up as you indicate, but having
the same difficulty I did last time I tried to use SoundPool; I have
seven one-shot sounds that trigger from buttons and in the emulator it
works every time, but on the phone itself, occasionally all 7 work but
usually only a random few do or sometimes none at all. Any idea what
might be going wrong?

On Feb 13, 6:29 am, "tasos.klei...@gmail.com"
 wrote:
> I have written a class that utilises MediaPlayer and SoundPool
> objects. MediaPlayer is used to play looping music and SoundPool is
> used for sound effects. Have a look at my 
> bloghttp://tkcodesharing.blogspot.com/2009/02/class-for-playing-music-and...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Alarm Manager forgets repeating alarms?

2009-02-14 Thread Mariano Kamp

  This question is a bit strange, but does anybody know about a common
gotcha when using the AlarmManager? And not knowing it sometimes leads
to the AlarmManger forgetting alarms?

  I have a repeating task that runs once an hour. Some nights it runs
without a hitch and some nights it runs a couple of times and then it
isn't.

  I am constantly adding to my debug statements and will continue to
do that, but I thought it was worth to just ask ;-)

  Btw. I use the AlarmManager something like this:

AlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() +
 6, 60*1000*1000, somePendingIntentToTriggerMyTask);

Oh ... and about common gotchas ... Any gotcha how to prevent the
NotificationManager to "allegedly" keep a cancelled notification? ;-)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Mariano Kamp
Germany, Old Europe and all, is also on the axis of the forgotten. So your
field trip would need to go to the UK.

On Sat, Feb 14, 2009 at 10:12 AM, Mads Kristiansen <
mads.kristian...@nullwire.com> wrote:

>
> That's an interesting idea - I might sign up for something like that. In
> any case it will be very interesting first of all to see how well the paid
> apps will perform compared to a certain other Application Store.
> Another option for me personally would be to take a "field trip" to Germany
> and register a company if I get really desperate. I already have bank
> accounts setup there and I go there often, so it's not a big deal, but it
> really depends on when I can expect Denmark to join the "paid apps club".
> / Mads
>
> On Sat, Feb 14, 2009 at 9:48 AM, Al Sutton  wrote:
>
>>
>> OK, I'm going to float an idea that I'd like some feedback on from
>> developers and (hopefully) someone at Google (Justin, I'd appreciate any
>> clarification you can give on this).
>>
>> My company (Funky Android) is a UK Registered company and I would be
>> willing to allow it to act as a publisher for *some* non-US/UK
>> developers in order to get their paid apps into the app store. What I'd
>> look for is a 2% cut of the app sales price on top of the Markets 30%
>> cut in order to cover support and admin costs (i.e. forwarding user
>> queries, paying the accountant to make sure the money flow is tax
>> efficient and legal, etc.).
>>
>> Is this something developers would want and Google would allow?
>>
>> Al.
>>
>> Mads Kristiansen wrote:
>> > I'd like to see someone create a solution like armadillo - i.e. a
>> > wrapper to make apps available in the Android Market while using an
>> > external DRM/payment solution. There is no word on when I will be able
>> > to publish priced apps form my country, so that could be anywhere from
>> > 1 month to years from now (well, probably not, but just to make a
>> > point). That's a bit of a problem. I'll probably just publish my first
>> > app and then do some shameless self promotion in it ;) instead of
>> > charging, see what happens with the priced apps and then concentrate a
>> > bit on the iPhone development.
>> >
>> > BR, Mads
>> >
>> > On Sat, Feb 14, 2009 at 8:28 AM, Mariano Kamp > > > wrote:
>> >
>> > > Google checkout has been working since 2006
>> > It might be operational since then, but did anyone see Google's
>> > checkout in the wild?
>> > It is in Google's the best interest to finally do something about
>> > it and make it mandatory to use for people so that they will
>> > finally start using it, but I don't think it is in the best
>> > interest of developers to be forced to use an exotic payment
>> > system that no user has ever used before.
>> > Given that non-us/uk developers are not allowed to publish their
>> > apps makes the story worse, at least for those developers.
>> >
>> > That's the beauty of Apple's solution. They also don't provide
>> > paypal, but at least most user already have an iTunes account and
>> > things go very smoothly.
>> >
>> > On Sat, Feb 14, 2009 at 12:21 AM, Ivan Soto > > > wrote:
>> >
>> > I've been reading a lot about this whole Google Merchant thing
>> > and it's actually that Google Checkout only allows to sell
>> > goods from US and UK. It's not an Android thing, it's their
>> > system is not even complete and operational for all countries.
>> >
>> > Well, I know they will add more countries like they said in
>> > the email but I wonder what is the ETA on Canada. Google
>> > checkout has been working since 2006 I believe and people have
>> > been whining since then. Still nothing has been done. So
>> > seeing how slow is this going, I wonder if they will actually
>> > add Canada (or more countries) in a matter of months or years
>> > or what?
>> >
>> >
>> >
>> > On Fri, Feb 13, 2009 at 4:06 PM, Mariano Kamp
>> > mailto:mariano.k...@gmail.com>> wrote:
>> >
>> > Yeah, that is really really bad and even worse and too
>> > late communicated. I wonder why?
>> >
>> > On Fri, Feb 13, 2009 at 7:55 PM, Ivan Soto
>> > mailto:ivanso...@gmail.com>> wrote:
>> >
>> > I knew you wouldn't be able to buy or sell IN Canada.
>> > But I had no idea that if I was IN Canada I wouldn't
>> > be able to sell to another countries.
>> >
>> > Now I'm sad.
>> >
>> >
>> > On Fri, Feb 13, 2009 at 11:29 AM, Al Sutton
>> > mailto:a...@funkyandroid.com>>
>> wrote:
>> >
>> >
>> > Does Canada appear in the list in the email?
>> >
>> > Agus wrote:
>> > > no Canada?
>> > >
>> > > On Fri, Feb 13, 2009 at 10:

[android-developers] How to Check Key Status?

2009-02-14 Thread iAmACyborg

Hi,

I'm killing myself here, any help would be appreciated.

Is there any way to poll the state of a given hardware key? I'm not
talking about using an event.

Matthew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Idea for non-US/UK developers with paid apps (was Setup Merchant Account link now available)

2009-02-14 Thread Mariano Kamp
Sounds like a great idea.
But then all the uploads would need to go through you, right? That could
make it a burden for you.

All rights remain with the developer, so that when the wonderful and popular
google checkout opens with a minutes notice in the respective country the
app can be published by the developer themselves, if s/he so wishes?

And while you're at it? Maybe you also want to offer a service that the
developer delivers to you (or somebody working for your of course) and you
will upload it to the Market, to your AndAppStore and SlideMe? Just a
thought...

You could also provide boilerplate license agreements etc. When you are the
partner of google and the customers that would make sense for your anyway.

Of course, all that for a higher cut than 2%.

On Sat, Feb 14, 2009 at 9:48 AM, Al Sutton  wrote:

>
> OK, I'm going to float an idea that I'd like some feedback on from
> developers and (hopefully) someone at Google (Justin, I'd appreciate any
> clarification you can give on this).
>
> My company (Funky Android) is a UK Registered company and I would be
> willing to allow it to act as a publisher for *some* non-US/UK
> developers in order to get their paid apps into the app store. What I'd
> look for is a 2% cut of the app sales price on top of the Markets 30%
> cut in order to cover support and admin costs (i.e. forwarding user
> queries, paying the accountant to make sure the money flow is tax
> efficient and legal, etc.).
>
> Is this something developers would want and Google would allow?
>
> Al.
>
> Mads Kristiansen wrote:
> > I'd like to see someone create a solution like armadillo - i.e. a
> > wrapper to make apps available in the Android Market while using an
> > external DRM/payment solution. There is no word on when I will be able
> > to publish priced apps form my country, so that could be anywhere from
> > 1 month to years from now (well, probably not, but just to make a
> > point). That's a bit of a problem. I'll probably just publish my first
> > app and then do some shameless self promotion in it ;) instead of
> > charging, see what happens with the priced apps and then concentrate a
> > bit on the iPhone development.
> >
> > BR, Mads
> >
> > On Sat, Feb 14, 2009 at 8:28 AM, Mariano Kamp  > > wrote:
> >
> > > Google checkout has been working since 2006
> > It might be operational since then, but did anyone see Google's
> > checkout in the wild?
> > It is in Google's the best interest to finally do something about
> > it and make it mandatory to use for people so that they will
> > finally start using it, but I don't think it is in the best
> > interest of developers to be forced to use an exotic payment
> > system that no user has ever used before.
> > Given that non-us/uk developers are not allowed to publish their
> > apps makes the story worse, at least for those developers.
> >
> > That's the beauty of Apple's solution. They also don't provide
> > paypal, but at least most user already have an iTunes account and
> > things go very smoothly.
> >
> > On Sat, Feb 14, 2009 at 12:21 AM, Ivan Soto  > > wrote:
> >
> > I've been reading a lot about this whole Google Merchant thing
> > and it's actually that Google Checkout only allows to sell
> > goods from US and UK. It's not an Android thing, it's their
> > system is not even complete and operational for all countries.
> >
> > Well, I know they will add more countries like they said in
> > the email but I wonder what is the ETA on Canada. Google
> > checkout has been working since 2006 I believe and people have
> > been whining since then. Still nothing has been done. So
> > seeing how slow is this going, I wonder if they will actually
> > add Canada (or more countries) in a matter of months or years
> > or what?
> >
> >
> >
> > On Fri, Feb 13, 2009 at 4:06 PM, Mariano Kamp
> > mailto:mariano.k...@gmail.com>> wrote:
> >
> > Yeah, that is really really bad and even worse and too
> > late communicated. I wonder why?
> >
> > On Fri, Feb 13, 2009 at 7:55 PM, Ivan Soto
> > mailto:ivanso...@gmail.com>> wrote:
> >
> > I knew you wouldn't be able to buy or sell IN Canada.
> > But I had no idea that if I was IN Canada I wouldn't
> > be able to sell to another countries.
> >
> > Now I'm sad.
> >
> >
> > On Fri, Feb 13, 2009 at 11:29 AM, Al Sutton
> > mailto:a...@funkyandroid.com>>
> wrote:
> >
> >
> > Does Canada appear in the list in the email?
> >
> > Agus wrote:
> > > no Canada?
> > >
> > > On Fri, Feb 13, 2009 at 10:24 AM, Al Sutton
> > mailto:a...@funkyandr

[android-developers] Re: MediaPlayer plays sound but screen is black

2009-02-14 Thread Brendan

Wow that sounds really convenient. Since the signature of the
MediaPlayer.create() that takes a SurfaceHolder requires the second
argument to be a URI and not a resource id, I tried creating a URI for
the resource by doing this:

Uri uri = Uri.parse("android.resource://com.example.www/" +
R.raw.video);

And this may be a total noob question, but is that the right way to
create a URI for a resource?
Because then when I passed it in like this:

MediaPlayer mp = MediaPlayer.create(this, uri, holder);

The app immediately closes after flashing up a black screen, with
these the last lines that the log gets:

INFO/ActivityManager(49): Process com.example.www (pid 642) has died.
DEBUG/Zygote(23): Process 642 terminated by signal (11)


On Feb 14, 1:35 pm, Marco Nelissen  wrote:
> On Sat, Feb 14, 2009 at 1:32 PM, Marco Nelissen  wrote:
> > Several things potentially wrong with your code:
> > - you're using MediaPlayer.create(), which calls prepare() for you. IIRC,
> > setDisplay() needs to be called *before* prepare(), so you won't be able to
> > use any of the MediaPlayer.create convenience methods.
>
> Scratch that. There's actually a version of MediaPlayer.create() that allows
> you to specify the SurfaceHolder. Use that one instead of the one you're
> using currently.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Check Key Status?

2009-02-14 Thread Dianne Hackborn
I don't believe there currently is, sorry.

On Sat, Feb 14, 2009 at 2:16 PM, iAmACyborg  wrote:

>
> Hi,
>
> I'm killing myself here, any help would be appreciated.
>
> Is there any way to poll the state of a given hardware key? I'm not
> talking about using an event.
>
> Matthew
> >
>


-- 
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.  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: Dumb question about SMS - what port does a normal text SMS come in...

2009-02-14 Thread Hans

So default text based SMS traffic does not travel over IP, but SMS
traffic can travel over IP?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: sound effect using SoundPool

2009-02-14 Thread Dave Sparks

There are a lot of fixes to SoundPool coming in the Cupcake release.

I need to check on the crash you mentioned - I don't recall seeing
that before and it should give you an error, not crash. The range is
dependent on the ratio of the sample rate of the source and the
hardware output.

On Feb 13, 9:46 am, Robert Green  wrote:
> One more thing you need to know:
>
> Soundpool crashes if you change the pitch over 1.5 or under .5.  I
> created multiple "engine" samples for higher and higher pitches, so no
> matter how high you hear the engine on light racer, it never goes
> above 1.5 playback rate.  Soundpool is actually a really nice API for
> game sound FX and I really hope it doesn't go away because it's
> perfect for that application.  I just hope that things like that are
> fixed in the future.
>
> On Feb 13, 10:34 am, Marco Nelissen  wrote:
>
> > There is a known problem (fixed in cupcake) with SoundPool that will cause
> > it to lock up if you try to play more simultaneous sounds than the capacity
> > of the SoundPool. If you specify the capacity of the SoundPool to be higher
> > than the largest number of sounds you will ever play at the same time, then
> > it should work.
>
> > On Thu, Feb 12, 2009 at 1:11 PM, djp  wrote:
>
> > > Hi,
>
> > > there seems to be a dead-lock problem when using sound effects with
> > > SoundPool. I was hoping the the problem would be fixed in the new
> > > firmware update, but unfortunately, it was not. The application still
> > > locks up after couple of minutes when playing sound effects using
> > > SoundPool. My application is a game playing a background music
> > > scenario with multiple simultaneous sound effects.
>
> > > Any word from devs as when we can expect stable SoundPool would be
> > > very welcome.
>
> > > Best
> > > David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dumb question about SMS - what port does a normal text SMS come in...

2009-02-14 Thread george_c

No SMS can NOT ever travel over IP to your handset.

Between carriers networks they can, but thats all on the backend of
the networks. e.g SS7/SIGTRAN stuff.

George

On Sun, Feb 15, 2009 at 1:10 AM, Hans  wrote:
>
> So default text based SMS traffic does not travel over IP, but SMS
> traffic can travel over IP?
> >
>

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



[android-developers] Re: MediaPlayer plays sound but screen is black

2009-02-14 Thread Marco Nelissen
On Sat, Feb 14, 2009 at 3:01 PM, Brendan  wrote:

>
> Wow that sounds really convenient. Since the signature of the
> MediaPlayer.create() that takes a SurfaceHolder requires the second
> argument to be a URI and not a resource id, I tried creating a URI for
> the resource by doing this:


Oh, right, of course. My original comment stands then :)
You'll have to use "new MediaPlayer" instead of the MediaPlayer.create
convenience method.

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



[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Dianne Hackborn
On Sat, Feb 14, 2009 at 1:14 PM, Hans  wrote:

> I'm not trying to be argumentative for the sake of being argumentative
> Dianne, but if that was the case, how could the IPC calls to the
> remote process be resolved if they are only declared in the manifest
> for the service project which is in a different *.apk?  This would
> mean that android was accidentally (presumably) bypassing the
> requirement to declare your exposed service interfaces in your
> manifest.


I don't have your code here to run to tell you exactly what is going on, I
can just tell you what I see posted, and what I see is that you have your
service declared in a package like this:

http://schemas.android.com/apk/res/android";
 package="com.android.TestService"

Note the package name "com.android.TestService"

And the error message you are getting is this:

"02-12 14:16:23.531: WARN/ActivityManager(50): Unable to start service
Intent {
comp={com.android.servicemonitor/com.android.TestService.TestService} }: not
found"

Note the component that is trying to be started is in the package name
"com.android.servicemonitor".

If putting a declaration of the service in your servicemonitor package
causes things to work, then the only way I can possibly see this happening
is that it is now successfully finding the component
"com.android.servicemonitor/com.android.TestService.TestService" which due
to the package name MUST be a component in your servicemonitor client
package, so it must be running the implementation there.

Maybe I am missing some part of what you are doing, but that is what I see
at this point.

BTW, I would presume that there is an implementation of the class in
> the local client's *.apk because otherwise the client would have to
> use late/explicit binding to the interfaces exposed by the service...
> This should be true anytime you write a client.


That is not true at all, the only thing the client needs is the interface to
the class.  If you are using aidl then this would be the Java classes
created for ITestService.aidl or whatever you call the interface
definition.  And if you don't use aidl (by using a Messenger to send
messages to the service, or direct transact() calls on its IBinder), then
you don't need any service-related code in your client at all.


> Either it should be impossible to start a remote service from a class
> name or some other local to the client reference, or
> the operating system should handle starting a remote service from a
> class name 'properly' so that the main service thread can callback
> into the client instead of just the service's thread pool being able
> to.


Sorry I don't quite understand what you are saying here.  Ultimately the
Intent you use to bind to the service is either going to be abstract, and
the package manager will try to find the concrete component matching that
intent for you, or it will be like you are doing here where you supply a
concrete ComponentName for the actual component you want.  In the latter
case, the ComponentName consists of the package name of the .apk holding the
component plus the full name of the component inside of that .apk.  And then
either that component exists in that .apk, or it doesn't, and there is
really nothing else to it.

One thing that may be confusing is that "new Intent(this, MyClass.class)" is
a short-hand for creating an Intent with an explicit ComponentName for
component in your -own- package.  It can not ever be used to reference
component in other packages.  To do that you will need to manually create a
ComponentName() with the proper strings.


> In either case, it would be nice if the documentation about starting
> services recommended using a global service name for starting remote
> services, although I would certainly know less about Android if that
> were the case, lol...


I am still confused. :}  Ultimately it is a ComponentName that names the
service to start, and that is unambigous and you can see right in the error
output exactly what it is.


> Is there a formal specification for the behavior of services in this
> regard?


It's basic Intent matching, the exact same thing as is used for activities
and receivers, and should be fairly well covered in the Intent class.

-- 
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.  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: Resize based on orientation.

2009-02-14 Thread David

Alright, In the new SDK found here: 
http://dl.google.com/android/android-sdk-windows-1.1_r1.zip
Google added an OrientationListener package
(android.view.OrientationListener) that has an onOrientationChanged
(int orientation) function. This helps immensly. However, I agree with
you Dianne, having a static px setting is a bad idea. I had just set
it to 200px height because it looked right on the emu, and I would
change it once the code for the app actually worked. See here for more
info on onOrientationChanged:
http://developer.android.com/reference/android/view/OrientationListener.html#onOrientationChanged(int)

If this was already in the SDK, I missed it. I was using 1.0r2, the
new one is 1.1r1

On Feb 13, 8:46 pm, Dianne Hackborn  wrote:
> I really, strongly recommend against solving this by having different
> layouts designed for different explicit screen sizes.  It won't help you
> when there is a device that is wide resolution so has a few more pixels
> along one edge or the other, for example.
>
>
>
>
>
> On Fri, Feb 13, 2009 at 9:30 AM, loty  wrote:
>
> > I would also suggest using different layout files for different screen
> > sizes and orientation. It works very well and much easier to control
> > than any 'smart' resizing code. Look into API docs for explanation of
> > resource folder naming conventions.
>
> > On Feb 12, 7:26 pm, Timo Bruck  wrote:
> > > Android will automatically re-layout your views based on orientation (and
> > > screen size, too!), but you need to give it flexibility in setting the
> > view
> > > sizes to do that.
>
> > > I try to avoid using absolute dimensions for anything other than padding
> > or
> > > when I want a view to be a certain size regardless of screen size (e.g.
> > the
> > > height of a button).
>
> > > I think what you want to do is set the layout_height of your EditText and
> > > WebViews to 0px, and then add a layout_weight="1" to each of them. This
> > will
> > > tell Android to divide up any extra screen space between those two views
> > > equally.
>
> > > Alternatively, you could also have two different layout files (one for
> > > landscape and one for portrait).
>
> > > -Timo
>
> > > On Thu, Feb 12, 2009 at 3:54 PM, David  wrote:
>
> > > > Hello, I need to have my view resize itself based on the orientation.
> > > > After extensive googling (maybe i was using the wrong terms) I could
> > > > find nothing telling me how to detect when the orientation was
> > > > changed. Here is my layout file:
>
> > > > 
> > > > http://schemas.android.com/apk/res/
> > > > android"
> > > >    android:orientation="vertical"
> > > >    android:layout_width="fill_parent"
> > > >    android:layout_height="fill_parent"
>
> > > >         > > >                android:layout_width="fill_parent"
> > > >                android:layout_height="200px"
> > > >                />
> > > >         > > >                android:layout_width="fill_parent"
> > > >                android:layout_height="200px"
> > > >                />
> > > > 
>
> > > > how do I have it automatically resize itself? I want each item (the
> > > > EditText and the WebView) to fill half the screen (not counting the
> > > > title/notification bars). I set the height to absolute and not
> > > > wrap_content because wrap_content defaults to 1 line for EditText and
> > > > nothing for WebView. and fill_parent has the EditText on top of the
> > > > WebView.
>
> --
> 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.  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: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?

2009-02-14 Thread yhfudev

you may use:

loadDataWithBaseURL (null, content, "text/html", "utf-8",
"about:blank");


On Feb 13, 2:33 pm, Mark Murphy  wrote:
> Chister Nordvik wrote:
> > String xml = "" +
> >   "" +
> >         "Norwegian chars: åø" +
> >   "" +
> > "";
> > myWebView.loadData(xml, "text/html", "UTF-8");
>
> > This code works for latin-1 but as far as I know there are not HTML
> > entities defined for Latin-2 so I was wondering if there are other
> > solutions to displaying non latin-1 in aWebview? I've tried encoding
> > the string given to loadData as UTF-8 but with little success...
>
> The string provided to loadData() is loaded via a data: URL and so needs
> to be URL-encoded, apparently.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: # special characters in webview

2009-02-14 Thread yhfudev

You may use:
loadDataWithBaseURL (null, content, "text/html", "utf-8",
"about:blank");

On Jan 27, 7:45 am, Bob  wrote:
> Hi,
> I am populating awebviewwith the loaddata option but special
> characters such as "'" for quotation mark aren't showing up and
> end the display.  What am I doing wrong?
>
> Thanks,
> Bob
>
> WebViewwv;
> wv.loadData(toload, "text/html", "utf-8");
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to 
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ViewGroup, Views and Animation

2009-02-14 Thread mobilek...@googlemail.com

Hi,
I have a few views and animations and I need to figure out a way to
package them so I can use them throughout my app. I thought I should
be able to use ViewGroup, however, things are getting a bit
complicated as my animations need to repeat and to achieve that I have
applied the technique with an AnimationListener posting to a Runnable
when the animation stops so it plays again in a loop. Also they all
have different startOffset values, and I'm not sure how a ViewGroup
can handle that as well. What is the best practice for hadnling
multiple views and animations? 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: ViewGroup, Views and Animation

2009-02-14 Thread Romain Guy

Animations have a repeat mode, no need to do it yourself. Also, why
wouldn't ViewGroup handle the startOffset? From your email, I don't
really understand what your problem is exactly :)

On Sat, Feb 14, 2009 at 3:52 PM, mobilek...@googlemail.com
 wrote:
>
> Hi,
> I have a few views and animations and I need to figure out a way to
> package them so I can use them throughout my app. I thought I should
> be able to use ViewGroup, however, things are getting a bit
> complicated as my animations need to repeat and to achieve that I have
> applied the technique with an AnimationListener posting to a Runnable
> when the animation stops so it plays again in a loop. Also they all
> have different startOffset values, and I'm not sure how a ViewGroup
> can handle that as well. What is the best practice for hadnling
> multiple views and animations? Thanks.
> >
>



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

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

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



[android-developers] Re: Margin-problem with changed layout for titlebar

2009-02-14 Thread Marco Nelissen
On Wed, Feb 11, 2009 at 12:09 PM, $§Kalle§$ <__kalle...@hphone.eu> wrote:

>
> I am using the following Layout for the titlebar with a blue backround
> color
>
> android:id="@+id/RelativeLayout01"
>xmlns:android="http://schemas.android.com/apk/res/android";
>android:layout_width="fill_parent"
>android:layout_height="fill_parent"
>android:background="#ff99">
>android:id="@+id/TextView01"
>android:layout_height="wrap_content"
>android:text="@string/app_name"
>android:textColor="#"
>android:textStyle="bold"
>android:gravity="center_vertical"
>android:layout_centerVertical="true"
>android:layout_width="wrap_content">
>
> 
>
> In onCreate I got:
> ...
>requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
>setContentView(R.layout.main);
>getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
> R.layout.title);
> ...
>
> With that I get a changed titlebar for my HelloWorlApp, that is fine.
> But somehow on the left and right side there is some margin and I
> still can see some Grey from the original titlebar.
>
> What did I wrong?


Where do the icons next the title string come from? I don't see them in your
layout, so there must be something you're doing outside of the posted code
and layout that is causing the problem.
And why on earth are you trying to make your app's title bar look like
Windows 3.1? ;)

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



[android-developers] Re: Some bugs of WebView

2009-02-14 Thread yhfudev

After I have tried some methods, it could work now.
use:

loadDataWithBaseURL (null, content, "text/html", "utf-8",
"about:blank");

Thank you very much!

On Feb 11, 3:21 pm, Mark Murphy  wrote:
> kolby wrote:
> > Hmmm,
>
> >    String test = "some text  > \"#00ff00\">in green";
> >    web.loadDataWithBaseURL("data:///some/text/",test, "text/html",
> > "utf-8", "");
>
> > only gives me "some text" and nothing in green.
>
> Aha!
>
> JBQ wrote: "LoadData loads your data as a data: Uri. You need to
>
> Uri-escape your data."
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Try that and see if it helps.
>
> > Saving to a file just to make the html parser work seems excessive for
> > a dynamic web app.
>
> In my case, I was starting from a file. I just wanted to demonstrate
> that the issue isn't withWebView.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to 
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaPlayer plays sound but screen is black

2009-02-14 Thread Brendan

Thanks for all your help! I've been trying out your original idea, but
I still seem to be having issues.

I have moved the SurfaceView to main.xml, it looks like this:


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



And now onCreate looks like this:

   setContentView(R.layout.main);
   SurfaceView sv = (SurfaceView) findViewById
(R.id.surface_view);

   SurfaceHolder holder = sv.getHolder();
   holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

   try {
   MediaPlayer mp = new MediaPlayer();
   AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.video);
   mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(),
afd.getLength());
   afd.close();
   mp.setDisplay(holder);
   mp.prepare();
   mp.start();
} catch {...}

There are no errors ever thrown, but the process dies on mp.prepare()
without any warning or useful debug info. Is there potentially some
other way I should be setting the data source for a resource? Or
something else I'm forgetting to do that would make prepare
mysteriously kill the entire process?

On Feb 14, 3:16 pm, Marco Nelissen  wrote:
> On Sat, Feb 14, 2009 at 3:01 PM, Brendan  wrote:
>
> > Wow that sounds really convenient. Since the signature of the
> > MediaPlayer.create() that takes a SurfaceHolder requires the second
> > argument to be a URI and not a resource id, I tried creating a URI for
> > the resource by doing this:
>
> Oh, right, of course. My original comment stands then :)
> You'll have to use "new MediaPlayer" instead of the MediaPlayer.create
> convenience method.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Resize based on orientation.

2009-02-14 Thread David

Timo Bruck's tip worked like a charm. Each item now takes up exactly
1/2 of the screen, which is what I want. You guys are great, thank you
very, very much.

On Feb 14, 6:27 pm, David  wrote:
> Alright, In the new SDK found 
> here:http://dl.google.com/android/android-sdk-windows-1.1_r1.zip
> Google added an OrientationListener package
> (android.view.OrientationListener) that has an onOrientationChanged
> (int orientation) function. This helps immensly. However, I agree with
> you Dianne, having a static px setting is a bad idea. I had just set
> it to 200px height because it looked right on the emu, and I would
> change it once the code for the app actually worked. See here for more
> info on 
> onOrientationChanged:http://developer.android.com/reference/android/view/OrientationListen...)
>
> If this was already in the SDK, I missed it. I was using 1.0r2, the
> new one is 1.1r1
>
> On Feb 13, 8:46 pm, Dianne Hackborn  wrote:
>
> > I really, strongly recommend against solving this by having different
> > layouts designed for different explicit screen sizes.  It won't help you
> > when there is a device that is wide resolution so has a few more pixels
> > along one edge or the other, for example.
>
> > On Fri, Feb 13, 2009 at 9:30 AM, loty  wrote:
>
> > > I would also suggest using different layout files for different screen
> > > sizes and orientation. It works very well and much easier to control
> > > than any 'smart' resizing code. Look into API docs for explanation of
> > > resource folder naming conventions.
>
> > > On Feb 12, 7:26 pm, Timo Bruck  wrote:
> > > > Android will automatically re-layout your views based on orientation 
> > > > (and
> > > > screen size, too!), but you need to give it flexibility in setting the
> > > view
> > > > sizes to do that.
>
> > > > I try to avoid using absolute dimensions for anything other than padding
> > > or
> > > > when I want a view to be a certain size regardless of screen size (e.g.
> > > the
> > > > height of a button).
>
> > > > I think what you want to do is set the layout_height of your EditText 
> > > > and
> > > > WebViews to 0px, and then add a layout_weight="1" to each of them. This
> > > will
> > > > tell Android to divide up any extra screen space between those two views
> > > > equally.
>
> > > > Alternatively, you could also have two different layout files (one for
> > > > landscape and one for portrait).
>
> > > > -Timo
>
> > > > On Thu, Feb 12, 2009 at 3:54 PM, David  wrote:
>
> > > > > Hello, I need to have my view resize itself based on the orientation.
> > > > > After extensive googling (maybe i was using the wrong terms) I could
> > > > > find nothing telling me how to detect when the orientation was
> > > > > changed. Here is my layout file:
>
> > > > > 
> > > > > http://schemas.android.com/apk/res/
> > > > > android"
> > > > >    android:orientation="vertical"
> > > > >    android:layout_width="fill_parent"
> > > > >    android:layout_height="fill_parent"
>
> > > > >         > > > >                android:layout_width="fill_parent"
> > > > >                android:layout_height="200px"
> > > > >                />
> > > > >         > > > >                android:layout_width="fill_parent"
> > > > >                android:layout_height="200px"
> > > > >                />
> > > > > 
>
> > > > > how do I have it automatically resize itself? I want each item (the
> > > > > EditText and the WebView) to fill half the screen (not counting the
> > > > > title/notification bars). I set the height to absolute and not
> > > > > wrap_content because wrap_content defaults to 1 line for EditText and
> > > > > nothing for WebView. and fill_parent has the EditText on top of the
> > > > > WebView.
>
> > --
> > 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.  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: ViewGroup, Views and Animation

2009-02-14 Thread mobilek...@googlemail.com

Ok, well I'm a bit new to animations on android, and wasn't sure if
ViewGropus was the right path for me. Btw how would you set the repeat
mode for an animation? I've tried the java way but it didn't work.

On Feb 14, 11:57 pm, Romain Guy  wrote:
> Animations have a repeat mode, no need to do it yourself. Also, why
> wouldn't ViewGroup handle the startOffset? From your email, I don't
> really understand what your problem is exactly :)

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

2009-02-14 Thread Dianne Hackborn
OrientationListener is not new in 1.1, and it is for monitoring the
accelerometer sensor not keeping track of the screen display. :}

On Sat, Feb 14, 2009 at 3:27 PM, David  wrote:

>
> Alright, In the new SDK found here:
> http://dl.google.com/android/android-sdk-windows-1.1_r1.zip
> Google added an OrientationListener package
> (android.view.OrientationListener) that has an onOrientationChanged
> (int orientation) function. This helps immensly. However, I agree with
> you Dianne, having a static px setting is a bad idea. I had just set
> it to 200px height because it looked right on the emu, and I would
> change it once the code for the app actually worked. See here for more
> info on onOrientationChanged:
>
> http://developer.android.com/reference/android/view/OrientationListener.html#onOrientationChanged(int)
>
> If this was already in the SDK, I missed it. I was using 1.0r2, the
> new one is 1.1r1
>
> On Feb 13, 8:46 pm, Dianne Hackborn  wrote:
> > I really, strongly recommend against solving this by having different
> > layouts designed for different explicit screen sizes.  It won't help you
> > when there is a device that is wide resolution so has a few more pixels
> > along one edge or the other, for example.
> >
> >
> >
> >
> >
> > On Fri, Feb 13, 2009 at 9:30 AM, loty  wrote:
> >
> > > I would also suggest using different layout files for different screen
> > > sizes and orientation. It works very well and much easier to control
> > > than any 'smart' resizing code. Look into API docs for explanation of
> > > resource folder naming conventions.
> >
> > > On Feb 12, 7:26 pm, Timo Bruck  wrote:
> > > > Android will automatically re-layout your views based on orientation
> (and
> > > > screen size, too!), but you need to give it flexibility in setting
> the
> > > view
> > > > sizes to do that.
> >
> > > > I try to avoid using absolute dimensions for anything other than
> padding
> > > or
> > > > when I want a view to be a certain size regardless of screen size
> (e.g.
> > > the
> > > > height of a button).
> >
> > > > I think what you want to do is set the layout_height of your EditText
> and
> > > > WebViews to 0px, and then add a layout_weight="1" to each of them.
> This
> > > will
> > > > tell Android to divide up any extra screen space between those two
> views
> > > > equally.
> >
> > > > Alternatively, you could also have two different layout files (one
> for
> > > > landscape and one for portrait).
> >
> > > > -Timo
> >
> > > > On Thu, Feb 12, 2009 at 3:54 PM, David 
> wrote:
> >
> > > > > Hello, I need to have my view resize itself based on the
> orientation.
> > > > > After extensive googling (maybe i was using the wrong terms) I
> could
> > > > > find nothing telling me how to detect when the orientation was
> > > > > changed. Here is my layout file:
> >
> > > > > 
> > > > > http://schemas.android.com/apk/res/
> > > > > android"
> > > > >android:orientation="vertical"
> > > > >android:layout_width="fill_parent"
> > > > >android:layout_height="fill_parent"
> >
> > > > > > > > >android:layout_width="fill_parent"
> > > > >android:layout_height="200px"
> > > > >/>
> > > > > > > > >android:layout_width="fill_parent"
> > > > >android:layout_height="200px"
> > > > >/>
> > > > > 
> >
> > > > > how do I have it automatically resize itself? I want each item (the
> > > > > EditText and the WebView) to fill half the screen (not counting the
> > > > > title/notification bars). I set the height to absolute and not
> > > > > wrap_content because wrap_content defaults to 1 line for EditText
> and
> > > > > nothing for WebView. and fill_parent has the EditText on top of the
> > > > > WebView.
> >
> > --
> > 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.  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.  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: ViewGroup, Views and Animation

2009-02-14 Thread Romain Guy

Use Animation.setRepeatMode() and Animation.setRepeatCount().

On Sat, Feb 14, 2009 at 4:31 PM, mobilek...@googlemail.com
 wrote:
>
> Ok, well I'm a bit new to animations on android, and wasn't sure if
> ViewGropus was the right path for me. Btw how would you set the repeat
> mode for an animation? I've tried the java way but it didn't work.
>
> On Feb 14, 11:57 pm, Romain Guy  wrote:
>> Animations have a repeat mode, no need to do it yourself. Also, why
>> wouldn't ViewGroup handle the startOffset? From your email, I don't
>> really understand what your problem is exactly :)
>
> >
>



-- 
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: MediaPlayer plays sound but screen is black

2009-02-14 Thread Marco Nelissen
I think you have to use the SurfaceHolder callbacks to find out when the
surface has actually been created, and *then* call setDisplay/prepare/start

On Sat, Feb 14, 2009 at 4:28 PM, Brendan  wrote:

>
> Thanks for all your help! I've been trying out your original idea, but
> I still seem to be having issues.
>
> I have moved the SurfaceView to main.xml, it looks like this:
>
> 
> http://schemas.android.com/apk/res/
> android"
>android:orientation="vertical"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent"
>>
>  android:layout_height="fill_parent"
> android:layout_width="fill_parent">
> 
>
> And now onCreate looks like this:
>
>   setContentView(R.layout.main);
>   SurfaceView sv = (SurfaceView) findViewById
> (R.id.surface_view);
>
>   SurfaceHolder holder = sv.getHolder();
>   holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
>
>try {
>   MediaPlayer mp = new MediaPlayer();
>   AssetFileDescriptor afd = getResources().openRawResourceFd
> (R.raw.video);
>   mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(),
> afd.getLength());
>   afd.close();
>   mp.setDisplay(holder);
>   mp.prepare();
>   mp.start();
>} catch {...}
>
> There are no errors ever thrown, but the process dies on mp.prepare()
> without any warning or useful debug info. Is there potentially some
> other way I should be setting the data source for a resource? Or
> something else I'm forgetting to do that would make prepare
> mysteriously kill the entire process?
>
> On Feb 14, 3:16 pm, Marco Nelissen  wrote:
> > On Sat, Feb 14, 2009 at 3:01 PM, Brendan  wrote:
> >
> > > Wow that sounds really convenient. Since the signature of the
> > > MediaPlayer.create() that takes a SurfaceHolder requires the second
> > > argument to be a URI and not a resource id, I tried creating a URI for
> > > the resource by doing this:
> >
> > Oh, right, of course. My original comment stands then :)
> > You'll have to use "new MediaPlayer" instead of the MediaPlayer.create
> > convenience method.
> >
>

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



[android-developers] Re: Margin-problem with changed layout for titlebar

2009-02-14 Thread $§Kalle§$

Don't worry. I will not try to make my apps like Windows x.x. I just
want to understand the changebale titlebar for the moment ;-)

Here is the complete layout, which fits to the scrrenshot I mentioned.
I do not think, that the icons caused the problem.

##


http://schemas.android.com/apk/res/android";
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff99">










##


On 15 Feb., 00:57, Marco Nelissen  wrote:
> On Wed, Feb 11, 2009 at 12:09 PM, $§Kalle§$ <__kalle...@hphone.eu> wrote:
>
> > I am using the following Layout for the titlebar with a blue backround
> > color
>
> >  >        android:id="@+id/RelativeLayout01"
> >        xmlns:android="http://schemas.android.com/apk/res/android";
> >        android:layout_width="fill_parent"
> >        android:layout_height="fill_parent"
> >        android:background="#ff99">
> >         >                android:id="@+id/TextView01"
> >                android:layout_height="wrap_content"
> >                android:text="@string/app_name"
> >                android:textColor="#"
> >                android:textStyle="bold"
> >                android:gravity="center_vertical"
> >                android:layout_centerVertical="true"
> >                android:layout_width="wrap_content">
> >        
> > 
>
> > In onCreate I got:
> > ...
> >        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
> >        setContentView(R.layout.main);
> >        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
> > R.layout.title);
> > ...
>
> > With that I get a changed titlebar for my HelloWorlApp, that is fine.
> > But somehow on the left and right side there is some margin and I
> > still can see some Grey from the original titlebar.
>
> > What did I wrong?
>
> Where do the icons next the title string come from? I don't see them in your
> layout, so there must be something you're doing outside of the posted code
> and layout that is causing the problem.
> And why on earth are you trying to make your app's title bar look like
> Windows 3.1? ;)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >