[android-developers] Re: [android-porting] /mnt/secure/asec

2011-02-14 Thread Anand Android
Hi Dianne,
Thanks .
I'm mounting SDcard on pc ..using UMS mode...when i do this . i see all the
partitions of the SD card mounted on the PC side,which i dont want it . i
just want to mount '/mnt/sdcard' .
how do i do this ?

-
Anand


On Mon, Feb 14, 2011 at 11:39 PM, Dianne Hackborn wrote:

> It is secure containers, currently mainly for apps on SD card.
>
> On Sun, Feb 13, 2011 at 11:34 PM, Anand Android 
> wrote:
>
>> hi all,
>> actually when i mount mysd card . i see 2 partitions ,/mnt/sdcard and
>> /mnt/secure/asec.
>> what is /mnt/secure/asec? whats the use ?
>>
>> -
>> Anand
>>
>>
>>  --
>> unsubscribe: android-porting+unsubscr...@googlegroups.com
>> website: http://groups.google.com/group/android-porting
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>

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

Re: [android-developers] In-app billing sample is not working

2011-02-14 Thread Kostya Vasilyev
Billing requires Market application 2.3, which has not been released yet.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
15.02.2011 10:23 пользователь "muhammad mahmood" 
написал:
> Hi
> i would like to say that i want to implement in-app billing in my
> application. Before it i downloaded the sample billing app. But when i
> click on "Buy" button, it throws exception
>
>
> 01-06 05:01:26.608: ERROR/Bundle(966): readBundle: bad magic number
> 01-06 05:01:26.608: ERROR/Bundle(966): readBundle: trace =
> java.lang.RuntimeException
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Bundle.readFromParcelInner(Bundle.java:1580)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Bundle.(Bundle.java:82)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Parcel.readBundle(Parcel.java:1381)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Parcel.readBundle(Parcel.java:1366)
> 01-06 05:01:26.608: ERROR/Bundle(966): at android.os.Bundle
> $1.createFromParcel(Bundle.java:1517)
> 01-06 05:01:26.608: ERROR/Bundle(966): at android.os.Bundle
> $1.createFromParcel(Bundle.java:1520)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.android.vending.billing.IMarketBillingService$Stub
> $Proxy.sendBillingRequest(IMarketBillingService.java:102)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.example.dungeons.BillingService
> $RequestPurchase.run(BillingService.java:231)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.example.dungeons.BillingService
> $BillingRequest.runIfConnected(BillingService.java:120)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.example.dungeons.BillingService
> $BillingRequest.runRequest(BillingService.java:97)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.example.dungeons.BillingService.requestPurchase(BillingService.java:
> 438)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.example.dungeons.Dungeons.onClick(Dungeons.java:464)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.view.View.performClick(View.java:2408)
> 01-06 05:01:26.608: ERROR/Bundle(966): at android.view.View
> $PerformClick.run(View.java:8816)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Handler.handleCallback(Handler.java:587)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Handler.dispatchMessage(Handler.java:92)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.os.Looper.loop(Looper.java:123)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> android.app.ActivityThread.main(ActivityThread.java:4627)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:858)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
> 01-06 05:01:26.608: ERROR/Bundle(966): at
> dalvik.system.NativeStart.main(Native Method)
> 01-06 05:01:26.608: ERROR/BillingService(966): Error with
> requestPurchase
>
> Kind Regards
> Muhammad Rashid
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] In-app billing sample is not working

2011-02-14 Thread muhammad mahmood
Hi
i would like to say that i want to implement in-app billing in my
application. Before it i downloaded the sample billing app. But when i
click on "Buy" button, it throws exception


01-06 05:01:26.608: ERROR/Bundle(966): readBundle: bad magic number
01-06 05:01:26.608: ERROR/Bundle(966): readBundle: trace =
java.lang.RuntimeException
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Bundle.readFromParcelInner(Bundle.java:1580)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Bundle.(Bundle.java:82)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Parcel.readBundle(Parcel.java:1381)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Parcel.readBundle(Parcel.java:1366)
01-06 05:01:26.608: ERROR/Bundle(966): at android.os.Bundle
$1.createFromParcel(Bundle.java:1517)
01-06 05:01:26.608: ERROR/Bundle(966): at android.os.Bundle
$1.createFromParcel(Bundle.java:1520)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.android.vending.billing.IMarketBillingService$Stub
$Proxy.sendBillingRequest(IMarketBillingService.java:102)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.example.dungeons.BillingService
$RequestPurchase.run(BillingService.java:231)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.example.dungeons.BillingService
$BillingRequest.runIfConnected(BillingService.java:120)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.example.dungeons.BillingService
$BillingRequest.runRequest(BillingService.java:97)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.example.dungeons.BillingService.requestPurchase(BillingService.java:
438)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.example.dungeons.Dungeons.onClick(Dungeons.java:464)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.view.View.performClick(View.java:2408)
01-06 05:01:26.608: ERROR/Bundle(966): at android.view.View
$PerformClick.run(View.java:8816)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Handler.handleCallback(Handler.java:587)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Handler.dispatchMessage(Handler.java:92)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.os.Looper.loop(Looper.java:123)
01-06 05:01:26.608: ERROR/Bundle(966): at
android.app.ActivityThread.main(ActivityThread.java:4627)
01-06 05:01:26.608: ERROR/Bundle(966): at
java.lang.reflect.Method.invokeNative(Native Method)
01-06 05:01:26.608: ERROR/Bundle(966): at
java.lang.reflect.Method.invoke(Method.java:521)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
01-06 05:01:26.608: ERROR/Bundle(966): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-06 05:01:26.608: ERROR/Bundle(966): at
dalvik.system.NativeStart.main(Native Method)
01-06 05:01:26.608: ERROR/BillingService(966): Error with
requestPurchase

Kind Regards
Muhammad Rashid

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


[android-developers] Cannot use AXMLPrinter2 to translate binary xml correctly in Honeycomb-version apk

2011-02-14 Thread Gary Wang
Dear all,

I try to use AXMLPrinter2 to translate the binary xml files in
resource directory of Honeycomb-related apk. But I always got
following error,

java.lang.ArrayIndexOutOfBoundsException: 71 at
android.content.res.StringBlock.getShort(StringBlock.java:231) at
android.content.res.StringBlock.getString(StringBlock.java:91) at
android.content.res.AXmlResourceParser.getName(AXmlResourceParser.java:
140) at test.AXMLPrinter.main(AXMLPrinter.java:56)

Any format change to binary XML in Honeycomb?!

Thanks!

Gary

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


Re: [android-developers] Re: How to delete...?

2011-02-14 Thread Abhilash baddam
Hi,

My problem was solved like this..
myDB.execSQL("DELETE FROM favourites where month=' "+str1+" ' ");

On Tue, Feb 15, 2011 at 4:31 AM, JAlexoid (Aleksandr Panzin) <
jalex...@gmail.com> wrote:

> Learn SQL first to deal with SQLite.
>
> The problem with the code is that string values in SQL have to be
> enclosed in single quotes.
> DELETE FROM tablename where colname='SomeStringValue'
>
> And change your code to proper code that does not have the SQL
> injection problem:
> myDB.execSQL("DELETE FROM tablename where colname= ? ",new Object[]
> {string});
>
> Read the following chapter: Using Databases
> http://developer.android.com/intl/de/guide/topics/data/data-storage.html#db
>
> At the end of it, there are 2 links to examples of complete
> applications.
>
> On 14 фев, 16:59, Abhilash baddam
>  wrote:
> > Hi,
> >
> >  what type of mistake is i am doing?
> >
> > On Mon, Feb 14, 2011 at 8:11 PM, Abhilash baddam <
> >
> > abhilash.androiddevelo...@gmail.com> wrote:
> > > Hi,
> >
> > > In my code i used the command like this,**
> > > *
> > > *
> > > * myDB.execSQL("DELETE FROM tablename where colname="+string,null);*
> >
> > >   In the place of args i am passing null, is it correct what exactly i
> have
> > > to pass there.
> >
> > > On Mon, Feb 14, 2011 at 8:06 PM, Abhilash baddam <
> > > abhilash.androiddevelo...@gmail.com> wrote:
> >
> > >> Hi,
> >
> > >>  i am getting that string, dynamically.
> >
> > >> On Mon, Feb 14, 2011 at 7:54 PM, Mark Murphy  >wrote:
> >
> > >>> Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
> > >>> LogCat and look at your stack trace associated with your error.
> >
> > >>> In your case, you will find that you have invalid SQL, because your
> > >>> string is not quoted. Please use:
> >
> > >>> String[] args={string};
> > >>> myDB.execSQL("DELETE FROM tablename where colname=?", args);
> >
> > >>> On Mon, Feb 14, 2011 at 9:15 AM, Abhilash baddam
> > >>>  wrote:
> > >>> > Hi,
> > >>> > In sqlite database, i am having some values. How can i delete a
> > >>> > particular value from database. I tried like but showing error..
> > >>> > What mistake is i am doin here..?
> > >>> > myDB.execSQL("DELETE FROM tablename where colname="+string);
> > >>> > i want to delete the value at that particulat string.
> > >>> > Any help regarding this issue?
> >
> > >>> > --
> > >>> > You received this message because you are subscribed to the Google
> > >>> > Groups "Android Developers" group.
> > >>> > To post to this group, send email to
> > >>> android-developers@googlegroups.com
> > >>> > To unsubscribe from this group, send email to
> > >>> > android-developers+unsubscr...@googlegroups.com
> > >>> > For more options, visit this group at
> > >>> >http://groups.google.com/group/android-developers?hl=en
> >
> > >>> --
> > >>> Mark Murphy (a Commons Guy)
> > >>>http://commonsware.com|http://github.com/commonsguy
> > >>>http://commonsware.com/blog|http://twitter.com/commonsguy
> >
> > >>> Warescription: Three Android Books, Plus Updates, One Low Price!
> >
> > >>> --
> > >>> You received this message because you are subscribed to the Google
> > >>> Groups "Android Developers" group.
> > >>> To post to this group, send email to
> android-developers@googlegroups.com
> > >>> To unsubscribe from this group, send email to
> > >>> android-developers+unsubscr...@googlegroups.com
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Problem with xml inflate

2011-02-14 Thread yogi
Hi All,
While working on browser I got the following log and a force close.Do
any one have idea what does this "android.view.InflateException:
Binary XML file line #38: Error inflating class " and how can
i debug this.
Thanks in advance
Regards
Yogi

: Starting activity: Intent { act=android.intent.action.VIEW
dat=http://m.google.com/privacy
cmp=com.android.browser/.BrowserActivity }
02-15 10:50:04.798 E/AndroidRuntime(13071): FATAL EXCEPTION: main
02-15 10:50:04.798 E/AndroidRuntime(13071):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.browser/
com.android.browser.BrowserActivity}: android.view.InflateException:
Binary XML file line #38: Error inflating class 
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2663)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2679)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.os.Looper.loop(Looper.java:123)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.ActivityThread.main(ActivityThread.java:4627)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
java.lang.reflect.Method.invokeNative(Native Method)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
java.lang.reflect.Method.invoke(Method.java:521)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
dalvik.system.NativeStart.main(Native Method)
02-15 10:50:04.798 E/AndroidRuntime(13071): Caused by:
android.view.InflateException: Binary XML file line #38: Error
inflating class 
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.createView(LayoutInflater.java:513)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.inflate(LayoutInflater.java:407)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
com.android.browser.BrowserActivity.onCreate(BrowserActivity.java:326)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1049)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2627)
02-15 10:50:04.798 E/AndroidRuntime(13071): ... 11 more
02-15 10:50:04.798 E/AndroidRuntime(13071): Caused by:
java.lang.reflect.InvocationTargetException
02-15 10:50:04.798 E/AndroidRuntime(13071): at
com.android.browser.WebGLZoomView.(WebGLZoomView.java:116)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
java.lang.reflect.Constructor.constructNative(Native Method)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
java.lang.reflect.Constructor.newInstance(Constructor.java:446)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
android.view.LayoutInflater.createView(LayoutInflater.java:500)
02-15 10:50:04.798 E/AndroidRuntime(13071): ... 21 more
02-15 10:50:04.798 E/AndroidRuntime(13071): Caused by:
java.lang.NullPointerException
02-15 10:50:04.798 E/AndroidRuntime(13071): at
com.android.browser.WebGLZoomRenderer.(WebGLZoomView.java:1096)
02-15 10:50:04.798 E/AndroidRuntime(13071): at
com.android.browser.WebGLZoomView.(WebGLZoomView.java:126)
02-15 10:50:04.798 E/AndroidRuntime(13071): ... 25 more
02-15 10:50:04.814 W/ActivityManager( 2609):   Force finishing
activity com.android.browser/.BrowserActivity
02-15 10:50:04.814 W/ActivityManager( 2609):   Force finishing
activity com.google.android.youtube/.SettingsActivity

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

[android-developers] TextView length limit? How strange!

2011-02-14 Thread Jenus Dong
Hi, everyone.
I having a ListView,  which has three TextView components in every item. One
TextView possiblily display too long text, for example 5000 characters in
Ascii code. The testing result is:
G7 ,2.2 , it is ok. But when it running in G3, it just display space, no at
all one character. So I just try and trial, when
words.setText(ss.subSequence(0, 3653));
it display all.
when
words.setText(ss.subSequence(0, 3654));
it display none.

The listview item layout is like:


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

















So android:maxLength="3653",  it just works.
I would appreciated if having some hints, thanks a lot.

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

Re: [android-developers] Can an app get invoked on both mime-type *and* file extension?

2011-02-14 Thread Dianne Hackborn
Did you try putting two  tags inside of a single activity?

On Mon, Feb 14, 2011 at 8:02 PM, eehouse  wrote:

> I'm trying to figure out how to get my app to handle browser-initiated
> downloads for BOTH of two scenarios.  The files are identical in both
> cases, and have names that end in .xwd.  In scenario #1 I control the
> http server and can send the file with a custom mime type.  In
> scenario #2 the user gets the .xwd file from some random website.
>
> For the first, I want my app to get the file without user interaction.
> In the second, because .xwd has multiple meanings, the user should get
> a choice between my app and others that handle it.
>
> I can get each of these to work individually, but not both at the same
> time.  I've messed around with intent-filters in my
> AndroidManifest.xml, and I've even gone so far as to implement two
> Activity subclasses, one for each scenario and each with its own
> intent-filter.  What happens is that the mime-type filter (or class)
> only works if the pathPattern filter (or class) is not present.  As
> soon as they're both there the user's always asked to pick which app
> should handle the download even if it's coming from my server with my
> custom mime type.
>
> (Which would be fine except that some users do the wrong thing, or
> even set the wrong thing as their default.  You know how that
> goes)
>
> Is there any way to do this?  I can provide some .xml, but the fact
> that it doesn't work even with two separate Activity subclasses makes
> me think that better .xml isn't the solution.
>
> Thanks,
>
> --Eric
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: It's not the browser?

2011-02-14 Thread kypriakos

Hi Kostya,

I was not able to find where Android / native browser handles the
XMLHttpRequest calls.
Regardless, do you happen to have any experience with the native
browser and how
it handles requests/responses to web services? I think there seems to
be a buffering of
data on the browser side before it can act upon any response and that
buffer seems
to be as big as 4k or so .. interesting implementation if that is
true.

And is this the best place to browse the Android code online?
http://android.git.kernel.org/

Thanks again

On Feb 13, 4:02 am, Kostya Vasilyev  wrote:
> Isn't Dolphin basically the standard browser with a new UI?
>
> If so, it wouldn't be surprising that they behave the same wrt. networking.
>
> -- Kostya
>
> 13.02.2011 9:18, kypriakos пишет:
>
> > Hi all,
>
> > I have tried a number of other browsers (Dolphin, Opera Mini, Opera
> > Mobile) and although
> > the last two falsely advertise that they implement cross-origin
> > resource sharing solutions,
> > Dolphin seems to work exactly the same as the native browser - it
> > sends out the Ajax
> > request to the remote web server, the web server executes the service
> > call but the result
> > does not get posted by the browser. This may indicate that it is a NOT
> > a browser issue
> > I am facing with but rather and Android OS-lever issue (http layers??)
> > where for some
> > reason the responses are not allowed to reach the browser. Would this
> > be a correct
> > assessment? From what I understand, Android OS does not implement a
> > personal
> > firewall correct? What else would be causing this disconnect? I will
> > greatly appreciate
> > any hints on this.
>
> > Thanks
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.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: adb upload

2011-02-14 Thread Hendrik Greving
Oh and second question, how do you actually know whether you've compiled in 
debug or release mode in Eclipse? This is actually very basic but somehow not 
very obvious in this tool.
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Monday, February 14, 2011 8:39 PM
  Subject: adb upload


  After I've signed and exported an .apk, is there a way to upload this 
automatically with Eclipse? This is a basic question, I know. If I press F11 I 
guess it is just recompiling an unsigned package.

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

[android-developers] Multitouch buttons

2011-02-14 Thread brian purgert
Ok i just put out my game spacebike and got a comment saying they want
multitouch.
so basically i am using on click listener right now and im wondering how i
change that to multitouch. Instead of just being able to accelerate or
change the gravity i want them to be able to do either at a time.
thanks anyhelp is much appreciated.

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

[android-developers] adb upload

2011-02-14 Thread Hendrik Greving
After I've signed and exported an .apk, is there a way to upload this 
automatically with Eclipse? This is a basic question, I know. If I press F11 I 
guess it is just recompiling an unsigned package.

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

2011-02-14 Thread Mikey
I mean the bitmap that I'm drawing into the canvas I suppose. In the
code I get the bitmap from a decodeResource(..) call, and then in the
onDraw I draw that bitmap into the canvas with the current matrix
(which is manipulated when the screen is touched). Are you only able
to draw to the campus? I need the dot to stay where it should be on
the bitmap. i.e. if your current location translates to pixel
coordinates(220, 660), I need it to draw the dot on the bitmap's
coordinate (220, 660), not the phone's screen coordinate (my phone has
resolution 480 x 854). So if I'm able to draw that dot onto the
bitmap, then I can just draw it onto the canvas without worrying about
the scale or if the dot is off screen 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] Re: ImageButton with rounded corners and no padding

2011-02-14 Thread Streets Of Boston
Padding does not control any rounding of borders at all. If you want rounded 
border, use 9-patches or drawables:
Drawables:
http://developer.android.com/guide/topics/resources/drawable-resource.html
http://idunnolol.com/android/drawables.html (look at 'shape' with a 'corner' 
element)
 
9-patches:
http://developer.android.com/guide/topics/resources/drawable-resource.html#NinePatch
 

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

[android-developers] Can an app get invoked on both mime-type *and* file extension?

2011-02-14 Thread eehouse
I'm trying to figure out how to get my app to handle browser-initiated
downloads for BOTH of two scenarios.  The files are identical in both
cases, and have names that end in .xwd.  In scenario #1 I control the
http server and can send the file with a custom mime type.  In
scenario #2 the user gets the .xwd file from some random website.

For the first, I want my app to get the file without user interaction.
In the second, because .xwd has multiple meanings, the user should get
a choice between my app and others that handle it.

I can get each of these to work individually, but not both at the same
time.  I've messed around with intent-filters in my
AndroidManifest.xml, and I've even gone so far as to implement two
Activity subclasses, one for each scenario and each with its own
intent-filter.  What happens is that the mime-type filter (or class)
only works if the pathPattern filter (or class) is not present.  As
soon as they're both there the user's always asked to pick which app
should handle the download even if it's coming from my server with my
custom mime type.

(Which would be fine except that some users do the wrong thing, or
even set the wrong thing as their default.  You know how that
goes)

Is there any way to do this?  I can provide some .xml, but the fact
that it doesn't work even with two separate Activity subclasses makes
me think that better .xml isn't the solution.

Thanks,

--Eric

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


Re: [android-developers] Custom View question

2011-02-14 Thread Romain Guy
Hi,

What "underlying bitmap" are you referring to? In the onDraw() method, the
Canvas is used to draw onto your application's window buffer.

On Mon, Feb 14, 2011 at 7:55 PM, Mikey  wrote:

> Here's my problem. I finally figured out how to get my custom view
> working, but discovered that "canvas.drawCircle(..)" draws based on
> the screens dimensions and not the underlying bitmap (I may be
> misusing some terms/concepts here, still a little iffy on the whole
> custom view).
>
> Basically, I have a bitmap of a map image, and I want to be able to
> draw based on the bitmap's pixel dimensions, and to the bitmap if
> possible, so that when it's panned/zoomed, it stays in its respective
> place. Here is the code for my custom view. I x'd out my latitude and
> longitude. The touch handling is code adapted from a Hello, Android
> (3e) excerpt.
>
> package mikey.gps.NAV;
>
> import java.util.Vector;
>
> import android.content.Context;
> import android.graphics.Bitmap;
> import android.graphics.BitmapFactory;
> import android.graphics.Canvas;
> import android.graphics.Matrix;
> import android.graphics.Paint;
> import android.graphics.PointF;
> import android.util.AttributeSet;
> import android.util.FloatMath;
> import android.view.MotionEvent;
> import android.view.View;
>
> public class CustomView extends View {
>private int mMode;
>private double curLat, curLng;
>public static final int MAP = 0;
>public static final int NAV = 1;
>private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
>Vector mPath = new Vector();
>Bitmap map;
>
>//Geographical information for translating to pixels
>private double XZero = xx;
>private double YZero = yyy;
>private double XWidth = 0.013884;
>private double YWidth = 0.006934;
>  //Image dimensions
>private double IWidth = 1389;
>private double IHeight = 971;
>
>
>//Matrices for scaling the image
>public Matrix matrix = new Matrix();
>Matrix savedMatrix = new Matrix();
>
>static final int NONE = 0;
>static final int DRAG = 1;
>static final int ZOOM = 2;
>int mode = NONE;
>
>  PointF start = new PointF();
>PointF mid = new PointF();
>float oldDist = 1f;
>
>public CustomView(Context context, AttributeSet attrs) {
>super(context, attrs);
>init();
>}
>
>public CustomView(Context context, AttributeSet attrs, int defStyle)
> {
>super(context, attrs, defStyle);
>// TODO Auto-generated constructor stub
>}
>
>public CustomView(Context context) {
>super(context);
>init();
>}
>private void init() {
>map =
> BitmapFactory.decodeResource(getContext().getResources(),
> R.drawable.campus);
>//mPaint.setFilterBitmap(true);
>matrix.setTranslate(1f, 1f);
>invalidate();
>}
>
>/* When the view is invalidated, onDraw does different actions
> * depending on its mode. If it is the map display, it simply
> * draws a circle on the current location. If it is on navigate,
> * it draws a circle on the start and goal nodes, then lines to
> * form the path.
> *
> * (non-Javadoc)
> * @see android.view.View#onDraw(android.graphics.Canvas)
> */
>@Override
>protected void onDraw(Canvas canvas) {
>// TODO Auto-generated method stub
>super.onDraw(canvas);
>canvas.drawBitmap(map, matrix, mPaint);
>if(mMode == NAV) {
>
>  canvas.drawCircle(translateX(mPath.lastElement().lat),
>translateY(mPath.lastElement().lng),
> 10, mPaint);
>
>  canvas.drawCircle(translateX(mPath.firstElement().lat),
>
>  translateY(mPath.firstElement().lng), 10, mPaint);
>for(int i = 0; i < mPath.size()- 1; i++) {
>LocationNode startNode = mPath.elementAt(i);
>LocationNode stopNode =
> mPath.elementAt(i+1);
>float startX = translateX(startNode.lat);
>float startY = translateY(startNode.lng);
>float stopX = translateX(stopNode.lat);
>float stopY = translateY(stopNode.lng);
>canvas.drawLine(startX, startY, stopX,
> stopY, mPaint);
>}
>}
>else if (mMode == MAP) {
>canvas.drawCircle(translateX(curLat),
>translateY(curLng), 10, mPaint);
>}
>}
>
>@Override
>public boolean onTouchEvent(MotionEvent e) {
>

[android-developers] Custom View question

2011-02-14 Thread Mikey
Here's my problem. I finally figured out how to get my custom view
working, but discovered that "canvas.drawCircle(..)" draws based on
the screens dimensions and not the underlying bitmap (I may be
misusing some terms/concepts here, still a little iffy on the whole
custom view).

Basically, I have a bitmap of a map image, and I want to be able to
draw based on the bitmap's pixel dimensions, and to the bitmap if
possible, so that when it's panned/zoomed, it stays in its respective
place. Here is the code for my custom view. I x'd out my latitude and
longitude. The touch handling is code adapted from a Hello, Android
(3e) excerpt.

package mikey.gps.NAV;

import java.util.Vector;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PointF;
import android.util.AttributeSet;
import android.util.FloatMath;
import android.view.MotionEvent;
import android.view.View;

public class CustomView extends View {
private int mMode;
private double curLat, curLng;
public static final int MAP = 0;
public static final int NAV = 1;
private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
Vector mPath = new Vector();
Bitmap map;

//Geographical information for translating to pixels
private double XZero = xx;
private double YZero = yyy;
private double XWidth = 0.013884;
private double YWidth = 0.006934;
  //Image dimensions
private double IWidth = 1389;
private double IHeight = 971;


//Matrices for scaling the image
public Matrix matrix = new Matrix();
Matrix savedMatrix = new Matrix();

static final int NONE = 0;
static final int DRAG = 1;
static final int ZOOM = 2;
int mode = NONE;

  PointF start = new PointF();
PointF mid = new PointF();
float oldDist = 1f;

public CustomView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}

public CustomView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}

public CustomView(Context context) {
super(context);
init();
}
private void init() {
map = BitmapFactory.decodeResource(getContext().getResources(),
R.drawable.campus);
//mPaint.setFilterBitmap(true);
matrix.setTranslate(1f, 1f);
invalidate();
}

/* When the view is invalidated, onDraw does different actions
 * depending on its mode. If it is the map display, it simply
 * draws a circle on the current location. If it is on navigate,
 * it draws a circle on the start and goal nodes, then lines to
 * form the path.
 *
 * (non-Javadoc)
 * @see android.view.View#onDraw(android.graphics.Canvas)
 */
@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
super.onDraw(canvas);
canvas.drawBitmap(map, matrix, mPaint);
if(mMode == NAV) {
canvas.drawCircle(translateX(mPath.lastElement().lat),
translateY(mPath.lastElement().lng), 
10, mPaint);
canvas.drawCircle(translateX(mPath.firstElement().lat),
translateY(mPath.firstElement().lng), 
10, mPaint);
for(int i = 0; i < mPath.size()- 1; i++) {
LocationNode startNode = mPath.elementAt(i);
LocationNode stopNode = mPath.elementAt(i+1);
float startX = translateX(startNode.lat);
float startY = translateY(startNode.lng);
float stopX = translateX(stopNode.lat);
float stopY = translateY(stopNode.lng);
canvas.drawLine(startX, startY, stopX, stopY, 
mPaint);
}
}
else if (mMode == MAP) {
canvas.drawCircle(translateX(curLat),
translateY(curLng), 10, mPaint);
}
}

@Override
public boolean onTouchEvent(MotionEvent e) {
// TODO Auto-generated method stub
WrapMotionEvent event = WrapMotionEvent.wrap(e);
switch (event.getAction() & MotionEvent.ACTION_MASK) {
  case MotionEvent.ACTION_DOWN:
 savedMatrix.set(matrix);

Re: [android-developers] Do XML Request if certain time elapsed

2011-02-14 Thread TreKing
On Mon, Feb 14, 2011 at 6:43 PM, Ehask  wrote:

> I want to pull a field from the SQLLite see if it has been an hour since it
> last pulled data or the first time its been run if so fire off the XML fetch
> to get recent stats.
>

If you only care about it being an hour since *your app* last pulled data,
then just use AlarmManager.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Best practice for when to go get data in a Fragment lifecycle?

2011-02-14 Thread davemac
Given the lifecycle of a Fragment, when would it be best to go get
data for it? The samples so far have relied on simple built-in String
and resource data, and it's been accessed in onActivityCreated(),
which seems late to me. If I have a fragment that needs to read from a
database, from the disk, or over the network, I'd want to get a
background thread going early to pre-fetch the data so when my
onActivityCreated() is called, my data might already be there for me
to use. Is onInflate() too early? (I know, onInflate() is only called
if my fragment is in a layout and that layout is inflated, such as
when a layout is set as the content view of an activity) I won't have
an Activity context until onAttach() is called so if I want to do
anything that needs a context I'd have to wait until onAttach(). But
maybe I should be waiting until onCreate() at least. Any guidelines
here? I need to wait until any necessary data is available to my
fragment, but could I start too early? Thank you in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Do XML Request if certain time elapsed

2011-02-14 Thread Ehask
Dan,

Its pulling stats from an API that dont really change for up to 1
hour or more. This app is for a specific company's website. My main
concern is how others are storing their date in SQLLite so they can
pull out and compare (along with how they compare calendar??) to see
if it has run within the last hour of the current time.

Thx,
Eric

> On Feb 14, 6:43 pm, Ehask  wrote:
>
>
>
>
>
>
>
> > How are you guys handling determining time. I want to pull a field
> > from the SQLLite see if it has been an hour since it last pulled data
> > or the first time its been run if so fire off the XML fetch to get
> > recent stats. If not just call the ListView Intent
>
> > Thx for any pointers

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


[android-developers] ImageButton with rounded corners and no padding

2011-02-14 Thread RLScott
A normal ImageButton with default padding embeds a rectangular image
into a frame with rounded corners.  What I would like to do is
eliminate that padded frame and still have transparent rounded
corners.  If I set:

android:padding="0px"

in the XML for the ImageButton, then the frame around the  button
disappears, but the button has sharp corners - not rounded.  I suppose
I could edit my images to make transparent rounded corners, but isn't
there a more straightforward way to do it?  I'm looking for something
that will automatically erase (make transparent) the corners of my
image when padding = 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: Do XML Request if certain time elapsed

2011-02-14 Thread DanH
Is this pulling data off the net?  Sounds like you're describing RSS.

On Feb 14, 6:43 pm, Ehask  wrote:
> How are you guys handling determining time. I want to pull a field
> from the SQLLite see if it has been an hour since it last pulled data
> or the first time its been run if so fire off the XML fetch to get
> recent stats. If not just call the ListView Intent
>
> Thx for any pointers

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

2011-02-14 Thread Ted Hopp
The problem persists in 2.3.3 (API level 10) emulator, at least for
us.

On Feb 5, 11:36 am, Marcin Orlowski  wrote:
> > Same code works on version 2.2 of the Google API emulator, but not 2.3
> > of the Google API emulator.
>
> It's known, confirmed 
> issue:https://groups.google.com/group/android-developers/msg/69ad5f4a5ec9f3e9
> If you want to test LVL use 2.2 emulator instead.

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


Re: [android-developers] Publishing / log.d

2011-02-14 Thread Dianne Hackborn
Yes you should strip them out.  In Java, "if (static_flag)" is the same as
preprocessor defines for this purpose.

See for example the various logging here:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/am/ActivityStack.java

On Mon, Feb 14, 2011 at 4:39 PM, Hendrik Greving wrote:

>  Hi question to publishing apps: Do you need to remove all Log.d calls
> before publishing? Since there is no preprocessor with #defines, it seems
> kind of dumb to put if (static_flag) around every Log.d call.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




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

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

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

[android-developers] Do XML Request if certain time elapsed

2011-02-14 Thread Ehask
How are you guys handling determining time. I want to pull a field
from the SQLLite see if it has been an hour since it last pulled data
or the first time its been run if so fire off the XML fetch to get
recent stats. If not just call the ListView Intent

Thx for any pointers

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


[android-developers] Publishing / log.d

2011-02-14 Thread Hendrik Greving
Hi question to publishing apps: Do you need to remove all Log.d calls before 
publishing? Since there is no preprocessor with #defines, it seems kind of dumb 
to put if (static_flag) around every Log.d call. 

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

Re: [android-developers] Re: Share some of my work - Drag&Drop framework

2011-02-14 Thread Kevin Duffey
This is pretty interesting.. trying to figure what use it would be on a
phone device.. what sort of app may take advantage of this. On a tablet
though, I can see this being very useful, for like mail apps and such. Do
you have any ideas what sort of apps would use this?


On Mon, Feb 14, 2011 at 3:14 PM, JAlexoid (Aleksandr Panzin) <
jalex...@gmail.com> wrote:

> In Java CameCasing is also the norm. But methodNames, ClassNames and
> fieldNames are CamelCased(See the difference in came casing). Just not
> packages. Because packages == directories.
>
> Thnx for BSD'ing the code. LGPL would have been acceptable also for
> components.
>
> PS: Since you are the sole developer you can change the license to
> whatever you like any time. Just people that got your code under
> previous license will have that code under that license that was
> effective at the time.
>
> On 14 фев, 09:59, "Oded O."  wrote:
> > Sorry for that...
> > I'm coming from the .NET world (5+ years of C# development) where
> > CamelCasing is the way to go...
> > I'm still adjusting, and had no way of knowing that upper-cased
> namespaces
> > can be problematic
> >
> > BTW, why is this an issue, and on what machines?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Not receiving c2DM message

2011-02-14 Thread Indu
I am trying to build a test app for C2DM message.

Here is what I've
Registration:
package name: myapp.test
published on the market: no
contact email: my gmail account (all emails are same, lets say
x...@gmail.com)


Phone:
I've signed up to sync google account (in fact with the email account
I've registered x...@gmail.com)
I am using the google package for C2DM. So, i am using the registered
gmail account x...@gmail.com in the C2DMBaseReceiver.java.
When I run my app, I get the registration id at C2DMReciever.java.
I've the following set in my AndroidManifest.xml:

  




Server side:
I run JBoss on my local machine.

I send the message to: https://android.clients.google.com/c2dm/send
parameters:
registration_id: the id I recieved
collapse_key: None
data.message=test  <== this is the message I expect to be sent.
data.account_name=x...@gmail.com <== I am not sure, if this is required.

conn.setRequestProperty("Authorization", "GoogleLogin auth=" +
authToken); <== authtoken uses the email I registered with
(x...@gmail.com) and the password for the same.

The response to the HTTP post is 200. and the response line is:
id=0:1297724645037768%c7a1f70d00252358

So, I am assuming it is successful.

However, I never receive the message on the phone.

Am I doing it right? I feel I am so close, but yet so far :-( Your
help is 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: Share some of my work - Drag&Drop framework

2011-02-14 Thread JAlexoid (Aleksandr Panzin)
In Java CameCasing is also the norm. But methodNames, ClassNames and
fieldNames are CamelCased(See the difference in came casing). Just not
packages. Because packages == directories.

Thnx for BSD'ing the code. LGPL would have been acceptable also for
components.

PS: Since you are the sole developer you can change the license to
whatever you like any time. Just people that got your code under
previous license will have that code under that license that was
effective at the time.

On 14 фев, 09:59, "Oded O."  wrote:
> Sorry for that...
> I'm coming from the .NET world (5+ years of C# development) where
> CamelCasing is the way to go...
> I'm still adjusting, and had no way of knowing that upper-cased namespaces
> can be problematic
>
> BTW, why is this an issue, and on what machines?

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

2011-02-14 Thread Mark
I am also experiencing this issue. The code I am using to apply a gradient 
is as follows...

Canvas DestinationCanvas = new Canvas();
DestinationCanvas.setBitmap(DestinationBitmap);
//Gradient is going from very transparent black to fully black at the bottom 
GradientDrawable grad = new GradientDrawable(Orientation.TOP_BOTTOM, new 
int[]{0x0200, 0x2a00, 0x5b00, 0x9000, 0xc900, 
0xcc00});
grad.setBounds(0, 0, DestinationBitmap.getWidth(), RequiredHeight);
grad.draw(DestinationCanvas);


Calling grad.setDither(true) or setFilter(true) does not help.

Regards,
Mark England

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

[android-developers] Heap measured in DDMS

2011-02-14 Thread culonna
What is the difference between VM heap and native heap shown in ddms?
What do they mean and which of them is limited to 16 mb?

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

2011-02-14 Thread JAlexoid (Aleksandr Panzin)
Network provider has a precision of 500-1 meters(~1500-3 feet)
WiFi has 70-150 meters(~ 210-450 feet)
Not an option for high precision.

On 14 фев, 15:40, Deeps Uttekar  wrote:
> Hi you can use network provider for it
> plse see following code
> if gps not working then you can use network provider
> Sorry for code indentation
>
> LocationManager myManager =
> (LocationManager)getSystemService(Context.LOCATION_SERVICE);
>         Location
> gpsLoc=myManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
>         Location
> nwloc=myManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);;
>         Double latPoint=0D;
>         Double longPoint=0D;
>         String currentPhoneLocation=null;
>
> if(gpsLoc==null){
>             Log.i("Mobsec","gps null");
>             currentPhoneLocation="no location";
>         }else{
>
>              latPoint
> =myManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude();
>              longPoint
> =myManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude();
>              currentPhoneLocation = "Current phone location: Latitude:
> "+latPoint+" Longitude: "+longPoint;
>
>         }
>
>         if(nwloc==null){
>             Log.i("Mobsec","nwloc null");
>             currentPhoneLocation="no location";
>         }else{
>             latPoint
> =myManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER).getLatitude();
>             longPoint
> =myManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER).getLatitude();
>             currentPhoneLocation = "Current phone location: Latitude:
> "+latPoint+" Longitude: "+longPoint;
>
>         }
>
> -Deeps
>
> On Mon, Feb 14, 2011 at 6:07 PM, JAlexoid (Aleksandr Panzin) <
>
> jalex...@gmail.com> wrote:
> > In theory it is possible using accelerometer. But that will trash the
> > battery and will not be reliable. In addition to being heavy on
> > computation.
>
> > On 4 фев, 15:55, dica  wrote:
> > > Hi
>
> > > Is it possible to track movement without GPS?  The GPS signal is too
> > > weak on my phone to work indoors.  I want to be able to track where
> > > I've been within a building.  Possible?
>
> > > Tks
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: How to delete...?

2011-02-14 Thread JAlexoid (Aleksandr Panzin)
Learn SQL first to deal with SQLite.

The problem with the code is that string values in SQL have to be
enclosed in single quotes.
DELETE FROM tablename where colname='SomeStringValue'

And change your code to proper code that does not have the SQL
injection problem:
myDB.execSQL("DELETE FROM tablename where colname= ? ",new Object[]
{string});

Read the following chapter: Using Databases
http://developer.android.com/intl/de/guide/topics/data/data-storage.html#db

At the end of it, there are 2 links to examples of complete
applications.

On 14 фев, 16:59, Abhilash baddam
 wrote:
> Hi,
>
>      what type of mistake is i am doing?
>
> On Mon, Feb 14, 2011 at 8:11 PM, Abhilash baddam <
>
> abhilash.androiddevelo...@gmail.com> wrote:
> > Hi,
>
> > In my code i used the command like this,*    *
> > *
> > *
> > * myDB.execSQL("DELETE FROM tablename where colname="+string,null);*
>
> >   In the place of args i am passing null, is it correct what exactly i have
> > to pass there.
>
> > On Mon, Feb 14, 2011 at 8:06 PM, Abhilash baddam <
> > abhilash.androiddevelo...@gmail.com> wrote:
>
> >> Hi,
>
> >>      i am getting that string, dynamically.
>
> >> On Mon, Feb 14, 2011 at 7:54 PM, Mark Murphy 
> >> wrote:
>
> >>> Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
> >>> LogCat and look at your stack trace associated with your error.
>
> >>> In your case, you will find that you have invalid SQL, because your
> >>> string is not quoted. Please use:
>
> >>> String[] args={string};
> >>> myDB.execSQL("DELETE FROM tablename where colname=?", args);
>
> >>> On Mon, Feb 14, 2011 at 9:15 AM, Abhilash baddam
> >>>  wrote:
> >>> > Hi,
> >>> >     In sqlite database, i am having some values. How can i delete a
> >>> > particular value from database. I tried like but showing error..
> >>> > What mistake is i am doin here..?
> >>> > myDB.execSQL("DELETE FROM tablename where colname="+string);
> >>> > i want to delete the value at that particulat string.
> >>> > Any help regarding this issue?
>
> >>> > --
> >>> > You received this message because you are subscribed to the Google
> >>> > Groups "Android Developers" group.
> >>> > To post to this group, send email to
> >>> android-developers@googlegroups.com
> >>> > To unsubscribe from this group, send email to
> >>> > android-developers+unsubscr...@googlegroups.com
> >>> > For more options, visit this group at
> >>> >http://groups.google.com/group/android-developers?hl=en
>
> >>> --
> >>> Mark Murphy (a Commons Guy)
> >>>http://commonsware.com|http://github.com/commonsguy
> >>>http://commonsware.com/blog|http://twitter.com/commonsguy
>
> >>> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Logcat Filter for two or tags in Eclipse?

2011-02-14 Thread Xavier Ducrohet
It's not supported in the Eclipse/DDMS UI.

On Sat, Feb 12, 2011 at 2:58 AM, AndroidDevTime wrote:

> Clicked on create filter could not figure out from docs how to create
> a filter for say two or more tags. If I have two tags
> com.test.TestClassA and com.test.TestClassB how do I create a filter
> that shows log for both of these classes? I saw how you can start ADB
> for only certain tags, but how can this be done in eclipse? Please
> provide details thanks. What exactly do I need to enter on the tag
> line when creating a new filter in eclipse?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

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

Re: [android-developers] Re: It's not the browser?

2011-02-14 Thread Kostya Vasilyev
This page says that Dolphin is based on the default browser:

http://hubpages.com/hub/Review-of-Web-Browsers-for-Android-2x

Of course, that could be wrong too, but - there just aren't that many
mobile-ready web engines that it could possibly be built on. Mozilla's just
barely limping along at this point, Opera is only sharing theirs with device
manufacturers, and that, to my knowledge, leaves only WebKit. And the
default browser is a great starting point, since it's already been made to
run on Android.

Of course, that's pure speculation on my part, but it just seems likely.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
15.02.2011 0:23 пользователь "kypriakos"  написал:
>
> Not sure about that Kostya but if you are right then that makes
> perfect sense
> after all. I think I need to figure out where in the code the handling
> of the
> XMLHttpRequest occurs and how much the browser itself is involved vs
> the http and the OS layers.
>
> Thanks for the response
>
> On Feb 13, 4:02 am, Kostya Vasilyev  wrote:
>> Isn't Dolphin basically the standard browser with a new UI?
>>
>> If so, it wouldn't be surprising that they behave the same wrt.
networking.
>>
>> -- Kostya
>>
>> 13.02.2011 9:18, kypriakos пишет:
>>
>> > Hi all,
>>
>> > I have tried a number of other browsers (Dolphin, Opera Mini, Opera
>> > Mobile) and although
>> > the last two falsely advertise that they implement cross-origin
>> > resource sharing solutions,
>> > Dolphin seems to work exactly the same as the native browser - it
>> > sends out the Ajax
>> > request to the remote web server, the web server executes the service
>> > call but the result
>> > does not get posted by the browser. This may indicate that it is a NOT
>> > a browser issue
>> > I am facing with but rather and Android OS-lever issue (http layers??)
>> > where for some
>> > reason the responses are not allowed to reach the browser. Would this
>> > be a correct
>> > assessment? From what I understand, Android OS does not implement a
>> > personal
>> > firewall correct? What else would be causing this disconnect? I will
>> > greatly appreciate
>> > any hints on this.
>>
>> > Thanks
>>
>> --
>> Kostya Vasilyev --http://kmansoft.wordpress.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

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

Re: [android-developers] Problem Activity

2011-02-14 Thread Kostya Vasilyev
My recommendation, before heading down that path, is to look up Romain Guy's
blog post on fast orientation changes. It covers another orientation change
optimization with which you can let Android recreate your activity, and
still have good response time.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
15.02.2011 1:24 пользователь "Kevin Duffey"  написал:
> Oh.. so if you implement that onConfigurationChage, then orientation
changes
> (among other things) don't stop/restart activities? I'll have to read
about
> that. You'd think that would be emphasized more.. or is there some reason
it
> is not done as often?
>
> On Mon, Feb 14, 2011 at 12:37 PM, Kostya Vasilyev wrote:
>
>> 14.02.2011 23:13, Kevin Duffey пишет:
>>
>> Incidentally, I don't know if there are other reasons for restarting
>>> activities on orientation changes, but I know one reason it's done is to
>>> allow potential layout changes to occur. You can provide layouts for
both
>>> landscape and portrait. I don't know why some sort of event handler
couldn't
>>> be called without restarting the entire activity...
>>>
>>
>> There is just such handler - onConfigurationChanged:
>>
>>
>>
http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)
>>
>> ... but you have to tell Android that your code is able to handle it:
>>
>>
>>
http://developer.android.com/guide/topics/manifest/activity-element.html#config
>>
>> Note that there are more potential config change cases than just the
>> orientation change - in particular, the user may change the phone's
locale
>> setting - other cases are listed on the page above.
>>
>> The automatic destroy / recreate cycle is there as a catch-all, with the
>> onConfigurationChanged providing a possibility for an optimization.
>>
>> --
>> Kostya Vasilyev -- http://kmansoft.wordpress.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
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Problem Activity

2011-02-14 Thread Mark Murphy
On Mon, Feb 14, 2011 at 5:24 PM, Kevin Duffey  wrote:
> Oh.. so if you implement that onConfigurationChage, then orientation changes
> (among other things) don't stop/restart activities?

Not exactly. You need the android:configChanges attribute in the manifest.

> You'd think that would be emphasized more.. or is there some reason it
> is not done as often?

Yes. The fear is that you'll screw it up.

If you use android:configChanges, for those configuration changes
listed, Android does *nothing* other than call
onConfigurationChanged().

It won't load in a fresh layout or otherwise update the UI to work on
this configuration -- you have to do that.

It won't load in fresh string resources for changes in locale (which
is a configuration change) -- you have to do that.

And so on.

At the point in time you make the decision to use
android:configChanges, it may seem like a fair deal. However:

-- If you're not going to handle *all* configuration changes in
android:configChanges, then you *still* have to do all the normal
stuff for the destroy/recreate cycle, to handle the other
configuration changes you skip (e.g., dock/undock).

-- Every time you add a new resource, or possibly even change an
existing one (e.g., layout), you will need to go through your code and
make sure that you are handling it properly in
onConfigurationChanged() or other places downstream. The belief is
that you modify these things way more frequently than you modify stuff
that would have to go into onSaveInstanceState() or
onRetainNonConfigurationInstance().

Google's recommendation -- which I've come to agree with -- is that
you use android:configChanges only in places where there is no way to
deal with the destroy/recreate cycle (e.g., WebView, camera preview,
streaming media playback, some games).

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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


Re: [android-developers] Re: answering machine in android

2011-02-14 Thread Kevin Duffey
I am pretty sure I read someone else doing something like this and I think
the answer was that while you might be able to record the conversation, you
can't play audio through the call for the other side to hear. Short of using
speaker phone to play audio and hope the mic picks up the speaker output, I
don't know if you will be able to play a message to the person on the other
end of the call.


On Sun, Feb 13, 2011 at 10:49 PM, Androidbaby  wrote:

> Just a simple answer is yes you can record call conversation.
>
> Currently i am leaving to attend a meeting and will update you about
> code shortly.
>
>
>
> On Feb 7, 1:51 pm, deepak kumar  wrote:
> > Dear Sir/Madam,
> > We are trying to develop an application based on
> > answering machine, in which the application has to receive the call
> > during certain period, has to answer the call by playing a pre-
> > recorded message and has to record the message of the caller. The
> > application has to allow the user to play the message whenever he is
> > free. Here we had few questions in mind and wanted to confirm if this
> > was possible.
> >
> > 1. can we receive an incoming call using an application??
> > 2. can we record a call conversation??
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Camera preview demo

2011-02-14 Thread Kevin Duffey
Make sure you aren't hard-coding /sdcard and using the api to get the right
path. I forget the call (someone will post it), or search in this forum for
camera and you'll find it. I've seen a few posts about using /sdcard
directly and not the right way to do it.

What I want to learn is how to store the images such that the Gallery app
can find them. Although I did find an example of initiating the built-in
camera app to take a picture via an Intent, then getting control back so
that you can use the image (and I assume it's also stored in the right
location/format for gallery to see it). I am considering that for my own app
since the built-in camera app will use flash, focus, and other capabilities
that I don't have to recreate in my own app.


On Sun, Feb 13, 2011 at 11:42 PM, Jayanthi  wrote:

> Hi,
>
>  
> 
>   android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
>
> I gave all the above permission
>
> On Feb 14, 12:38 pm, guru sagar  wrote:
> > hi,
> >
> >   check permissons in android manifest file
> >
> > On Mon, Feb 14, 2011 at 12:59 PM, Jayanthi  wrote:
> > > Hi Dude,
> > > I worked on camera preview for taking live image , Here I
> > > get following Exception
> >
> > > java.io.FileNotFoundException: /sdcard/1297668185153.jpg (Permission
> > > denied)
> >
> > > image is not saved in sd card can anyone tell me  where  i did
> > > mistake .
> >
> > > Thanks in Advance,
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Problem Activity

2011-02-14 Thread Kevin Duffey
Oh.. so if you implement that onConfigurationChage, then orientation changes
(among other things) don't stop/restart activities? I'll have to read about
that. You'd think that would be emphasized more.. or is there some reason it
is not done as often?

On Mon, Feb 14, 2011 at 12:37 PM, Kostya Vasilyev wrote:

> 14.02.2011 23:13, Kevin Duffey пишет:
>
>  Incidentally, I don't know if there are other reasons for restarting
>> activities on orientation changes, but I know one reason it's done is to
>> allow potential layout changes to occur. You can provide layouts for both
>> landscape and portrait. I don't know why some sort of event handler couldn't
>> be called without restarting the entire activity...
>>
>
> There is just such handler - onConfigurationChanged:
>
>
> http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)
>
> ... but you have to tell Android that your code is able to handle it:
>
>
> http://developer.android.com/guide/topics/manifest/activity-element.html#config
>
> Note that there are more potential config change cases than just the
> orientation change - in particular, the user may change the phone's locale
> setting - other cases are listed on the page above.
>
> The automatic destroy / recreate cycle is there as a catch-all, with the
> onConfigurationChanged providing a possibility for an optimization.
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.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
>

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

Re: [android-developers] Re: How do I Crop an picture after taking it?

2011-02-14 Thread Kevin Duffey
Ah.. ok..I am sure there is, I don't know off hand. I would imagine you need
to use SurfaceView and do your own drawing and handling of touch events for
resizing the crop lines. I haven't had to do something like this yet,
although I would love to see some code that draws on top of an image and
handles touch events too.

2011/2/14 Carlos Eduardo Rührwiem 

> @Kevin,
>
> Thanks for the reply. I would like to adjust a box around the picture and
> then crop it. Is there a way to do it?
>
> Carlos Eduardo Rührwiem
>
>
>
> On Mon, Feb 14, 2011 at 6:17 PM, Kevin Duffey  wrote:
>
>> Do you mean for your code to crop it to some smaller size? Or allow the
>> user to adjust a box around the picture then crop it once the user sets the
>> size?
>>
>> 2011/2/14 Carlos Eduardo Rührwiem 
>>
>> Just to be more clear. I would like to be able to point at the picture (it
>>> would be nice to have some sort of small zoom) and pick the 4 corners so
>>> that the app can crop latter.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Make a sidebar like the one in dolphin browser

2011-02-14 Thread TreKing
On Fri, Feb 11, 2011 at 9:38 AM, Carbodrache wrote:

> I would like to make a sidebar in my application. The objective is :
> - to have a main listView
> - by swyping to right display a sidebar which push the main listview.
>

What have you done so far?


> Thanks
>

For what?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Usage of Zoom Controls

2011-02-14 Thread TreKing
On Tue, Feb 8, 2011 at 5:21 AM, diptanu  wrote:

> Can anybody give an idea to accomplish that using Android API
> for "ZoomButtonController" or similar stuff?
>

http://developer.android.com/reference/android/widget/ZoomButton.html
 
http://developer.android.com/reference/android/widget/ZoomButtonsController.html

http://developer.android.com/reference/android/widget/ZoomControls.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: How do I Crop an picture after taking it?

2011-02-14 Thread Carlos Eduardo Rührwiem
@Kevin,

Thanks for the reply. I would like to adjust a box around the picture and
then crop it. Is there a way to do it?

Carlos Eduardo Rührwiem


On Mon, Feb 14, 2011 at 6:17 PM, Kevin Duffey  wrote:

> Do you mean for your code to crop it to some smaller size? Or allow the
> user to adjust a box around the picture then crop it once the user sets the
> size?
>
> 2011/2/14 Carlos Eduardo Rührwiem 
>
> Just to be more clear. I would like to be able to point at the picture (it
>> would be nice to have some sort of small zoom) and pick the 4 corners so
>> that the app can crop latter.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2011-02-14 Thread kypriakos

Not sure about that Kostya but if you are right then that makes
perfect sense
after all. I think I need to figure out where in the code the handling
of the
XMLHttpRequest occurs and how much the browser itself is involved vs
the http and the OS layers.

Thanks for the response

On Feb 13, 4:02 am, Kostya Vasilyev  wrote:
> Isn't Dolphin basically the standard browser with a new UI?
>
> If so, it wouldn't be surprising that they behave the same wrt. networking.
>
> -- Kostya
>
> 13.02.2011 9:18, kypriakos пишет:
>
> > Hi all,
>
> > I have tried a number of other browsers (Dolphin, Opera Mini, Opera
> > Mobile) and although
> > the last two falsely advertise that they implement cross-origin
> > resource sharing solutions,
> > Dolphin seems to work exactly the same as the native browser - it
> > sends out the Ajax
> > request to the remote web server, the web server executes the service
> > call but the result
> > does not get posted by the browser. This may indicate that it is a NOT
> > a browser issue
> > I am facing with but rather and Android OS-lever issue (http layers??)
> > where for some
> > reason the responses are not allowed to reach the browser. Would this
> > be a correct
> > assessment? From what I understand, Android OS does not implement a
> > personal
> > firewall correct? What else would be causing this disconnect? I will
> > greatly appreciate
> > any hints on this.
>
> > Thanks
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

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


Re: [android-developers] Re: AsyncTask Question

2011-02-14 Thread Danielle Murkerson
Thanks for the in depth explanation...I'll definitely check out that
article. I'm not used to programming for devices where you have to be really
careful with performance and resources so this is pretty new to me. Desktop
computers and such have so much memory now a days that it's not usually an
issue.

It seems like there's a lot to keep in mind in programming for
Android...such as worrying about whether the screen has changed orientation
or whether your app is paused, in focus, destroyed, etc.

Thanks for the help,
DanielleM

On Mon, Feb 14, 2011 at 4:04 PM, Indicator Veritatis wrote:

> The docs leave out a lot of details like that. That is why it is so
> valuable to study good examples, such as the entry titled
> "Multithreading for Performance" in the Android Developer's Blog at
>
> http://android-developers.blogspot.com/search?updated-max=2010-08-04T15%3A00%3A00-07%3A00&max-results=7
>
> Also, what you might have noticed form the online docs on AsyncTask
> itself is that AsyncTask derives from Object, not from Activity. So it
> is up to the client programmer (you) to establish the connection
> between the 'Task' (your object deriving from AsyncTask) and the
> Activity it (more precisely: its methods) is running in.
>
> This in turn implies that your original question, "Does an AsyncTask
> run every time the activity is brought back to the
> front?" is out of place, since it is the Activity's callback,
> onRestart() that gets called when the Activity is "brought back to the
> front", if by 'front', you mean "visible to the user". But if by
> 'front' you mean "in the foreground", i.e. not only visible, but also
> having input focus, then it is onResume() you are interested in (it
> will get called after onRestart or onStart anyway). Neither has any
> connection with what thread executes doInBackground() unless you, the
> client programmer, establish the connection. Again, "Multithreading
> for Performance" is a good example of how to do this. Normally, you
> would call doInBackground from your Activity while in the running,
> visible, foreground state, to create a new thread, which will pass
> information back to the original main UI thread via publishProgress().
> Then, when the system magically causes onProgressUpdate to be called,
> this happens on the main UI thread, so that this where you can put
> code to show the progress using UI widgets (e.g. updating a progress
> bar).
>
> Oh, about about back key and isFinishing(): of course, a user might
> switch applications by press-hold on the Home key, too. In that case,
> the Activity is NOT destroyed. It is only paused or stopped (if now
> completely not visible).
>
> Expect to have to read and re-read
> http://developer.android.com/guide/topics/fundamentals.html#actlife
> many times to keep all these issues straight in your mind;)
>
> On Feb 14, 11:33 am, Danielle Murkerson 
> wrote:
> > Ok that's good to know...I didn't see anything about that in the
> docs...So I
> > could just tell it to cancel when the activity resumes.
> >
> > Thanks,
> > DanielleM
> >
> > On Mon, Feb 14, 2011 at 2:32 PM, Kostya Vasilyev 
> wrote:
> > > AsyncTask doesn't know anything about activities or their lifecycles.
> >
> > > If you leave your activity with the back key, it's actually destroyed.
> So
> > > when you come back (by launching again, or by using the recent apps
> list
> > > [long-pressing the home key]), it will be created all over again.
> >
> > > It's up to your code to handle activity lifecycle callbacks, and do
> what's
> > > meaningful in this situation for your application (like canceling an
> > > AsyncTask).
> >
> > > -- Kostya
> >
> > > 14.02.2011 22:15, DanielleM пишет:
> >
> > >  Hello all:
> >
> > >> I'm trying to use an AsyncTask to prepare two MediaPlayer objects
> > >> while the rest of my activity loads. However, I've noticed that once
> > >> everything is loaded...I'm able to play my media player just fine, but
> > >> if I switch to another activity in my app and then switch back to the
> > >> media player activity the Media Player objects get re-created and so
> > >> the code I have in the onClick listeners for the buttons no longer
> > >> works.
> >
> > >> Basically, the app loads, the streams are set up..once this is done
> > >> you can press play to play one of the streams and then stop to pause
> > >> it. But if I switch to another activity while the streams are playing
> > >> and then go back to the MediaPlayer activity, I can no longer stop the
> > >> streams.
> >
> > >> Does an AsyncTask run every time the activity is brought back to the
> > >> front? That doesn't seem right since the code is in the onCreate
> > >> method and the activity should not be re-created every time it's
> > >> brought back to the front.
> >
> > >> If anyone can shed some light on what's happening here I'd really
> > >> appreciate it.
> >
> > >> The buttons and streams were functioning properly before I started
> > >> pushing the setup code to an AsyncTask...I ju

[android-developers] Re: AsyncTask Question

2011-02-14 Thread Indicator Veritatis
The docs leave out a lot of details like that. That is why it is so
valuable to study good examples, such as the entry titled
"Multithreading for Performance" in the Android Developer's Blog at
http://android-developers.blogspot.com/search?updated-max=2010-08-04T15%3A00%3A00-07%3A00&max-results=7

Also, what you might have noticed form the online docs on AsyncTask
itself is that AsyncTask derives from Object, not from Activity. So it
is up to the client programmer (you) to establish the connection
between the 'Task' (your object deriving from AsyncTask) and the
Activity it (more precisely: its methods) is running in.

This in turn implies that your original question, "Does an AsyncTask
run every time the activity is brought back to the
front?" is out of place, since it is the Activity's callback,
onRestart() that gets called when the Activity is "brought back to the
front", if by 'front', you mean "visible to the user". But if by
'front' you mean "in the foreground", i.e. not only visible, but also
having input focus, then it is onResume() you are interested in (it
will get called after onRestart or onStart anyway). Neither has any
connection with what thread executes doInBackground() unless you, the
client programmer, establish the connection. Again, "Multithreading
for Performance" is a good example of how to do this. Normally, you
would call doInBackground from your Activity while in the running,
visible, foreground state, to create a new thread, which will pass
information back to the original main UI thread via publishProgress().
Then, when the system magically causes onProgressUpdate to be called,
this happens on the main UI thread, so that this where you can put
code to show the progress using UI widgets (e.g. updating a progress
bar).

Oh, about about back key and isFinishing(): of course, a user might
switch applications by press-hold on the Home key, too. In that case,
the Activity is NOT destroyed. It is only paused or stopped (if now
completely not visible).

Expect to have to read and re-read 
http://developer.android.com/guide/topics/fundamentals.html#actlife
many times to keep all these issues straight in your mind;)

On Feb 14, 11:33 am, Danielle Murkerson 
wrote:
> Ok that's good to know...I didn't see anything about that in the docs...So I
> could just tell it to cancel when the activity resumes.
>
> Thanks,
> DanielleM
>
> On Mon, Feb 14, 2011 at 2:32 PM, Kostya Vasilyev  wrote:
> > AsyncTask doesn't know anything about activities or their lifecycles.
>
> > If you leave your activity with the back key, it's actually destroyed. So
> > when you come back (by launching again, or by using the recent apps list
> > [long-pressing the home key]), it will be created all over again.
>
> > It's up to your code to handle activity lifecycle callbacks, and do what's
> > meaningful in this situation for your application (like canceling an
> > AsyncTask).
>
> > -- Kostya
>
> > 14.02.2011 22:15, DanielleM пишет:
>
> >  Hello all:
>
> >> I'm trying to use an AsyncTask to prepare two MediaPlayer objects
> >> while the rest of my activity loads. However, I've noticed that once
> >> everything is loaded...I'm able to play my media player just fine, but
> >> if I switch to another activity in my app and then switch back to the
> >> media player activity the Media Player objects get re-created and so
> >> the code I have in the onClick listeners for the buttons no longer
> >> works.
>
> >> Basically, the app loads, the streams are set up..once this is done
> >> you can press play to play one of the streams and then stop to pause
> >> it. But if I switch to another activity while the streams are playing
> >> and then go back to the MediaPlayer activity, I can no longer stop the
> >> streams.
>
> >> Does an AsyncTask run every time the activity is brought back to the
> >> front? That doesn't seem right since the code is in the onCreate
> >> method and the activity should not be re-created every time it's
> >> brought back to the front.
>
> >> If anyone can shed some light on what's happening here I'd really
> >> appreciate it.
>
> >> The buttons and streams were functioning properly before I started
> >> pushing the setup code to an AsyncTask...I just figured it was too
> >> taxing on the system to do the set up in the main thread. So I decided
> >> to push that to a background thread while the rest of the activity
> >> loads.
>
> >> Thanks,
> >> DanielleM
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group

[android-developers] published app not found by android market search

2011-02-14 Thread john brown
I have published an application. I have two beta users that have
utilized android market to download the application. They downloaded
and installed the app and it worked. This activity was a month or so
ago. The application does show up in my Developer Console today.

But when I search for the application, it is not found.

I search for the application exactly as the name appears in developer
console. I search for the application with just the name w/o the
version.

Thanks, John Brown

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


[android-developers] Re: WebView Page Not Found Error Trapping

2011-02-14 Thread Craigbtx
Can you give me some sample code? I am learning and only done android
programming for 2-3 weeks.


On Feb 14, 2:26 pm, Mark Murphy  wrote:
> On Mon, Feb 14, 2011 at 3:23 PM, Craigbtx  wrote:
> > I have the OnReceivedError event
> > I get the dialog Internet Down message but the page not found still
> > shows in hte background.
> > Is there some way around this? Like show a blank screen saying "error:
> > Site down. Try later" or something?
>
> Call loadUrl() or loadData() or loadDataWithBaseURL() with whatever you want.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

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


Re: [android-developers] Re: Making Sure a Finished App is not Draining Resources

2011-02-14 Thread Dianne Hackborn
And actually, there is no need to always remove threads.  You don't want to
have threads continue doing work (just like you don't want to continue
pumping messages through your main thread), but a thread just sitting there
blocked in the kernel is not going to consume any significant resources.

In fact you will find lots of things in the framework itself that create
threads and don't try to remove them -- the binder IPC thread pool, the
AsyncTask thread pool, etc.

On Mon, Feb 14, 2011 at 12:32 PM, Kostya Vasilyev wrote:

>  Application (taken to mean the application's process) != Actvity (or
> Service or Receiver or ContentProvider, substitute your own component here).
>
> It's true that you should shut down any unneeded tasks and threads in your
> activity's onDestroy (actually, more like onPause), but the process is kept
> around.
>
> Quoting from the Dev Guide (emphasis mine):
>
> http://developer.android.com/guide/topics/fundamentals.html#procthread
>
> *Android may decide to shut down a process at some point*, when memory is
> low and required by other processes that are more immediately serving the
> user. Application components running in the process are consequently
> destroyed. A process is restarted for those components when there's again
> work for them to do.
>
>
> http://developer.android.com/guide/topics/fundamentals.html#proclife
>
> *The Android system tries to maintain an application process for as long
> as possible*, but eventually it will need to remove old processes when
> memory runs low. To determine which processes to keep and which to kill,
> Android places each process into an "importance hierarchy" based on the
> components running in it and the state of those components. Processes with
> the lowest importance are eliminated first, then those with the next lowest,
> and so on.
>
>
> -- Kostya
>
> 14.02.2011 23:10, Kevin Duffey пишет:
>
> I am curious why if in your onDestroy you shut down any tasks/threads, your
> app would still show up? I would think it would exit properly if you wanted
> it to. Perhaps I misunderstood that. I thought if the lifecycle onDestroy
> fires, that meant your app (or at least the activity) was going to be done.
> If you only have one activity then your app should essentially close. If
> your app is made of multiple activities, then calling finish() does that not
> end the activity? Assuming you have 3 or 4 running, and you call that on all
> of them, wouldn't your app shut down?
>
> I see I still need to learn more on the lifecycle stuff.
>
>
> On Mon, Feb 14, 2011 at 11:42 AM, Kostya Vasilyev wrote:
>
>> 14.02.2011 22:28, John пишет:
>>
>>  A user who has downloaded my app probably won't take time to ask me
>>> why my app is still running. He will merely look at the task manager
>>> and form a bad opinion of my app.
>>>
>>
>>  Yes they can. However, not all users use task killers, and among those
>> who do, some do email and ask.
>>
>>
>>  Misguided as this user may be, I have an unverified belief that many
>>> such users exist.
>>>
>>
>>  Some do, and sometimes they post bad comments that may or may not affect
>> other user's perception of your app. In general, users are just human, and
>> they can misjudge any particular feature or lack thereof and complain.
>>
>> This used to really get on my nerves, now I'm a few months older and a few
>> notches wiser - or just more cynical, but that's healthy cynicism.
>>
>> And speaking of that:
>>
>> http://en.wikipedia.org/wiki/Cynicism
>>
>>  They believed [...] suffering was caused by false judgments of what was
>>> valuable and by the worthless customs and conventions which surrounded
>>> society
>>>
>>
>> It fits perfectly - in this case, suffering is caused by the false
>> judgment that a task killer is valuable, and by the worthless custom and
>> convention of downloading and using one :)
>>
>>
>> --
>> Kostya Vasilyev -- http://kmansoft.wordpress.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
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.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, se

Re: [android-developers] Canvas or Gesture??

2011-02-14 Thread Robin Talwar
but i also need to save it and then convert the gesture to image and then
mail it as an attachment.
Is that all possible? can i convert a gesture into an image?

On Tue, Feb 15, 2011 at 2:06 AM, Marcin Orlowski
wrote:

> > How to use canvas to sensetize the touch event and then save the image
> > created by the user through touch and mail it as an attachment
>
> You do not use canvas to sense anything. Canvas is, as name indicates,
> a way of drawing. And that's mainly it. If you want to react on user
> gestures or touches, use GestureDetector process motionEvents your
> listener get and paint them on your canvas.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Problem Activity

2011-02-14 Thread Kostya Vasilyev

14.02.2011 23:13, Kevin Duffey пишет:
Incidentally, I don't know if there are other reasons for restarting 
activities on orientation changes, but I know one reason it's done is 
to allow potential layout changes to occur. You can provide layouts 
for both landscape and portrait. I don't know why some sort of event 
handler couldn't be called without restarting the entire activity...


There is just such handler - onConfigurationChanged:

http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)

... but you have to tell Android that your code is able to handle it:

http://developer.android.com/guide/topics/manifest/activity-element.html#config

Note that there are more potential config change cases than just the 
orientation change - in particular, the user may change the phone's 
locale setting - other cases are listed on the page above.


The automatic destroy / recreate cycle is there as a catch-all, with the 
onConfigurationChanged providing a possibility for an optimization.


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Canvas or Gesture??

2011-02-14 Thread Marcin Orlowski
> How to use canvas to sensetize the touch event and then save the image
> created by the user through touch and mail it as an attachment

You do not use canvas to sense anything. Canvas is, as name indicates,
a way of drawing. And that's mainly it. If you want to react on user
gestures or touches, use GestureDetector process motionEvents your
listener get and paint them on your canvas.

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


Re: [android-developers] Re: Making Sure a Finished App is not Draining Resources

2011-02-14 Thread Kostya Vasilyev
Application (taken to mean the application's process) != Actvity (or 
Service or Receiver or ContentProvider, substitute your own component here).


It's true that you should shut down any unneeded tasks and threads in 
your activity's onDestroy (actually, more like onPause), but the process 
is kept around.


Quoting from the Dev Guide (emphasis mine):

http://developer.android.com/guide/topics/fundamentals.html#procthread

*Android may decide to shut down a process at some point*, when memory 
is low and required by other processes that are more immediately 
serving the user. Application components running in the process are 
consequently destroyed. A process is restarted for those components 
when there's again work for them to do.


http://developer.android.com/guide/topics/fundamentals.html#proclife

*The Android system tries to maintain an application process for as 
long as possible*, but eventually it will need to remove old processes 
when memory runs low. To determine which processes to keep and which 
to kill, Android places each process into an "importance hierarchy" 
based on the components running in it and the state of those 
components. Processes with the lowest importance are eliminated first, 
then those with the next lowest, and so on.


-- Kostya

14.02.2011 23:10, Kevin Duffey пишет:
I am curious why if in your onDestroy you shut down any tasks/threads, 
your app would still show up? I would think it would exit properly if 
you wanted it to. Perhaps I misunderstood that. I thought if the 
lifecycle onDestroy fires, that meant your app (or at least the 
activity) was going to be done. If you only have one activity then 
your app should essentially close. If your app is made of multiple 
activities, then calling finish() does that not end the activity? 
Assuming you have 3 or 4 running, and you call that on all of them, 
wouldn't your app shut down?


I see I still need to learn more on the lifecycle stuff.


On Mon, Feb 14, 2011 at 11:42 AM, Kostya Vasilyev > wrote:


14.02.2011 22:28, John пишет:

A user who has downloaded my app probably won't take time to
ask me
why my app is still running. He will merely look at the task
manager
and form a bad opinion of my app.


Yes they can. However, not all users use task killers, and among
those who do, some do email and ask.


Misguided as this user may be, I have an unverified belief
that many
such users exist.


Some do, and sometimes they post bad comments that may or may not
affect other user's perception of your app. In general, users are
just human, and they can misjudge any particular feature or lack
thereof and complain.

This used to really get on my nerves, now I'm a few months older
and a few notches wiser - or just more cynical, but that's healthy
cynicism.

And speaking of that:

http://en.wikipedia.org/wiki/Cynicism

They believed [...] suffering was caused by false judgments of
what was valuable and by the worthless customs and conventions
which surrounded society


It fits perfectly - in this case, suffering is caused by the false
judgment that a task killer is valuable, and by the worthless
custom and convention of downloading and using one :)


-- 
Kostya Vasilyev -- http://kmansoft.wordpress.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


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



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Re: [android-developers] Re: WebView Page Not Found Error Trapping

2011-02-14 Thread Mark Murphy
On Mon, Feb 14, 2011 at 3:23 PM, Craigbtx  wrote:
> I have the OnReceivedError event
> I get the dialog Internet Down message but the page not found still
> shows in hte background.
> Is there some way around this? Like show a blank screen saying "error:
> Site down. Try later" or something?

Call loadUrl() or loadData() or loadDataWithBaseURL() with whatever you want.

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

Android Training...At Your Office: http://commonsware.com/training

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


[android-developers] Re: WebView Page Not Found Error Trapping

2011-02-14 Thread Craigbtx
I have the OnReceivedError event
I get the dialog Internet Down message but the page not found still
shows in hte background.
Is there some way around this? Like show a blank screen saying "error:
Site down. Try later" or something?

Thanks


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

// Needed for progress bar
// Let's display the progress in the activity titlebar, like
the browser app does
this.getWindow().requestFeature(Window.FEATURE_PROGRESS);

setContentView(R.layout.main);

// WORKS WITH PROGRESS BAR
WebView webview = new WebView(this);
setContentView(webview);
WebSettings webSettings = webview.getSettings();

setProgressBarVisibility(true);

webview.getSettings().setJavaScriptEnabled(true);


// Make the zoom controls visible
webSettings.setBuiltInZoomControls(true);

final Activity activity = this;
webview.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
activity.setProgress(progress * 100 );

}
});


webview.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode, String
description, String failingUrl) {
  Toast.makeText(activity, "Internet connection down? " +
description, Toast.LENGTH_SHORT).show();
}
});


// Go to a web page
webview.loadUrl("http://www.MySite.com/Default.aspx";);

}





On Feb 14, 12:24 pm, Mark Murphy  wrote:
> Implement onReceivedError() in your WebViewClient.
>
>
>
>
>
> On Mon, Feb 14, 2011 at 1:21 PM, Craigbtx  wrote:
> > I am using webview. If the page is not correct or the website is down,
> > how can I error trap a page not found and show the users an error page
> > or some
>
> > othe page?
>
> > I am very much a beginner so I need examples of code.
>
> >  @Override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
>
> >        WebView webview = new WebView(this);
> >        setContentView(webview);
>
> >        WebSettings webSettings = webview.getSettings();
> >        webSettings.setJavaScriptEnabled(true);
> >        webSettings.setBuiltInZoomControls(true);
>
> >        // No error trapping
> >        webview.setWebViewClient(new WebViewClient());
> >        webview.loadUrl("http://www.MyWebsite.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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!- 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


Re: [android-developers] Re: Making Sure a Finished App is not Draining Resources

2011-02-14 Thread Mark Murphy
On Mon, Feb 14, 2011 at 3:10 PM, Kevin Duffey  wrote:
> I am curious why if in your onDestroy you shut down any tasks/threads, your
> app would still show up? I would think it would exit properly if you wanted
> it to. Perhaps I misunderstood that. I thought if the lifecycle onDestroy
> fires, that meant your app (or at least the activity) was going to be done.
> If you only have one activity then your app should essentially close. If
> your app is made of multiple activities, then calling finish() does that not
> end the activity? Assuming you have 3 or 4 running, and you call that on all
> of them, wouldn't your app shut down?

"The app" is a basked of components, hosted by a process.

Components come and components go. However, if there are no components
right now, Android may still hang onto the process, in case something
happens momentarily that causes another component to show up.
Eventually, Android will terminate a component-less process, to free
up RAM for use by other processes.

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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Re: How do I Crop an picture after taking it?

2011-02-14 Thread Kevin Duffey
Do you mean for your code to crop it to some smaller size? Or allow the user
to adjust a box around the picture then crop it once the user sets the size?

2011/2/14 Carlos Eduardo Rührwiem 

> Just to be more clear. I would like to be able to point at the picture (it
> would be nice to have some sort of small zoom) and pick the 4 corners so
> that the app can crop latter.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Problem Activity

2011-02-14 Thread Kevin Duffey
Incidentally, I don't know if there are other reasons for restarting
activities on orientation changes, but I know one reason it's done is to
allow potential layout changes to occur. You can provide layouts for both
landscape and portrait. I don't know why some sort of event handler couldn't
be called without restarting the entire activity...

On Mon, Feb 14, 2011 at 12:12 PM, Kevin Duffey  wrote:

> Orientation changes restart your activity if I recall correctly. I have not
> done what you are doing, but I would think that in the onPause, you'd need
> some way to save the location of the audio playing, then in the onResume
> after the orientation change, restart playback from that point?
>
>
> On Mon, Feb 14, 2011 at 10:25 AM, Kevin R. Octavian <
> kevin.r.octav...@gmail.com> wrote:
>
>> thx...
>>
>>
>> On Tue, Feb 15, 2011 at 1:17 AM, TreKing  wrote:
>>
>>>  On Mon, Feb 14, 2011 at 12:08 PM, Kevin R. Octavian <
>>> kevin.r.octav...@gmail.com> wrote:
>>>
 why it happen??
 can you give me a solution for my problem??

>>>
>>> Please review the documentation the Android Activity Lifecycle.
>>> Understanding this should answer your questions.
>>>
>>>
>>> -
>>> TreKing  - Chicago
>>> transit tracking app for Android-powered devices
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> --
>> Mobile Developer
>> (Android,iphone,Blackberry,J2ME,brew,symbian)
>> mobile :
>> 085722945257
>> email :
>> kevin.r.octav...@gmail.com
>> arsenal_a...@yahoo.co.id
>> blog :
>> kevinroctavian.wordpress.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
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 I Crop an picture after taking it?

2011-02-14 Thread Carlos Eduardo Rührwiem
Just to be more clear. I would like to be able to point at the picture (it 
would be nice to have some sort of small zoom) and pick the 4 corners so 
that the app can crop latter.

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

Re: [android-developers] Problem Activity

2011-02-14 Thread Kevin Duffey
Orientation changes restart your activity if I recall correctly. I have not
done what you are doing, but I would think that in the onPause, you'd need
some way to save the location of the audio playing, then in the onResume
after the orientation change, restart playback from that point?

On Mon, Feb 14, 2011 at 10:25 AM, Kevin R. Octavian <
kevin.r.octav...@gmail.com> wrote:

> thx...
>
>
> On Tue, Feb 15, 2011 at 1:17 AM, TreKing  wrote:
>
>>  On Mon, Feb 14, 2011 at 12:08 PM, Kevin R. Octavian <
>> kevin.r.octav...@gmail.com> wrote:
>>
>>> why it happen??
>>> can you give me a solution for my problem??
>>>
>>
>> Please review the documentation the Android Activity Lifecycle.
>> Understanding this should answer your questions.
>>
>>
>> -
>> TreKing  - Chicago
>> transit tracking app for Android-powered devices
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Mobile Developer
> (Android,iphone,Blackberry,J2ME,brew,symbian)
> mobile :
> 085722945257
> email :
> kevin.r.octav...@gmail.com
> arsenal_a...@yahoo.co.id
> blog :
> kevinroctavian.wordpress.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
>

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

Re: [android-developers] Re: Making Sure a Finished App is not Draining Resources

2011-02-14 Thread Kevin Duffey
I am curious why if in your onDestroy you shut down any tasks/threads, your
app would still show up? I would think it would exit properly if you wanted
it to. Perhaps I misunderstood that. I thought if the lifecycle onDestroy
fires, that meant your app (or at least the activity) was going to be done.
If you only have one activity then your app should essentially close. If
your app is made of multiple activities, then calling finish() does that not
end the activity? Assuming you have 3 or 4 running, and you call that on all
of them, wouldn't your app shut down?

I see I still need to learn more on the lifecycle stuff.


On Mon, Feb 14, 2011 at 11:42 AM, Kostya Vasilyev wrote:

> 14.02.2011 22:28, John пишет:
>
>  A user who has downloaded my app probably won't take time to ask me
>> why my app is still running. He will merely look at the task manager
>> and form a bad opinion of my app.
>>
>
> Yes they can. However, not all users use task killers, and among those who
> do, some do email and ask.
>
>
>  Misguided as this user may be, I have an unverified belief that many
>> such users exist.
>>
>
> Some do, and sometimes they post bad comments that may or may not affect
> other user's perception of your app. In general, users are just human, and
> they can misjudge any particular feature or lack thereof and complain.
>
> This used to really get on my nerves, now I'm a few months older and a few
> notches wiser - or just more cynical, but that's healthy cynicism.
>
> And speaking of that:
>
> http://en.wikipedia.org/wiki/Cynicism
>
>  They believed [...] suffering was caused by false judgments of what was
>> valuable and by the worthless customs and conventions which surrounded
>> society
>>
>
> It fits perfectly - in this case, suffering is caused by the false judgment
> that a task killer is valuable, and by the worthless custom and convention
> of downloading and using one :)
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.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
>

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

Re: [android-developers] Re: Formatting a Preference Summary

2011-02-14 Thread TreKing
On Mon, Feb 14, 2011 at 1:57 PM, Jake Colman  wrote:

> So the only way to do this is to create my own view to be used to for that
> preference and set up the edittext for summary so that it handled multiple
> lines?
>

I don't know if it's the *only* way, but since you tried the obvious "\n"
approach and it did not work, this is the first alternative I thought of.


> Is that the basic suggestion?
>

Pretty much.


> If so, that seems like a huge amount of work for a simple result.
>

Creating a layout that contains two text views should not be a huge amount
of work. I'd guess 15 minutes.


> I guess I'm surprised that there is no more direct approach.
>

Me too!

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Canvas or Gesture??

2011-02-14 Thread Robin Talwar
Ok lemme refine the question.

How to use canvas to sensetize the touch event and then save the image
created by the user through touch and mail it as an attachment

On Mon, Feb 14, 2011 at 7:13 PM, Abhishek Talwar <
r.o.b.i.n.abhis...@gmail.com> wrote:

> Hi guys
> I have to make an application in which the user can sign on the
> touchscreen and that signature
> of his gets saved in the device and then if he clicks on the mail
> button a mail is send with that sign image as an
> attachment.
>
> I spend some time doing this with gesture but now since i have googled
> much i think canvas can also do this.
> But my problem is that both of these are new to me so kindly suggest
> what should be my pick and how should i plan my quest over this
> particular problem.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: Formatting a Preference Summary

2011-02-14 Thread Jake Colman
> "T" == TreKing   writes:

   T> On Mon, Feb 14, 2011 at 11:43 AM, Jake Colman  wrote:
   >> Any suggestions?

   T> 
http://developer.android.com/reference/android/preference/Preference.html#setLayoutResource(int)

Short, pithy reply!  :-)

So the only way to do this is to create my own view to be used to for
that preference and set up the edittext for summary so that it handled
multiple lines?  Is that the basic suggestion?  If so, that seems like a
huge amount of work for a simple result.  I guess I'm surprised that
there is no more direct approach.

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do I Crop an picture after taking it?

2011-02-14 Thread Carlos Eduardo Rührwiem
Hello devs!

I've searched alot for some sort of library/help/tutorial to do the picture 
croping after taking a picture.

Unfortunately I wasn't able to find something with good results and that was 
easy to use.

There was a topic a year ago here but no real solution was found.

Any ideas of how to do that?

Thanks,

Carlos

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Your feedback on Samples/Tutorials/Articles

2011-02-14 Thread Elvis
Sorry this might not sound friendly but this is reality.

All I can say is me and 80 000 other developers are having a nightmare
trying to find basic info on the android website and google search is
well 30% on what I am searching for if it even finds anything related.
This is just the normal daily experience of hundreds of people I speak
to each day.
I am tired of smelling or having to go to a palm reader that can
predict the start and possibly say the there might be in 3 years
somebody int his overseas country that will have the answer to the
basics of Android just to get a answer for my questions. this is
Android not the search for the freaking holy grail as this is the only
way to get answer about Android.

1. Example:
Android 2.3.3 for mobile phones is running on my phone for a few days
already  = modded sdk big deal.
Now I want to build a clean version for my s3c6410 hardware using the
2.3.3 Android = impossible.

Problem: repo sync pulls down what might be updates but nowhere is
2.3.3 listed so the closest is some 2.3_r1, make clean still shows
this below so do I need to delete the whole 4gb folder and download
this again and hope and pray I get 2.3.3 eventually like the last time
12x 4gb clean downloads and finally something worked ?
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.1
TARGET_PRODUCT=generic

Either Android needs to get their names sorted or give us the updates
with clear instructions that even a newby can understand and jump into
immediately.
ie: the world is not flat it is round = aahhh now we know now we can
use this world is not flat as base and start from there instead of
reinventing the wheel to end up 200 years later with the world is not
flat conclusion.
Get everyone on the same page / base and then go from there.

2. Missing or hidden info needs to be updated.
The install sdk page that always ends up on windows sdk and the old
http://dl.google.com/android/android-sdk_r09-linux_x86.tgz but 2.3.3 =
API10 for mobile phones ? ?? Missing info ?
What the heck is going on here 

Why should I have 1 windows SDK and 3 Android folders with ADB still
not working in linux and android commander I have to use in Windows =
this is stupid and unproductive.
O some clown forgot to add adb "integral part of SDK" out of SDK so
now you have to get more files ??? Okay so windows has 8gb and Linux
has 30gb 16gb just for android folders the rest for other Android
phone version as reference dew to missing guides android website info
= irritating.

3. http://developer.android.com/sdk/android-2.3.3.html   as you can
see you would expect to have info related to this 2.3.3 / API10 and
how to install it or the repo init command to make sure you get 2.3.3
or a guide to say okay you have old junk this is how to get it to
2.3.3 follow this step for clean android 2.3.3 and this steps to
recycling old files with minm. download needed.

Only in California is above 4MB/s Internet so please help the rest of
us with crappy Internet connections to make the most of it, same goes
for google spam every time the data connection is on on the phone, 90%
of the limited extremely expensive mobile data is used up by google
spam / google analytics and other junk not related to any website and
loading without my permission = spam.

4. I develop at least 3 android version at any time so I have to have
3x 4gb folders then do 3 separate repo sync commands and then have
more than 75% chance of failure to get the latest updates active not
just downloaded but active.
So download or download and switch to latest option ??? how what
where. Why delete android folder and do the 4gb hell again just to get
from 2.3.1 to 2.3.3 come on get real.

Why is there no multi android development, 1 main folder that sym
links shared same folders with same data and rest gets with 1 repo
sync command  all 3 android sub folder version gets updated ?

5. There is apparently a way to get the kernel files into the android
folder + the video 3D android.so or fimg or similar files into the
android folder then build once and use ??
Is there a guide ?? as Google search can not find it and this android
developer website has lots of useless stuff not related to this or
extremely hard to find if it is even there.

6. 90% of the repo info is where ? Do I need to smell this or call a
psychic to read Android website minds ?


What I would expect from a android developer how-to website:
1. To get started get your linux version you like by using this and
can be used in this way, virtualbox / live cd / install / gentoo /
ubuntu64 = this is good ways and version to develop on.

2. Now to get your android repo sorted you need to do steps a b c and
if you are using or going to use more than 1 android version then see
this link for most effective install + update procedure.

3. Now that you have the android folder and your gingerbread or master
or whatever version you would like to know this = you can change to
2.3.0 or 2.3.1 or 2.3.2 or 2.3.3 and not loose data a

Re: [android-developers] AsyncTask Question

2011-02-14 Thread Danielle Murkerson
Thanks for the help.

On Mon, Feb 14, 2011 at 2:46 PM, Kostya Vasilyev  wrote:

>  No, you tell it to cancel when your activity is *paused* (probably
> combined with a check for isFinishing()).
>
> And actually, you don't need to use an AsyncTask for a media player:
>
>
> http://developer.android.com/reference/android/media/MediaPlayer.html#prepareAsync()
>
> public void prepareAsync ()
> Since: API Level 1
>
> *Prepares the player for playback, asynchronously*. After setting the
> datasource and the display surface, you need to either call prepare() or
> prepareAsync(). *For streams, you should call prepareAsync(), which
> returns immediately*, rather than blocking until enough data has been
> buffered.
>
>
> To cancel prepareAsync, I *think* you just call release(), but honestly, I
> haven't used MediaPlayer too much.
>
> -- Kostya
>
> 14.02.2011 22:33, Danielle Murkerson пишет:
>
> Ok that's good to know...I didn't see anything about that in the docs...So
> I could just tell it to cancel when the activity resumes.
>
> Thanks,
> DanielleM
>
> On Mon, Feb 14, 2011 at 2:32 PM, Kostya Vasilyev wrote:
>
>> AsyncTask doesn't know anything about activities or their lifecycles.
>>
>> If you leave your activity with the back key, it's actually destroyed. So
>> when you come back (by launching again, or by using the recent apps list
>> [long-pressing the home key]), it will be created all over again.
>>
>> It's up to your code to handle activity lifecycle callbacks, and do what's
>> meaningful in this situation for your application (like canceling an
>> AsyncTask).
>>
>> -- Kostya
>>
>> 14.02.2011 22:15, DanielleM пишет:
>>
>>  Hello all:
>>>
>>> I'm trying to use an AsyncTask to prepare two MediaPlayer objects
>>> while the rest of my activity loads. However, I've noticed that once
>>> everything is loaded...I'm able to play my media player just fine, but
>>> if I switch to another activity in my app and then switch back to the
>>> media player activity the Media Player objects get re-created and so
>>> the code I have in the onClick listeners for the buttons no longer
>>> works.
>>>
>>> Basically, the app loads, the streams are set up..once this is done
>>> you can press play to play one of the streams and then stop to pause
>>> it. But if I switch to another activity while the streams are playing
>>> and then go back to the MediaPlayer activity, I can no longer stop the
>>> streams.
>>>
>>> Does an AsyncTask run every time the activity is brought back to the
>>> front? That doesn't seem right since the code is in the onCreate
>>> method and the activity should not be re-created every time it's
>>> brought back to the front.
>>>
>>> If anyone can shed some light on what's happening here I'd really
>>> appreciate it.
>>>
>>> The buttons and streams were functioning properly before I started
>>> pushing the setup code to an AsyncTask...I just figured it was too
>>> taxing on the system to do the set up in the main thread. So I decided
>>> to push that to a background thread while the rest of the activity
>>> loads.
>>>
>>> Thanks,
>>> DanielleM
>>>
>>>
>>
>>  --
>> Kostya Vasilyev -- http://kmansoft.wordpress.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
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.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
>

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

Re: [android-developers] AsyncTask Question

2011-02-14 Thread Kostya Vasilyev
No, you tell it to cancel when your activity is *paused* (probably 
combined with a check for isFinishing()).


And actually, you don't need to use an AsyncTask for a media player:

http://developer.android.com/reference/android/media/MediaPlayer.html#prepareAsync()


public void prepareAsync ()
Since: API Level 1

*Prepares the player for playback, asynchronously*. After setting the 
datasource and the display surface, you need to either call prepare() 
or prepareAsync(). *For streams, you should call prepareAsync(), which 
returns immediately*, rather than blocking until enough data has been 
buffered.


To cancel prepareAsync, I *think* you just call release(), but honestly, 
I haven't used MediaPlayer too much.


-- Kostya

14.02.2011 22:33, Danielle Murkerson пишет:
Ok that's good to know...I didn't see anything about that in the 
docs...So I could just tell it to cancel when the activity resumes.


Thanks,
DanielleM

On Mon, Feb 14, 2011 at 2:32 PM, Kostya Vasilyev > wrote:


AsyncTask doesn't know anything about activities or their lifecycles.

If you leave your activity with the back key, it's actually
destroyed. So when you come back (by launching again, or by using
the recent apps list [long-pressing the home key]), it will be
created all over again.

It's up to your code to handle activity lifecycle callbacks, and
do what's meaningful in this situation for your application (like
canceling an AsyncTask).

-- Kostya

14.02.2011 22:15, DanielleM пишет:

Hello all:

I'm trying to use an AsyncTask to prepare two MediaPlayer objects
while the rest of my activity loads. However, I've noticed
that once
everything is loaded...I'm able to play my media player just
fine, but
if I switch to another activity in my app and then switch back
to the
media player activity the Media Player objects get re-created
and so
the code I have in the onClick listeners for the buttons no longer
works.

Basically, the app loads, the streams are set up..once this is
done
you can press play to play one of the streams and then stop to
pause
it. But if I switch to another activity while the streams are
playing
and then go back to the MediaPlayer activity, I can no longer
stop the
streams.

Does an AsyncTask run every time the activity is brought back
to the
front? That doesn't seem right since the code is in the onCreate
method and the activity should not be re-created every time it's
brought back to the front.

If anyone can shed some light on what's happening here I'd really
appreciate it.

The buttons and streams were functioning properly before I started
pushing the setup code to an AsyncTask...I just figured it was too
taxing on the system to do the set up in the main thread. So I
decided
to push that to a background thread while the rest of the activity
loads.

Thanks,
DanielleM



-- 
Kostya Vasilyev -- http://kmansoft.wordpress.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


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



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Re: [android-developers] Re: Making Sure a Finished App is not Draining Resources

2011-02-14 Thread Kostya Vasilyev

14.02.2011 22:28, John пишет:

A user who has downloaded my app probably won't take time to ask me
why my app is still running. He will merely look at the task manager
and form a bad opinion of my app.


Yes they can. However, not all users use task killers, and among those 
who do, some do email and ask.



Misguided as this user may be, I have an unverified belief that many
such users exist.


Some do, and sometimes they post bad comments that may or may not affect 
other user's perception of your app. In general, users are just human, 
and they can misjudge any particular feature or lack thereof and complain.


This used to really get on my nerves, now I'm a few months older and a 
few notches wiser - or just more cynical, but that's healthy cynicism.


And speaking of that:

http://en.wikipedia.org/wiki/Cynicism

They believed [...] suffering was caused by false judgments of what 
was valuable and by the worthless customs and conventions which 
surrounded society


It fits perfectly - in this case, suffering is caused by the false 
judgment that a task killer is valuable, and by the worthless custom and 
convention of downloading and using one :)


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] AsyncTask Question

2011-02-14 Thread Danielle Murkerson
Ok that's good to know...I didn't see anything about that in the docs...So I
could just tell it to cancel when the activity resumes.

Thanks,
DanielleM

On Mon, Feb 14, 2011 at 2:32 PM, Kostya Vasilyev  wrote:

> AsyncTask doesn't know anything about activities or their lifecycles.
>
> If you leave your activity with the back key, it's actually destroyed. So
> when you come back (by launching again, or by using the recent apps list
> [long-pressing the home key]), it will be created all over again.
>
> It's up to your code to handle activity lifecycle callbacks, and do what's
> meaningful in this situation for your application (like canceling an
> AsyncTask).
>
> -- Kostya
>
> 14.02.2011 22:15, DanielleM пишет:
>
>  Hello all:
>>
>> I'm trying to use an AsyncTask to prepare two MediaPlayer objects
>> while the rest of my activity loads. However, I've noticed that once
>> everything is loaded...I'm able to play my media player just fine, but
>> if I switch to another activity in my app and then switch back to the
>> media player activity the Media Player objects get re-created and so
>> the code I have in the onClick listeners for the buttons no longer
>> works.
>>
>> Basically, the app loads, the streams are set up..once this is done
>> you can press play to play one of the streams and then stop to pause
>> it. But if I switch to another activity while the streams are playing
>> and then go back to the MediaPlayer activity, I can no longer stop the
>> streams.
>>
>> Does an AsyncTask run every time the activity is brought back to the
>> front? That doesn't seem right since the code is in the onCreate
>> method and the activity should not be re-created every time it's
>> brought back to the front.
>>
>> If anyone can shed some light on what's happening here I'd really
>> appreciate it.
>>
>> The buttons and streams were functioning properly before I started
>> pushing the setup code to an AsyncTask...I just figured it was too
>> taxing on the system to do the set up in the main thread. So I decided
>> to push that to a background thread while the rest of the activity
>> loads.
>>
>> Thanks,
>> DanielleM
>>
>>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.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

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

2011-02-14 Thread Spiral123
With the supplied ListView you can also override a heap of stuff to
make it look very different from a 'standard' list.  Personally I
think I would always start from the default.

Some of the guys on the Sony Ericsson developer blog did a nice
tutorial around 3d lists:
http://blogs.sonyericsson.com/developerworld/2010/05/20/android-tutorial-making-your-own-3d-list-part-1/.

I thought for a while about doing something clever like that, but
ultimately decided that what I was really doing was writing an app
that needed a ListView rather than writing a ListView with an app
attached.

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


Re: [android-developers] AsyncTask Question

2011-02-14 Thread Kostya Vasilyev

AsyncTask doesn't know anything about activities or their lifecycles.

If you leave your activity with the back key, it's actually destroyed. 
So when you come back (by launching again, or by using the recent apps 
list [long-pressing the home key]), it will be created all over again.


It's up to your code to handle activity lifecycle callbacks, and do 
what's meaningful in this situation for your application (like canceling 
an AsyncTask).


-- Kostya

14.02.2011 22:15, DanielleM пишет:

Hello all:

I'm trying to use an AsyncTask to prepare two MediaPlayer objects
while the rest of my activity loads. However, I've noticed that once
everything is loaded...I'm able to play my media player just fine, but
if I switch to another activity in my app and then switch back to the
media player activity the Media Player objects get re-created and so
the code I have in the onClick listeners for the buttons no longer
works.

Basically, the app loads, the streams are set up..once this is done
you can press play to play one of the streams and then stop to pause
it. But if I switch to another activity while the streams are playing
and then go back to the MediaPlayer activity, I can no longer stop the
streams.

Does an AsyncTask run every time the activity is brought back to the
front? That doesn't seem right since the code is in the onCreate
method and the activity should not be re-created every time it's
brought back to the front.

If anyone can shed some light on what's happening here I'd really
appreciate it.

The buttons and streams were functioning properly before I started
pushing the setup code to an AsyncTask...I just figured it was too
taxing on the system to do the set up in the main thread. So I decided
to push that to a background thread while the rest of the activity
loads.

Thanks,
DanielleM




--
Kostya Vasilyev -- http://kmansoft.wordpress.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: Making Sure a Finished App is not Draining Resources

2011-02-14 Thread John
I appreciate the response.

I can deal with my employer, explaining things each time.

A user who has downloaded my app probably won't take time to ask me
why my app is still running. He will merely look at the task manager
and form a bad opinion of my app.

Misguided as this user may be, I have an unverified belief that many
such users exist.

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


[android-developers] AsyncTask Question

2011-02-14 Thread DanielleM
Hello all:

I'm trying to use an AsyncTask to prepare two MediaPlayer objects
while the rest of my activity loads. However, I've noticed that once
everything is loaded...I'm able to play my media player just fine, but
if I switch to another activity in my app and then switch back to the
media player activity the Media Player objects get re-created and so
the code I have in the onClick listeners for the buttons no longer
works.

Basically, the app loads, the streams are set up..once this is done
you can press play to play one of the streams and then stop to pause
it. But if I switch to another activity while the streams are playing
and then go back to the MediaPlayer activity, I can no longer stop the
streams.

Does an AsyncTask run every time the activity is brought back to the
front? That doesn't seem right since the code is in the onCreate
method and the activity should not be re-created every time it's
brought back to the front.

If anyone can shed some light on what's happening here I'd really
appreciate it.

The buttons and streams were functioning properly before I started
pushing the setup code to an AsyncTask...I just figured it was too
taxing on the system to do the set up in the main thread. So I decided
to push that to a background thread while the rest of the activity
loads.

Thanks,
DanielleM

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


Re: [android-developers] Making Sure a Finished App is not Draining Resources

2011-02-14 Thread Kostya Vasilyev

14.02.2011 21:48, John пишет:

Once a month, my employer will use a task manager app and figure out
that our app is still "running" even after he has exited the app. Then
he asks me about it, I explain the Android rules to him, and he comes
back with "But Angry Birds doesn't show up in the task manager when I
close it!"


Tell him to come up with an idea that's as successful as Angry Birds, 
and promise that if he does, you will find a way to prevent the app 
hanging around in memory :)



I should also mention that early in the development cycle of our app,
we weren't properly releasing certain resources and so would drain the
battery even when the user had backed out of our activities.


Not releasing resources is a bug, and those need to be fixed. This is 
very different from the Android process management keeping processes in 
memory just in case.



So what I really need now is a way to show, even though the task
manager says we are running, that we are not consuming any resources.


Show him the Battery screen.

An application can't do anything in the background without consuming CPU 
time, which means consuming the battery.



And if my employer thinks this is a problem, even when I have
explained it so many times, what's a user going to think who is using
a task manager?


Good thing there isn't an application that visualizes the kernel file 
system cache - I'm sure someone would complain.


When I get questions about the memory thing, I explain that this 
actually speeds up the application and the phone in general (in case the 
user comes back to it). Works most of the time.


So, maybe try that - don't just say that it's "harmless", say that it's 
"good", and provides a more significant speedup than a task manager.


But, sometimes managers can be pretty misdirected, and you just gotta 
live with that.


There was this guy who wanted me to implement Macintosh-style dialog 
boxes in a Windows application, just because he had Mac background (this 
is 1992-1993 or so).


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread Mark Murphy
On Mon, Feb 14, 2011 at 1:39 PM, guich  wrote:
> Very strange. I'm sending messages to the console and it really shows
> only the onPause method, and not the onDestroy. I'm pretty sure
> something changed (or maybe is a new bug in 2.2).

I'm pretty sure nothing changed, at least for normal stuff. You may be
encountering an edge case somewhere, but that's impossible to tell
based on the information you have supplied to date.

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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Re: a different list mechanism

2011-02-14 Thread Kostya Vasilyev
ListView already provides a way to implement long lists that's efficient 
in terms of both memory usage and processing time. It also connects to 
classes that make it easy to pull your data from a database. It also 
implements a way to automatically refresh data if it changes.


That's a lot of useful stuff, and it's already there for you to use.

Any particular reason you're having doubts about using ListView?

-- Kostya

14.02.2011 21:53, kiros88 пишет:

no It be a big long list sometimes  would this method work for that
too I kinda just wanted to confirm if ListView is teh only option for
creating lists in Android

On Feb 14, 10:49 am, Kostya Vasilyev  wrote:

For a small list, where you don't care about item recycling, you can
just put a LinearLayout in your layout XML file, and add views to it
dynamically from code (probably by using LayoutInflater so that each
item's layout can be also defined in XML).

-- Kostya

14.02.2011 21:40, kiros88 пишет:


Um well I was just curious if there was a different widget or a
different android tool
On Feb 14, 10:31 am, Mark Murphywrote:

What are you expecting to be different about this "different list mechanism"?
On Mon, Feb 14, 2011 at 1:29 PM, kiros88wrote:

Hi I was curious if anyone knew of a different list mechanism other
then listview? that would list an array of strings for the user

--
Mark Murphy (a Commons 
Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
Android Training...At Your Office:http://commonsware.com/training

--
Kostya Vasilyev --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- http://kmansoft.wordpress.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: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
Thanks for the isFinishing tip. Now i'm using it onFinish and
checking, and it works fine. I  no longer trust at onDestroy. :-)

regards

guich

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
Hi,

> I don't think that onDestroy is guaranteed to be called. My
> understanding is that the system chooses when/whether to destroy it.
> But onPause is guaranteed to be called, and you can check isFinishing
> to see whether the activity is finishing in the onPause.

In my situation, the isFinishing returns true in onPause when i call
the finish() method. Why the onDestroy method is not called if
isFinishing is true?

regards

 guich

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

2011-02-14 Thread kiros88
no It be a big long list sometimes  would this method work for that
too I kinda just wanted to confirm if ListView is teh only option for
creating lists in Android

On Feb 14, 10:49 am, Kostya Vasilyev  wrote:
> For a small list, where you don't care about item recycling, you can
> just put a LinearLayout in your layout XML file, and add views to it
> dynamically from code (probably by using LayoutInflater so that each
> item's layout can be also defined in XML).
>
> -- Kostya
>
> 14.02.2011 21:40, kiros88 пишет:
>
> > Um well I was just curious if there was a different widget or a
> > different android tool
>
> > On Feb 14, 10:31 am, Mark Murphy  wrote:
> >> What are you expecting to be different about this "different list 
> >> mechanism"?
>
> >> On Mon, Feb 14, 2011 at 1:29 PM, kiros88  wrote:
> >>> Hi I was curious if anyone knew of a different list mechanism other
> >>> then listview? that would list an array of strings for the user
> >> --
> >> Mark Murphy (a Commons 
> >> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> Android Training...At Your Office:http://commonsware.com/training
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

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


Re: [android-developers] Re: a different list mechanism

2011-02-14 Thread Kostya Vasilyev
For a small list, where you don't care about item recycling, you can 
just put a LinearLayout in your layout XML file, and add views to it 
dynamically from code (probably by using LayoutInflater so that each 
item's layout can be also defined in XML).


-- Kostya

14.02.2011 21:40, kiros88 пишет:

Um well I was just curious if there was a different widget or a
different android tool

On Feb 14, 10:31 am, Mark Murphy  wrote:

What are you expecting to be different about this "different list mechanism"?

On Mon, Feb 14, 2011 at 1:29 PM, kiros88  wrote:

Hi I was curious if anyone knew of a different list mechanism other
then listview? that would list an array of strings for the user

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

Android Training...At Your Office:http://commonsware.com/training



--
Kostya Vasilyev -- http://kmansoft.wordpress.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] Making Sure a Finished App is not Draining Resources

2011-02-14 Thread John
I understand that Android will keep an application open until the
system decides to close it. The correct way to handle this is to make
sure your app isn't using resources and call finish() on the Activity.

Once a month, my employer will use a task manager app and figure out
that our app is still "running" even after he has exited the app. Then
he asks me about it, I explain the Android rules to him, and he comes
back with "But Angry Birds doesn't show up in the task manager when I
close it!"

I should also mention that early in the development cycle of our app,
we weren't properly releasing certain resources and so would drain the
battery even when the user had backed out of our activities.

So what I really need now is a way to show, even though the task
manager says we are running, that we are not consuming any resources.

And if my employer thinks this is a problem, even when I have
explained it so many times, what's a user going to think who is using
a task manager?

There needs to be a way to show that a given app is not using
resources, and preferrably with code so that the task managers can
implement a way to show what is consuming the battery.

Also I know that you can look at the battery use, but that isn't a
good way for the masses of uneducated users, who've all downloaded a
task manager and refer to those apps to see whether their brand new
app is properly exiting. And it doesn't help that Angry Birds is
incorrectly calling (probably) System.exit, and thereby these users
think that app is better than mine.

P.S. Sorry to anybody to whom I may have privately sent a similar post.

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


Re: [android-developers] Re: AlphabetIndexer Letter 'Toast' Question

2011-02-14 Thread Kostya Vasilyev
Yeah, I was just about to suggest creating your own alternative 
implementation.


With the class being instantiated inside android.widget.AbsListView, and 
no way to redefine it, that would seem like the only way to do it.


Good thing you found someone's work that you can leverage.

-- Kostya

14.02.2011 21:43, Paul пишет:

Looks like there might be a solution here, disabling the FastScroller
then rolling your own:

http://stackoverflow.com/questions/3531398/resize-fastscroll-alert-dialog

So much work for such a simple feature...

On Feb 14, 1:30 pm, Paul  wrote:

Gah... it's a hardcoded value, and as you said, is instantiated
directly from AbsListView so I can't extend it and have it used by the
ListView...  looks like a dead-end.

Any suggestions on getting around this, or is my DateIndexer dead in
the water?

Thanks for any insight,

Paul

On Feb 14, 1:16 pm, Kostya Vasilyev  wrote:


Paul,
Looks like the index popup is drawn here:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
Now sure how useful this is, since this is a class that's directly
instantiated by AbsListView here:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
-- Kostya
14.02.2011 21:05, Paul пишет:

I have created a DateIndexer class that mimics the AlphabetIndexer
class, except I can pass it an ArrayList of unique dates, and it will
generate the section prompts to a ListView when implemented.  I'd be
happy to share this code once I have it finished... which brings me to
this question:  The prompts being generated, "February 14th",
"February 12th", etc as you scroll down the ListView, are shown
properly, but the box that surrounds the date is still the same size
as that used by the AlphabetIndexer, in that it is square and only
large enough to contain a single letter, not the full date.  The end
result is the date is shown, but it spills way beyondthe edges fo this
fixed box.
There is no code in AlphabetIndexer (and thus my DateIndexer) that
directly generates these toast-like prompts, and looking at the
SectionIndexer class that AlphabetIndexer implements, there is nothing
there either (that is just an abstract class).
Can anyone point me at where the Toast is being generated?  I've tried
tracing it, but no luck so far.
Thanks.

--
Kostya Vasilyev --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- http://kmansoft.wordpress.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: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread Streets Of Boston
When an activity is *finishing*, the onDestroy will be called.

The documentation states that onPause is guaranteed to be called, but not 
the onDestroy in case an activity is part of a process that is about to be 
killed:
Apps with foreground activities won't be killed --> onPause will be called, 
because just before onPause, the activity is in the foreground.
After the call to onPause, the activity is in the background. It is possible 
that it will be stopped (onStop) and stay there, until the process is killed 
--> onDestroy is never called.

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

2011-02-14 Thread Paul
Looks like there might be a solution here, disabling the FastScroller
then rolling your own:

http://stackoverflow.com/questions/3531398/resize-fastscroll-alert-dialog

So much work for such a simple feature...

On Feb 14, 1:30 pm, Paul  wrote:
> Gah... it's a hardcoded value, and as you said, is instantiated
> directly from AbsListView so I can't extend it and have it used by the
> ListView...  looks like a dead-end.
>
> Any suggestions on getting around this, or is my DateIndexer dead in
> the water?
>
> Thanks for any insight,
>
> Paul
>
> On Feb 14, 1:16 pm, Kostya Vasilyev  wrote:
>
> > Paul,
>
> > Looks like the index popup is drawn here:
>
> >http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> > Now sure how useful this is, since this is a class that's directly
> > instantiated by AbsListView here:
>
> >http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> > -- Kostya
>
> > 14.02.2011 21:05, Paul пишет:
>
> > > I have created a DateIndexer class that mimics the AlphabetIndexer
> > > class, except I can pass it an ArrayList of unique dates, and it will
> > > generate the section prompts to a ListView when implemented.  I'd be
> > > happy to share this code once I have it finished... which brings me to
> > > this question:  The prompts being generated, "February 14th",
> > > "February 12th", etc as you scroll down the ListView, are shown
> > > properly, but the box that surrounds the date is still the same size
> > > as that used by the AlphabetIndexer, in that it is square and only
> > > large enough to contain a single letter, not the full date.  The end
> > > result is the date is shown, but it spills way beyondthe edges fo this
> > > fixed box.
>
> > > There is no code in AlphabetIndexer (and thus my DateIndexer) that
> > > directly generates these toast-like prompts, and looking at the
> > > SectionIndexer class that AlphabetIndexer implements, there is nothing
> > > there either (that is just an abstract class).
>
> > > Can anyone point me at where the Toast is being generated?  I've tried
> > > tracing it, but no luck so far.
>
> > > Thanks.
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.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: a different list mechanism

2011-02-14 Thread kiros88
Um well I was just curious if there was a different widget or a
different android tool

On Feb 14, 10:31 am, Mark Murphy  wrote:
> What are you expecting to be different about this "different list mechanism"?
>
> On Mon, Feb 14, 2011 at 1:29 PM, kiros88  wrote:
> > Hi I was curious if anyone knew of a different list mechanism other
> > then listview? that would list an array of strings for the user
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

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


[android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
Hi Mark,

Very strange. I'm sending messages to the console and it really shows
only the onPause method, and not the onDestroy. I'm pretty sure
something changed (or maybe is a new bug in 2.2).

Anyway, i added a thread with a sleep that calls System.exit if the
app doesn't exit after a second.

 loader.finish();
 new Thread()
 {
public void run()
{
   try {sleep(1000);} catch (Exception e) {}
   AndroidUtils.debug("Forcing application to close.");
   System.exit(0);
}
 }.start();

cheers

guich

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread John
I don't think that onDestroy is guaranteed to be called. My
understanding is that the system chooses when/whether to destroy it.
But onPause is guaranteed to be called, and you can check isFinishing
to see whether the activity is finishing in the onPause.

On Feb 14, 11:25 am, guich  wrote:
> Hi,
>
> Running an application in Android 1.6 throught 2.1, when i call
> finish(), the onPause then onDestroy method is correctly called. On
> Galaxy Tab (Android 2.2), when i call finish, the onPause is called,
> but onDestroy not.
>
> What i have to invoke to make onDestroy be called? Seems that the
> Galaxy is holding the process in memory for some obscure reason. What
> changed in Android's lifecycle in version 2.2?
>
> thanks and regards
>
>     guich

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


Re: [android-developers] a different list mechanism

2011-02-14 Thread Mark Murphy
What are you expecting to be different about this "different list mechanism"?

On Mon, Feb 14, 2011 at 1:29 PM, kiros88  wrote:
> Hi I was curious if anyone knew of a different list mechanism other
> then listview? that would list an array of strings for the user

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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread Mark Murphy
On Mon, Feb 14, 2011 at 1:25 PM, guich  wrote:
> Running an application in Android 1.6 throught 2.1, when i call
> finish(), the onPause then onDestroy method is correctly called. On
> Galaxy Tab (Android 2.2), when i call finish, the onPause is called,
> but onDestroy not.

Works for me on my Tab. Just tried it.

> What changed in Android's lifecycle in version 2.2?

Nothing, AFAIK.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-02-14 Thread Paul
Gah... it's a hardcoded value, and as you said, is instantiated
directly from AbsListView so I can't extend it and have it used by the
ListView...  looks like a dead-end.

Any suggestions on getting around this, or is my DateIndexer dead in
the water?

Thanks for any insight,

Paul

On Feb 14, 1:16 pm, Kostya Vasilyev  wrote:
> Paul,
>
> Looks like the index popup is drawn here:
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> Now sure how useful this is, since this is a class that's directly
> instantiated by AbsListView here:
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> -- Kostya
>
> 14.02.2011 21:05, Paul пишет:
>
>
>
> > I have created a DateIndexer class that mimics the AlphabetIndexer
> > class, except I can pass it an ArrayList of unique dates, and it will
> > generate the section prompts to a ListView when implemented.  I'd be
> > happy to share this code once I have it finished... which brings me to
> > this question:  The prompts being generated, "February 14th",
> > "February 12th", etc as you scroll down the ListView, are shown
> > properly, but the box that surrounds the date is still the same size
> > as that used by the AlphabetIndexer, in that it is square and only
> > large enough to contain a single letter, not the full date.  The end
> > result is the date is shown, but it spills way beyondthe edges fo this
> > fixed box.
>
> > There is no code in AlphabetIndexer (and thus my DateIndexer) that
> > directly generates these toast-like prompts, and looking at the
> > SectionIndexer class that AlphabetIndexer implements, there is nothing
> > there either (that is just an abstract class).
>
> > Can anyone point me at where the Toast is being generated?  I've tried
> > tracing it, but no luck so far.
>
> > Thanks.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.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] a different list mechanism

2011-02-14 Thread kiros88
Hi I was curious if anyone knew of a different list mechanism other
then listview? that would list an array of strings for the user

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


Re: [android-developers] Problem Activity

2011-02-14 Thread Kevin R. Octavian
thx...

On Tue, Feb 15, 2011 at 1:17 AM, TreKing  wrote:

>  On Mon, Feb 14, 2011 at 12:08 PM, Kevin R. Octavian <
> kevin.r.octav...@gmail.com> wrote:
>
>> why it happen??
>> can you give me a solution for my problem??
>>
>
> Please review the documentation the Android Activity Lifecycle.
> Understanding this should answer your questions.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Mobile Developer
(Android,iphone,Blackberry,J2ME,brew,symbian)
mobile :
085722945257
email :
kevin.r.octav...@gmail.com
arsenal_a...@yahoo.co.id
blog :
kevinroctavian.wordpress.com

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

Re: [android-developers] WebView Page Not Found Error Trapping

2011-02-14 Thread Mark Murphy
Implement onReceivedError() in your WebViewClient.

On Mon, Feb 14, 2011 at 1:21 PM, Craigbtx  wrote:
> I am using webview. If the page is not correct or the website is down,
> how can I error trap a page not found and show the users an error page
> or some
>
> othe page?
>
> I am very much a beginner so I need examples of code.
>
>
>  @Override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>
>        WebView webview = new WebView(this);
>        setContentView(webview);
>
>        WebSettings webSettings = webview.getSettings();
>        webSettings.setJavaScriptEnabled(true);
>        webSettings.setBuiltInZoomControls(true);
>
>        // No error trapping
>        webview.setWebViewClient(new WebViewClient());
>        webview.loadUrl("http://www.MyWebsite.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
>



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

Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
Hi,

Running an application in Android 1.6 throught 2.1, when i call
finish(), the onPause then onDestroy method is correctly called. On
Galaxy Tab (Android 2.2), when i call finish, the onPause is called,
but onDestroy not.

What i have to invoke to make onDestroy be called? Seems that the
Galaxy is holding the process in memory for some obscure reason. What
changed in Android's lifecycle in version 2.2?

thanks and regards

guich

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


[android-developers] WebView Page Not Found Error Trapping

2011-02-14 Thread Craigbtx
I am using webview. If the page is not correct or the website is down,
how can I error trap a page not found and show the users an error page
or some

othe page?

I am very much a beginner so I need examples of code.


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

WebView webview = new WebView(this);
setContentView(webview);

WebSettings webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setBuiltInZoomControls(true);

// No error trapping
webview.setWebViewClient(new WebViewClient());
webview.loadUrl("http://www.MyWebsite.com";);

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


Re: [android-developers] Problem Activity

2011-02-14 Thread TreKing
On Mon, Feb 14, 2011 at 12:08 PM, Kevin R. Octavian <
kevin.r.octav...@gmail.com> wrote:

> why it happen??
> can you give me a solution for my problem??
>

Please review the documentation the Android Activity Lifecycle.
Understanding this should answer your questions.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] AlphabetIndexer Letter 'Toast' Question

2011-02-14 Thread Kostya Vasilyev

Paul,

Looks like the index popup is drawn here:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/FastScroller.java;h=aa68a742f615867177a0cf62612976f9e3d85e30;hb=93552de8e305027fb003401e347b9493c64c981f#l174

Now sure how useful this is, since this is a class that's directly 
instantiated by AbsListView here:


http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/AbsListView.java;h=9a38acc51d701dfac16a8a3a1614b4345d8a314a;hb=93552de8e305027fb003401e347b9493c64c981f#l687

-- Kostya

14.02.2011 21:05, Paul пишет:

I have created a DateIndexer class that mimics the AlphabetIndexer
class, except I can pass it an ArrayList of unique dates, and it will
generate the section prompts to a ListView when implemented.  I'd be
happy to share this code once I have it finished... which brings me to
this question:  The prompts being generated, "February 14th",
"February 12th", etc as you scroll down the ListView, are shown
properly, but the box that surrounds the date is still the same size
as that used by the AlphabetIndexer, in that it is square and only
large enough to contain a single letter, not the full date.  The end
result is the date is shown, but it spills way beyondthe edges fo this
fixed box.

There is no code in AlphabetIndexer (and thus my DateIndexer) that
directly generates these toast-like prompts, and looking at the
SectionIndexer class that AlphabetIndexer implements, there is nothing
there either (that is just an abstract class).

Can anyone point me at where the Toast is being generated?  I've tried
tracing it, but no luck so far.

Thanks.




--
Kostya Vasilyev -- http://kmansoft.wordpress.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: [android-porting] /mnt/secure/asec

2011-02-14 Thread Dianne Hackborn
It is secure containers, currently mainly for apps on SD card.

On Sun, Feb 13, 2011 at 11:34 PM, Anand Android wrote:

> hi all,
> actually when i mount mysd card . i see 2 partitions ,/mnt/sdcard and
> /mnt/secure/asec.
> what is /mnt/secure/asec? whats the use ?
>
> -
> Anand
>
>
>  --
> unsubscribe: android-porting+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>



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

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

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

  1   2   >