[android-developers] Should onSaveInstanceState call super?

2009-01-28 Thread J . Pablo Fernández

Hello,

At the beginning of my onSaveInstanceState I was calling
super.onSaveInstanceState(outState) and everything was working fine.
But now I wrote an instrumentation test case which basically does:

Activity activity = getActivity();
getInstrumentation().callActivityOnStart(activity);
getInstrumentation().callActivityOnResume(activity);
Bundle outState = new Bundle();
getInstrumentation().callActivityOnSaveInstanceState(activity, 
outState);

and I'm getting this error: "Only the original thread that created a
view hierarchy can touch its views." (stack trace at the bottom). So
I'm wondering, what am I doing wrong here? the test or the app?

Thanks.
-- 
J. Pablo Fernández  (http://pupeno.com)

PS: The stack trace:

Error in testLoadingAndSavingState:
android.view.ViewRoot$CalledFromWrongThreadException: Only the
original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:1849)
at android.view.ViewRoot.invalidateChild(ViewRoot.java:468)
at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:481)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:2250)
at android.view.View.invalidate(View.java:4095)
at android.widget.TextView.invalidateCursor(TextView.java:2767)
at android.widget.TextView.access$1300(TextView.java:151)
at android.widget.TextView$ChangeWatcher.spanChange(TextView.java:4278)
at android.widget.TextView$ChangeWatcher.onSpanAdded(TextView.java:4304)
at 
android.text.SpannableStringInternal.sendSpanAdded(SpannableStringInternal.java:312)
at 
android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:136)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at 
android.text.SpannableStringInternal.(SpannableStringInternal.java:50)
at android.text.SpannableString.(SpannableString.java:30)
at android.widget.TextView.onSaveInstanceState(TextView.java:2015)
at android.view.View.dispatchSaveInstanceState(View.java:4944)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:1052)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:1052)
at android.view.View.saveHierarchyState(View.java:4927)
at 
com.android.internal.policy.impl.PhoneWindow.saveHierarchyState(PhoneWindow.java:1314)
at android.app.Activity.onSaveInstanceState(Activity.java:1055)
at blah.blah.Blah.onSaveInstanceState(TodoEdit.java:110)
at android.app.Activity.performSaveInstanceState(Activity.java:999)
at 
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1255)
at 
blah.blah.BlahTest.testLoadingAndSavingState(TodoEditIntegrationTest.java:37)
at java.lang.reflect.Method.invokeNative(Native Method)
at 
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:136)
at 
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:126)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:155)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:142)
at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:313)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1508)

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



[android-developers] Re: How do you save the state of an activity on an ActivityUnitTestCase

2009-01-28 Thread J . Pablo Fernández

Thanks. I did give ActivityInstrumentationTestCase a try but it didn't
work. Now I gave it another try with a fresh look and it's partly
running (the test is failing, but I believe the problem is somewhere
else so if I post I'd do it as another thread).

On Sat, Jan 24, 2009 at 9:19 AM, Andrew Stadler  wrote:
>
> Pablo-
>
> ActivityUnitTestCase is extremely limited in its support for
> operations that require interfacing with the rest of the system,
> because the Activity is never attached to the Activity Manager or the
> rest of the runtime.  It may be possible to fix this particular case
> (so you can make this call via Instrumentation) in an update but in
> the meantime, you will probably find it easier to use
> ActivityInstrumentationTestCase - have you tried that?
>
> --Andy
>
>
> On Thu, Jan 22, 2009 at 12:28 AM, J. Pablo Fernández  
> wrote:
>>
>> Hello,
>>
>> In an ActivityUnitTestCase I'm trying to do:
>>
>>Activity activity = startActivity(INSERT_INTENT, 
>> initialState, null);
>>Bundle outState = new Bundle();
>>
>> getInstrumentation().callActivityOnSaveInstanceState(activity, outState);
>>
>> But on the save state call I get this trace:
>>
>> android.util.AndroidRuntimeException: Acquiring SearchManager objects
>> only valid in Activity Contexts.
>>at 
>> android.app.ApplicationContext.getSearchManager(ApplicationContext.java:976)
>>at 
>> android.app.ApplicationContext.getSystemService(ApplicationContext.java:861)
>>at 
>> android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:73)
>>at android.app.Activity.getSystemService(Activity.java:3091)
>>at android.app.Activity.performSaveInstanceState(Activity.java:1004)
>>at 
>> android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1255)
>>at 
>> com.blah.blah.SomeActivityTest.testLoadingAndSavingState(SomeActivityTest.java:90)
>>at java.lang.reflect.Method.invokeNative(Native Method)
>>at 
>> android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:136)
>>at 
>> android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:126)
>>at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:155)
>>at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:142)
>>at 
>> android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:313)
>>at 
>> android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1508)
>>
>> Going through the ApplicationContext source code I've found this
>> (http://tinyurl.com/d8qsyc):
>>
>>private SearchManager getSearchManager() {
>>// This is only useable in Activity Contexts
>>if (getActivityToken() == null) {
>>throw new AndroidRuntimeException(
>>"Acquiring SearchManager objects only valid in
>> Activity Contexts.");
>>}
>>synchronized (mSync) {
>>if (mSearchManager == null) {
>>mSearchManager = new SearchManager(getOuterContext(),
>> mMainThread.getHandler());
>>}
>>}
>>return mSearchManager;
>>}
>>
>> It seems the problem is that the activity token is not set. But here
>> I'm puzzled, I don't know where to go next. Any ideas on how to fix it
>> or workaround it are appreciated. I want to test that my application
>> is saving its state correctly.
>>
>> Thanks.
>> --
>> J. Pablo Fernández  (http://pupeno.com)
>>
>> >
>>
>
> >
>



-- 
J. Pablo Fernández  (http://pupeno.com)

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



[android-developers] Re: Dial a USSD code

2009-01-28 Thread sabdart

Not a bug and it is in the documentation (http://code.google.com/
android/reference/android/net/Uri.html)
I should have been escaping the # symbol with %23

String encodedHash = Uri.encode("#");

startActivity(new Intent("android.intent.action.DIAL",
 Uri.parse("tel:**004*+668190099" + encodedHash)));

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



[android-developers] DEVICE_POWER permission denied for using goToSleep

2009-01-28 Thread mnj

Hi,

I wanted to use the funcion goToSleep() in PowerManager Class to force
the device to sleep. But I'm getting an exception and the application
crashes when I call this function. I already have added the
DEVICE_POWER permission in Androidmanifest.xml. When I checked the
logs I could see below error

"E/AndroidRuntime( 2158): Caused by: java.lang.SecurityException:
Neither user 10
020 nor current process has android.permission.DEVICE_POWER."

Has anyone faced this issue before. Does application have
DEVICE_POWER permission. or is it disabled.

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



[android-developers] AdMob for Android

2009-01-28 Thread dbradby

If anyone is interesting in putting some ads in their apps, AdMob
released an SDK today. Seems to work ok and I put a quick start guide
together on http://jtribe.blogspot.com/2009/01/admob-for-android.html

Hope it helps ...

Daniel

--
iPhone, Android and Geolocation ramblings - http://jtribe.blogspot.com/
Android Market Stats - http://androidstats.com


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



[android-developers] maps not getting displayed

2009-01-28 Thread sankalp

hi group

i was making a location based service applictaion but i was not
getting maps rendered in to my mapview .
i checked the ddms log i saw an error in mapactivty tags "couldnt get
connection factory client"

please can anyone help out of this .ASAP


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



[android-developers] Not able to build Browser Source Code on android-sdk-windows-1.0_r1

2009-01-28 Thread Pratap

Hi All

I am trying to build the Browser source code downloaded from the
http://android.git.kernel.org/ site
with android-sdk-windows-1.0_r1.
I am getting a lot of compilation errors and it seems that many
classes are missing in 1.0 which are being used by the Browser.

I am stuck into this and not able to figure a way out.
Let me know if I am missing anything.
Waiting desperately 4 a reply.

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] For launching a camera from appl which action requires?

2009-01-28 Thread jj

For launching a camera from appl which action requires?

If start a camera from my appl and captured image, how should I pick-up
(retrieve) that current image to my appl from camera provider. what is
process for this(which Uri).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is SDK(r2) support camera capture from desktop devices * (webcams etc). ?

2009-01-28 Thread jj

In other words, What I mean is to pick current image from camera
provider which is captured by my appl, So how should I achieve this,
some body suggest me process.

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



[android-developers] Re: Is SDK(r2) support camera capture from desktop devices * (webcams etc). ?

2009-01-28 Thread jj

Actually I am working on emulator, dont have android phone,
I am developing app of capture image using camera and use that in my
appl.

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



[android-developers] Is SDK(r2) support camera capture from desktop devices * (webcams etc). ?

2009-01-28 Thread jj

Is SDK(second release) support for camera capture from desktop
devices  * (webcams etc). ? If no
Since real device have its camera. so how should I code for appl which
capture images from camera?

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



[android-developers] Re: JavaScript XMLHTTPRequest

2009-01-28 Thread kevin

Can you point me to an example of implement native layer? Is it just a
javascript interface call back object which register in webview?

Thanks,
Kevin

On 1月27日, 下午9时53分, Tez  wrote:
> Hi,
>
> Basically, AJAX calls are not allowed within the android web view
> I implemented a native layer that intercepted the calls and
> transferred actual data
> using android apis
>
> Cheers,
> Earlence
>
> On Jan 27, 8:58 am, kevin  wrote:
>
> > I am trying to usejavascriptXMLHTTPRequestinside a webview.
> > Wondering if anyone has experience doing this and what is the
> > limitation Android webview has?
>
> > Anyway to get around loading a local page withjavascript
> >XMLHTTPRequesthaving security issue for other domain?
>
> > 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: How to Code following logic to make a turning effect of page.

2009-01-28 Thread Kather Jailani
Hi, You can do it, but you have cross the bridge...to Microsoft, please
search for MSDN magazines(2008) for the logic, The algorithm is provided in
one of the articles.

On Wed, Jan 28, 2009 at 12:59 AM, tahera rabadi
wrote:

> hello,
>
> Here, i m proposing a logic to make a turn over of page
>
> http://www.codeproject.com/KB/GDI-plus/TurnThePage/turn_the_page2.gif
>
> but how to implement it in 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: Context of a class

2009-01-28 Thread Immy

Thanks a lot guys...
That should solve my problem..

On Jan 29, 8:28 am, Dianne Hackborn  wrote:
> Don't use getBaseContext(), just use the Context you have.
>
> And if you are doing something from a background service, Service is-a
> Context, so you can just use the service instance.
>
>
>
> On Wed, Jan 28, 2009 at 7:26 PM, suhas gavas  wrote:
>
> > try passing getBaseContext() in place of this
>
> > On Wed, Jan 28, 2009 at 9:28 PM, Immy  wrote:
>
> >> Hi,
>
> >> Thanks for the reply..
>
> >> This is what I'm doing in all other classes, which happen to be
> >> Activities...
> >> But here,
>
> >> Database_mob mDbHelper = new Database_mob(this);
>
> >> generates an error which says Database_mob(*classname*) is undefined.
>
> >> Regards,
> >> Immanuel
>
> >> On Jan 28, 12:51 pm, suhas gavas  wrote:
> >> > make object of the class in which u have to use the context .
> >> Then
> >> > pass as parameter this to the class  And the class in which
> >> u
> >> > have to use conext should have constructor as parameter context in it
>
> >> > e.g
>
> >> > class activity extends Activity
> >> > {
> >> >      Viewclass myclass;
> >> >       public oncreate()
> >> >       {
> >> >          myclass = new Viewclass (this);
>
> >> >        }
>
> >> > }
>
> >> > ---
>
> >> > class Viewclass
> >> > {
> >> >     public Viewclass (Context context)
> >> >    {
> >> >     }
>
> >> > }
>
> >> > > On Wed, Jan 28, 2009 at 12:43 PM, Immy 
> >> wrote:
>
> >> > >> Hi,
>
> >> > >> Can anyone tell me how to access context of a class which is not an
> >> > >> activity?
>
> >> > >> Thanks,
> >> > >> Immanuel
>
> --
> 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: MapsApplication missing from source code?

2009-01-28 Thread Dianne Hackborn
I don't think anyone will have time to put together such a thing.  There is
lots of sample code showing how to use it.

On Wed, Jan 28, 2009 at 8:07 PM, jsm  wrote:

>
> If thats the case, could you provide some samples of the
> implementation to understand the views created, the search, etc.?
>
> On Jan 28, 11:01 pm, Jean-Baptiste Queru  wrote:
> > It's not part of the Android platform, it's a Google-proprietary
> > add-on that is not open-source.
> >
> > JBQ
> >
> >
> >
> > On Wed, Jan 28, 2009 at 8:39 AM, jsm  wrote:
> >
> > > Why is that closed? I mean the reasoning behind closing that app.
> >
> > > On Jan 28, 9:30 pm, Disconnect  wrote:
> > >> Its closed source, just like gmail, contact/email sync, market, mp3
> store,
> > >> .. that might be it.
> > >> (Anyone want to comment?)
> > >> Oh, and the IM protocols (all of them) but not the framework. And -
> for tmob
> > >> users - the myfaves app.
> >
> > >> On Wed, Jan 28, 2009 at 11:24 AM, jsm  wrote:
> >
> > >> > Why is the com.google.android.apps.maps.MapsApplication missing from
> > >> > the open source project site?
> > >> > Is it closed source?
> >
> > >> > Can someone from google clarify please?
> >
> > --
> > Jean-Baptiste M. "JBQ" Queru
> > Android Engineer, Google.
> >
>


-- 
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: MapsApplication missing from source code?

2009-01-28 Thread jsm

If thats the case, could you provide some samples of the
implementation to understand the views created, the search, etc.?

On Jan 28, 11:01 pm, Jean-Baptiste Queru  wrote:
> It's not part of the Android platform, it's a Google-proprietary
> add-on that is not open-source.
>
> JBQ
>
>
>
> On Wed, Jan 28, 2009 at 8:39 AM, jsm  wrote:
>
> > Why is that closed? I mean the reasoning behind closing that app.
>
> > On Jan 28, 9:30 pm, Disconnect  wrote:
> >> Its closed source, just like gmail, contact/email sync, market, mp3 store,
> >> .. that might be it.
> >> (Anyone want to comment?)
> >> Oh, and the IM protocols (all of them) but not the framework. And - for 
> >> tmob
> >> users - the myfaves app.
>
> >> On Wed, Jan 28, 2009 at 11:24 AM, jsm  wrote:
>
> >> > Why is the com.google.android.apps.maps.MapsApplication missing from
> >> > the open source project site?
> >> > Is it closed source?
>
> >> > Can someone from google clarify please?
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, 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: startup sequence

2009-01-28 Thread Dan Raaka

I think this will really help you ..
http://sites.google.com/site/io/anatomy--physiology-of-an-android

-Dan


On Jan 28, 12:42 pm, Dianne Hackborn  wrote:
> The system doesn't generally install .apks during boot, and doesn't start
> any application services during boot (there are a handful of system services
> that it starts during boot, but these look nothing like what you would think
> about a service from the application perspective).  The only thing system
> boot does in relation to starting third party apps is:
>
> - Start an intent for the home activity (which the package manager will
> resolve to a concrete activity as appropriate).
> - Once home is started, send the BOOT_COMPLETED broadcast to all receivers
> that have a match in their manifest.
>
> On Wed, Jan 28, 2009 at 9:52 AM, krish24  wrote:
>
> > Hi Everyone,
>
> > Can anybody tell me the system startup sequence of Android?
> > When the services are starting? When and how the application packages
> > (.apk) are getting installed?
>
> > Thanks,
> > Krish
>
> --
> 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: Context of a class

2009-01-28 Thread Dianne Hackborn
Don't use getBaseContext(), just use the Context you have.

And if you are doing something from a background service, Service is-a
Context, so you can just use the service instance.

On Wed, Jan 28, 2009 at 7:26 PM, suhas gavas  wrote:

>
> try passing getBaseContext() in place of this
>
>
>
>
> On Wed, Jan 28, 2009 at 9:28 PM, Immy  wrote:
>
>>
>> Hi,
>>
>> Thanks for the reply..
>>
>> This is what I'm doing in all other classes, which happen to be
>> Activities...
>> But here,
>>
>> Database_mob mDbHelper = new Database_mob(this);
>>
>> generates an error which says Database_mob(*classname*) is undefined.
>>
>> Regards,
>> Immanuel
>>
>>
>>
>>
>> On Jan 28, 12:51 pm, suhas gavas  wrote:
>> > make object of the class in which u have to use the context .
>> Then
>> > pass as parameter this to the class  And the class in which
>> u
>> > have to use conext should have constructor as parameter context in it
>> >
>> > e.g
>> >
>> > class activity extends Activity
>> > {
>> >  Viewclass myclass;
>> >   public oncreate()
>> >   {
>> >  myclass = new Viewclass (this);
>> >
>> >}
>> >
>> > }
>> >
>> > ---
>> >
>> > class Viewclass
>> > {
>> > public Viewclass (Context context)
>> >{
>> > }
>> >
>> > }
>> >
>> > > On Wed, Jan 28, 2009 at 12:43 PM, Immy 
>> wrote:
>> >
>> > >> Hi,
>> >
>> > >> Can anyone tell me how to access context of a class which is not an
>> > >> activity?
>> >
>> > >> Thanks,
>> > >> Immanuel
>>
>>
>
> >
>


-- 
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: Context of a class

2009-01-28 Thread suhas gavas
try passing getBaseContext() in place of this



On Wed, Jan 28, 2009 at 9:28 PM, Immy  wrote:

>
> Hi,
>
> Thanks for the reply..
>
> This is what I'm doing in all other classes, which happen to be
> Activities...
> But here,
>
> Database_mob mDbHelper = new Database_mob(this);
>
> generates an error which says Database_mob(*classname*) is undefined.
>
> Regards,
> Immanuel
>
>
>
>
> On Jan 28, 12:51 pm, suhas gavas  wrote:
> > make object of the class in which u have to use the context .
> Then
> > pass as parameter this to the class  And the class in which u
> > have to use conext should have constructor as parameter context in it
> >
> > e.g
> >
> > class activity extends Activity
> > {
> >  Viewclass myclass;
> >   public oncreate()
> >   {
> >  myclass = new Viewclass (this);
> >
> >}
> >
> > }
> >
> > ---
> >
> > class Viewclass
> > {
> > public Viewclass (Context context)
> >{
> > }
> >
> > }
> >
> > > On Wed, Jan 28, 2009 at 12:43 PM, Immy 
> wrote:
> >
> > >> Hi,
> >
> > >> Can anyone tell me how to access context of a class which is not an
> > >> activity?
> >
> > >> Thanks,
> > >> Immanuel
> >
>

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



[android-developers] Force close (exception) during rotation

2009-01-28 Thread Sean E. Russell

I have a strange problem where, if the screen is rotated while a
dialog is displayed, an exception gets thrown every time.  It happens
_only_ during this single dialog, and the exception is thrown outside
of the app (there's no trace information that touches any of my
code).  It happens in both the emulator and the G1.

I'm wondering if anybody has any suggestions about how I might analyze
this problem, or what might be the cause.  The stack trace, for what
it is worth, follows.  Is this something I can work around, or is it
an Android bug?

Thanks!

E/AndroidRuntime(  353): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  353): java.lang.RuntimeException: Unable to start
activity ComponentInfo{net.ser1.timetracker/
net.ser1.timetracker.Tasks}: java.lang.NullPointerException
E/AndroidRuntime(  353):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2140)
E/AndroidRuntime(  353):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
E/AndroidRuntime(  353):at
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:
3086)
E/AndroidRuntime(  353):at android.app.ActivityThread.access
$1900(ActivityThread.java:112)
E/AndroidRuntime(  353):at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1584)
E/AndroidRuntime(  353):at android.os.Handler.dispatchMessage
(Handler.java:88)
E/AndroidRuntime(  353):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  353):at android.app.ActivityThread.main
(ActivityThread.java:3742)
E/AndroidRuntime(  353):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  353):at java.lang.reflect.Method.invoke
(Method.java:515)
E/AndroidRuntime(  353):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
E/AndroidRuntime(  353):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
E/AndroidRuntime(  353):at dalvik.system.NativeStart.main
(Native Method)
E/AndroidRuntime(  353): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  353):at
android.app.Activity.restoreManagedDialogs(Activity.java:850)
E/AndroidRuntime(  353):at
android.app.Activity.performRestoreInstanceState(Activity.java:793)
E/AndroidRuntime(  353):at
android.app.Instrumentation.callActivityOnRestoreInstanceState
(Instrumentation.java:1171)
E/AndroidRuntime(  353):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2117)
E/AndroidRuntime(  353):... 12 more


--- SER
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Updated app not showing up in Market's "by date" sorting?

2009-01-28 Thread Sean E. Russell

That sounds like it would do it.

I don't dislike new versions being bumped to the top, actually.
That's how I keep track of which ones have new versions, to be
honest... only now I know it isn't a reliable way to do that.

--- SER

On Jan 26, 8:01 am, A T  wrote:
> Yeah, I did that by accident once. Unpublished it, uploaded the update, and
> it was on top again. All other updates before and after that stayed at the
> same spot.
>
> I hope this will be fixed now...
>
> On Mon, Jan 26, 2009 at 5:40 AM, arnouf  wrote:
>
> > Unpublish current app, and post your new app...perhaps it's the "bad"
> > solution to be on the top always..
>
> > On Jan 26, 11:25 am, android_soft  wrote:
> > > may be you can post a small portion of your manifest where the version
> > > info goes, so others know what you got.(especially people who are not
> > > the market yet but who can help if they notice anything amiss)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Simultaneous Photography using Andriod

2009-01-28 Thread Faber Fedor
As Dave Sparks pointed out, it shouldn't be too difficult to do this, at
least from the Android side. I haven't played with the camera yet, so I
can't give any concrete tips.

Have you thought how you are going to coordinate the "thousands of users"?
For that, IMO, you're going to need a website that the Android app phones
home to to find out when it should snap the picture.  You could probably
throw something up on Google's AppEngine and communicate via JSON (that's
what I'm planning on doing! ;-).
The website is where the "social networking" part of the project comes in.

Actually sounds kinda cool.  Good luck with it!

On Wed, Jan 28, 2009 at 5:20 AM, Thomas  wrote:

>
> I am working on an art project with several other people that involves
> simultaneity and photography.  We want to coordinate a series of
> events involving simultaneous photographs based on the Android system.
>
> In simple terms, here is what we are proposing.  Someone writes an app
> for Android Phone/Camera that makes the camera take a photograph at a
> predetermined time so that many thousands of people all take a
> simultaneous photograph.  The art involved here is not only the
> synchronizing of the event to approximate simultaneity but also making
> "social networking" into an element of an art project.
>
> Could someone please help with this?  Even if just to give a few
> suggestions about how to move the project forward?
>
> >
>


-- 

Faber Fedor
Cloud Computing New Jersey
http://cloudcomputingnj.com

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



[android-developers] Re: Instantiating a layout from an xml file and/or resource id

2009-01-28 Thread steele johnson

Thank you, I'll give it a try.

On Jan 28, 9:05 pm, Mark Murphy  wrote:
> steele johnson wrote:
> > Hello,
> > I'm interested in instantiating a LinearLayout object from an xml file
> > that has a LinearLayout file configuration. I want to do this within a
> > method of my Activity.
>
> > I tried findViewById() but that returned null. I've made sure that the
> > LinearLayout id is the one I'm passing. Note that this layout isn't
> > part of my screen, it's stand-alone, so I want to build a LinearLayout
> > object from the xml.
>
> If you are starting from a layout XML and you want to create a brand-new
> View tree based on that layout (e.g., LinearLayout containing other
> widgets), that's called "view inflation" or "layout inflation".
>
> getLayoutInflater().inflate() should do the trick. This uses the
> android.view.LayoutInflater class.
>
> You can see inflation used in many of my Fancy ListViews posts:
>
> http://androidguys.com/?s=fancy+listviews
>
> --
> 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: Instantiating a layout from an xml file and/or resource id

2009-01-28 Thread Mark Murphy

steele johnson wrote:
> Hello,
> I'm interested in instantiating a LinearLayout object from an xml file
> that has a LinearLayout file configuration. I want to do this within a
> method of my Activity.
> 
> I tried findViewById() but that returned null. I've made sure that the
> LinearLayout id is the one I'm passing. Note that this layout isn't
> part of my screen, it's stand-alone, so I want to build a LinearLayout
> object from the xml.

If you are starting from a layout XML and you want to create a brand-new
View tree based on that layout (e.g., LinearLayout containing other
widgets), that's called "view inflation" or "layout inflation".

getLayoutInflater().inflate() should do the trick. This uses the
android.view.LayoutInflater class.

You can see inflation used in many of my Fancy ListViews posts:

http://androidguys.com/?s=fancy+listviews

-- 
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] Instantiating a layout from an xml file and/or resource id

2009-01-28 Thread steele johnson

Hello,
I'm interested in instantiating a LinearLayout object from an xml file
that has a LinearLayout file configuration. I want to do this within a
method of my Activity.

I tried findViewById() but that returned null. I've made sure that the
LinearLayout id is the one I'm passing. Note that this layout isn't
part of my screen, it's stand-alone, so I want to build a LinearLayout
object from the xml.

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: Apple Granted Multitouch Patent

2009-01-28 Thread gjs

Hi,

Maybe EFF's Patent Busting Project can help -

http://w2.eff.org/patent/

Regards

On Jan 29, 4:37 am, JP  wrote:
> On Jan 28, 8:05 am, Al Sutton  wrote:> You can see 
> from the article 
> athttp://www.infoworld.com/article/09/01/16/Firm_seeks_to_bar_Nokia_RIM...
> > that the worst that a firm can do is try to ban companies importing
> > products into the US which may breach a US patent.
>
> I generally agree with you. You are comparing apples with oranges
> however (pun intended). Saxon Innovation and this whole slew of non-
> practicing entities (also known as "patent trolls") exist for the sole
> purpose of extorting money from legitimate businesses. Apple would
> shoot themselves in the foot if they started enforcing the rights
> granted through this (and I suppose other) patents. If this happens,
> the touch-screen oriented model of user interaction would mostly be
> available with their products only. Although Apple's big, they are not
> quite big enough that they wouldn't have to rely on having their boat
> lifted along with everybody else's as a result of the proliferation of
> touch-oriented handsets by virtue of introduction through numerous
> vendors. In my humble opinion, anyway. I am looking in particular at
> manufacturers in China and "extended workbench" countries which
> deliver to growth markets, and which are not be quite there yet as far
> as software is concerned. Android should come as an opportunity to
> deliver a software platform that supports the touch-oriented model for
> their products almost "out of the box".
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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-01-28 Thread gsmd

Thanks, I'll have a try.
Do you know a way to achieve the same in .xml?

On Jan 17, 5:41 pm, android_soft  wrote:
> getBaseContext().getResources().getDrawable
> (android.R.drawable.list_selector_background)
>
> On Jan 17, 2:49 am,gsmd wrote:
>
> > Thanks! Could you plz suggest how to dynamically set TextView
> > background to orange? Googling for setCompoundDrawables doesn't lead
> > to any solution.
> > TIA.
>
> > On Jan 16, 11:31 pm, "Dianne Hackborn"  wrote:
>
> > > It's not a color, it's a drawable.
>
> > > On Fri, Jan 16, 2009 at 1:26 PM,gsmd wrote:
>
> > > > Where's the color used for selection e.g. in ListView?
> > > > TIA.
>
> > > --
> > > 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] SharedPreference bug - commit() always returns false

2009-01-28 Thread Justin (Google Employee)

I just got bit by http://code.google.com/p/android/issues/detail?id=940
and a search for related issues on this group and the web didn't seem
to be very helpful. Hopefully this post will end up being more
findable for those in a similar situation.

Also note that this bug is already fixed and the fix will be in
cupcake.

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] Need help in running the android junit test case for andriod APIDemo in eclipse

2009-01-28 Thread ying...@gmail.com

Hi,

I am trying to run Junit test case for the android APIDemo project
under eclipse.

I create an eclipse project from the APIDemo source, it compiles fine
and then I did:
1. Debug->Run as Junit tests

But I get this error:
'Lanuching AllTests' has encountered a problem.
Cannot connect to VM.

And I find this in the .log file in eclipse:
!ENTRY org.eclipse.core.net 1 0 2009-01-28 15:03:52.799
!MESSAGE System property http.nonProxyHosts has been set to
local|*.local|169.25
4/16|*.169.254/16 by an external source. This value will be
overwritten
using th
e values from the preferences

!ENTRY org.eclipse.jdt.launching 4 120 2009-01-28 15:04:03.269
!MESSAGE Cannot connect to VM
!STACK 0
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at
org.eclipse.jdi.internal.connect.SocketTransportService.accept(Socket
TransportService.java:95)
at
org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTra
nsportImpl.java:56)
at
org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(
SocketListeningConnectorImpl.java:135)
at
org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable
run(StandardVMDebugger.java:107)
at java.lang.Thread.run(Thread.java:613)

!ENTRY org.eclipse.jdt.launching 4 120 2009-01-28 15:23:53.932
!MESSAGE Cannot connect to VM
!STACK 0
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at
org.eclipse.jdi.internal.connect.SocketTransportService.accept(Socket
TransportService.java:95)
at
org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTra
nsportImpl.java:56)
at
org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(
SocketListeningConnectorImpl.java:135)
at
org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable
run(StandardVMDebugger.java:107)
at java.lang.Thread.run(Thread.java:613)


Thank you for any help.



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



[android-developers] Re: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Tim Bray
Yow, it works...  You da geek!   -T

On Wed, Jan 28, 2009 at 4:06 PM, Mark Murphy wrote:

>
> I tossed together an app based on the notes I posted previously on this
> thread. See:
>
>
> http://groups.google.com/group/cw-android/browse_thread/thread/d2dbcabee6bcba1a
>
> or
>
>
> http://groups.google.com/group/android-discuss/browse_thread/thread/939b320cea3c81d4
>
> --
> 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] Difference between kernel on git and kernel on code.google.com

2009-01-28 Thread ttho02

I successfully ported Android to a custom platform (S3C24A0 based) by
taking a diff between a stock 2.6.25 kernel and the kernel available
at http://code.google.com/p/android/downloads/list and applying the
patch to a 2.6.25 kernel that was already patched to run on the
platform.

Now I have checked out the latest kernel by doing:
git clone git://android.git.kernel.org/kernel/common.git

But in this kernel there is no goldfish_defconfig

If i check out the platform/prebuilt.git project i says that this is
supposed to be there in the android-arm/kernel/PREBUILT file:

% git clone git://android.kernel.org/kernel/common.git kernel
% cd kernel
% export ARCH=arm
% export CROSS_COMPILE=arm-eabi-
% make goldfish_defconfig
% make

So i wonder, can anyone explain briefly what the difference is between
the kernel available on git and the one available from the
code.google.com download site?

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



[android-developers] Re: When the dev phone will be available in Greece

2009-01-28 Thread trevorpower

I would also like to ask a similar question, availability for Ireland?

I would like to know if there are any plans for the short term. If not
I'll try importing a phone an unlocking 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: Zip inflate failed error

2009-01-28 Thread fadden

On Jan 28, 5:22 am, krish24  wrote:
> While booting,  Android is segfaulting when it scans /system/app for
>  most of .apk present in that dir. Each time it segfaults in a similar
> fashion; e.g.:
>
> W/zipro   ( 1555): Zip inflate failed, zerr=-3 (nIn=0x4101910e
> aIn=1101 nOut=0x1
> ac708 aOut=3936)

(Answered in android-beginners, where I saw it first.)

Please only post once, to the most-appropriate mailing list.

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



[android-developers] Re: is there a way to access the install date of an application?

2009-01-28 Thread Dianne Hackborn
No there is currently no such thing.

On Wed, Jan 28, 2009 at 3:24 PM, Josh Dobbs  wrote:

> I know that i can write something to take care of this but i was just
> wondering if there's already something available in android that would give
> me the date when the application was installed.
> >
>


-- 
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: Gesture detection

2009-01-28 Thread Moto

I currently have a class that handles some complex scrolling of a
view... this class implements OnGestureListener and in that class I
have no way of telling when the event OnUp() is triggered...

I have all other touch event handlers that OnGestureListener provides
except OnUp()

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: what display resolution to expect?

2009-01-28 Thread Dianne Hackborn
You should pretty much never do anything based on the system-reported screen
size, since there can be any number of arbitrary decorations around the
screen -- we already have the status bar on the G1, soon there will be an
input method of arbitrary size that slides up from the bottom, other devices
could easily have other things on the left or right sides that take a chunk
out of the screen.

The correct way to do this is to work with the layout system by handling the
layout operation of a view and performing layout based on the size you are
given there.

On Wed, Jan 28, 2009 at 3:25 PM, Sundog  wrote:

>
> You can of course use AbsoluteLayout if you virtualize all the
> coordinates and calculate them on the fly based on the system-reported
> screen size. For some apps (like mine) there is no alternative to
> AbsoluteLayout.
>
> On Jan 28, 3:53 pm, Dianne Hackborn  wrote:
> > You can actually use any layouts except AbsoluteLayout. :)
> >
> > On Wed, Jan 28, 2009 at 1:27 PM, deepdr...@googlemail.com <
> >
> >
> >
> >
> >
> > deepdr...@googlemail.com> wrote:
> >
> > > Hi Dianne,
> >
> > > thanks for your statement!
> > > and, sure, about using relative layouts wherever possible.
> >
> > > thanks -
> >
> > > On Jan 28, 9:35 pm, Dianne Hackborn  wrote:
> > > > Android currently runs on 320x480 / 480x320 screens, and that is all.
> > > > Whenever the platform supports smaller screens, it will need to
> ensure
> > > that
> > > > existing applications run acceptably there.
> >
> > > > So basically assume the G1 screen and don't sweat the noise you hear.
> > >  The
> > > > only caveat is that we strongly recommend you use layout managers
> instead
> > > of
> > > > absolute layout of your UI, so you can take advantage of any
> additional
> > > > space on a larger screen (especially something that is a bit
> taller/wider
> > > > for a wide screen display) without it going to waste.
> >
> > > > On Wed, Jan 28, 2009 at 12:03 PM, deepdr...@googlemail.com <
> >
> > > > deepdr...@googlemail.com> wrote:
> >
> > > > > Hi there,
> >
> > > > > I wonder whether there is a minimal display resolution I can expect
> > > > > for Android programs.
> >
> > > > > Especially with the news about the Kogan Agora, which is said to
> have
> > > > > too low a resolution at 240 x 320.
> > > > > And then again there come emulator skins with exactly that
> resolution
> > > > > with the SDK.
> >
> > > > > Now, should I make sure that applications work and look well on 240
> x
> > > > > 320
> > > > > or can I expect larger resolution on actual devices?
> >
> > > > > 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.
> >
> > --
> > 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.- Hide quoted text -
> >
> > - Show quoted text -
> >
>


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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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: Cannot View Images from SD Card Image on Emulator

2009-01-28 Thread myIP

What is your environment?  As you know, I am having the same problem
and still cant find a solution yet.  Perhaps its something with our
environment.  Below is my environment details:

- Microsoft Windows Server 2003 R2 (running off Microsoft Virtual PC
2007)
- Version 6 SE Update 11 (build 1.6.0_11-b03)
- Android SDK: android-sdk-windows-1.0_r2
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Mark Murphy

I tossed together an app based on the notes I posted previously on this
thread. See:

http://groups.google.com/group/cw-android/browse_thread/thread/d2dbcabee6bcba1a

or

http://groups.google.com/group/android-discuss/browse_thread/thread/939b320cea3c81d4

-- 
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: what display resolution to expect?

2009-01-28 Thread Sundog

You can of course use AbsoluteLayout if you virtualize all the
coordinates and calculate them on the fly based on the system-reported
screen size. For some apps (like mine) there is no alternative to
AbsoluteLayout.

On Jan 28, 3:53 pm, Dianne Hackborn  wrote:
> You can actually use any layouts except AbsoluteLayout. :)
>
> On Wed, Jan 28, 2009 at 1:27 PM, deepdr...@googlemail.com <
>
>
>
>
>
> deepdr...@googlemail.com> wrote:
>
> > Hi Dianne,
>
> > thanks for your statement!
> > and, sure, about using relative layouts wherever possible.
>
> > thanks -
>
> > On Jan 28, 9:35 pm, Dianne Hackborn  wrote:
> > > Android currently runs on 320x480 / 480x320 screens, and that is all.
> > > Whenever the platform supports smaller screens, it will need to ensure
> > that
> > > existing applications run acceptably there.
>
> > > So basically assume the G1 screen and don't sweat the noise you hear.
> >  The
> > > only caveat is that we strongly recommend you use layout managers instead
> > of
> > > absolute layout of your UI, so you can take advantage of any additional
> > > space on a larger screen (especially something that is a bit taller/wider
> > > for a wide screen display) without it going to waste.
>
> > > On Wed, Jan 28, 2009 at 12:03 PM, deepdr...@googlemail.com <
>
> > > deepdr...@googlemail.com> wrote:
>
> > > > Hi there,
>
> > > > I wonder whether there is a minimal display resolution I can expect
> > > > for Android programs.
>
> > > > Especially with the news about the Kogan Agora, which is said to have
> > > > too low a resolution at 240 x 320.
> > > > And then again there come emulator skins with exactly that resolution
> > > > with the SDK.
>
> > > > Now, should I make sure that applications work and look well on 240 x
> > > > 320
> > > > or can I expect larger resolution on actual devices?
>
> > > > 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.
>
> --
> 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.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] is there a way to access the install date of an application?

2009-01-28 Thread Josh Dobbs
I know that i can write something to take care of this but i was just
wondering if there's already something available in android that would give
me the date when the application was installed.

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



[android-developers] Layout editing Eclipse refreshes with every key pressed event... a bug?

2009-01-28 Thread Noonien Soong

Am I the only one who this is happening to?

When I'm editing my layout xml files, literally every time after I
type one character into the editor, Eclipse refreshes the other
windows, e. g. the properties window. This slows down Eclipse to the
point were I have to stop typing..

Is this a glitch in the ADT plugin?



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

2009-01-28 Thread Brad Gies



This works for me:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://search?q=pname:PriceBunnyClient"));
startActivity(intent);


Sincerely,
 
Brad Gies
 
 
-
Brad Gies
27415 Greenfield Rd, # 2,
Southfield, MI, USA
48076
www.bgies.com  www.truckerphone.com 
www.EDI-Easy.com  www.pricebunny.com
-
 
Moderation in everything, including abstinence

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Tomei Ningen
Sent: Wednesday, January 28, 2009 6:09 PM
To: android-developers@googlegroups.com
Subject: [android-developers] How to launch Market to point to specific
application


Hello, sorry if this is an FAQ:

If someone publish a "free" and "paid" version of a game, how can the free
app easily point to the paid version of the app in the Android Market? Can
this be done via an intent?

What I am looking for is some sort of API:

launchTheMarkert("com.foofoo.MyVeryCostlyApp");

which will open the Android Market app, and display MyVeryCostlyApp so that
the user can make a one click download?

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: AnimationDrawable: animation can't be started in onResume

2009-01-28 Thread blake

Thank you Romain!

-blake

On Jan 28, 1:07 pm, Romain Guy  wrote:
> It's a framework bug that I recently fixed in cupcake.
>
> You can work around this by setting the drawable not as the background
> drawable of a View but as the content (in an ImageView for instance.)
>
>
>
> On Wed, Jan 28, 2009 at 1:03 PM, blake  wrote:
>
> > Apparently no-one else can figure it out, either... ;)
>
> > -blake
>
> > On Jan 27, 7:36 am, blake  wrote:
> >> There's already been some discussion of this, in various lists and
> >> blogs.  I finally got anAnimationDrawableto work, but I cannot start
> >> it from onResume.  I can start it from a timer that onResume starts,
> >> or an onClickHandler.
>
> >> I've poked around the source a bit and I can't figure out,
> >> specifically, what state the view has to be in, in order for the
> >> backgroundAnimationDrawableto start.
>
> >> Can anyone enlighten me?
>
> >> Thanks
> >>   -blake
>
> --
> 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: Background Repeat in relativeLayout

2009-01-28 Thread Romain Guy


http://schemas.android.com/apk/res/android";
android:src="@drawable/shelf_panel"
android:tileMode="repeat" />

You can also use clamp and mirror instead of repeat.

On Wed, Jan 28, 2009 at 3:00 PM, Emmanuel  wrote:
>
> Hi Romain,
>
>
> Can you elaborate a little on how to do it on the Xml side ?
>
> I succeeded to do it by code, on the java side ( Sebastien, it's on my
> blog if you are interested ).
> But I didn't found how to do it with the xml, and I feel it would be
> cleaner this way.
>
> thanks,
>
> Emmanuel
> http://androidblogger.blogspot.com/
>
>
>
> On Jan 23, 4:46 am, Romain Guy  wrote:
>> Use a BitmapDrawable and its tiling feature.
>>
>> On Thu, Jan 22, 2009 at 6:07 AM, galina.sebast...@gmail.com
>>
>>  wrote:
>>
>> > Hi all !
>>
>> > There is an repeatingbackgroundattribute like in css for layout on
>> > Android API ?
>>
>> > Sorry for my english ... i'am a frenchy ...
>>
>> > Thx for your help !
>>
>> --
>> 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
> >
>



-- 
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] How to launch Market to point to specific application

2009-01-28 Thread Tomei Ningen

Hello, sorry if this is an FAQ:

If someone publish a "free" and "paid" version of a game, how can the free app 
easily point to the paid version of the app in the Android Market? Can this be 
done via an intent?

What I am looking for is some sort of API:

launchTheMarkert("com.foofoo.MyVeryCostlyApp");

which will open the Android Market app, and display MyVeryCostlyApp so that the 
user can make a one click download?

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: Background Repeat in relativeLayout

2009-01-28 Thread Emmanuel

Hi Romain,


Can you elaborate a little on how to do it on the Xml side ?

I succeeded to do it by code, on the java side ( Sebastien, it's on my
blog if you are interested ).
But I didn't found how to do it with the xml, and I feel it would be
cleaner this way.

thanks,

Emmanuel
http://androidblogger.blogspot.com/



On Jan 23, 4:46 am, Romain Guy  wrote:
> Use a BitmapDrawable and its tiling feature.
>
> On Thu, Jan 22, 2009 at 6:07 AM, galina.sebast...@gmail.com
>
>  wrote:
>
> > Hi all !
>
> > There is an repeatingbackgroundattribute like in css for layout on
> > Android API ?
>
> > Sorry for my english ... i'am a frenchy ...
>
> > Thx for your help !
>
> --
> 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: what display resolution to expect?

2009-01-28 Thread Dianne Hackborn
You can actually use any layouts except AbsoluteLayout. :)

On Wed, Jan 28, 2009 at 1:27 PM, deepdr...@googlemail.com <
deepdr...@googlemail.com> wrote:

>
> Hi Dianne,
>
> thanks for your statement!
> and, sure, about using relative layouts wherever possible.
>
> thanks -
>
>
> On Jan 28, 9:35 pm, Dianne Hackborn  wrote:
> > Android currently runs on 320x480 / 480x320 screens, and that is all.
> > Whenever the platform supports smaller screens, it will need to ensure
> that
> > existing applications run acceptably there.
> >
> > So basically assume the G1 screen and don't sweat the noise you hear.
>  The
> > only caveat is that we strongly recommend you use layout managers instead
> of
> > absolute layout of your UI, so you can take advantage of any additional
> > space on a larger screen (especially something that is a bit taller/wider
> > for a wide screen display) without it going to waste.
> >
> > On Wed, Jan 28, 2009 at 12:03 PM, deepdr...@googlemail.com <
> >
> >
> >
> > deepdr...@googlemail.com> wrote:
> >
> > > Hi there,
> >
> > > I wonder whether there is a minimal display resolution I can expect
> > > for Android programs.
> >
> > > Especially with the news about the Kogan Agora, which is said to have
> > > too low a resolution at 240 x 320.
> > > And then again there come emulator skins with exactly that resolution
> > > with the SDK.
> >
> > > Now, should I make sure that applications work and look well on 240 x
> > > 320
> > > or can I expect larger resolution on actual devices?
> >
> > > 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.
> >
>


-- 
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: After the ADT 0.9 update, Eclipse can not create R.java automatically

2009-01-28 Thread Khuong

The ADT's PreCompilerBuilder uses aapt to generate the R.java file.
The android.jar includes a compressed resources file called
resources.arsc that appt needs to extract out to a buffer. The first
error indicates that it failed to create this buffer.

The root cause is that the buffer max size is set to 1 MB. The
resources.arsc file in prior versions was smaller than the max size,
but in cupcake, it's about 1.3 MB. For a quick workaround, you can
increase this buffer size to 2 MB. To do this, look for the Asset.h
file under

mydroid/frameworks/base/include/utils

change

UNCOMPRESS_DATA_MAX = 1 * 1024 * 1024

to

UNCOMPRESS_DATA_MAX = 2 * 1024 * 1024

and rebuild the sdk again.


On Jan 21, 9:12 am, moontain  wrote:
> Hi,
>
>   I checked out cupcake branch yesterday and made the full build and sdk
> successfully, and I also built the ADT 0.9 with the command
> cupcake/development/tools/eclipse/scripts/build_server.sh on another Linux
> box. Then I updated the ADT 0.9 and set new SDK on Eclipse.
>    Then I created a simple Android project Test with Android Project Wizard,
> the Eclipse created project files except the R.java and then reported
> following errors.
>     Seems the resources are  not correctly parsed.
>
> Errors:
>
> [2009-01-21 15:07:32 - Test] W/ResourceType(  267): Unable to get buffer of
> resource asset file
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No
> resource identifier found for attribute 'orientation' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No
> resource identifier found for attribute 'layout_width' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No
> resource identifier found for attribute 'layout_height' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No
> resource identifier found for attribute 'layout_width' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No
> resource identifier found for attribute 'layout_height' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No
> resource identifier found for attribute 'text' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:2: ERROR No
> resource identifier found for attribute 'versionCode' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:2: ERROR No
> resource identifier found for attribute 'versionName' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:6: ERROR No
> resource identifier found for attribute 'icon' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:6: ERROR No
> resource identifier found for attribute 'label' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:7: ERROR No
> resource identifier found for attribute 'name' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:7: ERROR No
> resource identifier found for attribute 'label' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:10: ERROR No
> resource identifier found for attribute 'name' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:11: ERROR No
> resource identifier found for attribute 'name' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:15: ERROR No
> resource identifier found for attribute 'minSdkVersion' in package 'android'
> [2009-01-21 15:07:32 - Test] W/ResourceType(  268): Unable to get buffer of
> resource asset file
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No
> resource identifier found for attribute 'orientation' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No
> resource identifier found for attribute 'layout_width' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No
> resource identifier found for attribute 'layout_height' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No
> resource identifier found for attribute 'layout_width' in package 'android'
> [2009-01-21 15:07:32 - Test]
> /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No
> resource identifier found for attribute 'layout_height' in package 'android'

[android-developers] Re: Gesture detection

2009-01-28 Thread Phill Midwinter
Could you not just write an override? Or do you not know the specific
listener?

2009/1/28 Moto 

>
> Let me ask the following:
>
> Romain Guy you said:
> -A fling is simply an onDown() followed by several ACTION_MOVE
> MotionEvent then an onUp().
>
> Were is this OnUp() call?
> I looked at the APIs for OnGestureListener  and I don't see it?
>
> How could I overwrite this call for the OnGestureListener  class?
>
> Thanks!
> Moto!
> >
>


-- 
Phill Midwinter
Director
Grant Midwinter Limited
d: 0844 736 5234 x: 0
m: 07538 082156
e: ph...@grantmidwinter.com

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



[android-developers] Re: AnimationDrawable: animation can't be started in onResume

2009-01-28 Thread Phill Midwinter
I'm afraid I can't help, but I'd be interested to know how you got it to
work?

2009/1/28 blake 

>
> Apparently no-one else can figure it out, either... ;)
>
> -blake
>
> On Jan 27, 7:36 am, blake  wrote:
> > There's already been some discussion of this, in various lists and
> > blogs.  I finally got an AnimationDrawable to work, but I cannot start
> > it from onResume.  I can start it from a timer that onResume starts,
> > or an onClickHandler.
> >
> > I've poked around the source a bit and I can't figure out,
> > specifically, what state the view has to be in, in order for the
> > background AnimationDrawable to start.
> >
> > Can anyone enlighten me?
> >
> > Thanks
> >   -blake
> >
>


-- 
Phill Midwinter
Director
Grant Midwinter Limited
d: 0844 736 5234 x: 0
m: 07538 082156
e: ph...@grantmidwinter.com

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



[android-developers] contacts/BUG/android.process.acore

2009-01-28 Thread kurdebajer

Hello,

unfortunatelly i can not determine exact conditions for this error to
occur, but be patient... sooner or later it happens.

in contact application while viewing contact list while keeping
contact entry pressed i get:

The process android.process.acore has stopped unexpectedly. Please try
again.

here is the log:

01-28 22:29:52.260: INFO/ActivityManager(51): Starting activity:
Intent { action=android.intent.action.MAIN categories=
{android.intent.category.LAUNCHER} flags=0x1000 comp=
{com.android.contacts/
com.android.contacts.DialtactsContactsEntryActivity} }
01-28 22:29:53.120: INFO/ActivityManager(51): Displayed activity
com.android.contacts/.DialtactsContactsEntryActivity: 860 ms
01-28 22:30:17.690: DEBUG/AndroidRuntime(14118): Shutting down VM
01-28 22:30:17.700: WARN/dalvikvm(14118): threadid=3: thread exiting
with uncaught exception (group=0x40013e28)
01-28 22:30:17.700: ERROR/AndroidRuntime(14118): Uncaught handler:
thread main exiting due to uncaught exception
01-28 22:30:17.970: ERROR/AndroidRuntime(14118):
java.lang.NullPointerException: ssp
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.net.Uri.fromParts(Uri.java:764)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
com.android.contacts.ContactsListActivity.onCreateContextMenu
(ContactsListActivity.java:730)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.view.View.createContextMenu(View.java:3404)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
com.android.internal.view.menu.ContextMenuBuilder.show
(ContextMenuBuilder.java:81)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.showContextMenuForChild(PhoneWindow.java:1719)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:429)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:429)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:429)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:429)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.widget.AbsListView.performLongPress(AbsListView.java:1478)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.widget.AbsListView.access$500(AbsListView.java:62)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:
1431)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.os.Handler.handleCallback(Handler.java:542)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.os.Handler.dispatchMessage(Handler.java:86)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.os.Looper.loop(Looper.java:123)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
android.app.ActivityThread.main(ActivityThread.java:3742)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
java.lang.reflect.Method.invokeNative(Native Method)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
java.lang.reflect.Method.invoke(Method.java:515)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
01-28 22:30:17.970: ERROR/AndroidRuntime(14118): at
dalvik.system.NativeStart.main(Native Method)
01-28 22:30:17.980: INFO/Process(51): Sending signal. PID: 14118 SIG:
3
01-28 22:30:17.980: INFO/dalvikvm(14118): threadid=7: reacting to
signal 3
01-28 22:30:18.060: INFO/dalvikvm(14118): Wrote stack trace to '/data/
anr/traces.txt'
01-28 22:30:18.160: VERBOSE/DumpStateReceiver(51): Running: /system/
bin/dumpcrash
01-28 22:30:18.590: INFO/DumpStateReceiver(51): Finished: 2273 bytes
read; status 0
01-28 22:30:18.630: INFO/DumpStateReceiver(51): Added state dump to 1
crashes
01-28 22:30:18.910: WARN/WindowManager(51): No window to dispatch
pointer action 1
01-28 22:30:28.100: INFO/Process(14118): Sending signal. PID: 14118
SIG: 9
01-28 22:30:28.130: INFO/ActivityManager(51): Process
android.process.acore (pid 14118) has died.
01-28 22:30:28.140: INFO/ActivityManager(51): Killing app
com.google.process.gapps (pid 14125) because provider
com.android.providers.im.ImProvider is in dying process
android.process.acore
01-28 22:30:28.140: INFO/Process(51): Sending signal. PID: 14125 SIG:
9
01-28 22:30:28.140: INFO/WindowManager(51): WIN DEATH: Window{433a3a90
com.android.contacts/
com.android.contacts.DialtactsContactsEntryActivity}
01-28 22:30:28.170: INFO/WindowManager(51): WIN DEATH: Window{4346c448
com.android.launcher/com.android.launcher.Launcher}
01-28 22:30:28.480: DEBUG/dalvikvm(51): GC freed 12687 objects /
936104 bytes in 256ms
01-28 22:30:28.490: WARN/BinderNative(51): Uncaught exce

[android-developers] Re: exit button - or not?

2009-01-28 Thread Mark L. Chang

On Jan 28, 12:40 am, Dianne Hackborn  wrote:
> Yeah there are two big things I have on my priority list to address this:
>
> - Some facility to figure out which applications are draining your battery.
>
> - A way to entirely force stop an application: kill all its processes, stop
> all its services, unregister its alarms, remove its notifications, etc.
> There is actually already a mechanism to do this in the system, we just need
> to surface the API and provide a UI for it.

I agree on both counts. However, I also agree on the interaction model/
functional model of having no quit and using the OS to manage
applications. Unfortunately, the nature of power consumption as
related to network usage and overall device activity so strongly
impacts battery life that the user experience is greatly diminished in
some cases. As mentioned in this thread, applications that seem to
believe onPause() doesn't mean, "hey, pause," affect experiences that
are unrelated to that application (especially if they spawn
themselves).

I would love, Dianne, to have an official mechanism to expose these
applications. I could see this as evolving into sort of a permissions-
based model where end users can set their balance of performance /
battery life in a general sense, and have applications take that data
into account when doing background tasks.

Of course, I'm preaching to the choir, I'm sure. I just think of it as
ways that we can make the platform more mature for the end user by
making tools for developers to more quantitatively assess their impact
on responsiveness and battery life, even if they are measuring apps
that aren't their own.

Mark

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



[android-developers] Re: what display resolution to expect?

2009-01-28 Thread deepdr...@googlemail.com

Hi Dianne,

thanks for your statement!
and, sure, about using relative layouts wherever possible.

thanks -


On Jan 28, 9:35 pm, Dianne Hackborn  wrote:
> Android currently runs on 320x480 / 480x320 screens, and that is all.
> Whenever the platform supports smaller screens, it will need to ensure that
> existing applications run acceptably there.
>
> So basically assume the G1 screen and don't sweat the noise you hear.  The
> only caveat is that we strongly recommend you use layout managers instead of
> absolute layout of your UI, so you can take advantage of any additional
> space on a larger screen (especially something that is a bit taller/wider
> for a wide screen display) without it going to waste.
>
> On Wed, Jan 28, 2009 at 12:03 PM, deepdr...@googlemail.com <
>
>
>
> deepdr...@googlemail.com> wrote:
>
> > Hi there,
>
> > I wonder whether there is a minimal display resolution I can expect
> > for Android programs.
>
> > Especially with the news about the Kogan Agora, which is said to have
> > too low a resolution at 240 x 320.
> > And then again there come emulator skins with exactly that resolution
> > with the SDK.
>
> > Now, should I make sure that applications work and look well on 240 x
> > 320
> > or can I expect larger resolution on actual devices?
>
> > 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] How to read all connected UMTS Node Bs (CIDs) ??

2009-01-28 Thread onlythoughtwo...@googlemail.com

Is there a way to get all the CIDs which a phone is connected too
(using UMTS), or what are the criterias which CID is shown me in
GsmCellLocation (when called via TelephonyManager.getCellLocation).
Signal Strength, Highest Cell ID etc... ?? And is there any way for a
CID -> Location resolution??

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



[android-developers] Re: Gesture detection

2009-01-28 Thread Moto

Let me ask the following:

Romain Guy you said:
-A fling is simply an onDown() followed by several ACTION_MOVE
MotionEvent then an onUp().

Were is this OnUp() call?
I looked at the APIs for OnGestureListener  and I don't see it?

How could I overwrite this call for the OnGestureListener  class?

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



[android-developers] Re: AnimationDrawable: animation can't be started in onResume

2009-01-28 Thread Romain Guy

It's a framework bug that I recently fixed in cupcake.

You can work around this by setting the drawable not as the background
drawable of a View but as the content (in an ImageView for instance.)

On Wed, Jan 28, 2009 at 1:03 PM, blake  wrote:
>
> Apparently no-one else can figure it out, either... ;)
>
> -blake
>
> On Jan 27, 7:36 am, blake  wrote:
>> There's already been some discussion of this, in various lists and
>> blogs.  I finally got an AnimationDrawable to work, but I cannot start
>> it from onResume.  I can start it from a timer that onResume starts,
>> or an onClickHandler.
>>
>> I've poked around the source a bit and I can't figure out,
>> specifically, what state the view has to be in, in order for the
>> background AnimationDrawable to start.
>>
>> Can anyone enlighten me?
>>
>> Thanks
>>   -blake
> >
>



-- 
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: AnimationDrawable: animation can't be started in onResume

2009-01-28 Thread blake

Apparently no-one else can figure it out, either... ;)

-blake

On Jan 27, 7:36 am, blake  wrote:
> There's already been some discussion of this, in various lists and
> blogs.  I finally got an AnimationDrawable to work, but I cannot start
> it from onResume.  I can start it from a timer that onResume starts,
> or an onClickHandler.
>
> I've poked around the source a bit and I can't figure out,
> specifically, what state the view has to be in, in order for the
> background AnimationDrawable to start.
>
> Can anyone enlighten me?
>
> Thanks
>   -blake
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: startup sequence

2009-01-28 Thread Dianne Hackborn
The system doesn't generally install .apks during boot, and doesn't start
any application services during boot (there are a handful of system services
that it starts during boot, but these look nothing like what you would think
about a service from the application perspective).  The only thing system
boot does in relation to starting third party apps is:

- Start an intent for the home activity (which the package manager will
resolve to a concrete activity as appropriate).
- Once home is started, send the BOOT_COMPLETED broadcast to all receivers
that have a match in their manifest.

On Wed, Jan 28, 2009 at 9:52 AM, krish24  wrote:

>
> Hi Everyone,
>
> Can anybody tell me the system startup sequence of Android?
> When the services are starting? When and how the application packages
> (.apk) are getting installed?
>
> Thanks,
> Krish
> >
>


-- 
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: Can you play a local video not on the sdcard?

2009-01-28 Thread Marco Nelissen
VideoView currently only works with paths and URIs though, not file
descriptors.


On Wed, Jan 28, 2009 at 12:29 PM, Dave Sparks wrote:

>
> Right, which means that you need to open the resource file in your
> process and pass the file descriptor in setDataSource instead of the
> URI.
>
> On Jan 27, 4:16 pm, Marco Nelissen  wrote:
> > Playback/decoding actually happens in a different process (the media
> > server), so that process needs to have permission to read your file.
> >
> > On Tue, Jan 27, 2009 at 4:01 PM, devileper  wrote:
> >
> > > I can only get the VideoView to play videos on the sdcard, NOT local
> > > to my application.  Is there a permission requirement to get this
> > > working or can it only access the sdcard?
> >
> > > Working:
> > > VideoView videoView = (VideoView) findViewById(R.id.video);
> > > videoView.setPath("/sdcard/video.mp4");
> >
> > > Not Working ("Cannot Play Video"):
> > > VideoView videoView = (VideoView) findViewById(R.id.video);
> > > videoView.setPath("/data/data/com.myapp/app_files/video.mp4");
> >
> > > Log Errors:
> > > 01-27 15:56:14.920: ERROR/MediaPlayer(3341): Error (-4,0)
> > > 01-27 15:56:14.920: DEBUG/VideoView(3341): Error: -4,0
> >
>

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



[android-developers] Re: Video and Audio format Supported by Android

2009-01-28 Thread Dave Sparks

We are getting ready to post some new pages in the SDK area that will
cover this information.

If you can't wait for that, do a search on this forum for codecs. It
has been covered a number of times.

On Jan 28, 2:33 am, Tom  wrote:
> Hi All
>
>  i want to knw what r the Audio and Video format r supported by
> Android by Default .
>
> is thier any plug-ins  needs to be add in to SDK .
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Wrong resultCode when sending email?

2009-01-28 Thread Dianne Hackborn
The ACTION_SEND protocol doesn't return a result, so you are just getting
the default result.

On Wed, Jan 28, 2009 at 11:52 AM, Noonien Soong
wrote:

>
> My goal: Open a "compose email" activity and then determine whether
> the email was sent.
>
>I open the email app with this:
>
> Intent msg=new Intent(Intent.ACTION_SEND);
>
> String emailSubject = "Hello!";
> String emailBody = "Insert body text here.";
>
> msg.putExtra(Intent.EXTRA_EMAIL, new String[]
> {"j...@doe.com"} );
> msg.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
> msg.putExtra(Intent.EXTRA_TEXT, emailBody);
> msg.setType("message/rfc822");
>
> startActivityForResult(msg, REQUEST_CODE_SEND_EMAIL);
>
>
>I send the intent with startActivityForResult, because I would like
> to know wether the email was actually send.
>
> Works fine until here, the email app starts and I see my text 
> Now I either press "Send" or "Save as draft" or "Discard"... I recieve
> the email just fine...
>
>
>But in my onActivityResult-method, the resultCode seems to be always
> 0 ( RESULT_CANCEL), even if the email was actually sent.
>
>Does anyone have an explanation for this? Or a fix?
>
>Thx!
>
>
>
>
>
> >
>


-- 
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: Reg playing youtube video in android

2009-01-28 Thread Dave Sparks

If you specifically want to play a YouTube video, you need to register
as a YouTube developer to get the keys you need to access the Gdata
feeds.

I think that the Cupcake release will support a new intent for playing
YouTube videos with the YouTube app, but it will be some time before
that feature makes it into an SDK or actual device. That would remove
the need for getting the developer keys.

Aside from that, playing a YT video is no different than any other
HTTP streamed video. You just pass the URL through setDataSource and
the media player does the rest.

On Jan 28, 1:42 am, harish  wrote:
> Dear All,
>
> Using Mediaplayer (Api Demo) example, i was able to play a local video
> file and also an video mp4 streamed over internet on my android
> emulator using sdk in my development machine.
>
> When i run an youtube video from browser running in an emulator, it
> asks for to download flash player.
>
> Is there any way to play youtube video using mediaplayer or any other
> alternative methods in android.
>
> In emulator session, is it possile to play youtube video.
>
> Guys, help me in this. any reference or example of youtube video being
> played in the emulator using sdk is available.
>
> Thanks and Regards,
> HarishKumar.V
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: what display resolution to expect?

2009-01-28 Thread Dianne Hackborn
Android currently runs on 320x480 / 480x320 screens, and that is all.
Whenever the platform supports smaller screens, it will need to ensure that
existing applications run acceptably there.

So basically assume the G1 screen and don't sweat the noise you hear.  The
only caveat is that we strongly recommend you use layout managers instead of
absolute layout of your UI, so you can take advantage of any additional
space on a larger screen (especially something that is a bit taller/wider
for a wide screen display) without it going to waste.

On Wed, Jan 28, 2009 at 12:03 PM, deepdr...@googlemail.com <
deepdr...@googlemail.com> wrote:

>
> Hi there,
>
> I wonder whether there is a minimal display resolution I can expect
> for Android programs.
>
> Especially with the news about the Kogan Agora, which is said to have
> too low a resolution at 240 x 320.
> And then again there come emulator skins with exactly that resolution
> with the SDK.
>
> Now, should I make sure that applications work and look well on 240 x
> 320
> or can I expect larger resolution on actual devices?
>
> 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: Simultaneous Photography using Andriod

2009-01-28 Thread Dave Sparks

The simplest approach is just firing off an intent to the existing
camera app to take a picture. This requires the user to push the
shutter button.

If you want it purely under program control, you could have the
application snap the picture without the user pressing a button. It
just takes a bit more work.

On Jan 28, 2:20 am, Thomas  wrote:
> I am working on an art project with several other people that involves
> simultaneity and photography.  We want to coordinate a series of
> events involving simultaneous photographs based on the Android system.
>
> In simple terms, here is what we are proposing.  Someone writes an app
> for Android Phone/Camera that makes the camera take a photograph at a
> predetermined time so that many thousands of people all take a
> simultaneous photograph.  The art involved here is not only the
> synchronizing of the event to approximate simultaneity but also making
> "social networking" into an element of an art project.
>
> Could someone please help with this?  Even if just to give a few
> suggestions about how to move the project forward?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 you play a local video not on the sdcard?

2009-01-28 Thread Dave Sparks

Right, which means that you need to open the resource file in your
process and pass the file descriptor in setDataSource instead of the
URI.

On Jan 27, 4:16 pm, Marco Nelissen  wrote:
> Playback/decoding actually happens in a different process (the media
> server), so that process needs to have permission to read your file.
>
> On Tue, Jan 27, 2009 at 4:01 PM, devileper  wrote:
>
> > I can only get the VideoView to play videos on the sdcard, NOT local
> > to my application.  Is there a permission requirement to get this
> > working or can it only access the sdcard?
>
> > Working:
> > VideoView videoView = (VideoView) findViewById(R.id.video);
> > videoView.setPath("/sdcard/video.mp4");
>
> > Not Working ("Cannot Play Video"):
> > VideoView videoView = (VideoView) findViewById(R.id.video);
> > videoView.setPath("/data/data/com.myapp/app_files/video.mp4");
>
> > Log Errors:
> > 01-27 15:56:14.920: ERROR/MediaPlayer(3341): Error (-4,0)
> > 01-27 15:56:14.920: DEBUG/VideoView(3341): Error: -4,0
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Access resources from another application

2009-01-28 Thread Mark Murphy

Romain Guy wrote:
>> One application cannot access the Java code or resources from another
>> application, at least at runtime.
> 
> Actually, you can. That's what Home does for shortcuts for instance :)
> But to do this you need the package name and the resource id within
> the target package.

Ah, my mistake. I thought you still needed to be the same owner even in
that case, or needed to be a system app.

-- 
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: Access resources from another application

2009-01-28 Thread Romain Guy

> One application cannot access the Java code or resources from another
> application, at least at runtime.

Actually, you can. That's what Home does for shortcuts for instance :)
But to do this you need the package name and the resource id within
the target package.

-- 
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] what display resolution to expect?

2009-01-28 Thread deepdr...@googlemail.com

Hi there,

I wonder whether there is a minimal display resolution I can expect
for Android programs.

Especially with the news about the Kogan Agora, which is said to have
too low a resolution at 240 x 320.
And then again there come emulator skins with exactly that resolution
with the SDK.

Now, should I make sure that applications work and look well on 240 x
320
or can I expect larger resolution on actual devices?

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: Access resources from another application

2009-01-28 Thread Mark Murphy

Bamboo wrote:
> Sorry, I don't think I explained very clearly, the activity that I am
> extending from resides within a different application.

I'm not sure how you can "extend" an activity from another application.

Are you saying that CustomActivity resides in one APK and you are
subclassing it in some other activity?

Or do you mean something else by "extending"?

> So I want to access the resources from that application as well.

One application cannot access the Java code or resources from another
application, at least at runtime.

If these are both yours, you could find a way to "share" them in your
build process, assuming you are building them in tandem.

> Give me a shout if that is still unclear

OK, here you go:

SHOUT!

;-)

-- 
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] Wrong resultCode when sending email?

2009-01-28 Thread Noonien Soong

My goal: Open a "compose email" activity and then determine whether
the email was sent.

I open the email app with this:

 Intent msg=new Intent(Intent.ACTION_SEND);

 String emailSubject = "Hello!";
 String emailBody = "Insert body text here.";

 msg.putExtra(Intent.EXTRA_EMAIL, new String[]
{"j...@doe.com"} );
 msg.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
 msg.putExtra(Intent.EXTRA_TEXT, emailBody);
 msg.setType("message/rfc822");

 startActivityForResult(msg, REQUEST_CODE_SEND_EMAIL);


I send the intent with startActivityForResult, because I would like
to know wether the email was actually send.

Works fine until here, the email app starts and I see my text 
Now I either press "Send" or "Save as draft" or "Discard"... I recieve
the email just fine...


But in my onActivityResult-method, the resultCode seems to be always
0 ( RESULT_CANCEL), even if the email was actually sent.

Does anyone have an explanation for this? Or a fix?

Thx!





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



[android-developers] Re: Access resources from another application

2009-01-28 Thread Bamboo

Sorry, I don't think I explained very clearly, the activity that I am
extending from resides within a different application.
So I want to access the resources from that application as well. Give
me a shout if that is still unclear

On Jan 28, 7:19 pm, Mark Murphy  wrote:
> Bamboo wrote:
> > I have created a subclass of Activity, 'CustomActivity', that
> > overrides the onCreateOptionsMenu and onOptionsItemSelected methods.
>
> > In a couple of other applications I have extended this subclass to
> > provider a common menu for each activity. Is it still possible to
> > access the resources from this Subclass?
>
> > By default it uses the resources from the current activity (Strings,
> > xml layout etc)
>
> Activities don't have resources; applications do.
>
> Multiple activities in the same application share their resources.
>
> --
> 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] Failed to upload myapp.apk on 'HT841GZ03224': Too many open files

2009-01-28 Thread Mark Nuetzmann

I have been debugging my app for weeks now on both the emulator and
device.  All of a sudden I am getting the following error when I try
to debug.

Failed to upload myapp.apk on 'HT841GZ03224': Too many open files

I figure I could simply uninstall the app and try again but is there a
quicker fix?

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



[android-developers] Re: Access resources from another application

2009-01-28 Thread Mark Murphy

Bamboo wrote:
> I have created a subclass of Activity, 'CustomActivity', that
> overrides the onCreateOptionsMenu and onOptionsItemSelected methods.
> 
> In a couple of other applications I have extended this subclass to
> provider a common menu for each activity. Is it still possible to
> access the resources from this Subclass?
> 
> By default it uses the resources from the current activity (Strings,
> xml layout etc)

Activities don't have resources; applications do.

Multiple activities in the same application share their resources.

-- 
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] Access resources from another application

2009-01-28 Thread Bamboo

I have created a subclass of Activity, 'CustomActivity', that
overrides the onCreateOptionsMenu and onOptionsItemSelected methods.

In a couple of other applications I have extended this subclass to
provider a common menu for each activity. Is it still possible to
access the resources from this Subclass?

By default it uses the resources from the current activity (Strings,
xml layout etc)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Get the name of the owner of the phone? (the email sender)

2009-01-28 Thread Noonien Soong

I want my application to send emails.

The user can pick arecipient from the contacts.

Then I generate the body text of the email and send it to the email
app ( using something like http://androidguys.com/?p=3100#comment-5168).

The email body looks something like :

-
Hi {recipientname}!

Please click the following link :

http://www.somewhere.com/action.php?data=9324jlkjfddsfjlk

If you click that like, you will live forever. Bla bla ...

Thank you,

{sendername}
-

"{recipientname}" is replaced by the name of the recipient that I get
from the Contacts via Contacts.People.

For convenience, I'd like to replace "{sendername}" with the name of
the sender, that means the name of the owner of the phone. (As stored
in the email app, under Account Settings -> General Settings -> Your
name)   So, obviously that name is stored somewhere, ...

My question:

Is there any way to access this name via a content provider ?
Or is there any other way to get a string (e.g. "John Doe" ) with the
name of the owner/user of the device ?


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



[android-developers] Re: Porting JavaME Midlet to android.

2009-01-28 Thread Noonien Soong


You will be able to use java code that does not access any of the J2ME
APis.
You will have to recode most of the System-related stuff.

I think what you should do is take a step back and take a look at the
notepad example if you haven't already. Really go though it step by
step.
Then start playing around with little example apps to see how things
are done in android.

Android really is quite different from coding for J2ME - you probably
are better of writing things like the UI from scratch.

That's my experience ...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Mark Murphy

Mark Murphy wrote:
> Well, there's some way to get screen grabs off the device that DDMS
> uses. I don't see an adb command for it, so off the top of my head I'm
> not sure how it's done. But I think the DDMS source code is in the git
> repository.
> 
> In theory, one could use that technique to create a desktop program that
> automatically refreshes an image of the device. I don't know how much
> horsepower the screen-capture stuff takes, which would determine how
> frequently you can refresh the image without slowing the device down too
> much. It also implies you can connect the device to something with the
> mini-USB cable, I imagine.
> 
> It's far from the most elegant solution, but it's something...

I did a pinch more research and am logging some notes here:

DDMS's screen shot dialog is cunningly disguised as
ScreenShotDialog.java. The easiest way to get to it is by visiting:

http://www.google.com/codesearch

and searching for:

ScreenShotDialog package:android

The dialog itself is SWT-dependent, but the guts of the screen-capture
logic appears to be more independent, mostly surrounding the Device and
RawImage classes.

The Swing-based hierarchyviewer also captures screens from the
device/emulator, and it leverages the same Device and RawImage classes.
Pretty much, once you figure out how to get a proper Device object, you
call getScreenshot() and convert the RawImage into a BufferedImage. From
there, it's standard Swing/AWT stuff to display it, such as:

http://www.java-forums.org/awt-swing/6763-how-display-image.html

I haven't hunted around yet to figure out how best to get the proper
Device object, but with two reference uses (DDMS and hierarchyviewer),
it can't be all that tough.

-- 
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: Eclipse Plug-in Site down?

2009-01-28 Thread bleucalme

I'm having the same problemé

On Jan 27, 8:20 pm, Mafian911  wrote:
> Anyone get anywhere on this? I am still having this problem.
>
> On Jan 7, 1:27 pm, PeeWee Sperman  wrote:
>
> > Did you ever get this fixed. I'm having the same problem after
> > researching this thread entirely. The repository is still down and I
> > have instaalled all the proper software SDK, ADT's etc.
>
> > Thanks
>
> > On Nov 15 2008, 1:56 pm, Hong Ji  wrote:
>
> > > Same problem. TheEclipsesays "Norepositoryfound 
> > > athttps://dl-ssl.google.com/android/eclipse/.";
>
> > > On Nov 14, 1:25 pm, Steve918  wrote:
>
> > > > I'm getting a 404 when I try to install theeclipseplugin from:
>
> > > >https://dl-ssl.google.com/android/eclipse/-Hidequoted text -
>
> > > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problems when setting / removing color filter to image views

2009-01-28 Thread pmilosev

> Drawable d1 = getResources().getDrawable(R.drawable.my_image);
> Drawable d2 = getResources().getDrawable(R.drawable.my_image);

> The two drawables are different objects but they both use the same
> "constant state" (it's the actual name of the implementation) which
> contains, among other things, the alpha value, the bitmap... and the
> color filter.

Aughhh ... thats why it started after I added several buttons using
same
image for resource.
So I guess in this moment the solution would be to have several copies
of the same resource.

Is this a known issue or should we fire a bug report ?

10x for the reply
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Touch mode again (CRUD application context).

2009-01-28 Thread Peli

> (I have 5
> entities to be stored in the database and only one of them has only
> one attribute and any actions can be performed on it).

If those actions are equally important, what about having a dialog pop
up with the different actions when you click on an item (instead of
going to 'edit')? (Similar to an activity chooser dialog).

Peli
www.openintents.org

PS: Romain, "Shelves" looks really cool :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: problems when setting / removing color filter to image views

2009-01-28 Thread Sundog

Another question: At some point this explanation breaks down, because
in my experience, this happens only the FIRST time I attempt to change
a button's image's state... on subsequent attempts, all works
properly. So apparently something "triggers" correct behavior at some
point, suggesting there is a workaround, but I searched in vain for
days for one. Is there a way to defeat this behavior beyond physically
including redundant copies of resources?

On Jan 28, 11:11 am, Sundog  wrote:
> Last time you mentioned this, in response to my question about it, you
> said that it was a known issue and that you were personally working on
> fixing it.
>
> So is this an "issue" that will be fixed at some point, or are we now
> regarding this bug as something that won't be fixed?
>
> On Jan 28, 10:09 am, Romain Guy  wrote:
>
>
>
> > Hi,
>
> > The problem comes from a rather unknown feature of resources and
> > drawables. The state of several drawables that come from the same
> > resource is shared across all the drawables. Take this example:
>
> > Drawable d1 = getResources().getDrawable(R.drawable.my_image);
> > Drawable d2 = getResources().getDrawable(R.drawable.my_image);
>
> > d2.setAlpha(0); // Sets the alpha value of d2 *and* d1 to 0
>
> > The two drawables are different objects but they both use the same
> > "constant state" (it's the actual name of the implementation) which
> > contains, among other things, the alpha value, the bitmap... and the
> > color filter.
>
> > This behavior comes from the necessity to optimize the memory usage
> > and the loading times of applications. By doing so we have only one
> > constant state used by all buttons across all applications.
>
> > On Wed, Jan 28, 2009 at 3:36 AM, pmilosev  wrote:
>
> > > Hi
>
> > > I have several state-full custom buttons, each composed of three parts
> > > (image views): back, middle, front.
> > > On state change color filter (tint) is applied / removed to the middle
> > > and front part.
> > > On focus change color filter is applied / removed to the back part of
> > > the button (the image on the bottom).
>
> > > Randomly, after several filters are applied (due to state change) the
> > > filters will start to be rendered incorrectly.
> > > E.g. On next focus change all the buttons would be marked as they have
> > > changed state.
> > >       The color filter will not be removed when the button lose
> > > focus.
> > >        Sometimes only portions of the button is tinted (although it
> > > should not be affected).
> > >        Sometimes the transparent parts of the image are affected,
> > > although I use SRC_ATOP mode.
>
> > > To apply color filter I use:
> > > myImageView.setColorFilter(myColor, Mode.SRC_ATOP);
>
> > > To remove color filter I have tried:
> > > myImageView.setcolorFilter(null); OR myImageView.setColorFilter
> > > (Color.TRANSPARENT, Mode.SRC_ATOP);
>
> > > Please note that everything works fine until several color filters are
> > > applied, after that tinting errors appear randomly;
>
> > > Am I missing something (e.g calling some method to force view to
> > > redraw) since I could not find anyone having
> > > similar problems ?
>
> > > regards
>
> > --
> > 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- Hide quoted text 
> > -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Porting JavaME Midlet to android.

2009-01-28 Thread sblantipodi

Hi,
I have a huge midlet that is completely based on
javax.microedition.lcdui
and javax.microedtion.m3g.

I need to completely rewrite my midlet to port it to android?
Is there a way to use javame class in android?

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



[android-developers] Re: problems when setting / removing color filter to image views

2009-01-28 Thread Sundog

Last time you mentioned this, in response to my question about it, you
said that it was a known issue and that you were personally working on
fixing it.

So is this an "issue" that will be fixed at some point, or are we now
regarding this bug as something that won't be fixed?

On Jan 28, 10:09 am, Romain Guy  wrote:
> Hi,
>
> The problem comes from a rather unknown feature of resources and
> drawables. The state of several drawables that come from the same
> resource is shared across all the drawables. Take this example:
>
> Drawable d1 = getResources().getDrawable(R.drawable.my_image);
> Drawable d2 = getResources().getDrawable(R.drawable.my_image);
>
> d2.setAlpha(0); // Sets the alpha value of d2 *and* d1 to 0
>
> The two drawables are different objects but they both use the same
> "constant state" (it's the actual name of the implementation) which
> contains, among other things, the alpha value, the bitmap... and the
> color filter.
>
> This behavior comes from the necessity to optimize the memory usage
> and the loading times of applications. By doing so we have only one
> constant state used by all buttons across all applications.
>
>
>
>
>
> On Wed, Jan 28, 2009 at 3:36 AM, pmilosev  wrote:
>
> > Hi
>
> > I have several state-full custom buttons, each composed of three parts
> > (image views): back, middle, front.
> > On state change color filter (tint) is applied / removed to the middle
> > and front part.
> > On focus change color filter is applied / removed to the back part of
> > the button (the image on the bottom).
>
> > Randomly, after several filters are applied (due to state change) the
> > filters will start to be rendered incorrectly.
> > E.g. On next focus change all the buttons would be marked as they have
> > changed state.
> >       The color filter will not be removed when the button lose
> > focus.
> >        Sometimes only portions of the button is tinted (although it
> > should not be affected).
> >        Sometimes the transparent parts of the image are affected,
> > although I use SRC_ATOP mode.
>
> > To apply color filter I use:
> > myImageView.setColorFilter(myColor, Mode.SRC_ATOP);
>
> > To remove color filter I have tried:
> > myImageView.setcolorFilter(null); OR myImageView.setColorFilter
> > (Color.TRANSPARENT, Mode.SRC_ATOP);
>
> > Please note that everything works fine until several color filters are
> > applied, after that tinting errors appear randomly;
>
> > Am I missing something (e.g calling some method to force view to
> > redraw) since I could not find anyone having
> > similar problems ?
>
> > regards
>
> --
> 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- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Mark Murphy

Tim Bray wrote:
> On Wed, Jan 28, 2009 at 9:05 AM, j  > wrote:
> 
> 
> For the purposes of demo to a large audience, we need to show the G1
> screen on a projector.  Is there VNC software available?
> 
> 
> I'm doing a couple of Android presos in March... I'm assuming that I'll
> have to point a video camera at the device.  I'd love to hear that
> there's a better way. -T

Well, there's some way to get screen grabs off the device that DDMS
uses. I don't see an adb command for it, so off the top of my head I'm
not sure how it's done. But I think the DDMS source code is in the git
repository.

In theory, one could use that technique to create a desktop program that
automatically refreshes an image of the device. I don't know how much
horsepower the screen-capture stuff takes, which would determine how
frequently you can refresh the image without slowing the device down too
much. It also implies you can connect the device to something with the
mini-USB cable, I imagine.

It's far from the most elegant solution, but it's something...

-- 
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: G1 OS version?

2009-01-28 Thread Jean-Baptiste Queru

The build on the ADP1 (116222) is slightly different from the current
G1 build (116143 in the US, 116470 in the UK). They're all awfully
close when it comes to the behavior of the platform itself.

JBQ

On Fri, Jan 23, 2009 at 8:25 PM, Wah  wrote:
>
> Can someone tell me the current OS version for T-mobile G1 phones? I
> have a developer phone but its OS version may be different from what T-
> mobile has.
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, 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: exit button - or not?

2009-01-28 Thread kolby

I apologize if I have hit the wrong tone, originally this thread
caught my eye, because it is an issue that any app has. I was hoping
to find some secret trick to tell the OS via a published, but well
hidden API (not saying anything here), that my app needs some
resources asap and speed up the process a little.

I do agree that making the app feel responsive at start-up is the way
to go, but then again, I would like to know, if there's a way to find
out via an API, how bad the situation really is, so the app could
decide what best to do.

Maybe this should all be in a different thread, or in a different
group, but I'm not tinkering with the OS.

And so far, I have been enjoying the discussion.

Again, sorry if it came across differently, it was not my intention. I
tend to overuse sarcasm at times.

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: ellipsize not working with TextView

2009-01-28 Thread Mark Nuetzmann

This is weird...  It didn't work all day yesterday, but I just looked
at it and it is now both truncating and ellipsizing correctly.  I am
using the singleLine="true" on the TextView.

On Jan 27, 1:53 pm, Mark Nuetzmann  wrote:
> darn, that didn't work either.
>
> On Jan 27, 1:28 pm, James Yum  wrote:
>
> > Hi Mark,
>
> > Try android:singleLine="true" instead of android:maxLines="1"
>
> > Cheers,
> > James
>
> > On Mon, Jan 26, 2009 at 7:48 PM, Mark Nuetzmann
>
> >  wrote:
>
> > > just tried that.  no change. Still does not display the "...", just
> > > truncates the text.
>
> > > On Jan 26, 6:15 pm, Romain Guy  wrote:
> > >> Try changing the TextView's width from wrap_content to 0dip.
>
> > >> On Mon, Jan 26, 2009 at 4:13 PM, Mark Nuetzmann
>
> > >>  wrote:
>
> > >> > I am using the following to create a layout that is inflated and used
> > >> > in a ListView.  The text in the first TextView gets truncated but I do
> > >> > not get the "..." added as I expected.  What do I not have set
> > >> > correctly?  Or is this a known problem...
>
> > >> > 
> > >> >  > >> >        xmlns:android="http://schemas.android.com/apk/res/android";
> > >> >        android:orientation="horizontal"
> > >> >        android:layout_width="fill_parent"
> > >> >        android:layout_height="wrap_content">
>
> > >> >         > >> >                android:layout_height="wrap_content"
> > >> >                android:layout_width="wrap_content"
> > >> >                android:layout_marginLeft="20px"
> > >> >                android:layout_weight="1"
> > >> >                android:layout_gravity="center_vertical"
> > >> >                android:text="This text will not fit in the space 
> > >> > allowed"
> > >> >                android:textSize="20.0sp"
> > >> >                android:maxLines="1"
> > >> >                android:ellipsize="end"
> > >> >                />
> > >> >         > >> >                android:layout_width="40px"
> > >> >                android:layout_height="30px"
> > >> >                android:layout_gravity="center_vertical"
> > >> >                android:gravity="right|center_vertical"
> > >> >                android:text="5"
> > >> >                android:textSize="20.0sp"
> > >> >                android:layout_marginRight="5sp"
> > >> >                android:paddingRight="5sp"
> > >> >                />
> > >> > 
>
> > >> --
> > >> 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: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Tim Bray
On Wed, Jan 28, 2009 at 9:05 AM, j  wrote:

>
> For the purposes of demo to a large audience, we need to show the G1
> screen on a projector.  Is there VNC software available?


I'm doing a couple of Android presos in March... I'm assuming that I'll have
to point a video camera at the device.  I'd love to hear that there's a
better way. -T

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

2009-01-28 Thread Mark K


   Look under 'Settings' scroll to the very bottom, 'About Phone' will
give you the build number etc.

Mark

On Jan 23, 8:25 pm, Wah  wrote:
> Can someone tell me the current OS version for T-mobile G1 phones? I
> have a developer phone but its OS version may be different from what T-
> mobile has.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 run sample application in real harware

2009-01-28 Thread Xavier Ducrohet

apk files are NOT executable.

to install an apk on your device, just execture 'adb install '. Your application should then appear in the Home screen.
This is what ADT is doing when dealing with emulators or devices.

Xav

On Wed, Jan 28, 2009 at 7:04 AM, sumit  wrote:
>
> hi
>
> i build an application in android SdK(HelloAndroid)
> i took the hole source code and put in syatem/bin/HelloAndroid
>
> and tried to excute HelloAndroid.apk but it's giving error
> i tried witout ./dalvikvm and with dalvikvm
>
> without dalvikvm--->
>
> [r...@linux bin]$ ./HelloAndroid.apk
> ./HelloAndroid.apk: line 1: PK  : command not found
> : command not found line 2:
> : No such file or directoryNG
> ./HelloAndroid.apk: line 3:  : command not found
> ./HelloAndroid.apk: line 5: syntax error near unexpected token `('
> ½uËgk:Ž,Y– *–,J ÉCR‡¤Ió<»à9G‡´œª M[`/ðê|ð|¼ çù Ÿçyß#EDøen>~ÉÛ
>  øy7ÅÙùÆŸüiBQ"§  H
> ‹Èy ù­ Ϧ á <õ÷ p¤ /<](c)TôjµÚv ˆ¤ $p H= ­ MþB ø·ï¼–>vNT«Uò¹<ù\Ž
> \>GµRÝè¾ H ¸(B'
> ./HelloAndroid.apk: line 2: : VÜ : No such file or directory
>
> i dont know whether dalvik virtual machine is runngg or not
>
> i tried with dalvik machine
>
> ./dalvikvm -classpath  /system/bin/HelloAndroid/bin/HelloAndroid.apk
>
> right now i dont know how to run a build application in real hardware
> correct me if i am wrong.
>
> regards
> Abhishek
>
> >
>

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

2009-01-28 Thread Jean-Baptiste Queru

It's not part of the Android platform, it's a Google-proprietary
add-on that is not open-source.

JBQ

On Wed, Jan 28, 2009 at 8:39 AM, jsm  wrote:
>
> Why is that closed? I mean the reasoning behind closing that app.
>
> On Jan 28, 9:30 pm, Disconnect  wrote:
>> Its closed source, just like gmail, contact/email sync, market, mp3 store,
>> .. that might be it.
>> (Anyone want to comment?)
>> Oh, and the IM protocols (all of them) but not the framework. And - for tmob
>> users - the myfaves app.
>>
>> On Wed, Jan 28, 2009 at 11:24 AM, jsm  wrote:
>>
>> > Why is the com.google.android.apps.maps.MapsApplication missing from
>> > the open source project site?
>> > Is it closed source?
>>
>> > Can someone from google clarify please?
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, 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: exit button - or not?

2009-01-28 Thread Mark Murphy

kolby wrote:
> I don't see myself running a 1min animation to tell people I have to
> wait until the
> OS has finally decided that my app needs more room. And really, that's
> the message
> they should see, because that's the cause of the delay. And I don't
> want to lie to my users.

You are posting to [android-developers], which is for Q&A about using
the Android SDK to build applications. Hence, I assumed you were
interested in brainstorming ways to improve Steel's responsiveness. Your
tone suggests I am getting in the way of your rant and that my
assumption was flawed.

I am sorry for wasting your time.

-- 
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: About Google Map Installation Package

2009-01-28 Thread Jean-Baptiste Queru

Sounds like you're trying to run Android on custom hardware, not
through the SDK. If that's the case, you should probably head to the
android-platform or maybe android-porting list.

JBQ

On Wed, Jan 28, 2009 at 9:51 AM, mak  wrote:
>
> Hi All,
>
> I have couple of doubts regarding Google Map Usage as below:
>
> 1. I am able to run Google Map Application on Emulator with proper API
> key. Google Map is not open source and not available on Target Board,
> so I am not able to execute this application. Does same API Key hold
> good for Target Board also or Is there something else need to be done
> for it ?
>
> 2. What will Google provide as Google Map Installation Package ( Legal
> one )  for Google Map for Target ? i.e. How Google Map Installer will
> be different from Emulator's Google Map ? What are the other security
> means used to Secure Google Map Installer from running on Target Board
> except API Key and signed .apk file ?
>
>
> Regards,
> _-_Mayank Rana_-_
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, 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] startup sequence

2009-01-28 Thread krish24

Hi Everyone,

Can anybody tell me the system startup sequence of Android?
When the services are starting? When and how the application packages
(.apk) are getting installed?

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



[android-developers] About Google Map Installation Package

2009-01-28 Thread mak

Hi All,

I have couple of doubts regarding Google Map Usage as below:

1. I am able to run Google Map Application on Emulator with proper API
key. Google Map is not open source and not available on Target Board,
so I am not able to execute this application. Does same API Key hold
good for Target Board also or Is there something else need to be done
for it ?

2. What will Google provide as Google Map Installation Package ( Legal
one )  for Google Map for Target ? i.e. How Google Map Installer will
be different from Emulator's Google Map ? What are the other security
means used to Secure Google Map Installer from running on Target Board
except API Key and signed .apk file ?


Regards,
_-_Mayank Rana_-_
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Touch mode again (CRUD application context).

2009-01-28 Thread Andriy Zakharchuk

Thank you for comments, guys.

Probably, I was not clear, but I'm still using context menus. However,
in my opinion, context menu is a secondary way to perform an action.
So, there should always be a primary way (options menu, item click,
toolbar button). Context menu is less obvious/intuitive than other
controls. It's OK for geeks (or guys who read documentation :)), but
not for typical users. Thus I think that context menus can be used
only as secondary shortcuts.

Do you think it's OK to provide some functions only via context menu
without alternative? Doesn't it make the application unclear, more
difficult to learn (at least when other applications in the system,
and other screens in this application have this alternative)?

> The menu, the one that comes up when one presses the menu key, is
> meant for global actions only, actions that affect the entire
> activity.

I understand this, I agree with it and that's why I'm asking the
question. All standard Android applications are using this approach.
I'd like my application to be consistent with them, and it looks
mostly cool... except one screen which discomforts me (I have 5
entities to be stored in the database and only one of them has only
one attribute and any actions can be performed on 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: Apple Granted Multitouch Patent

2009-01-28 Thread JP



On Jan 28, 8:05 am, Al Sutton  wrote:
> You can see from the article 
> athttp://www.infoworld.com/article/09/01/16/Firm_seeks_to_bar_Nokia_RIM...
> that the worst that a firm can do is try to ban companies importing
> products into the US which may breach a US patent.
I generally agree with you. You are comparing apples with oranges
however (pun intended). Saxon Innovation and this whole slew of non-
practicing entities (also known as "patent trolls") exist for the sole
purpose of extorting money from legitimate businesses. Apple would
shoot themselves in the foot if they started enforcing the rights
granted through this (and I suppose other) patents. If this happens,
the touch-screen oriented model of user interaction would mostly be
available with their products only. Although Apple's big, they are not
quite big enough that they wouldn't have to rely on having their boat
lifted along with everybody else's as a result of the proliferation of
touch-oriented handsets by virtue of introduction through numerous
vendors. In my humble opinion, anyway. I am looking in particular at
manufacturers in China and "extended workbench" countries which
deliver to growth markets, and which are not be quite there yet as far
as software is concerned. Android should come as an opportunity to
deliver a software platform that supports the touch-oriented model for
their products almost "out of the box".
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: exit button - or not?

2009-01-28 Thread kolby

Mark,

>
> No, but you can make some choices here.
>
> For example, for a consulting customer, I have an activity that
> incorporates a WebView, loading up some local content. This takes a few
> seconds to load, even with everything local, due to a combination of
> content complexity and prototype-level local content serving code.
>
> So, rather than have a blank screen, we're running a loading animation
> first, with the WebView invisible, only "popping" the WebView when the
> page is finished loading (through a WebViewClient callback).
>
> Does this speed things up? No. In fact, it probably slows them down, as
> the device has to spin the little animation.
>
> Does the customer -- who has lots of UI design and human factors
> experience -- feel that this will improve the *perceived* loading time? Yes.
>
> I'm not saying this specific technique is appropriate for Steel.
> However, I am saying that there are probably steps you can take to make
> Steel both *be* more responsive once it's ready and *feel* more
> responsive through judicious use of tricks akin to the one described here.

Other than showing them a static picture from a website they visited
previously,
I don't think I could present anything to a user that wants to get to
her content, asap.

I don't see myself running a 1min animation to tell people I have to
wait until the
OS has finally decided that my app needs more room. And really, that's
the message
they should see, because that's the cause of the delay. And I don't
want to lie to my users.

>
> > The windows analogy is not 100% working for me here, because I believe
> > in
> > Android everything is in memory, we're not trying to access a hard
> > drive, and
> > even then, freeing room in a pagefile is much less resource intensive,
> > than
> > actually closing other applications based on demand, with callbacks to
> > allow
> > those apps to clean up, and having a garbage collector run in a java
> > environment.
> > All this while my poor app is trying to look good ;)
>
> I didn't say they were the same in implementation. I said they have the
> same impacts upon a newly-opening application. Hard drive thrashing for
> swapfile access slows things down. Terminating activities in Android
> slows things down. Which one does its work faster is contingent on way
> too many environmental considerations (# of apps open, amount of
> available memory, fragmentation of the hard drive, etc.) to make a clear
> statement that one is necessarily always better than the other.
>
> > Sometimes a user really does know when she wants to close an app and
> > not
> > use it again for a while, but Android is denying them the decision.
>
> I can see arguments from *users* that they should have the ability to
> close up unwanted applications.
>
> But as a developer, you need to handle all scenarios, including those
> where users, for whatever reason, aren't closing up other applications.
> Just because a facility *exists* doesn't mean people will use them.
>
And I have to live with comments accusing me of not being able to use
threads "properly" to make my application more responsive.

> As a user, I'm in agreement that a proactive
> close-the-app-and-I-really-mean-it-this-time facility would be A Good
> Thing, so long as it is not required for users to use it.

All I'm asking for really. That and a statement form someone in the
Android dev team admitting that there's a design flaw in this area.
And maybe that just pointing to all default apps not having an "exit"
button can't be the answer to this and related problems.

>As a
> developer, I gotta live with the fact that some users just won't use it
> and therefore I have to take whatever steps I can to make the user happy
> regardless.
>
> Of course, I'm an old fogey, having started developing apps in 16K of
> RAM on 1MHz CPUs. So my perspective may be out of touch with the
> whippersnappers who dominate the industry today. ;-)
>
I started on programmable calculators, until I moved up to a 1k
Sinclair, which I considered roomy. I have no idea how the world got
things done back then. Maybe we just didn't need to write code that
gets interpreted/translated down several times before it finds an
actual processor cycle that does some application related work.
But then again, it didn't offer a "f*rt" application either.
;)

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: Sending HTML email with GMail installed on G1

2009-01-28 Thread Noonien Soong


a question about URLSpan :

Is there a way to have a link with a different label than the URL
itsself?

I want something analog to:

{a href='http://www.google.com'}Google{/a}

instead of

{a href='http://www.google.com'}http://www.google.com{/a}


On Jan 2, 1:57 pm, sergey  wrote:
> Hello Thrusty,
>
> This can be solved by using Spans. Here is a piece of code which
> demonstrates how it can be done:
>
>                                                 SpannableString ss = new 
> SpannableString(getResources
> ().getString(R.string.link));
>                                                 ss.setSpan(new 
> URLSpan(getResources().getString
> (R.string.url)), 0, ss.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
>                                                 SpannableStringBuilder ssb = 
> new SpannableStringBuilder
> (getResources().getString(R.string.mail_text))
>                                                         .append(' ')
>                                                         .append(ss);
>                                                 Intent i = new 
> Intent(Intent.ACTION_SEND)
>                                                                 
> .putExtra(Intent.EXTRA_TEXT, ssb)
>                                                                 
> .putExtra(Intent.EXTRA_SUBJECT,
>                                                                         
> getString(R.string.mail_subject))
>                                                                 
> .setType("message/rfc822"); //$NON-NLS-1$
>                                                         
> startActivity(Intent.createChooser(i, "Title:")); //$NON-NLS-1$
>
> What this code does is is sending email composed of
>
> 
>  .
>
> Upon clicking on the link, the mail recipient will be navigated to a
> site, which address is specified by .
>
> Sergey
>
> On Nov 11 2008, 9:11 pm, thrusty  wrote:
>
> > Hello,
>
> > I'm trying to send HTML email using the GMail package installed on the
> > T-Mobile G1.  What I'm finding is that regardless of the content-type
> > I specify, the message body is always translated into both text/plain
> > and text/html ; however, the html is escaped (e.g. "<" becomes "<")
> > so it does not display as html in the receiving email client.
>
> > Here's how I'm setting up the Intent:
>
> > String[] addresses = {aAddress};
>
> > Intent intent = new Intent(Intent.ACTION_SEND);
> > intent.putExtra(Intent.EXTRA_EMAIL, addresses);
> > intent.putExtra(Intent.EXTRA_SUBJECT, aSubject);
> > intent.putExtra(Intent.EXTRA_TEXT, aBody);
> > intent.setType("text/html");
> > startActivity(newIntent);
>
> > The email I receive looks something like this:
>
> > MIME-Version: 1.0
> > Content-Type: multipart/alternative;
> >         boundary="=_Part_494_24247511.1226466478922"
>
> > --=_Part_494_24247511.1226466478922
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 7bit
> > Content-Disposition: inline
>
> > Here's a property you might want to look at:149
> > Ashbury,
> > San Francisco, CA, 94117View in Puluwai |  > href="http://www.agencylogic.com/googlebase/149Ashbury-com
> > ">Browser
>
> > --=_Part_494_24247511.1226466478922
> > Content-Type: text/html; charset=UTF-8
> > Content-Transfer-Encoding: 7bit
> > Content-Disposition: inline
>
> > 

Here's a property you might want to look > > at:

> > > --=_Part_494_24247511.1226466478922-- > > As you can see, the html is modified by gmail.  The "text/plain" > > version is basically correct except for its mime type. > > > I've tried setting various other content types, e.g.: > > > "text/xhtml" > > "message/rfc822" > > "message/rfc2822" > > "text/plain" > > "multipart/mixed" > > > No luck so far-- anyone have any ideas? > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---

[android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

2009-01-28 Thread Mark Murphy

Will wrote:
> Setting a breakpoint when a DatePickerDialog is open on the emulator's
> screen shows a com.android.internal.widget.NumberPicker for month,
> year, and date (1 number picker each for a total of three
> NumberPickers).  It looks like the same widget used for a time picker;
> based on the name I'm sure it is.
> 
> Importing android.internal.widget doesn't work.  It was worth a shot.

The source to it is probably available on source.android.com. Clone your
own until they open that one up in the SDK.

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



  1   2   >