[android-developers] android design pattern

2010-09-05 Thread ytbryan
hi all,

I'm new to android.

As i am building multiple activities, i realise that i have to code
out repetitively this segment.

Intent i = new Intent();
i.setClass(this, Main_Form.class);
startActivity(i);

So that i can return to the home page.

Is there some structural pattern or design pattern that i am missing
out? Like a Activities Manager that manage all the activities? can
someone give me some advice?

thanks.

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


[android-developers] Re: Bug in minSdkVersion or what?

2010-09-05 Thread Indicator Veritatis
Well, you got one thing right: you do not understand. You have been
too close to Android for too long, you simply do not understand how
the documentation is read by people who are not so close (or even by
those as close who are more careful readers). That is why you
underestimate how bad this one spot in the documentation is. For the
section I quoted, when read alone, really does read as if the issue of
those values is settled by those few lines. This is, after all, all on
the topic at that 'node' in the Javadoc, the node on .

So it is a surprise to the reader to find out that no, it is not
settled: the values are set by minSDKversion as well (in the default
case). By no means is the latter section "clearly there to expand upon
that material" as you say, since it is so far away, being a separate
and apparently unrelated node. Nor is this the only spot in the
documentation with such unexpected expansion in an even more
unexpected place. Why, the former is under  and the
latter is under . These are effectively two different
documents, since each gets its own distinct node in Javadoc. Nor is
there even a cross-reference suggesting to the reader of the one that
he needs to see the other for the 'expansion'.

Now I will admit there are bigger problems in the documentation. But I
haven't seen those get fixed in between 1.5 and 2.2 either. It seems
everyone at Google is as cavalier about it as you are. This does not
bode well for the future of Android.

On Sep 4, 5:56 pm, Dianne Hackborn  wrote:
> Okay, look at it another way: the documentation you are quoting says that
> those control the different screen sizes you support.  And let's say it
> states: "these attributes, and nothing else, determine the screen sizes you
> support."  It doesn't say anything about what the values are if you don't
> specify them.  That is covered *in the same document* only a couple
> paragraphs down (in the sections that are clearly there to expand upon that
> material) in the text I pointed to.
>
> I mean...  there are a lot of places I could point to in the documentation
> that are not so good or outright bad.  To have a problem with this
> particular part...  I don't understand.
>
> On Sat, Sep 4, 2010 at 4:11 PM, Indicator Veritatis wrote:
>
> > It is not "being uber-pedantic". And your example of guns killing
> > bunnies is irrelevant. It would have been relevant if you had followed
> > the wording of the citation a little more closely, and said,
> > "this gun lets me specify whether the bunny will live or die". But of
> > course, you did not say that, since that does not support your
> > position.
>
> > The truth is that as happens all too often, the online documentation
> > says one thing in one place, and contradicts that one thing in another
> > place.
>
> > On Sep 4, 12:36 am, Dianne Hackborn  wrote:
> > > Also on that page:
>
> > > Default values for attributes
>
> > > The default values for the  attributes differs,
> > depending
> > > on the value of
> > > theandroid:minSdkVersion<
> >http://developer.android.com/guide/topics/manifest/uses-sdk-element.html>
> > > attribute
> > > in the application's manifest, as well as on the value of
> > > android:targetSdkVersion, if declared:
>
> > >    - If android:minSdkVersion or android:targetSdkVersion is "3" (Android
> > >    1.5) or lower, the default value for everything except
> > android:normalScreens
> > >    is false. If you are primarily targeting pre-Android 1.6 platforms but
> > >    also want to support other densities/screen sizes, you need to set the
> > >    appropriate attributes to true.
> > >    - If android:minSdkVersion or android:targetSdkVersion is "4" (Android
> > >    1.6) or higher, the default value for everything is true. If your
> > >    application requires Android 1.6 features, but does not support these
> > >    densities and/or screen sizes, you need to set the appropriate
> > attributes
> > >    to false.
> > >    - Note that android:normalScreens always defaults to true.
>
> > > But um yeah if you want to be uber-pedantic...  wait, no, not even in
> > that
> > > case.  "This gun lets me kill the bunny."  That doesn't imply to me that
> > the
> > > gun is the only way I have to kill the bunny. :)
>
> > > On Fri, Sep 3, 2010 at 11:57 PM, Indicator Veritatis  > >wrote:
>
> > > > I take your word for this, that it really is true. But I must point
> > > > out: strictly speaking that contradicts
> > > >http://developer.android.com/guide/practices/screens_support.html
> > > > which reads in part:
>
> > > > "The platform also provides a  manifest element,
> > > > whose attributes android:largeScreens, android:normalScreens, and
> > > > android:smallScreens let you specify what generalized screen sizes
> > > > your application supports. "
>
> > > > By the rules of English grammar, this means that this manifest element
> > > > ALONE lets you specify it, minSdkVersion has NO part in it.
>
> > > > On Sep 3, 5:14 pm, Dianne Hackborn  wrote:
> > > > > On Fri,

[android-developers] Rendering intial screen issue

2010-09-05 Thread Rajesh Pelluru
Hi,
  I have three screens in my sample application i.e. MainScreen,
Screen1, and Screen2.

If I click on Button in Main Screen then Screen1 appears in my device.

If I click on Button in Screen1 then Screen2 appears in my device.

Now if I click on home button and again if I tap on my app it displays
Screen2.

Actual requirement of mine is it should display every time MainScreen if we
tap on my app in device.

Could anyone help me on the same.

--Rajesh

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

[android-developers] Re: Developing Android app for tablet

2010-09-05 Thread ytbryan
thanks guys

On Sep 6, 12:42 am, Kumar Bibek  wrote:
> Do test out your apps on emulators.
>
> http://techdroid.kbeanie.com/2010/09/getting-started-with-tablets-the...
>
> -Kumar Bibekhttp://techdroid.kbeanie.com
>
> On Sep 5, 9:32 pm, ben  wrote:
>
>
>
> > I would make sure your app isn't drawing anything to exact pixel
> > locations and sizes. If you're using the built in layouts you should
> > be in good shape. Also you can use the AVD manager to create an
> > emulator with larger resolutions and screen sizes. That should at
> > least give you some idea of what it will look like.
>
> > On Sep 5, 11:56 am, Droid  wrote:
>
> > > And is landscape view preferred or default for these bigger screens?
> > > Many of my apps are fixed to portrait...
>
> > > On Sep 5, 1:50 pm, ytbryan  wrote:
>
> > > > Hi all,
>
> > > > do we(developer) need to alter our app to suit the android
> > > > tablet(samsung galaxy tab)? or will them automatically run on the
> > > > tablet?
>
> > > > Is a documentation on developing for android tablet?
>
> > > > thanks!
> > > > bryan

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


[android-developers] Re: Capturing RAW data in Android 2.2(HTC Desire)

2010-09-05 Thread blindfold
Yes, many have reported problems with camera preview in portrait mode,
and one way out is to force your app in landscape mode and just not
use portrait. Otherwise, consider the solutions suggested in
http://code.google.com/p/android/issues/detail?id=1193 (I have not
tested those because landscape suited me best).

The vOICe for Android
http://www.seeingwithsound.com/android.htm


On Sep 6, 4:57 am, uday  wrote:
> Thanks Blindfold for ur information... Currently im working on Camera
> Capture in Android. I can able to display the image in portrait by
> forcing the preview as portrait in AndroidManifest.xml file.. But the
> image preview is not correct as i expected.. The image preview is like
> streched... I dont have an idea of how to maintain the Aspect ratio so
> that the image preview will be clear..
>
> Do u have any idea on this?? I saw some of the blogs on this but no
> luck..
>
> On Sep 5, 1:09 pm, blindfold  wrote:
>
> > You can do image processing on camera preview images, which are
> > smaller and "almost raw" even while not supporting the raw format
> > either: the default YCbCr_420_SP format uses 1.5 bytes per pixel by
> > subsampling U and V by a factor 2 in YUV color space; 1.5 times the
> > number of pixels in a typical preview size is still manageable in
> > terms of the amount of memory, but you need to do your own color
> > conversion/decoding to maybe arrive at a byte count of 4 times the
> > number of pixels for an RGBA integer-per-pixel (4 bytes per pixel)
> > encoding for more convenient image processing. This is a hassle in
> > Android for lack of conversion/decoding APIs, but doable and not very
> > memory hungry as long as you do image processing on preview images
> > from PreviewCallback.
>
> > Regards
>
> > The vOICe for Android http://www.seeingwithsound.com/android.htm

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


[android-developers] Re: stack corruption detected : aborted

2010-09-05 Thread Kumar Bibek
Can you post some code for this? I am not sure if it's a bug in your
code, or the Android source.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 6, 11:34 am, Nand  wrote:
> Hi,
> I'm developing an application which connects to some agent running on
> desktop via Wi-Fi. After it connects and receives some data, stack
> corruption detected error encountered and gets aborted. I'm calling a
> recursive function for my data processing Can anyone please tell me
> what might be the problem? And also how to solve this issue?
>
> 09-06 11:11:51.517: ERROR/Common(537): 0     File:apps/Common/project/
> jni/per_decoder.c    Line:39
> 09-06 11:11:51.517: ERROR/Common(537): 4555afd4     File:apps/Common/
> project/jni/per_decoder.c    Line:48
> 09-06 11:11:51.517: ERROR/Common(537): 4555afd4     File:apps/Common/
> project/jni/per_decoder.c    Line:63
> 09-06 11:11:51.517: ERROR/Common(537): 0     File:apps/Common/project/
> jni/per_decoder.c    Line:66
> 09-06 11:11:51.517: ERROR/Common(537): 0     File:apps/Common/project/
> jni/per_decoder.c    Line:71
> 09-06 11:11:51.517: ERROR/Common(537): 20     File:apps/Common/project/
> jni/per_decoder.c    Line:75
> 09-06 11:11:51.517: ERROR/Common Exit(537): 20     File:apps/Common/
> project/jni/per_decoder.c    Line:82
> 09-06 11:11:51.517: ERROR/Common Exit(537): [ 09-06 11:11:51.517
> 537:0x221 F/unknown  ]
> 09-06 11:11:51.517: ERROR/Common Exit(537): stack corruption detected:
> aborted
> 09-06 11:11:51.546: INFO/WindowManager(61): WIN DEATH: Window{43b62e28
> com.android.manager/com.android.manager.Manager paused=false}
> 09-06 11:11:51.546: INFO/ActivityManager(61): Process
> com.android.manager (pid 537) has died.
> 09-06 11:11:51.596: DEBUG/Zygote(36): Process 537 terminated by signal
> (6)
> 09-06 11:11:51.636: INFO/UsageStats(61): Unexpected resume of
> com.android.settings while already resumed in com.android.manager
>
> Regards,
> Nand

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


[android-developers] stack corruption detected : aborted

2010-09-05 Thread Nand
Hi,
I'm developing an application which connects to some agent running on
desktop via Wi-Fi. After it connects and receives some data, stack
corruption detected error encountered and gets aborted. I'm calling a
recursive function for my data processing Can anyone please tell me
what might be the problem? And also how to solve this issue?

09-06 11:11:51.517: ERROR/Common(537): 0 File:apps/Common/project/
jni/per_decoder.cLine:39
09-06 11:11:51.517: ERROR/Common(537): 4555afd4 File:apps/Common/
project/jni/per_decoder.cLine:48
09-06 11:11:51.517: ERROR/Common(537): 4555afd4 File:apps/Common/
project/jni/per_decoder.cLine:63
09-06 11:11:51.517: ERROR/Common(537): 0 File:apps/Common/project/
jni/per_decoder.cLine:66
09-06 11:11:51.517: ERROR/Common(537): 0 File:apps/Common/project/
jni/per_decoder.cLine:71
09-06 11:11:51.517: ERROR/Common(537): 20 File:apps/Common/project/
jni/per_decoder.cLine:75
09-06 11:11:51.517: ERROR/Common Exit(537): 20 File:apps/Common/
project/jni/per_decoder.cLine:82
09-06 11:11:51.517: ERROR/Common Exit(537): [ 09-06 11:11:51.517
537:0x221 F/unknown  ]
09-06 11:11:51.517: ERROR/Common Exit(537): stack corruption detected:
aborted
09-06 11:11:51.546: INFO/WindowManager(61): WIN DEATH: Window{43b62e28
com.android.manager/com.android.manager.Manager paused=false}
09-06 11:11:51.546: INFO/ActivityManager(61): Process
com.android.manager (pid 537) has died.
09-06 11:11:51.596: DEBUG/Zygote(36): Process 537 terminated by signal
(6)
09-06 11:11:51.636: INFO/UsageStats(61): Unexpected resume of
com.android.settings while already resumed in com.android.manager


Regards,
Nand

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


[android-developers] Re: Need project idea

2010-09-05 Thread ko5tik


On Sep 5, 8:11 pm, sws-vinpa  wrote:
> Serial ports would be valuable for this sort of application.  ;-)

I heard of bluetooth dongles which can be plugged to CAN - even more
valuable

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


[android-developers] ByPass UI for Activiating DevicePolicyManager

2010-09-05 Thread mikedroid
I need to bypass the Activity upon enabling the DevicePolicy in my
device, so far it will still ask the user to activate or cancel it, Is
there a workaround on how to remove this UI and implicitly enabled the
admin policy ?

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


[android-developers] What is INSTRUMENTATION_CODE refers to

2010-09-05 Thread manohar
Hello Guys,

I have been working with Instrumentation test for couple of days, i
will get the output as follows
INSTRUMENTATION_STATUS_CODE: 1
 * INSTRUMENTATION_STATUS: class=com.foo.FooTest
 * INSTRUMENTATION_STATUS: test=testFoo
 * INSTRUMENTATION_STATUS: numtests=2
 * INSTRUMENTATION_STATUS_CODE: -2

I understood what does STATUS CODe stands for start(1)/pass(0)/
fail(-2)/error(-1)

At the end of my all the tests, after it displays time, it returns

INSTRUMENTATION_CODE: -1,  what does exactly it means?  Where i can
get more information?

Regards
Manohar

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

2010-09-05 Thread TreKing
On Sun, Sep 5, 2010 at 11:38 PM, xc s  wrote:

> how should I do?
>

Make an app that sucks so much no one would want to even use it, let alone
reverse engineer it.

...

...

...

Or try obfuscating your code, for starters.

-
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] Format or example required for writing script for monkey tool

2010-09-05 Thread ankit
Hi,

Can someone please provide the example or format for writing my own
script to be used with monkey tool. It would be of great help for me.

Regards
Ankit Aggarwal

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


[android-developers] usb 3g cdma datacard on android

2010-09-05 Thread kiran
Hi All
i am using external usb 3g cdma datacard and Android-2.2 froyo on
non-mobile device platform, But i want to use the cdma network data
connection through usb on Android. Is there anything i  need to modify radio
interface layer and Network Settings connection in Android to make it work

Regards
Kiran

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

2010-09-05 Thread Mathias Lin
 > But, I am wondering how will this number help anyone.On 06.09.2010 
13:36, Tez wrote:


This number can be quite interesting (together with the reasons why 
users root - obviously due to limitations, but which are the main...?!); 
if somebody roots a phone, even though they lose guarantee by doing so, 
there must be a reason for it, which indicates that the user might not 
be entirely satisfied with the stock system or the limitations he gets 
with it. So imho it is relevant and interesting for vendors.




Its just a research study we are carrying. Certain operations can be
performed on a rooted phone and some of them are security threats.
We would like to quantify certain statements we make.
Also, now that rooting is legal, I expect a rise in the no. of users
who would root their phones.

Cheers,
Earlence

On Sep 6, 9:35 am, Kumar Bibek  wrote:

Ummm, not that I know of. Even if it were there, it would be an
enormous task to update it regularly. Users keep on switching. Even a
small sample of users cannot actually give you the approx numbers.

But, I am wondering how will this number help anyone. :)

-Kumar Bibekhttp://techdroid.kbeanie.com

On Sep 4, 7:14 pm, Tez  wrote:


Hi,
Is there any statistic/research study on the no. of users who root
their phones?
Cheers,
Earlence


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 dynamically remove widgets from a layout inside a layout ( nested ).

2010-09-05 Thread metal mikey
You'll need to use removeAllViews in combination with addView:

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

These methods were introduced in API Level 7 (i.e. Android 2.1).

The addView method in RemoteViews handles layout inflation so you
can't inflate them yourself.

Don't think you can ever have an EditText in an AppWidget though...you
could instead do what the Google Search Widget does and have a fake
EditText view that launches an Activity onClick.





On Sep 6, 2:38 pm, mani  wrote:
> Hi All,
>
>  I have LinearLayout. Inside to that i have added one more Linearyout
> ( checkbox & text ).
>
> (LinearLayout) one textView, (LinearLayout) Checkbox,textview , one
> textview
>
> Now whenever clicks the checkbox, i need to dynamically display
> EditBox after the checkbox.
>
> main.xml
> ---
> 
>  http://schemas.android.com/apk/res/
> android" android:orientation="horizontal"
> android:id="@+id/MainLayout"
> android:layout_width="match_parent"
> android:layout_height="match_parent">
>
>  android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:textSize="25sp"
> android:text="Enter category :" />
>
>                          android:layout_width="fill_parent"
>                         android:layout_height="wrap_content"
>                         android:orientation="horizontal"
>                         android:id="@+id/locationLayout">
>
>  android:layout_width="40dp"
> android:layout_height="40dp"
> android:checked="true"/>
>
>  android:layout_width="fill_parent"
> android:layout_height="40dp"
> android:paddingLeft="20dp"
> android:layout_gravity="center_horizontal"
> android:layout_centerHorizontal="true"
> android:textSize="25sp"
> android:text="Current Location" />
>
> 
>  android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:textSize="25sp"
> android:text="End of category :" />
>
> 
>
> test.xml:
> -
>
> 
>    xmlns:android="http://schemas.android.com/apk/res/android";
>   android:layout_width="wrap_content"
>   android:layout_height="wrap_content">
>
>  android:hint="eg. pubs,restuarants "
> android:layout_width="250dip"
> android:layout_height="wrap_content"
> android:maxLines="1"/>
>
> 
>
> On the click of checkbox listener i added a code like below.
>             public void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>                 setContentView(R.layout.main1);
>                 final CheckBox location =
> (CheckBox)findViewById(R.id.checkbox);
>
>                 location.setOnClickListener(new Button.OnClickListener(){
>
>       public void onClick(View v) {
>
>         if(location.isChecked() == true)
>                         {
>                          LinearLayout l = (LinearLayout)
> findViewById(R.id.locationLayout);
>                          LayoutInflater linflater = (LayoutInflater)
> getSystemService(Context.LAYOUT_INFLATER_SERVICE);
>                              View myView = linflater.inflate(R.layout.main,
> null);
>                             l.addView(myView);
>                    }
>                         else
>                         {
>                                  LinearLayout l = (LinearLayout)
> findViewById(R.id.locationLayout);
>                                  LayoutInflater linflater = (LayoutInflater)
> getSystemService(Context.LAYOUT_INFLATER_SERVICE);
>
>                              View myView = linflater.inflate(R.layout.main,
> null);
>
>                                 l.removeView(myView);  // I want to the layout
> which was added earlier. How do i do that.? I know this is not correct
> solution.
>
>                         }
>                 }
>         });
>
> Can anyone help me here.?
>
> Thanks,
> - mani

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


[android-developers] Re: Statistics on Rooted Phones

2010-09-05 Thread Tez
Its just a research study we are carrying. Certain operations can be
performed on a rooted phone and some of them are security threats.
We would like to quantify certain statements we make.
Also, now that rooting is legal, I expect a rise in the no. of users
who would root their phones.

Cheers,
Earlence

On Sep 6, 9:35 am, Kumar Bibek  wrote:
> Ummm, not that I know of. Even if it were there, it would be an
> enormous task to update it regularly. Users keep on switching. Even a
> small sample of users cannot actually give you the approx numbers.
>
> But, I am wondering how will this number help anyone. :)
>
> -Kumar Bibekhttp://techdroid.kbeanie.com
>
> On Sep 4, 7:14 pm, Tez  wrote:
>
> > Hi,
>
> > Is there any statistic/research study on the no. of users who root
> > their phones?
>
> > Cheers,
> > Earlence

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


[android-developers] Re: cannot get my location to work on android 2.2

2010-09-05 Thread Mathias Lin
It's a known issue with the emulator, see the bug report here:
http://code.google.com/p/android/issues/detail?id=8816
Works fine on real device. On emulator, use an older version (7 should
work).


On Sep 6, 10:07 am, sunny  wrote:
> Hi Folks,
> my app which was working on 2.1 and earlier version fails to run properly in
> 2.2. It relies on the location but I do not get any error message.
>
> However under DDMS /logCat, I see a message saying:Error message while
> getting the location address: Reason: this service is not available.
>
> This is coming more as an information message rather than an exception or
> error. The process that is printing it out is System.out.
>
> Note that I did everything possible ( I can think of) to upgrade the app to
> run in android 2.2
>
> The API version was changed to 8.
>
> The manifest file contains  all the following:-
> ...
> ...
>
> 
>
> 
>
> 
>
> 
>
> 
>
>  />
>
> anything else I need to do ?
>
> its very frustrating... any help would be greatly appreciated..
>
> thanks
>
> Sunny

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

2010-09-05 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/05/2010 09:38 PM, xc s wrote:
> My English is just so-so .   I dont 'want to  other people
> reversepengineering. my android app. how should I do? 

Easy.  Do not give it to other people.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkyEc1EACgkQ9RoMZyVa61ejAgCfYyKV53AbDb9PIjjmbg40dxzI
cUsAnjW/NX13tBVg6FgLf9X32CCxvJ9S
=9Kka
-END PGP SIGNATURE-

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


[android-developers] Re: problem with GL_CLAMP_TO_EDGE

2010-09-05 Thread Robert Green
Bill,

Only devices that have the non-power-of-two extension (NPOT) can do
that.  Different chips support different extensions.  Most everyone
uses power of two anamorphically to do NPOT rendering.  Just pick the
closest power of two size (for a full screen draw, 512x256 for 1st gen
or 1024x512 for high density), squeeze your image into it and draw it
at the original aspect ratio and while you'll lose a little quality,
it will work.

On Sep 5, 9:37 pm, billconan  wrote:
> hello guys,
>
> I cannot guarantee my texture size be a power of two,   therefore, i'm
> using GL_CLAMP_TO_EDGE,
>
> but when i call glTexImage2D, or glutil.teximage2d, i always get the
> Opengl Error Code 1281 Invalid Value.
>
> this same setting seems to work on iphone.
>
> does this mean that android only supports power of two texture maps?
>
> if i hard code the bitmap size to be power of two, then my program
> will work. otherwise the texture map is black.
>
> see, this is how i set the texture map, it is exactly the same as the
> official sample.
>
> thanks
>
>         Log.d("Ball Texture","textureID "+textureID+"; lengthx "+lengthx+";
> lengthy "+lengthy);
>                 //lengthx=64;
>                 //lengthy=64;
>                 if(textureID==0)
>                 {
>                         int[] textures = new int[1];
>                         gl.glGenTextures(1,textures,0 );
>                         textureID=textures[0];
>                 }
>
>                 gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);
>
>                 gl.glTexParameterf(GL10.GL_TEXTURE_2D,
> GL10.GL_TEXTURE_MIN_FILTER,GL10.GL_NEAREST);
>
> gl.glTexParameterf(GL10.GL_TEXTURE_2D,GL10.GL_TEXTURE_MAG_FILTER,GL10.GL_NE 
> AREST);
>
>         gl.glTexParameterf(GL10.GL_TEXTURE_2D,
> GL10.GL_TEXTURE_WRAP_S,GL10.GL_CLAMP_TO_EDGE);
>         gl.glTexParameterf(GL10.GL_TEXTURE_2D,
> GL10.GL_TEXTURE_WRAP_T,GL10.GL_CLAMP_TO_EDGE);
>
>         gl.glTexEnvf(GL10.GL_TEXTURE_ENV,
> GL10.GL_TEXTURE_ENV_MODE,GL10.GL_REPLACE);
>         Log.d("opengl error 1", "error code "+gl.glGetError());
>
>                 Bitmap bitmap=Bitmap.createBitmap(lengthx, lengthy,
> Bitmap.Config.RGB_565);
>                 Canvas mCanvas=new Canvas(bitmap);
>
>                 //mCanvas.drawColor(Color.BLUE);
>
>                 Path path=new Path();
>
>                 int pointnum=(int) (pointSet.length*0.5);
>
>         //      Log.d("point cound:",pointnum+";");
>                 path.moveTo(pointSet[0], pointSet[1]);
>                 for(int i=1;i                 {
>                 //      Log.d("point: ",pointSet[i*2]+";"+pointSet[i*2+1]);
>                         path.lineTo(pointSet[i*2], pointSet[i*2+1]);
>
>                 }
>                 path.close();
>
>         //      mC
>                 mCanvas.drawPath(path, ballPaint);
>                 //(lengthx*0.5f, lengthy*0.5f, 30.0f,ballPaint);
>
>                 ByteBuffer dst ;
>                 
> dst=ByteBuffer.allocate(bitmap.getHeight()*bitmap.getWidth()*4);
>
>                 bitmap.copyPixelsToBuffer(dst);
>
>                 gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGB, lengthx,
> lengthy, 0, GL10.GL_RGB, GL10.GL_UNSIGNED_BYTE,dst );

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


[android-developers] Re: Picking two pictures at once

2010-09-05 Thread Kumar Bibek
Not possible. If you really want it, then you have the option of
creating your own picture chooser app.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 6, 4:09 am, Pedro Teixeira  wrote:
> Hi, this snippet of code allows me to pick a picture and choose from a
> list of options to send them..
> I'm wondering if it'spossible to pick 2 pictures instead of just one?
> Is it possible? thnk you
>
> Uri U = Uri.fromFile(F);
>                 Intent i = new Intent(Intent.ACTION_SEND);
>                 i.setType("image/jpg");
>                 i.putExtra(Intent.EXTRA_STREAM, U);
>                 startActivity(Intent.createChooser(i,"Send Picture
> using:"));

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

2010-09-05 Thread xc s
thank you ..!!

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

[android-developers] Re: Simple Key Event Questions

2010-09-05 Thread Tez
and another thingin all these "key" interactions, (physical or
IME), am I correct in assuming that all data must pass thru the
Framework classes like WindowManagerService, KeyInputQueue etc?

Cheers,
Earlence

On Sep 6, 12:02 am, Dianne Hackborn  wrote:
> You can't get that from the IME.  What you get is edit operations via calls
> on InputConnection.
>
> You will need to implement your own keyboard in your app if you want to
> monitor individual interactions with it.
>
>
>
> On Sun, Sep 5, 2010 at 4:18 AM, Tez  wrote:
> > Biometric Measure with neural nets: Key stroke patterns.
> > For that I need data about how something was typed in:
>
> > Eg: EARLENCE
>
> > 1. time for which each key was pressed.
> > 2. interval between consecutive key presses.
>
> > Cheers,
> > Earlence
>
> > On Sep 4, 10:44 pm, Dianne Hackborn  wrote:
> > > You can override EditText to return your own InputConnection.
>
> > > But...  if you want KeyEvents, you won't get KeyEvents.  Period.  There
> > are
> > > no KeyEvent objects involved in this ANYWHERE.  At all.  The user is
> > > touching on the screen (that is a touch event).  The IME turns that into
> > an
> > > edit operation on the TextView (that is a call to InputConnection).  No
> > > KeyEvent.
>
> > > What you are claiming to want to do simply doesn't make sense.  Let's
> > back
> > > up here and see what you are actually trying to accomplish?  Not timing
> > > between two key events.  What is the goal you are trying to achieve?
>
> > > On Sat, Sep 4, 2010 at 6:55 AM, Tez  wrote:
> > > > How do I intercept the InputConnection Calls? Would I have to modify
> > > > the IME or use a custom one?
> > > > Having text change listeners would not be of use as I need key timing
> > > > information. This I can only get thru KeyEvents.
>
> > > > Cheers,
> > > > Earlence
>
> > > > On Sep 4, 12:39 pm, Dianne Hackborn  wrote:
> > > > > On Fri, Sep 3, 2010 at 10:48 PM, Tez 
> > wrote:
> > > > > > 1. I have registered a KeyListener on an EditText. When I use the
> > soft
> > > > > > keyboard to input text, my listener is not called. How Do I
> > intercept
> > > > > > these events?
>
> > > > > InputConnection is how edit operations are delivered through an IME.
> > > >  These
> > > > > will appear as direct edits of the text in the EditText, so to watch
> > that
> > > > > you either need to intercept the InputConnection calls or have
> > listeners
> > > > for
> > > > > text changes.
>
> > > > > > 2. How do I measure time interval between KeyEvents. The methods
> > are
> > > > > > confusing and documentation is not good. Plz put pseudo-code here.
>
> > > > > Er...  there is nothing really to document here.
> > > >  SystemClock.uptimeMillis()
> > > > > returns the current time in what are probably appropriate units for
> > you.
> > > > >  Call it at the points you are interested in.  Compare the values.
>
> > > > > (Didn't we just have a thread on this?)
>
> > > > > --
> > > > > 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
>
> > > --
> > > 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
>
> --
> 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-deve

Re: [android-developers] Slide Show sample code.

2010-09-05 Thread xc s
你要一个带抽屉控件的例子??我有呢

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

[android-developers] how to dynamically remove widgets from a layout inside a layout ( nested ).

2010-09-05 Thread mani
Hi All,

 I have LinearLayout. Inside to that i have added one more Linearyout
( checkbox & text ).

(LinearLayout) one textView, (LinearLayout) Checkbox,textview , one
textview

Now whenever clicks the checkbox, i need to dynamically display
EditBox after the checkbox.

main.xml
---

 http://schemas.android.com/apk/res/
android" android:orientation="horizontal"
android:id="@+id/MainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">














test.xml:
-


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





On the click of checkbox listener i added a code like below.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main1);
final CheckBox location =
(CheckBox)findViewById(R.id.checkbox);

location.setOnClickListener(new Button.OnClickListener(){

  public void onClick(View v) {

if(location.isChecked() == true)
{
 LinearLayout l = (LinearLayout)
findViewById(R.id.locationLayout);
 LayoutInflater linflater = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 View myView = linflater.inflate(R.layout.main,
null);
l.addView(myView);
   }
else
{
 LinearLayout l = (LinearLayout)
findViewById(R.id.locationLayout);
 LayoutInflater linflater = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);

 View myView = linflater.inflate(R.layout.main,
null);

l.removeView(myView);  // I want to the layout
which was added earlier. How do i do that.? I know this is not correct
solution.

}
}
});

Can anyone help me here.?

Thanks,
- mani

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


[android-developers] about android Reversepengineering !!!!

2010-09-05 Thread xc s
My English is just so-so .   I dont 'want to  other people
reversepengineering. my android app. how should I do?

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

[android-developers] Re: resource in conflict

2010-09-05 Thread Kumar Bibek
If you maintain colors, then it would be differentiated by
R.color.something from drawables R.drawable.something. I think that
shouldn't be a problem. Different classes they are.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 4, 4:18 pm, eli  wrote:
> Hi,
>
> My application has resource conflict problem. Did some investigation,
> seems like all the resources within the apk file are cached after they
> are loaded on demand. The cache is stored in Resources.java
> mDrawableCache. The key to retrieve the drawable from this cache is
> combining the data and assertCookie fields of TypedValue class. In my
> application, there are 2 resources, ex. a color background and image
> drawable, evaluated to the SAME key value.. So just wondering, how can
> it happen?
>
> BTW, I am using eclair SDK.
>
> Thanks.

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


[android-developers] Re: Simple Key Event Questions

2010-09-05 Thread Tez
So the KeyEvent Listener is only for physical keyboards?
I see many devices that have only soft keyboards. This leads me to
think "What is the value of the Key Listener API then"?

Cheers,
Earlence

On Sep 6, 12:02 am, Dianne Hackborn  wrote:
> You can't get that from the IME.  What you get is edit operations via calls
> on InputConnection.
>
> You will need to implement your own keyboard in your app if you want to
> monitor individual interactions with it.
>
>
>
> On Sun, Sep 5, 2010 at 4:18 AM, Tez  wrote:
> > Biometric Measure with neural nets: Key stroke patterns.
> > For that I need data about how something was typed in:
>
> > Eg: EARLENCE
>
> > 1. time for which each key was pressed.
> > 2. interval between consecutive key presses.
>
> > Cheers,
> > Earlence
>
> > On Sep 4, 10:44 pm, Dianne Hackborn  wrote:
> > > You can override EditText to return your own InputConnection.
>
> > > But...  if you want KeyEvents, you won't get KeyEvents.  Period.  There
> > are
> > > no KeyEvent objects involved in this ANYWHERE.  At all.  The user is
> > > touching on the screen (that is a touch event).  The IME turns that into
> > an
> > > edit operation on the TextView (that is a call to InputConnection).  No
> > > KeyEvent.
>
> > > What you are claiming to want to do simply doesn't make sense.  Let's
> > back
> > > up here and see what you are actually trying to accomplish?  Not timing
> > > between two key events.  What is the goal you are trying to achieve?
>
> > > On Sat, Sep 4, 2010 at 6:55 AM, Tez  wrote:
> > > > How do I intercept the InputConnection Calls? Would I have to modify
> > > > the IME or use a custom one?
> > > > Having text change listeners would not be of use as I need key timing
> > > > information. This I can only get thru KeyEvents.
>
> > > > Cheers,
> > > > Earlence
>
> > > > On Sep 4, 12:39 pm, Dianne Hackborn  wrote:
> > > > > On Fri, Sep 3, 2010 at 10:48 PM, Tez 
> > wrote:
> > > > > > 1. I have registered a KeyListener on an EditText. When I use the
> > soft
> > > > > > keyboard to input text, my listener is not called. How Do I
> > intercept
> > > > > > these events?
>
> > > > > InputConnection is how edit operations are delivered through an IME.
> > > >  These
> > > > > will appear as direct edits of the text in the EditText, so to watch
> > that
> > > > > you either need to intercept the InputConnection calls or have
> > listeners
> > > > for
> > > > > text changes.
>
> > > > > > 2. How do I measure time interval between KeyEvents. The methods
> > are
> > > > > > confusing and documentation is not good. Plz put pseudo-code here.
>
> > > > > Er...  there is nothing really to document here.
> > > >  SystemClock.uptimeMillis()
> > > > > returns the current time in what are probably appropriate units for
> > you.
> > > > >  Call it at the points you are interested in.  Compare the values.
>
> > > > > (Didn't we just have a thread on this?)
>
> > > > > --
> > > > > 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
>
> > > --
> > > 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
>
> --
> 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@googlegr

[android-developers] Re: Statistics on Rooted Phones

2010-09-05 Thread Kumar Bibek
Ummm, not that I know of. Even if it were there, it would be an
enormous task to update it regularly. Users keep on switching. Even a
small sample of users cannot actually give you the approx numbers.

But, I am wondering how will this number help anyone. :)

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 4, 7:14 pm, Tez  wrote:
> Hi,
>
> Is there any statistic/research study on the no. of users who root
> their phones?
>
> Cheers,
> Earlence

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


[android-developers] Re: cannot get my location to work on android 2.2

2010-09-05 Thread Kumar Bibek
I think it's related to the configuration of your emulator. Have you
checked if the Google Maps app works on the emulator/phone? That might
give you a clue.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 6, 7:07 am, sunny  wrote:
> Hi Folks,
> my app which was working on 2.1 and earlier version fails to run properly in
> 2.2. It relies on the location but I do not get any error message.
>
> However under DDMS /logCat, I see a message saying:Error message while
> getting the location address: Reason: this service is not available.
>
> This is coming more as an information message rather than an exception or
> error. The process that is printing it out is System.out.
>
> Note that I did everything possible ( I can think of) to upgrade the app to
> run in android 2.2
>
> The API version was changed to 8.
>
> The manifest file contains  all the following:-
> ...
> ...
>
> 
>
> 
>
> 
>
> 
>
> 
>
>  />
>
> anything else I need to do ?
>
> its very frustrating... any help would be greatly appreciated..
>
> thanks
>
> Sunny

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


[android-developers] Re: List Item (a view) order changes unexpextedly while (fast) scrolling in a ListView

2010-09-05 Thread rious.delie
somebody please...

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


[android-developers] Re: Is anyone's active install % dropping like a rock lately?

2010-09-05 Thread Maps.Huge.Info (Maps API Guru)
After 3 uninstalls:

756 total
139 active

So at least the numbers are somewhat consistent.

-John Coryat

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


[android-developers] Re: Capturing RAW data in Android 2.2(HTC Desire)

2010-09-05 Thread uday
Thanks Blindfold for ur information... Currently im working on Camera
Capture in Android. I can able to display the image in portrait by
forcing the preview as portrait in AndroidManifest.xml file.. But the
image preview is not correct as i expected.. The image preview is like
streched... I dont have an idea of how to maintain the Aspect ratio so
that the image preview will be clear..

Do u have any idea on this?? I saw some of the blogs on this but no
luck..

On Sep 5, 1:09 pm, blindfold  wrote:
> You can do image processing on camera preview images, which are
> smaller and "almost raw" even while not supporting the raw format
> either: the default YCbCr_420_SP format uses 1.5 bytes per pixel by
> subsampling U and V by a factor 2 in YUV color space; 1.5 times the
> number of pixels in a typical preview size is still manageable in
> terms of the amount of memory, but you need to do your own color
> conversion/decoding to maybe arrive at a byte count of 4 times the
> number of pixels for an RGBA integer-per-pixel (4 bytes per pixel)
> encoding for more convenient image processing. This is a hassle in
> Android for lack of conversion/decoding APIs, but doable and not very
> memory hungry as long as you do image processing on preview images
> from PreviewCallback.
>
> Regards
>
> The vOICe for Androidhttp://www.seeingwithsound.com/android.htm
>
> On Sep 5, 6:20 am, uday  wrote:
>
> > Do u have any idea of how much memory of raw data will generate for
> > the resolution 640x480 and 176x144??
>
> > Actually in my application we have image processing on raw data.. If
> > it is not available then is there any approach to do that??
>
> > On Sep 4, 6:13 pm, blindfold  wrote:
>
> > > Yes. Raw images would also claim too much memory with typical high-res
> > > still images in the current Android memory model, so a compressed
> > > format such as JPEG is needed to get around that. There is no support
> > > for incremental block-based or scanline readout or something like that
> > > to process the image in smaller (raw) chunks.
>
> > > On Sep 4, 1:11 pm, uday  wrote:
>
> > > > Thanks Blindfold..
>
> > > > So do u got any information regarding this?? What ever it may be the
> > > > resolution currently Android is not able to do the Raw image capture..
> > > > am i right??
>
> > > > On Sep 1, 1:07 am, blindfold  wrote:
>
> > > > > Right, already on February 11 2009 Google's David Sparks wrote in
> > > > > response to one of my postings,
>
> > > > > > I'm talking about deprecating the raw picture callback that has 
> > > > > > never worked.
>
> > > > > and
>
> > > > > > As for the camera API in SDK 1.0: It was never intended for signal 
> > > > > > processing.
>
> > > > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > > > Regards
>
> > > > > The vOICe for Androidhttp://www.seeingwithsound.com/android.htm
>
> > > > > On Aug 31, 6:30 pm, David Erosa García  wrote:
>
> > > > > > On Tue, Aug 31, 2010 at 6:17 PM, uday  wrote:
> > > > > > > Hi All,
> > > > > > > I'm facing problem when capturing RAW data in Android Froyo. Im 
> > > > > > > using
> > > > > > > HTC Desire(5MP) device.  in the method of
> > > > > > > PictureCallback rawCallback = new PictureCallback() {
> > > > > > >                public void onPictureTaken(byte[] data, Camera 
> > > > > > > camera)
> > > > > > >                {
> > > > > > >                }
> > > > > > > the data im getting is null. Is this the problem due to Heap size 
> > > > > > > in
> > > > > > > the device or is there another way to capture this raw data??
>
> > > > > > AFAIK, raw callbacks always get null arrays (maybe not implemented?)
>
> > > > > > > --
> > > > > > > You received this message because you are subscribed to the Google
> > > > > > > Groups "Android Developers" group.
> > > > > > > To post to this group, send email to 
> > > > > > > android-developers@googlegroups.com
> > > > > > > To unsubscribe from this group, 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: Bug in minSdkVersion or what?

2010-09-05 Thread Dianne Hackborn
CALL_PHONE won't effect the visibility on any of those devices.

Using CAMERA without specifying that auto-focus is optional will, I believe,
hide it from the Tattoo (which I think doesn't have an auto-focus camera...
 though of course I may be wrong).

And of course not supporting small screens will hide it from the Tattoo.

Also you can use "aapt dump badging " to see the exact info
Market uses to classify your app.

On Sun, Sep 5, 2010 at 5:07 PM, Gustavo  wrote:

> Hi, it's me again.
>
> So I think I've found a very serious problem here... This has nothing
> to do with supports screens or sdk versions. I have built an app just
> for testing this kind of behaviour and I realized that the problem is
> on uses permission (weird!).
>
> My tests:
>
> I published a very simple hello world app and decided just to change
> the manifest file.
>
> This was tested not just 4 times but I would say like up to 30 times
> to make sure, in every way possible... spent the whole day testing
> this since the CALL_PHONE permission is the most important feature in
> my app. I even tried with a different developer account, different
> projects, package name and most of the times had to wait for like 15 -
> 20 minutes after publishing the app to make sure it's really not
> showing on the other devices.
>
> Devices I've tested:
>
> HTC Tattoo - Firmware version: 1.6 - Model HTC Tattoo A3232
> Motorola Milestone (AKA Droid) - Firmware version: 2.0.1 - Model A853
> HTC G1 - Firmware version: 2.01 - Model T-Mobile G1
>
> 1st attempt (VISIBLE ON ANDROID MARKET FOR ALL OF MY 3 ANDROID
> DEVICES):
>
>
>
> android:name="android.permission.ACCESS_NETWORK_STATE" />
> android:name="android.permission.ACCESS_COARSE_LOCATION" />
> android:name="android.permission.ACCESS_COARSE_UPDATES" />
> /
> >
>
>
>
> 2nd attempt (VISIBLE ON ANDROID MARKET ONLY FOR HTC TATTOO):
>
>
>
>
>
> android:name="android.permission.ACCESS_NETWORK_STATE" />
> android:name="android.permission.ACCESS_COARSE_LOCATION" />
> android:name="android.permission.ACCESS_COARSE_UPDATES" />
> /
> >
>
> 3rd attempt (VISIBLE ON ANDROID MARKET ONLY FOR HTC TATTOO):
>
>
>
>
>
>
> 4th attempt with a new project (VISIBLE ON ANDROID MARKET ONLY FOR HTC
> TATTOO):
>
>
>
>
>
>
> In conclusion, I realized that there's got to be something wrong with
> the CALL_PHONE permission. does anyone have an idea why is this
> happening? is that only with me? how to deal with it? any workaround?
>
> Many thanks,
>
> - Gus
>
> On Sep 4, 10:43 pm, Gustavo  wrote:
> > Thank you very much for all your help guys.
> >
> > I'm not at work today so tomorrow I'll try taking those redundant
> > lines off my manifest file and upload the app to see if I'm finally
> > able to get my app visible for all android versions (1.6 and later,
> > because now it's only being shown to 1.6 androids).
> >
> > Thanks again for the great support!
> >
> > - Gus
> >
> > On Sep 4, 9:56 pm, Dianne Hackborn  wrote:
> >
> > > Okay, look at it another way: the documentation you are quoting says
> that
> > > those control the different screen sizes you support.  And let's say it
> > > states: "these attributes, and nothing else, determine the screen sizes
> you
> > > support."  It doesn't say anything about what the values are if you
> don't
> > > specify them.  That is covered *in the same document* only a couple
> > > paragraphs down (in the sections that are clearly there to expand upon
> that
> > > material) in the text I pointed to.
> >
> > > I mean...  there are a lot of places I could point to in the
> documentation
> > > that are not so good or outright bad.  To have a problem with this
> > > particular part...  I don't understand.
> >
> > > On Sat, Sep 4, 2010 at 4:11 PM, Indicator Veritatis  >wrote:
> >
> > > > It is not "being uber-pedantic". And your example of guns killing
> > > > bunnies is irrelevant. It would have been relevant if you had
> followed
> > > > the wording of the citation a little more closely, and said,
> > > > "this gun lets me specify whether the bunny will live or die". But of
> > > > course, you did not say that, since that does not support your
> > > > position.
> >
> > > > The truth is that as happens all too often, the online documentation
> > > > says one thing in one place, and contradicts that one thing in
> another
> > > > place.
> >
> > > > On Sep 4, 12:36 am, Dianne Hackborn  wrote:
> > > > > Also on that page:
> >
> > > > > Default values for attributes
> >
> > > > > The default values for the  attributes differs,
> > > > depending
> > > > > on the value of
> > > > > theandroid:minSdkVersion<
> > > >
> http://developer.android.com/guide/topics/manifest/uses-sdk-element.html>
> > > > > attribute
> > > > > in the application's manifest, as well as on the value of
> > > > > android:targetSdkVersion, if declared:
> >
> > > > >- If android:minSdkV

Re: [android-developers] Re: Bug in minSdkVersion or what?

2010-09-05 Thread Shawn Brown
> the app name is "my
> test".

I see it via market on adp2 running Froyo (CynogenMod 6.0).


DO NOT DOWNLOAD THIS APP X6 right!

Shawn

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


[android-developers] problem with GL_CLAMP_TO_EDGE

2010-09-05 Thread billconan
hello guys,

I cannot guarantee my texture size be a power of two,   therefore, i'm
using GL_CLAMP_TO_EDGE,

but when i call glTexImage2D, or glutil.teximage2d, i always get the
Opengl Error Code 1281 Invalid Value.

this same setting seems to work on iphone.

does this mean that android only supports power of two texture maps?

if i hard code the bitmap size to be power of two, then my program
will work. otherwise the texture map is black.


see, this is how i set the texture map, it is exactly the same as the
official sample.

thanks




Log.d("Ball Texture","textureID "+textureID+"; lengthx "+lengthx+";
lengthy "+lengthy);
//lengthx=64;
//lengthy=64;
if(textureID==0)
{
int[] textures = new int[1];
gl.glGenTextures(1,textures,0 );
textureID=textures[0];
}

gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);

gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MIN_FILTER,GL10.GL_NEAREST);
 
gl.glTexParameterf(GL10.GL_TEXTURE_2D,GL10.GL_TEXTURE_MAG_FILTER,GL10.GL_NEAREST);

gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_WRAP_S,GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_WRAP_T,GL10.GL_CLAMP_TO_EDGE);

gl.glTexEnvf(GL10.GL_TEXTURE_ENV,
GL10.GL_TEXTURE_ENV_MODE,GL10.GL_REPLACE);
Log.d("opengl error 1", "error code "+gl.glGetError());

Bitmap bitmap=Bitmap.createBitmap(lengthx, lengthy,
Bitmap.Config.RGB_565);
Canvas mCanvas=new Canvas(bitmap);

//mCanvas.drawColor(Color.BLUE);

Path path=new Path();

int pointnum=(int) (pointSet.length*0.5);

//  Log.d("point cound:",pointnum+";");
path.moveTo(pointSet[0], pointSet[1]);
for(int i=1;ihttp://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Bug in minSdkVersion or what?

2010-09-05 Thread Gustavo
Thank you for the quick reply Mark.

I also tried to look for some apps that require the CALL_PHONE and
you're right, they're up and running but why is it not working with my
apps? firstly I thought it had something to do with my manifest,
source code or something... but when I built a very simple hello world
app with just the CALL_PHONE on the manifest file, it also didn't work
so I got really confused about what's going on.

I'm running out of ideas on how to make this work... maybe I'll try
building and publishing it from another computer or something. =S

I've published a simple app that contains all of uses permissions that
is required in my app. would you (or anyone who's reading this) mind
telling me if you can see it from your android? the app name is "my
test".
If any of you guys have any idea on how to make this work I would be
really grateful with your support.

Thanks again.

- Gus

On Sep 5, 9:20 pm, Mark Murphy  wrote:
> On Sun, Sep 5, 2010 at 8:07 PM, Gustavo  wrote:
> > In conclusion, I realized that there's got to be something wrong with
> > the CALL_PHONE permission. does anyone have an idea why is this
> > happening? is that only with me?
>
> Possibly. I can certainly see apps that require CALL_PHONE on the
> Market with a Nexus One running 2.2:
>
> -- Advanced Call Manager
> -- recordAcall
> -- QuickCall
> -- Big Call
> -- etc.
>
> (note: I am not recommending any of these, I am merely pointing out
> that they are visible to me on the Market and use CALL_PHONE)
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] cannot get my location to work on android 2.2

2010-09-05 Thread sunny
Hi Folks,
my app which was working on 2.1 and earlier version fails to run properly in
2.2. It relies on the location but I do not get any error message.

However under DDMS /logCat, I see a message saying:Error message while
getting the location address: Reason: this service is not available.

This is coming more as an information message rather than an exception or
error. The process that is printing it out is System.out.

Note that I did everything possible ( I can think of) to upgrade the app to
run in android 2.2

The API version was changed to 8.

The manifest file contains  all the following:-
...
...















anything else I need to do ?

its very frustrating... any help would be greatly appreciated..

thanks

Sunny

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

[android-developers] Re: DDMS Heap Dump permissions problem

2010-09-05 Thread mrmanuke
Your suggestion led me to discover the problem, which was that my
device was set so that whenever it was connected via USB, the SD card
would be mounted by my development computer. I changed the "Connect to
PC" setting to "charge only" and that fixed it. Thank you!

On Sep 3, 6:59 am, fadden  wrote:
> On Sep 1, 5:04 pm, mrmanuke  wrote:
>
> > D/ddm-heap(19153):Heapdump: file='/sdcard/com.bunnies.Shhh.hprof'
> > E/dalvikvm(19153): hprof: can't open /sdcard/com.bunnies.Shhh.hprof-
> > hptemp: Perm
> > ission denied.
>
> > I've tried this on an actual device (HTC Desire w/ 2.1 Eclair) and an
> > emulator (Donut). Both gave exactly the same result as above. Also, I
> > do have the WRITE_EXTERNAL_STORAGE permission in the manifest. I've
> > searched and couldn't find anything about anyone ever having this
> > problem. Any ideas?
>
> Usually that comes up because of the WRITE_EXTERNAL_STORAGE issue.
> Does the file already exist but owned by someone else?  Can you verify
> that your app can create a file on /sdcard with that name using
> java.io calls?

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


[android-developers] Re: Activity inside a view

2010-09-05 Thread Explore Android
Thanks for all your feedback or suggestions.

Before posting this message I was already implementing the solution
that proposed by TreKing.
But I felt this is not a smart way of doing it. It would have been
nicer to have all my ActivityA behavior and GUI (with out any
modifications)
showed inside a frame layout of ActivityB.

I know TabHost does this but could not understand it's implementation
fully. So is the reason for posting this issue.

Does anyone has a simple example of to use LocalActivityManager or
something else to meet my requirements.

Thanks

On Sep 6, 7:14 am, TreKing  wrote:
> On Sun, Sep 5, 2010 at 6:40 AM, a1  wrote:
> > You can and moreover it makes a lot of sense, TabHost in fact relies on
> > this.
>
> This is true, though I'm not sure if this is what the OP is getting at. But
> I may very well be misunderstanding the OP's request to have an "Acitvity
> inside a View".
>
> -
> 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: Bug in minSdkVersion or what?

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 8:07 PM, Gustavo  wrote:
> In conclusion, I realized that there's got to be something wrong with
> the CALL_PHONE permission. does anyone have an idea why is this
> happening? is that only with me?

Possibly. I can certainly see apps that require CALL_PHONE on the
Market with a Nexus One running 2.2:

-- Advanced Call Manager
-- recordAcall
-- QuickCall
-- Big Call
-- etc.

(note: I am not recommending any of these, I am merely pointing out
that they are visible to me on the Market and use CALL_PHONE)

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Bug in minSdkVersion or what?

2010-09-05 Thread Gustavo
Hi, it's me again.

So I think I've found a very serious problem here... This has nothing
to do with supports screens or sdk versions. I have built an app just
for testing this kind of behaviour and I realized that the problem is
on uses permission (weird!).

My tests:

I published a very simple hello world app and decided just to change
the manifest file.

This was tested not just 4 times but I would say like up to 30 times
to make sure, in every way possible... spent the whole day testing
this since the CALL_PHONE permission is the most important feature in
my app. I even tried with a different developer account, different
projects, package name and most of the times had to wait for like 15 -
20 minutes after publishing the app to make sure it's really not
showing on the other devices.

Devices I've tested:

HTC Tattoo - Firmware version: 1.6 - Model HTC Tattoo A3232
Motorola Milestone (AKA Droid) - Firmware version: 2.0.1 - Model A853
HTC G1 - Firmware version: 2.01 - Model T-Mobile G1

1st attempt (VISIBLE ON ANDROID MARKET FOR ALL OF MY 3 ANDROID
DEVICES):










2nd attempt (VISIBLE ON ANDROID MARKET ONLY FOR HTC TATTOO):










3rd attempt (VISIBLE ON ANDROID MARKET ONLY FOR HTC TATTOO):






4th attempt with a new project (VISIBLE ON ANDROID MARKET ONLY FOR HTC
TATTOO):






In conclusion, I realized that there's got to be something wrong with
the CALL_PHONE permission. does anyone have an idea why is this
happening? is that only with me? how to deal with it? any workaround?

Many thanks,

- Gus

On Sep 4, 10:43 pm, Gustavo  wrote:
> Thank you very much for all your help guys.
>
> I'm not at work today so tomorrow I'll try taking those redundant
> lines off my manifest file and upload the app to see if I'm finally
> able to get my app visible for all android versions (1.6 and later,
> because now it's only being shown to 1.6 androids).
>
> Thanks again for the great support!
>
> - Gus
>
> On Sep 4, 9:56 pm, Dianne Hackborn  wrote:
>
> > Okay, look at it another way: the documentation you are quoting says that
> > those control the different screen sizes you support.  And let's say it
> > states: "these attributes, and nothing else, determine the screen sizes you
> > support."  It doesn't say anything about what the values are if you don't
> > specify them.  That is covered *in the same document* only a couple
> > paragraphs down (in the sections that are clearly there to expand upon that
> > material) in the text I pointed to.
>
> > I mean...  there are a lot of places I could point to in the documentation
> > that are not so good or outright bad.  To have a problem with this
> > particular part...  I don't understand.
>
> > On Sat, Sep 4, 2010 at 4:11 PM, Indicator Veritatis 
> > wrote:
>
> > > It is not "being uber-pedantic". And your example of guns killing
> > > bunnies is irrelevant. It would have been relevant if you had followed
> > > the wording of the citation a little more closely, and said,
> > > "this gun lets me specify whether the bunny will live or die". But of
> > > course, you did not say that, since that does not support your
> > > position.
>
> > > The truth is that as happens all too often, the online documentation
> > > says one thing in one place, and contradicts that one thing in another
> > > place.
>
> > > On Sep 4, 12:36 am, Dianne Hackborn  wrote:
> > > > Also on that page:
>
> > > > Default values for attributes
>
> > > > The default values for the  attributes differs,
> > > depending
> > > > on the value of
> > > > theandroid:minSdkVersion<
> > >http://developer.android.com/guide/topics/manifest/uses-sdk-element.html>
> > > > attribute
> > > > in the application's manifest, as well as on the value of
> > > > android:targetSdkVersion, if declared:
>
> > > >    - If android:minSdkVersion or android:targetSdkVersion is "3" 
> > > > (Android
> > > >    1.5) or lower, the default value for everything except
> > > android:normalScreens
> > > >    is false. If you are primarily targeting pre-Android 1.6 platforms 
> > > > but
> > > >    also want to support other densities/screen sizes, you need to set 
> > > > the
> > > >    appropriate attributes to true.
> > > >    - If android:minSdkVersion or android:targetSdkVersion is "4" 
> > > > (Android
> > > >    1.6) or higher, the default value for everything is true. If your
> > > >    application requires Android 1.6 features, but does not support these
> > > >    densities and/or screen sizes, you need to set the appropriate
> > > attributes
> > > >    to false.
> > > >    - Note that android:normalScreens always defaults to true.
>
> > > > But um yeah if you want to be uber-pedantic...  wait, no, not even in
> > > that
> > > > case.  "This gun lets me kill the bunny."  That doesn't imply to me that
> > > the
> > > > gun is the only way I have to kill the bunny. :)
>
> > > > On 

Re: [android-developers] Slide Show sample code.

2010-09-05 Thread 李实
hi, sowmay ,
I wonder what is exactly "a slideshow app"?
slide to unlock?

2010/9/1 sowmay 

> Hi everyone,
>
> I am making a slideshow app.
> I have been looking for a sample code, but I couldn't get it.
>
> Does anyone know sample code for it?
>
> 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




-- 
execuse me for my poor English

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Dianne Hackborn
Simplest is in onResume() to check if there has been a change and update
accordingly.

On Sun, Sep 5, 2010 at 3:59 PM, JimBadger  wrote:

> Wow, thanks for the quick responses. That simple for question 1, huh?
> Call finish()? :)  Will do, ta.  (I just presumed that once you called
> StartActivity, that was it, bam, you were out of the calling activity
> and into the called).
>
> What about part 2?  I want a visual refresh of Activity A when
> returning to it from Activity B (or C, or even G), that reflects how
> the game data that affects Acitivty A has changed since the user left
> it...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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] Picking two pictures at once

2010-09-05 Thread Pedro Teixeira
Hi, this snippet of code allows me to pick a picture and choose from a
list of options to send them..
I'm wondering if it'spossible to pick 2 pictures instead of just one?
Is it possible? thnk you

Uri U = Uri.fromFile(F);
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("image/jpg");
i.putExtra(Intent.EXTRA_STREAM, U);
startActivity(Intent.createChooser(i,"Send Picture
using:"));

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


[android-developers] Re: Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread JimBadger
Wow, thanks for the quick responses. That simple for question 1, huh?
Call finish()? :)  Will do, ta.  (I just presumed that once you called
StartActivity, that was it, bam, you were out of the calling activity
and into the called).

What about part 2?  I want a visual refresh of Activity A when
returning to it from Activity B (or C, or even G), that reflects how
the game data that affects Acitivty A has changed since the user left
it...

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


Re: [android-developers] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 6:49 PM, Sebastián Treu  wrote:
> I what performance concern, will using FLAG_ACTIVITY_NO_HISTORY make
> any changes? I mean, does the framework loads the task to the activity
> costly or not? I ask this just for curiosity and to know a little
> more, as one could think of launching the Activity with that flag if
> it's known that there's no need to keep it in the stack as later on it
> will be finished.

I would expect that FLAG_ACTIVITY_NO_HISTORY, android:noHistory, and
the finish() technique that I and Mr. Weiss mentioned would have
similar performance characteristics. The difference between them
appears to be:

-- FLAG_ACTIVITY_NO_HISTORY is good when the *caller* (the one
invoking startActivity()) is one making the decision about whether the
activity should be in the stack

-- android:noHistory is good when the activity is *never* in the stack

-- finish() is good when the activity is conditionally removed from
the stack (and, it's a bit better-known)

I keep forgetting about android:noHistory, and that might be a good
choice in this case:

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

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


Re: [android-developers] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Dianne Hackborn
On Sun, Sep 5, 2010 at 3:49 PM, Sebastián Treu wrote:

> I what performance concern, will using FLAG_ACTIVITY_NO_HISTORY make
> any changes?


It doesn't matter.  If your activity knows it doesn't want to be returned
to, I suggest it calling finish() on itself rather than relying on the
caller to set the correct flag.

-- 
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] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Sebastián Treu
On Sun, Sep 5, 2010 at 7:49 PM, Sebastián Treu  wrote:
> I what performance concern, will using FLAG_ACTIVITY_NO_HISTORY make
> any changes? I mean, does the framework loads the task to the activity

opps... correcting: does the framework loads the task to the *stack*



-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Sebastián Treu
I what performance concern, will using FLAG_ACTIVITY_NO_HISTORY make
any changes? I mean, does the framework loads the task to the activity
costly or not? I ask this just for curiosity and to know a little
more, as one could think of launching the Activity with that flag if
it's known that there's no need to keep it in the stack as later on it
will be finished.

-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Filip Havlicek
About the second question, I suppose you store your game data somehow
(perhaps in a database?). So what would you do before drawing the slots is
select data from database and make an if statement. If (data for slot1 is in
the select from database) {show the data as label and add Activity 3 class
to the on-slot-click intent} else {show an empty slot and add Activity 2
class to the on-slot-click intent}. The same for other slots.

Best regards,
Filip Havlicek

2010/9/6 Frank Weiss 

> The simplest thing to do when activity A starts activity B but
> activity A doesn't want to stay on the stack is for activity A to call
> finish() right after it calls startActivity() with the intent to start
> activity B.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Implementing a self-contained library project test project

2010-09-05 Thread Paul Butcher
In "Testing a library project" the Android documentation says:

> There are two recommended ways of setting up testing on code and resources in 
> a library project:
> 
> - You can set up a test project that instruments an application project that 
> depends on the library project. You can then add tests to the project for 
> library-specific features.
> 
> - You can set up a set up a standard application project that depends on the 
> library and put the instrumentation in that project. This lets you create a 
> self-contained project that contains both the tests/instrumentations and the 
> code to test.

How to achieve the first of these is pretty obvious, but the second (to me, at 
least) rather less so. After some experimentation, I've managed to get it 
working, but I'm not 100% happy with how I've done so. I would be very grateful 
for any suggestions for improvements.

I've described my solution here:

http://www.paulbutcher.com/2010/09/android-library-project-with-tests-step-by-step/

Many thanks in advance for any help you can offer.

--
paul.butcher->msgCount++

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Frank Weiss
The simplest thing to do when activity A starts activity B but
activity A doesn't want to stay on the stack is for activity A to call
finish() right after it calls startActivity() with the intent to start
activity B.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 6:23 PM, JimBadger  wrote:
> I'm developing a non-realtime Android game, and am having trouble
> figuring out the best way to sequence and control my activities.
>
> For example, when the user first installs and runs the app, he's into
> Activity 1: The Game.  He selects a new game slot (1 of 3) and goes to
> Activity 2: Create Character, and from there Activity 3: World Map.
>
> That scenario highlights two of my problems:
>
> 1) If the user presses the back button on Activity 3, I don't want him
> going back to Activity 2, I'd want him back on the main menu; Activity
> 1.but

Have Activity 2 call finish() after calling startActivity() for
Activity 3. When the user presses BACK in 3, 2 is gone, so they will
return to 1.

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Activities I Don't Want the User to be able to go Back to

2010-09-05 Thread JimBadger
Hi,

I'm developing a non-realtime Android game, and am having trouble
figuring out the best way to sequence and control my activities.

For example, when the user first installs and runs the app, he's into
Activity 1: The Game.  He selects a new game slot (1 of 3) and goes to
Activity 2: Create Character, and from there Activity 3: World Map.

That scenario highlights two of my problems:

1) If the user presses the back button on Activity 3, I don't want him
going back to Activity 2, I'd want him back on the main menu; Activity
1.but

2) When the user does return to Activity 1, I want it to have auto-
updated to show his character name in one of the 3 game slots*

I just don't know how to control my activity stack, or activity
launching process in this manner.  Help me, please.

*From then on, when he clicks that game slot it goes straight to
Activity 3, but that was the easy part! :)

Thanks in advance for any assistance!

Regards,
James

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


[android-developers] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Flying Coder

OK.  BTW, thanks for the tip about the "signature permission".  That
not only helped with a workaround for this problem, but also with
another related issue.

Cheers,
Steve

On Sep 5, 2:58 pm, Dianne Hackborn  wrote:
> There isn't a way in the SDK.  You need to go through the permissions screen
> so the user can approve the permissions being granted.  (adb install doesn't
> go through permissions because the shell is running as the user.)
>
>
>
>
>
> On Sun, Sep 5, 2010 at 8:33 AM, Mark Murphy  wrote:
> > On Sun, Sep 5, 2010 at 11:31 AM, Flying Coder 
> > wrote:
> > > Call it what you want, is there a way to make it happen?
>
> > Run adb install -r, or publish an update to your app on the Market. I
> > don't know of any other mechanism to do this.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://github.com/commonsguy
> >http://commonsware.com/blog|http://twitter.com/commonsguy
>
> > _The Busy Coder's Guide to Android Development_ Version 3.1 Available!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] Re: Activity inside a view

2010-09-05 Thread TreKing
On Sun, Sep 5, 2010 at 6:40 AM, a1  wrote:

> You can and moreover it makes a lot of sense, TabHost in fact relies on
> this.
>

This is true, though I'm not sure if this is what the OP is getting at. But
I may very well be misunderstanding the OP's request to have an "Acitvity
inside a View".

-
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] Re: How can we get the device name programmatically?

2010-09-05 Thread Maps.Huge.Info (Maps API Guru)
If you mean the device name, like in Droid or Nexus One, then you
should be able to get it from

android.os.Build.MODEL

This is a read only property so the user can't change it without root.

-John Coryat

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


[android-developers] Re: Place two buttons side by side

2010-09-05 Thread Droid
Thanks for that easy reference, looks like its
android:layout_alignParentRight="true"
or something like that.

On Sep 5, 7:11 pm, Frank Weiss  wrote:
> Try the hello views 
> page:http://developer.android.com/intl/de/resources/tutorials/views/index
>
> And please do use the resources before asking questions :-)

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


[android-developers] Re: Place two buttons side by side

2010-09-05 Thread Droid
I am coding continuously but have hit a brain fade time. So cannot
easily
read all that at this point. Later.

On Sep 5, 7:15 pm, Filip Havlicek  wrote:
> Did you actually tried to read it? Everything you need to know is said in a
> first few lines.
>
> Best regards,
> Filip Havlicek
>
> 2010/9/5 Droid 
>
>
>
> > Thanks, but cannot follow that page without a migraine.
> > Who can give me a snippet for two buttons side by side?
>
> > On Sep 5, 5:12 pm, Filip Havlicek  wrote:
> > > All you want is herehttp://
> > developer.android.com/reference/android/widget/LinearLayout.html
>
> > > 2010/9/5 Droid 
>
> > > > OK, my buttons go one under the other, but I want them side by side.
>
> > > > How do I place two buttons side by side?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com> > cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Http live streaming (Smooth Streaming)

2010-09-05 Thread oguz gurler
Hi,

Is it possible with Android media player component watching live streaming
(Live Tv) which serves from  iis smooth streaming server?

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

2010-09-05 Thread Dianne Hackborn
You can't get that from the IME.  What you get is edit operations via calls
on InputConnection.

You will need to implement your own keyboard in your app if you want to
monitor individual interactions with it.

On Sun, Sep 5, 2010 at 4:18 AM, Tez  wrote:

> Biometric Measure with neural nets: Key stroke patterns.
> For that I need data about how something was typed in:
>
> Eg: EARLENCE
>
> 1. time for which each key was pressed.
> 2. interval between consecutive key presses.
>
> Cheers,
> Earlence
>
> On Sep 4, 10:44 pm, Dianne Hackborn  wrote:
> > You can override EditText to return your own InputConnection.
> >
> > But...  if you want KeyEvents, you won't get KeyEvents.  Period.  There
> are
> > no KeyEvent objects involved in this ANYWHERE.  At all.  The user is
> > touching on the screen (that is a touch event).  The IME turns that into
> an
> > edit operation on the TextView (that is a call to InputConnection).  No
> > KeyEvent.
> >
> > What you are claiming to want to do simply doesn't make sense.  Let's
> back
> > up here and see what you are actually trying to accomplish?  Not timing
> > between two key events.  What is the goal you are trying to achieve?
> >
> >
> >
> > On Sat, Sep 4, 2010 at 6:55 AM, Tez  wrote:
> > > How do I intercept the InputConnection Calls? Would I have to modify
> > > the IME or use a custom one?
> > > Having text change listeners would not be of use as I need key timing
> > > information. This I can only get thru KeyEvents.
> >
> > > Cheers,
> > > Earlence
> >
> > > On Sep 4, 12:39 pm, Dianne Hackborn  wrote:
> > > > On Fri, Sep 3, 2010 at 10:48 PM, Tez 
> wrote:
> > > > > 1. I have registered a KeyListener on an EditText. When I use the
> soft
> > > > > keyboard to input text, my listener is not called. How Do I
> intercept
> > > > > these events?
> >
> > > > InputConnection is how edit operations are delivered through an IME.
> > >  These
> > > > will appear as direct edits of the text in the EditText, so to watch
> that
> > > > you either need to intercept the InputConnection calls or have
> listeners
> > > for
> > > > text changes.
> >
> > > > > 2. How do I measure time interval between KeyEvents. The methods
> are
> > > > > confusing and documentation is not good. Plz put pseudo-code here.
> >
> > > > Er...  there is nothing really to document here.
> > >  SystemClock.uptimeMillis()
> > > > returns the current time in what are probably appropriate units for
> you.
> > > >  Call it at the points you are interested in.  Compare the values.
> >
> > > > (Didn't we just have a thread on this?)
> >
> > > > --
> > > > 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
> >
> > --
> > 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
>



-- 
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] Re: How to detect device support multi touch without OnTouchListener's event?

2010-09-05 Thread Dianne Hackborn
You look at the package manager features as Dan said, and adjust your UI
appropriately.

On Sun, Sep 5, 2010 at 8:03 AM, eric  wrote:

>  Dear Dan:
> Thank you for your response at first.But I want
> to detect device that support multi touch or not to show different UI
> appear. If it supports to show A-Type   UI,or it show B-Type UI.I
> still show my app on non-multitouch devices.Can you slove my question?
> Thank you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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] Re: Google TV applications

2010-09-05 Thread Dianne Hackborn
On Sun, Sep 5, 2010 at 7:41 AM, ben  wrote:

> I understand that the market can't be opened up to everyone all at
> once. I can only begin to imagine what a nightmare that would be to
> manage. I just don't understand why this can't be more open like the
> c2dm start was. C2DM can't have everyone on the market using it at
> once. But at least it was open for everyone to apply to get into the
> beta.
>

At the time the c2dm stuff was being made available, the API had been
finalized and was on devices and they were just doing a slow roll-out to get
the server pieces in place.  It is a totally different situation than a
modification of the platform with new non-standard APIs and user
interactions that are still being developed.

-- 
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] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Dianne Hackborn
There isn't a way in the SDK.  You need to go through the permissions screen
so the user can approve the permissions being granted.  (adb install doesn't
go through permissions because the shell is running as the user.)

On Sun, Sep 5, 2010 at 8:33 AM, Mark Murphy  wrote:

> On Sun, Sep 5, 2010 at 11:31 AM, Flying Coder 
> wrote:
> > Call it what you want, is there a way to make it happen?
>
> Run adb install -r, or publish an update to your app on the Market. I
> don't know of any other mechanism to do this.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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: Need project idea

2010-09-05 Thread Maps.Huge.Info (Maps API Guru)
You mean like this one:

http://www.motorola.com/Consumers/US-EN/Consumer-Product-and-Services/Mobile-Phones/ci.MOTOROLA-i1-US-EN.alt

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] How to compare the data in framebuffer

2010-09-05 Thread Dianne Hackborn
(Oh and even if it does let you read the framebuffer, it is probably going
to be *much* slower to read it than to re-render it.)

On Sun, Sep 5, 2010 at 11:56 AM, Dianne Hackborn wrote:

> Hi, this is well outside the bounds of the SDK, so should be asked on
> another group such as android-porting.  Also there is no guarantee that the
> hardware will let you read the frame buffer.
>
>
> On Sun, Sep 5, 2010 at 9:40 AM, eric.D  wrote:
>
>> Hi
>> In my app on cupcake platform ,in the EGLDisplaySurface.cpp ,my plan
>> is adding a  method to compare the data is different or not between
>> front buffer and back buffer.but I can't understand the framebuffer
>> is.I'm poor in C++ .any 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
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>


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

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

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

Re: [android-developers] How to compare the data in framebuffer

2010-09-05 Thread Dianne Hackborn
Hi, this is well outside the bounds of the SDK, so should be asked on
another group such as android-porting.  Also there is no guarantee that the
hardware will let you read the frame buffer.

On Sun, Sep 5, 2010 at 9:40 AM, eric.D  wrote:

> Hi
> In my app on cupcake platform ,in the EGLDisplaySurface.cpp ,my plan
> is adding a  method to compare the data is different or not between
> front buffer and back buffer.but I can't understand the framebuffer
> is.I'm poor in C++ .any 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
>



-- 
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] Re: Need project idea

2010-09-05 Thread Kostya Vasilyev

 Android-based OBD probe?

You'd need industrial-strength Android devices for that, too (oil- dirt- 
gas- proof).


Would be cool, though.

05.09.2010 22:11, sws-vinpa пишет:

Serial ports would be valuable for this sort of application.  ;-)


Vince

On Sep 4, 2:50 am, Indicator Veritatis  wrote:

Funny. Just a little mean, but funny!

OK, OK, I will give away an idea I know I will never get around to
implementing. It has a lot to do with automotive. I am dreaming of an
Android app that given symptoms of a car's misbehavior, will not only
walk you through the trouble-shooting flow-chart, but locate garages
nearby by distance, rate, and hours.

That should keep you busy;)

On Sep 3, 1:12 pm, TreKing  wrote:




On Thu, Sep 2, 2010 at 2:19 AM, analyst  wrote:

Can any tell me a project related to automative industries using android.

Make an app that let's you remotely drive your car, like James Bond.
--- 
--
TreKing  - Chicago
transit tracking app for Android-powered devices



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: Place two buttons side by side

2010-09-05 Thread Filip Havlicek
Did you actually tried to read it? Everything you need to know is said in a
first few lines.

Best regards,
Filip Havlicek

2010/9/5 Droid 

> Thanks, but cannot follow that page without a migraine.
> Who can give me a snippet for two buttons side by side?
>
> On Sep 5, 5:12 pm, Filip Havlicek  wrote:
> > All you want is herehttp://
> developer.android.com/reference/android/widget/LinearLayout.html
> >
> > 2010/9/5 Droid 
> >
> >
> >
> > > OK, my buttons go one under the other, but I want them side by side.
> >
> > > How do I place two buttons side by side?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2010-09-05 Thread Frank Weiss
> Might want to also check for last forward slash, in case the path portion of
> the filename contains a dot.
>
> E.g.:
>
> /sdcard/.myapp/cachefile


I suppose that should be taken care of by File.getName(). I might add
that a test case for this new code would be a good idea.

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

2010-09-05 Thread Filip Havlicek
Didn't try that actually, thought getName() returns only "cachefile" (from
your example).

Best regards,
Filip Havlicek

2010/9/5 Kostya Vasilyev 

> Might want to also check for last forward slash, in case the path portion
> of the filename contains a dot.
>
> E.g.:
>
> /sdcard/.myapp/cachefile
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
> 05.09.2010 21:53 пользователь "Filip Havlicek" 
> написал:
>
>
> Well, you got it wrong i think :)
>
> public static String fileExtension(File f) {
> String name = f.getName();
> int idx = name.lastI...
> if (idx == -1) return null;
> if (idx == name.length()-1) return new String("");
> return name.substring(idx+1, name.length())); // that was what you got
> wrong :)
>
> }
>
>
>
> public static string fileBaseName(File f) {
>String name = f.getName();
>int idx = name.lastIn...
>if (idx == -1) return name;
>if (idx == 0) return new String("");
>return name.substsring(0,idx); // that was what you got wrong :)
> }
>
> Now I hope I didn't make any mistake!
>
> Best regards,
> Filip Havlicek
>
> 2010/9/5 Bob Kerns 
>
>
> >
> > The Java File class does not provide an abstraction for "extension".
> > It's a bit too abstract ...
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Place two buttons side by side

2010-09-05 Thread Frank Weiss
Try the hello views page:
http://developer.android.com/intl/de/resources/tutorials/views/index.html

And please do use the resources before asking questions :-)

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


[android-developers] Re: Need project idea

2010-09-05 Thread sws-vinpa
Serial ports would be valuable for this sort of application.  ;-)


Vince

On Sep 4, 2:50 am, Indicator Veritatis  wrote:
> Funny. Just a little mean, but funny!
>
> OK, OK, I will give away an idea I know I will never get around to
> implementing. It has a lot to do with automotive. I am dreaming of an
> Android app that given symptoms of a car's misbehavior, will not only
> walk you through the trouble-shooting flow-chart, but locate garages
> nearby by distance, rate, and hours.
>
> That should keep you busy;)
>
> On Sep 3, 1:12 pm, TreKing  wrote:
>
>
>
> > On Thu, Sep 2, 2010 at 2:19 AM, analyst  wrote:
> > > Can any tell me a project related to automative industries using android.
>
> > Make an app that let's you remotely drive your car, like James Bond.
>
> > --- 
> > --
> > 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: Split Path to get filename and extension

2010-09-05 Thread Kostya Vasilyev
Might want to also check for last forward slash, in case the path portion of
the filename contains a dot.

E.g.:

/sdcard/.myapp/cachefile

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

05.09.2010 21:53 пользователь "Filip Havlicek" 
написал:

Well, you got it wrong i think :)

public static String fileExtension(File f) {
String name = f.getName();
int idx = name.lastI...
if (idx == -1) return null;
if (idx == name.length()-1) return new String("");
return name.substring(idx+1, name.length())); // that was what you got
wrong :)

}



public static string fileBaseName(File f) {
   String name = f.getName();
   int idx = name.lastIn...
   if (idx == -1) return name;
   if (idx == 0) return new String("");
   return name.substsring(0,idx); // that was what you got wrong :)
}

Now I hope I didn't make any mistake!

Best regards,
Filip Havlicek

2010/9/5 Bob Kerns 


>
> The Java File class does not provide an abstraction for "extension".
> It's a bit too abstract ...

 --

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

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

[android-developers] Re: Place two buttons side by side

2010-09-05 Thread Droid
Thanks, but cannot follow that page without a migraine.
Who can give me a snippet for two buttons side by side?

On Sep 5, 5:12 pm, Filip Havlicek  wrote:
> All you want is 
> herehttp://developer.android.com/reference/android/widget/LinearLayout.html
>
> 2010/9/5 Droid 
>
>
>
> > OK, my buttons go one under the other, but I want them side by side.
>
> > How do I place two buttons side by side?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Split Path to get filename and extension

2010-09-05 Thread Filip Havlicek
Well, you got it wrong i think :)

public static String fileExtension(File f) {
String name = f.getName();
int idx = name.lastIndexOf('.');
if (idx == -1) return null;
if (idx == name.length()-1) return new String("");
return name.substring(idx+1, name.length())); // that was what you got
wrong :)

}

public static string fileBaseName(File f) {
   String name = f.getName();
   int idx = name.lastIndexOf('.');
   if (idx == -1) return name;
   if (idx == 0) return new String("");
   return name.substsring(0,idx); // that was what you got wrong :)
}

Now I hope I didn't make any mistake!

Best regards,
Filip Havlicek

2010/9/5 Bob Kerns 

> The Java File class does not provide an abstraction for "extension".
> It's a bit too abstract and least-common-denominator for that.
> Compared to when the File class was defined, modern filesystems are
> more consistent about not actually enforcing it as a part of the
> syntax, and about following it as a convention!
>
> // Untested, yell at me if I got it wrong.
> public static String fileExtension(File f) {
>   String name = f.getName();
>   int idx = name.lastIndexOf('.');
>   return name.substring(0, idx);
> }
>
> public static string fileBaseName(File f) {
>String name = f.getName();
>int idx = name.lastIndexOf('.');
>return name.substsring(idx + 1);
> }
>
> On Sep 4, 5:38 pm, Kumar Bibek  wrote:
> > The file object you must be creating, has a few methods. Try
> > experimenting, and I am sure, you will find it out easily. Try the
> > method, file.getName() or something like that, I don't remember
> > exactly.
> >
> > -Kumar Bibekhttp://techdroid.kbeanie.com
> >
> > On Sep 4, 1:41 am, Pedro Teixeira  wrote:
> >
> >
> >
> > > Obviously not for me lol.. I'm sorry, I'm just a little bit newbie in
> > > this and its giving me a headache just to get a simple name and
> > > extension from the path
> >
> > > On Sep 3, 2010, at 9:15 PM, Kumar Bibek wrote:
> >
> > > > Use the file class. It's pretty straight forward.
> >
> > > > -Kumar Bibek
> > > >http://techdroid.kbeanie.com
> >
> > > > On Sep 4, 12:02 am, Jeremy Wadsack  wrote:
> > > >> This is basic java. It's not Android specific.
> >
> > > >> String filename = "something.ext";
> > > >> String extension = null;
> > > >> int lastDotPosition = filename.lastIndexOf('.');
> > > >> if( lastDotPosition > 0 ) {
> > > >>   extension = filename.substring(lastDotPosition + 1);
> >
> > > >> }
> >
> > > >> --
> > > >> Jeremy Wadsack
> >
> > > >> On Fri, Sep 3, 2010 at 11:57 AM, Pedro Teixeira
> > > >> wrote:
> >
> > > >>> And how is that done?
> > > >>> I found examples in javascript using the lastindexof ...but cant
> > > >>> find
> > > >>> anything for android java..
> >
> > > >>> On Sep 3, 2010, at 6:52 PM, Filip Havlicek wrote:
> >
> > > >>> Just select extension as string from . to the end and filename as
> > > >>> string
> > > >>> from last / to last .
> >
> > > >>> Best regards,
> > > >>> Filip Havlicek
> >
> > > >>> 2010/9/3 Maps.Huge.Info (Maps API Guru) 
> >
> > >  Have you looked at File?
> >
> > >  -John Coryat
> >
> > >  --
> > >  You received this message because you are subscribed to the Google
> > >  Groups "Android Developers" group.
> > >  To post to this group, send email to
> android-developers@googlegroups.com
> > >  To unsubscribe from this group, send email to
> > >  android-developers+unsubscr...@googlegroups.com
>  > >  %2bunsubscr...@googlegroups.com>
> > >  For more options, visit this group at
> > > http://groups.google.com/group/android-developers?hl=en
> >
> > > >>> --
> > > >>> You received this message because you are subscribed to the Google
> > > >>> Groups "Android Developers" group.
> > > >>> To post to this group, send email to
> android-developers@googlegroups.com
> > > >>> To unsubscribe from this group, send email to
> > > >>> android-developers+unsubscr...@googlegroups.com
> > > >>> For more options, visit this group at
> > > >>>http://groups.google.com/group/android-developers?hl=en
> >
> > > >>> Pedro Teixeira
> >
> > > >>>www.pedroteixeira.org
> >
> > > >>>  --
> > > >>> You received this message because you are subscribed to the Google
> > > >>> Groups "Android Developers" group.
> > > >>> To post to this group, send email to
> android-developers@googlegroups.com
> > > >>> To unsubscribe from this group, send email to
> > > >>> android-developers+unsubscr...@googlegroups.com
>  > > >>> %2bunsubscr...@googlegroups.com>
> > > >>> For more options, visit this group at
> > > >>>http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://group

[android-developers] Re: Activity inside a view

2010-09-05 Thread skink


On Sep 5, 1:40 pm, a1  wrote:
> > And ... ?
>
> Subclass ActivityGroup, get LocalActivityManger, create local activity
> and add decor view from newly created activity window as child of any
> of ViewGroup in your layout, as simple as that.
>

I didn't test it but in theory you don't even need ActivityGroup - you
can use it in any Activity since there is a ctor
LocalActivityManger(Activity parent)

pskink

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


[android-developers] Re: Split Path to get filename and extension

2010-09-05 Thread Bob Kerns
The Java File class does not provide an abstraction for "extension".
It's a bit too abstract and least-common-denominator for that.
Compared to when the File class was defined, modern filesystems are
more consistent about not actually enforcing it as a part of the
syntax, and about following it as a convention!

// Untested, yell at me if I got it wrong.
public static String fileExtension(File f) {
   String name = f.getName();
   int idx = name.lastIndexOf('.');
   return name.substring(0, idx);
}

public static string fileBaseName(File f) {
String name = f.getName();
int idx = name.lastIndexOf('.');
return name.substsring(idx + 1);
}

On Sep 4, 5:38 pm, Kumar Bibek  wrote:
> The file object you must be creating, has a few methods. Try
> experimenting, and I am sure, you will find it out easily. Try the
> method, file.getName() or something like that, I don't remember
> exactly.
>
> -Kumar Bibekhttp://techdroid.kbeanie.com
>
> On Sep 4, 1:41 am, Pedro Teixeira  wrote:
>
>
>
> > Obviously not for me lol.. I'm sorry, I'm just a little bit newbie in  
> > this and its giving me a headache just to get a simple name and  
> > extension from the path
>
> > On Sep 3, 2010, at 9:15 PM, Kumar Bibek wrote:
>
> > > Use the file class. It's pretty straight forward.
>
> > > -Kumar Bibek
> > >http://techdroid.kbeanie.com
>
> > > On Sep 4, 12:02 am, Jeremy Wadsack  wrote:
> > >> This is basic java. It's not Android specific.
>
> > >> String filename = "something.ext";
> > >> String extension = null;
> > >> int lastDotPosition = filename.lastIndexOf('.');
> > >> if( lastDotPosition > 0 ) {
> > >>   extension = filename.substring(lastDotPosition + 1);
>
> > >> }
>
> > >> --
> > >> Jeremy Wadsack
>
> > >> On Fri, Sep 3, 2010 at 11:57 AM, Pedro Teixeira
> > >> wrote:
>
> > >>> And how is that done?
> > >>> I found examples in javascript using the lastindexof ...but cant  
> > >>> find
> > >>> anything for android java..
>
> > >>> On Sep 3, 2010, at 6:52 PM, Filip Havlicek wrote:
>
> > >>> Just select extension as string from . to the end and filename as  
> > >>> string
> > >>> from last / to last .
>
> > >>> Best regards,
> > >>> Filip Havlicek
>
> > >>> 2010/9/3 Maps.Huge.Info (Maps API Guru) 
>
> >  Have you looked at File?
>
> >  -John Coryat
>
> >  --
> >  You received this message because you are subscribed to the Google
> >  Groups "Android Developers" group.
> >  To post to this group, send email to 
> >  android-developers@googlegroups.com
> >  To unsubscribe from this group, send email to
> >  android-developers+unsubscr...@googlegroups.com >  %2bunsubscr...@googlegroups.com>
> >  For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
> > >>> --
> > >>> You received this message because you are subscribed to the Google
> > >>> Groups "Android Developers" group.
> > >>> To post to this group, send email to android-developers@googlegroups.com
> > >>> To unsubscribe from this group, send email to
> > >>> android-developers+unsubscr...@googlegroups.com
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/android-developers?hl=en
>
> > >>> Pedro Teixeira
>
> > >>>www.pedroteixeira.org
>
> > >>>  --
> > >>> You received this message because you are subscribed to the Google
> > >>> Groups "Android Developers" group.
> > >>> To post to this group, send email to android-developers@googlegroups.com
> > >>> To unsubscribe from this group, send email to
> > >>> android-developers+unsubscr...@googlegroups.com > >>> %2bunsubscr...@googlegroups.com>
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > Pedro Teixeira
>
> >www.pedroteixeira.org

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


Re: [android-developers] How can we get the device name programmatically?

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 12:55 PM, Vipul  wrote:
> I want to get the name of device programmatically.
> Suppose anyone has set the device name as "My New Phone"
> I want to get that.

Where do you see in Android a spot for a user to set a device name to
be "My New Phone"?

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] How can we get the device name programmatically?

2010-09-05 Thread Vipul
I want to get the name of device programmatically.
Suppose anyone has set the device name as "My New Phone"
I want to get that.
I tried  android.Os.BUILD constants
but none of them are useful for getting device name.

Any help would be appriciated.

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


[android-developers] Re: Developing Android app for tablet

2010-09-05 Thread Kumar Bibek
Do test out your apps on emulators.

http://techdroid.kbeanie.com/2010/09/getting-started-with-tablets-they-are.html

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 5, 9:32 pm, ben  wrote:
> I would make sure your app isn't drawing anything to exact pixel
> locations and sizes. If you're using the built in layouts you should
> be in good shape. Also you can use the AVD manager to create an
> emulator with larger resolutions and screen sizes. That should at
> least give you some idea of what it will look like.
>
> On Sep 5, 11:56 am, Droid  wrote:
>
> > And is landscape view preferred or default for these bigger screens?
> > Many of my apps are fixed to portrait...
>
> > On Sep 5, 1:50 pm, ytbryan  wrote:
>
> > > Hi all,
>
> > > do we(developer) need to alter our app to suit the android
> > > tablet(samsung galaxy tab)? or will them automatically run on the
> > > tablet?
>
> > > Is a documentation on developing for android tablet?
>
> > > thanks!
> > > bryan

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


[android-developers] How to compare the data in framebuffer

2010-09-05 Thread eric.D
Hi
In my app on cupcake platform ,in the EGLDisplaySurface.cpp ,my plan
is adding a  method to compare the data is different or not between
front buffer and back buffer.but I can't understand the framebuffer
is.I'm poor in C++ .any 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] Apps2Sd install/update failures on Froyo linked to smdl2tmp1.asec file

2010-09-05 Thread Craig D
I finally fixed a problem I was having with install/update of Apps
installed on my SD card on my NexusOne with Froyo installed reported
as Android issue 9593 (http://code.google.com/p/android/issues/detail?
id=9593). It turns out that there is a file called smdl2tmp1.asec in
the SD card app2sd directory (/mnt/secure/asec) that was causing the
problem (see the bug report for details).

My question is: What is this file (smdl2tmp1.asec) used for and why
doesn't the system erase it when finished with it?

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


[android-developers] Uncompressed bitmap

2010-09-05 Thread ls02
Is there way to save to and load from local file uncompressed bitmap?

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


[android-developers] Re: Developing Android app for tablet

2010-09-05 Thread ben
I would make sure your app isn't drawing anything to exact pixel
locations and sizes. If you're using the built in layouts you should
be in good shape. Also you can use the AVD manager to create an
emulator with larger resolutions and screen sizes. That should at
least give you some idea of what it will look like.



On Sep 5, 11:56 am, Droid  wrote:
> And is landscape view preferred or default for these bigger screens?
> Many of my apps are fixed to portrait...
>
> On Sep 5, 1:50 pm, ytbryan  wrote:
>
>
>
> > Hi all,
>
> > do we(developer) need to alter our app to suit the android
> > tablet(samsung galaxy tab)? or will them automatically run on the
> > tablet?
>
> > Is a documentation on developing for android tablet?
>
> > thanks!
> > bryan

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


[android-developers] Re: SQLite implementation - need help!

2010-09-05 Thread kingh32
I tried this and... it works!

Thank you for your help, it now displays a list of the the most recent
update to the database.
(only one item in the list) but for now this will do.

Many thanks

On Sep 4, 5:55 pm, Kostya Vasilyev  wrote:
> Without the angle brackets, right?
>
> adb uninstall com.shootingrange
>
> Like that?
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
>
> 03.09.2010 18:09 пользователь "kingh32"  написал:
>
> Yes that is definately what iI did, replace  with
> 
>
> On Sep 3, 3:03 pm, Kostya Vasilyev  wrote:
>
> >   03.09.2010 17:58, kingh32 пишет:...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" g...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Place two buttons side by side

2010-09-05 Thread Filip Havlicek
All you want is here
http://developer.android.com/reference/android/widget/LinearLayout.html

2010/9/5 Droid 

> OK, my buttons go one under the other, but I want them side by side.
>
> How do I place two buttons side by side?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Place two buttons side by side

2010-09-05 Thread Droid
OK, my buttons go one under the other, but I want them side by side.

How do I place two buttons side by side?

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


[android-developers] Re: Using eclipse

2010-09-05 Thread Droid
My eclipse goes out of sync very easily. I now make copy paste files
into a project to make sure they go into the workspace and do not stay
somewhere else. Its the worst thing about Eclipse IMO. Build/clean is
automatic usually, but does not always fix problems.
I have lost loads of stuff...

On Sep 3, 5:31 pm, Steve Mathews  wrote:
> I usually have to do Project -> Clean, then build again and this goes away.
>
> On Fri, Sep 3, 2010 at 2:40 AM, SREEHARI
> wrote:
>
>
>
> > Do "bulid project"... It will be fine.
>
> > Regards,
> > SREEHARI
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Developing Android app for tablet

2010-09-05 Thread Droid
And is landscape view preferred or default for these bigger screens?
Many of my apps are fixed to portrait...


On Sep 5, 1:50 pm, ytbryan  wrote:
> Hi all,
>
> do we(developer) need to alter our app to suit the android
> tablet(samsung galaxy tab)? or will them automatically run on the
> tablet?
>
> Is a documentation on developing for android tablet?
>
> thanks!
> bryan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 11:31 AM, Flying Coder  wrote:
> Call it what you want, is there a way to make it happen?

Run adb install -r, or publish an update to your app on the Market. I
don't know of any other mechanism to do this.

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Flying Coder

Call it what you want, is there a way to make it happen?  I believe
the "in place update" would be sufficient to get the permission
recognized.

On Sep 5, 11:21 am, Mark Murphy  wrote:
> On Sun, Sep 5, 2010 at 9:19 AM, Flying Coder  wrote:
> >    Thanks for the replies.  I was hoping there might some equivalent
> > of "adb install -r" that would allow my app to be re-installed without
> > losing its data (is it possible?).
>
> adb install -r doesn't "re-install" an app. It does an in-place
> update. This does have the effect of keeping your data around, but so
> does a regular Market update.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


Re: [android-developers] gridview in custom dialog not working....crashes

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 11:17 AM, mani  wrote:
> I have tried adding a grid view to a custom dialog. When displaying
> the dialog it crashes.

:: snip ::

> Could anyone please help me out here.

Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and take a look at the stack trace associated with your
"crash". That will tell you where things are going wrong.

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


Re: [android-developers] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Mark Murphy
On Sun, Sep 5, 2010 at 9:19 AM, Flying Coder  wrote:
>    Thanks for the replies.  I was hoping there might some equivalent
> of "adb install -r" that would allow my app to be re-installed without
> losing its data (is it possible?).

adb install -r doesn't "re-install" an app. It does an in-place
update. This does have the effect of keeping your data around, but so
does a regular Market update.

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] gridview in custom dialog not working....crashes

2010-09-05 Thread mani
Hi all,

I have tried adding a grid view to a custom dialog. When displaying
the dialog it crashes.
But when tried displaying the grid view in normal activity it was
working.( without dialog )

I took the examples from developer android website.Took grid view and
tried to integrate in custom dialog.

I used two xml main.xml & category.xml.
Here is my code:

package com.android.test;


import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class test extends Activity {
/** Called when the activity is first created. */

public final static int CATEGORY_ID=0;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button)findViewById(R.id.categories);

button.setOnClickListener(new Button.OnClickListener(){
public void onClick(View v) {
showDialog(CATEGORY_ID);
}
});
}
protected Dialog onCreateDialog(int id) {
Dialog dialog;
switch(id) {
case CATEGORY_ID:

AlertDialog.Builder builder;
AlertDialog alertDialog;

Context mContext = this;
LayoutInflater inflater = (LayoutInflater)
mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.categorydialog,
   (ViewGroup)
findViewById(R.id.layout_root));

TextView text = (TextView) layout.findViewById(R.id.text);
text.setText("Hello, this is a custom dialog!");
ImageView image = (ImageView)
layout.findViewById(R.id.image);
image.setImageResource(R.drawable.find);

GridView gridview = (GridView) findViewById(R.id.gridview);
   gridview.setAdapter(new ImageAdapter(this));

gridview.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView parent, View v,
int position, long id) {
Toast.makeText(test.this, "" + position,
Toast.LENGTH_SHORT).show();
}
});

builder = new AlertDialog.Builder(mContext);
builder.setView(layout);
dialog = builder.create();

break;
default:
dialog = null;
}
return dialog;
}

public class ImageAdapter extends BaseAdapter {
private Context mContext;

public ImageAdapter(Context c) {
mContext = c;
}

public int getCount() {
return mThumbIds.length;
}

public Object getItem(int position) {
return null;
}

public long getItemId(int position) {
return 0;
}

// create a new ImageView for each item referenced by the
Adapter
public View getView(int position, View convertView, ViewGroup
parent) {
ImageView imageView;
if (convertView == null) {  // if it's not recycled,
initialize some attributes
imageView = new ImageView(mContext);
imageView.setLayoutParams(new
GridView.LayoutParams(85, 85));
 
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setPadding(8, 8, 8, 8);
} else {
imageView = (ImageView) convertView;
}

imageView.setImageResource(mThumbIds[position]);
return imageView;
}

// references to our images
private Integer[] mThumbIds = {
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find,
R.drawable.info, R.drawable.find
};
}

}

main.xml

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






categorydialog.xml

http://schemas.android.

[android-developers] Re: How to detect device support multi touch without OnTouchListener's event?

2010-09-05 Thread eric
 Dear Dan:
 Thank you for your response at first.But I want
to detect device that support multi touch or not to show different UI
appear. If it supports to show A-Type   UI,or it show B-Type UI.I
still show my app on non-multitouch devices.Can you slove my question?
Thank you.

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


Re: [android-developers] Re: Crash on gesture recognize

2010-09-05 Thread Filip Havlicek
Hi Mor,

if it works with 99%, it's going to be hard. Right now I would try to
determine conditions under which the error is thrown.

For example, are you using the application on the same version of Android OS
as you created the gesture file? I'm pretty sure it shouldn't be a problem,
but who knows. Try to recreate the gestures file (on multiple versions of OS
if possible).

Aren't you using some deprecated methods? They might be fine when developing
application on, let's say 1.6, but might be an issue when you deploy the
application to 2.2.

It might be a bug in the gestures framework, although I wouldn't go that far
yet.

Best regards,
Filip Havlicek

2010/9/5 marmor 

> Hi,
>
> Thanks for the response.
>
> I've done all preparations as done by Google's example, including the
> gesture file in res/raw.
> 99% of the time everything works fine, onGesturePerformed is called
> and I get right answers from the recognize function, but in some cases
> (haven't figured out which yet), I crash on the recognize call.
>
> BTW, I'm using a large gestures file, containing about 30 gestures, I
> don't think it's too big for android, because Google's gesture search
> contains all English letters and numbers at least.
>
> Any idea?
>
> Thanks,
> Mor
> @ Contapps.
>
>
> On Sep 3, 2:59 pm, Filip Havlicek  wrote:
> > Hi Mor,
> >
> > do you have your gestures file in res/raw directory? Do you have the
> > necessary preparations done in your onCreate method? They are the same as
> in
> > the example provided by Google, ie "GestureLibraries.fromRawResource",
> > "GestureOverlayView gestures = findViewById" and
> > "addOnGesturePerformedListener"? That should be enough, works fine for me
> in
> > the example.
> >
> > Best regards,
> > Filip Havlicek
> >
> > 2010/9/3 marmor 
> >
> >
> >
> >
> >
> >
> >
> > > I got a crash with the following stack trace:
> >
> > > E/AndroidRuntime( 6709): Uncaught handler: thread main exiting due to
> > > uncaught exception
> > > E/AndroidRuntime( 6709): java.lang.IllegalArgumentException:
> > > Comparison method violates its general contract!
> > > E/AndroidRuntime( 6709): at java.util.TimSort.mergeHi(TimSort.java:
> > > 864)
> > > E/AndroidRuntime( 6709): at java.util.TimSort.mergeAt(TimSort.java:
> > > 481)
> > > E/AndroidRuntime( 6709): at
> > > java.util.TimSort.mergeCollapse(TimSort.java:406)
> > > E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:210)
> > > E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:169)
> > > E/AndroidRuntime( 6709): at java.util.Arrays.sort(Arrays.java:2500)
> > > E/AndroidRuntime( 6709): at
> > > java.util.Collections.sort(Collections.java:1952)
> > > E/AndroidRuntime( 6709): at
> > > android.gesture.InstanceLearner.classify(InstanceLearner.java:84)
> > > E/AndroidRuntime( 6709): at
> > > android.gesture.GestureStore.recognize(GestureStore.java:134)
> > > E/AndroidRuntime( 6709): at
> > > android.gesture.GestureLibrary.recognize(GestureLibrary.java:64)
> > > E/AndroidRuntime( 6709): at
> >
> > >
> com.contapps.android.search.SearchResults.onGesturePerformed(SearchResults.
> java:
> > > 130)
> >
> > > Line 130 in my code is:
> > > ArrayList predictions = mLibrary.recognize(gesture);
> > > and it is the first line in onGesturePerformed(GestureOverlayView
> > > overlay, Gesture gesture).
> >
> > > Any idea what's wrong and what checks can I perform on gesture before
> > > sending it to recognize to avoid this crash?
> >
> > > Thanks,
> > > Mor
> > > @ Contapps.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Google TV applications

2010-09-05 Thread ben
Dianne,

I understand that the market can't be opened up to everyone all at
once. I can only begin to imagine what a nightmare that would be to
manage. I just don't understand why this can't be more open like the
c2dm start was. C2DM can't have everyone on the market using it at
once. But at least it was open for everyone to apply to get into the
beta.

On Sep 5, 10:30 am, ben  wrote:
> Actually we do have the resources, and we do compete with them
> directly. I would say were highly competitive with them. And anyone
> who is a big player in the mobile market knows that being first to
> market is a huge huge advantage. Look at the current android market, a
> majority of the top apps on the market are the apps that were their
> first, or things everyone is going to use such Maps.
>
>  If they take users away from us then I don't see how our company
> benefits from that at all.
>
> On Sep 5, 2:28 am, "Maps.Huge.Info (Maps API Guru)" 
> wrote:
>
>
>
> > I don't see why we should have a problem with the "big boys" getting
> > first dibs on a new category of device (like Google TV). They have the
> > resources to invest in experimentation and will work with the Android
> > people in a close and time consuming manner. Do you have the resources
> > to throw a man year at a three month project? I certainly don't. Be
> > glad that there are companies that can and will do this as well all
> > benefit from their testing, debugging, development and investment.
>
> > Besides, what ever they publish will not be something you're going to
> > compete with anyway so it's not going to hurt you regardless.
>
> > -John Coryat

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


[android-developers] Re: Google TV applications

2010-09-05 Thread ben
Actually we do have the resources, and we do compete with them
directly. I would say were highly competitive with them. And anyone
who is a big player in the mobile market knows that being first to
market is a huge huge advantage. Look at the current android market, a
majority of the top apps on the market are the apps that were their
first, or things everyone is going to use such Maps.

 If they take users away from us then I don't see how our company
benefits from that at all.



On Sep 5, 2:28 am, "Maps.Huge.Info (Maps API Guru)" 
wrote:
> I don't see why we should have a problem with the "big boys" getting
> first dibs on a new category of device (like Google TV). They have the
> resources to invest in experimentation and will work with the Android
> people in a close and time consuming manner. Do you have the resources
> to throw a man year at a three month project? I certainly don't. Be
> glad that there are companies that can and will do this as well all
> benefit from their testing, debugging, development and investment.
>
> Besides, what ever they publish will not be something you're going to
> compete with anyway so it's not going to hurt you regardless.
>
> -John Coryat

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


[android-developers] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Flying Coder

Mark & Dianne,
Thanks for the replies.  I was hoping there might some equivalent
of "adb install -r" that would allow my app to be re-installed without
losing its data (is it possible?).  Unfortunately, the backup/restore
to SD card won't work for this app because the SharedPreferences
contains some sensitive data.  It looks like I will have to go with
the plug-in approach.

Cheers,
Steve


On Sep 4, 9:01 pm, Dianne Hackborn  wrote:
> Generally, unfortunately, this doesn't work.  As of froyo, if it is a
> signature permission, it will work -- the original app will be granted the
> permission once it is known.  (This is safe because it is not a permission
> the user ever needs to be shown anyway.)
>
> But for a permission the user needs to approve...  it won't get granted
> until the first app is re-installed or updated, and the permission it wants
> is known.
>
> This is something that really needs to be improved.
>
>
>
>
>
> On Sat, Sep 4, 2010 at 2:56 PM, Flying Coder  wrote:
>
> > For example, I am adding an option to my app (Executive Assistant) to
> > integrate with the Astrid TODO list app.  Astrid defines the
> > permissions necessary for doing this. My app uses those permissions.
> > Everything works fine if Astrid is installed before my app.  However,
> > many users will use my app first, then decide to use Astrid later
> > (e.g., in at least some cases, because its now supported by my app).
> > However, in this case, I will get a SecurityException if I try to read
> > from the Astrid ContentProvider since that permission didn't exist
> > when my app was installed.
>
> > One easy solution would be to simply uninstall, then re-install my app
> > after Astrid has been installed.  However, this would require the user
> > to reconfigure my app, which would understandably be quite annoying
> > for the user.
>
> > So, two questions:  (1) is there any way for my app to "re-request"
> > the permission after Astrid has been installed?  And, (2) if not, is
> > there any easy way to save & restore my applications data (database &
> > shared preferences) between an uninstall/reinstall so that the user
> > does not have to reconfigure?
>
> > Thanks a bunch,
> > Steve
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


  1   2   >