[android-developers] View.bringToFront() not working

2010-11-10 Thread kavitha b
How to bring a View to front?

i tried with View.bringToFront() method.

But it is not working.

Please help me.

It is very urgent.

Thanks
Kavitha

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

2010-11-10 Thread Babita kumari
Ya  Bibek ,

 I am getting following error :

11-10 10:48:46.348: ERROR/OAUTH(409): Communication with the service
provider failed: Received authentication challenge is null



I have added Twitter4J and signpost as library and I have registered as
client type on Twitter . And my code is following:



public class TwApp extends Activity
{
private static final String APP ="OAUTH";

 private Twitter twitter;
 TextView tweettx;
 Button login;

 private OAuthProvider provider;

 private CommonsHttpOAuthConsumer consumer;
 private static final String CONSUMER_KEY = " consumer key... ";
 private static final String CONSUMER_SECRET = "consumerSecret key..";

 String verifier ;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

tweettx = (TextView)findViewById(R.id.tweet);

login = (Button) findViewById(R.id.main_loin_button);



login.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
askOAuth();
}
});
}


private void askOAuth()
{
try
{
consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY,
CONSUMER_SECRET );
provider = new DefaultOAuthProvider("
https://api.twitter.com/oauth/request_token";,
"
https://api.twitter.com/oauth/access_token";,
"
https://api.twitter.com/oauth/authorize";);

String authUrl = provider.retrieveRequestToken(consumer,
OAuth.OUT_OF_BAND);
System.out.println("&&" +
authUrl);

Toast.makeText(this, "Please authorize this app!",
Toast.LENGTH_LONG).show();

this.startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse(authUrl)));

} catch (Exception e)
{
System.out.println("ERROR_" + e);
Log.e(APP, e.getMessage());
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}
}


@Override
protected void onNewIntent(Intent intent)
{
super.onNewIntent(intent);

Uri uri = intent.getData();
if (uri != null && uri.toString().startsWith( OAuth.OUT_OF_BAND))
{
verifier =
uri.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER);
}

try {
// this will populate token and token_secret in consumer
provider.retrieveAccessToken(consumer, verifier);

// TODO: you might want to store token and token_secret in
you app settings
AccessToken a = new AccessToken(consumer.getToken(),
consumer.getTokenSecret());

// initialize Twitter4J
twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
twitter.setOAuthAccessToken(a);

// create a tweet
Date d = new Date(System.currentTimeMillis());
String tweet = "#OAuth working! " + d.toLocaleString();

// send the tweet
twitter.updateStatus(tweet);

// feedback for the user...
tweettx.setText(tweet);
Toast.makeText(this, tweet, Toast.LENGTH_LONG).show();
login.setVisibility(Button.GONE);

} catch (Exception e) {
Log.e(APP, e.getMessage());
Toast.makeText(this, e.getMessage(),
Toast.LENGTH_LONG).show();
}

}


}



Can you reply fast as its very urgent.




Thanks
Babita

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

2010-11-10 Thread swaps12
Hi,

I am trying to develop an app for which I want multiple screen
support. I have read the Android article on Best practices for
Multiple Screen Support. As per the article we have to follow 3
important things
1. Mention support for different screen sizes(large, medium and small)
and any density in AndroidManifest.xml.
2. Place images of 3 dpi's (120, 160, 240) in 3 folders res/ldpi, res/
mdpi and res/hdpi.
3. In layout's the dimension should be mentioned in "dip" units. Then
Android will take care of the scaling on its own.

I have implemented all these points in my project. The images are
picked up correctly from the appropriate folders. But the arrangements
of the controls in not same.
e.g. I ran the app on three emulators
1. Resolution 240*320 dpi 120.
2. Resolution 240*320 dpi 160.
3. Resolution 240*320 dpi 240.
(All the emulator have same resolution but different density. )

The problem is the position of the controls is not same on all the
three emulator. As per my understanding if the
android:layout_marginLeft and android:layout_marginTop are mentioned
in "dip" then this problem should not occur. As the density of the
emulator increases the controls get placed more towards the right.

Is it necessary that i provide layouts for all combinations of
dimensions and density i.e. in layout-small, layout-large, layout-
medium, layout-long,layout-notlong?

Am I missing some important point? Any help will be great.
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] not getting next image on clicking next button

2010-11-10 Thread Alok Upadhyay
Hi,
i have a nest button on clicking which a new image should be
displayed.But not happening so
i have taken an integer array as:
private int imageCounter = 0;
private int index_count = 0;
private ImageView imageView;
private int[] imageArray = {R.drawable.image_w_lbl_0,
R.drawable.image_w_lbl_1,};

//in oncreate i have done something like this:
public void onCreate(Bundle savedInstanceState)
{
setContentView(R.layout.frame0);//this one is the common parent
layout for all imageviews
super.onCreate(savedInstanceState);
imageView = new ImageView(this);

ImageButton next = (ImageButton) findViewById(R.id.next);
ImageButton back = (ImageButton) findViewById(R.id.back);
next.setOnClickListener(this);
back.setOnClickListener(this);

//show the default image
this.loadImage(imageArray[0]);

}

in onclick something like this:
int imagePath = 0;
// TODO Auto-generated method stub
switch (v.getId())
{
case R.id.next:
if(imageCounter < 25)
{

imagePath = imageArray[index_count];
}
index_count++;
imageCounter++;
break;
case R.id.back:
if(imageCounter > 0)
{
//imagePath =
}


break;

}

this.loadImage(imagePath);
//now i have loadImage method to load image into imageview

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


[android-developers] Re: Camera Callback onPreviewFrame

2010-11-10 Thread ko5tik
You should not rely on frame rate or exact timing of preview frames.
AFAIK they are not guaranted.

regards,

On Nov 10, 11:52 am, Maurizio Mento  wrote:
> Hi,
> I am working on an application in Android and I have to manipulate the
> data coming from the preview.
>
> I read that the default frame rate is 15fps.
> I measured the time from one call of the onPreviewFrame function and
> the next one and I noticed that I got different times depending on the
> size of the preview (at the moment no other operations are done in
> this function).
> How can it be possible?
> I thought it would be called at any frame so 15 times in a second
> (approximately every 66ms) independently of the previewFrameSize.
>
> Can someone help me please?
> Thank you!
> Maurizio

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


[android-developers] Detect language of text

2010-11-10 Thread alan lam
i am writing a dictonary apps.

i have some problem, hope here have some advance level developers to
help me.

1.  i want to detect the language of text
like i have a string a = "japanese"
pass string a into a function, return the language.
japanese than japanese,
english than english.
PS

is there any api or internal function i can use?

2. have you use any electronic dictionary before.
in the past , i can control the screen easily by lower level language.
i can highlight some word than cross search another dictionary.

but now what i can do is,
i have a button to turn on something.
then the user can highlight some word,
then the apps will copy the highlight word,
then user click the cross search button.

what i want to do is.
the user dont need to click button to turn on this function.
they can directly highlight the word then click the cross search.

Regards

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


[android-developers] select query problem.

2010-11-10 Thread pramod.deore
Hi ,

I have a table in that there is 2 columns. Now I want to retrieve the
value of one column using value of second column (Means suppose my
table name is roomtable. and it contains 2 columns as RoomID and
RoomName)

Now I know value of RoomName and I want to find out value of
RoomID. How to this?
I had tried using following but not succeed.

final String ROOM_TABLE_NAME = "roomtable";
sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE,
null);

sampleDB.execSQL("SELECT RoomID FROM " +ROOM_TABLE_NAME+"where
RoomName="+selectedRoom);

how to execute this query so I can get RoomID?
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: Finish multiple tasks (stacks)

2010-11-10 Thread Ganapathy.C
Use onActivityResult() method  in stack of activity then pass unique
result code to finish that activity..


On Nov 11, 7:08 am, Dianne Hackborn  wrote:
> You can't do this without programmatically getting all of your activities to
> call finish() (possible using CLEAR_TOP to reduce some of that), implying
> that they may need to be re-instantiated to be able to do so.
>
> What you are trying to do here isn't really how tasks are supposed to work.
>  The whole point of them is that they are entirely separate, unrelated
> things (basically applications).
>
> On Wed, Nov 10, 2010 at 3:22 PM, raukodraug 
> wrote:
>
>
>
>
>
>
>
>
>
> > Hi everyone,
> > I have an app that contains multiple tasks (stacks of activities).
> > I can jump from one to another with no problem, but when i finish a
> > task it goes to the previous stack. I would like to finish all stacks
> > whenever i finish one of them, because I want my application to
> > finish.
> > Does anyone have an idea on how to achieve this?
>
> > Cheers,
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To 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: How to override native dialog's theme ?

2010-11-10 Thread Kumar Bibek
I am not sure about this. But I guess, you will have to override the default
long click action and drop in your Custom context menu there and handle the
events.

On Tue, Nov 9, 2010 at 8:27 PM, Hatch  wrote:

> ah :(
> Yes. that's the native copy/paste dialog.
> So there is no way to resolve those parts that are gray/black on the
> posted image ?
> Then the themes aren't that flexible, are they ?
>
> Ok, can you give me a clue on how can to disable native copy/paste and
> replace it with custom ones ?
>
> Thank you for your input.
>
> Regards,
> Hatch
>
> On Nov 9, 2:44 pm, Kumar Bibek  wrote:
> > Are you referring  to the Copy Paste dialog that comes up when EditText
> is
> > long clicked? If that is the case, you will have to first disable the
> > default dialog and use your own custom dialog and implement the Copy
> Paste
> > functionality.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Nov 9, 2010 at 6:57 PM, Hatch 
> wrote:
> > > Here's how the native popup looks like:
> >
> > >http://postimage.org/image/t59v7udg/
> >
> > > Anyone has an idea on what I failed to override in the themes.xml
> > > (besides @color/background)
> >
> > > I am creating all my dialogs by hand to avoid this, and now I found
> > > out that simple coply/paste dialog will look ... well bad :)
> >
> > > Any hints ?
> >
> > > Cheers
> >
> > > Hatch
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To 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
> >
> > --
> > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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
>



-- 
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.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: issue with Edit Text

2010-11-10 Thread Kumar Bibek
Yup, Even I guess, it's a problem with eclipse's layout editor. It doesn't
render some things properly. On the device, it should work fine. It should
work fine on the emulator as well.

On Thu, Nov 11, 2010 at 11:36 AM, Kartik Bansal wrote:

> for alignment of text i am using android:gravity="center" in the
> edittext tag..
> issue is in eclipse preview.. not tried it on actual device..
>
>
> On Nov 11, 1:19 am, TreKing  wrote:
> > On Wed, Nov 10, 2010 at 8:39 AM, Kartik Bansal  >wrote:
> >
> > >  if i align the text then hint is not shown but if i remove the gravity
> tag
> > > for aligning text then it shows.
> >
> > What's the alignment?
> > Is this in the preview in Eclipse or when you actually run it?
> >
> >
> ---
> --
> > 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




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

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

[android-developers] Re: Inflate layouts with different density

2010-11-10 Thread swaps12
Hey,

Have you been able to solve this problem? Cos I am stuck with a
similar problem and I dont like the idea of having different .xml
files for different layout. Hence I wanted to know how a single .xml
file in /layout folder be useful for multiple screen with different
resolutions and density.

On Oct 22, 5:36 am, Weeds  wrote:
> Hi Daniel, thanks for your answer.
> Sorry, scaling may have been misleading a little bit, the best
> solution for me would be inflating that layout with high density.
> Maybe I should specify the layout a little more (actually I was wrong
> before, there is only one default layout, which is "scaled up" on the
> Galaxy Tab)
>
> It is a simple RealtiveLayout for a Game Menu, with an ImageView
> horizontally centered and below that are four ImageButtons in a 2x2
> group.
> So of course I could change the layout (or the resources it will use),
> but this will probably break the layout for default HVGA screens (as I
> would need larger images for the medium density version).
>
> So my current setup looks like that:
> /res/layout/screen.xml
> /res/drawable-mdpi/
> /res/drawable-hdpi/
>
> And I really don't like the idea to create something like res/layout-
> mdpi-1024x600 or res/drawable-mdpi-1024x600 (which would include the
> same graphics as the hdpi directory).
>
> Andre

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


[android-developers] Updated procfg.txt

2010-11-10 Thread Zsolt Vasvari
I had to add a couple of entries to my procfg.txt.  These are not
specific to my app and should really be part of what Google recommends
as the default configuration.


The first line excludes all classes that derived from Preference as
these are referenced by name in the preference screen configuration
XML documents:

-keep public class * extends android.preference.Preference



The other one excludes the Parcelable creator which is special class
and probably found via reflection by Android:

-keepclassmembers class * {
public static android.os.Parcelable$Creator CREATOR;
}


Hope these are useful for some developers.

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


[android-developers] Re: The best way to download webpage and parse it into simple UI

2010-11-10 Thread fernando
That would be slw, unless the parser and renderer are native as
the webkit is for the webview

On Nov 10, 8:48 pm, TreKing  wrote:
> On Wed, Nov 10, 2010 at 3:02 AM, SHADOW-XIII  wrote:
> > Question is: is there a better/faster/easier way to pull the source of
> > webpage (or part of it)?
>
> Possibly better / easier but probably not faster, but there are various HTML
> parsers out there that will parse HTML and make it easier to transverse.
> Just google for Java HTML parser and you'll find a few.
>
> --- 
> --
> 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: issue with Edit Text

2010-11-10 Thread Kartik Bansal
for alignment of text i am using android:gravity="center" in the
edittext tag..
issue is in eclipse preview.. not tried it on actual device..


On Nov 11, 1:19 am, TreKing  wrote:
> On Wed, Nov 10, 2010 at 8:39 AM, Kartik Bansal wrote:
>
> >  if i align the text then hint is not shown but if i remove the gravity tag
> > for aligning text then it shows.
>
> What's the alignment?
> Is this in the preview in Eclipse or when you actually run it?
>
> --- 
> --
> 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] android edittext

2010-11-10 Thread yanamala siddaiah
In editText if digits size is large that means .Here print specified
length of digits and remain will show only dots (.).

How to achieve this problem pls .

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


[android-developers] drawing views on top

2010-11-10 Thread kavitha b
Hi All,

I am trying to draw a custom view extending linearlayout and put a
scrollview within that.

I should be able to draw objects on top of scrollview.

But the views which i draw are drawing down the scrollview.It is not drawing
on top layer of scrollview.

I tried with framelayout.But it is not drawing down of scrollview only.

How to make it to draw on top?

I tried using FrameLayout.But still same problem.

Please help.It is very urgent.

I have attached code for your reference.

main.xml
-
http://schemas.android.com/apk/res/android";

android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mylayout"
>

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

android:layout_width="fill_parent"
android:layout_height="fill_parent"
>


 








  


TransparentPanel.java
--
public class TransparentPanel extends LinearLayout {



 private static Vector squares;
private static Vector tiles;
private static Tile movingTile=null;

private PainttouchPaint;

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

public TransparentPanel(Context context) {
super(context);
init(context);
}

private void init(Context context)
{

 squares=Util.generateBoardSquares();
 tiles=Util.generateTiles(context);


}

@Override
public boolean onTouchEvent(MotionEvent event)
{

System.out.println(event.getY());
int x=(int) event.getX();
int y=(int) event.getY();


if(event.getAction() == MotionEvent.ACTION_DOWN){
for(int i=0;ihttp://groups.google.com/group/android-developers?hl=en

Re: [android-developers] nest custom views

2010-11-10 Thread kavitha b
Hi Kostya,

Thanks for reply.

I tried that and it is working.

But the views which i draw are drawing down the scrollview.It is not drawing
on top layer of scrollview.

I tried with framelayout.But it is not drawing down of scrollview only.

How to make it to draw on top?

I tried using FrameLayout.But still same problem.

Please help.It is very urgent.

I have attached code for your reference.

main.xml
-
http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mylayout"
>

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

android:layout_width="fill_parent"
android:layout_height="fill_parent"
>


 








  


TransparentPanel.java
--
public class TransparentPanel extends LinearLayout {



 private static Vector squares;
private static Vector tiles;
private static Tile movingTile=null;

private PainttouchPaint;

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

public TransparentPanel(Context context) {
super(context);
init(context);
}

private void init(Context context)
{

 squares=Util.generateBoardSquares();
 tiles=Util.generateTiles(context);

}

@Override
public boolean onTouchEvent(MotionEvent event)
{

System.out.println(event.getY());
int x=(int) event.getX();
int y=(int) event.getY();

if(event.getAction() == MotionEvent.ACTION_DOWN){
for(int i=0;i

>  Kavitha,
>
> If your intent is to let the user drag and drop game pieces from the bottom
> portion of the screen to the game grid, then:
>
> Implement a view that subclasses ViewGroup (possibly one of its subclasses,
> such as RelativeLayout or LinearLayout). Handle touch and drag events in
> that view.
>
> Specify a transparent background for this view group so it's invisible, and
> put your current views inside this one.
>
> This is how you can implement drag-and-drop that crosses the boundaries of
> individual views.
>
> http://developer.android.com/guide/topics/ui/custom-components.html
>
> -- Kostya
>
> 10.11.2010 20:42, kavitha b пишет:
>
>
>
> -- Forwarded message --
> From: kavitha b 
> Date: 2010/11/10
> Subject: Re: [android-developers] nest custom views
> To: android-developers@googlegroups.com
>
>
> Hi Kumar,
>
> my requirement is
>
> I have a custom scrollview where i am scrolling a image.
> That fills up half screen.
>
> I want to move images upon entire screen,including upon custom scrollview
> also.
>
> I cannot draw bitmaps using onDraw() because I cannot draw in entire
> screen.
>
> How to move images now.
>
> I wiill attach screenshot also for refernce.I want to move lettered tiles
> upon board and board is scrollview here.
>
> My code is:
>
> public class HorizoontalScroll extends Activity implements
> OnGestureListener
> {
>
> private static Vector squares;
> private static Vector tiles;
> private Tile tile;
>
>
>
>
>
>
> @Override
> public void onCreate(Bundle savedInstanceState)
> {
> super.onCreate(savedInstanceState);
>
>
> setContentView(R.layout.main);
>
> squares=Util.generateBoardSquares();
> tiles=Util.generateTiles(this);
>
>
>
>
> }
>
> }
>
>
> main.xml looks like this
>
> http://schemas.android.com/apk/res/android";
> android:orientation="vertical"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> android:id="@+id/mylayout"
> >
>  android:id = "@+id/scrollView"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
>
> />
> 
>
>
> And ScrollImageView.java
> public class ScrollImageView extends View {
>  private final int DEFAULT_PADDING = 0;
>  private Display mDisplay;
>  private Bitmap mImage;
>  private Bitmap mTile;
>
>
>  /* Current x and y of the touch */
>  private float mCurrentX = 0;
>  private float mCurrentY = 0;
>
>
>  private float mTotalX = 0;
>  private float mTotalY = 0;
>
>  /* The touch distance change from the current touch */
>  private float mDeltaX = 0;
>  private float mDeltaY = 0;
>
>
>  int mDisplayWidth;
>  int mDisplayHeight;
>  int mPadding;
>
>
>  public ScrollImageView(Context context) {
>  super(context);
>  initScrollImageView(context);
>  }
>  public ScrollImageView(Context context, AttributeSet attributeSet) {
>  super(context);
>  initScrollImageView(context);
>  }
>
>  private void initScrollImageView(Context context) {
>  mDisplay =
> ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
>  mPadding = DEFAULT_PADDING;
>  mImage=BitmapFact

Re: [android-developers] From emulator to real device

2010-11-10 Thread Kumar Bibek
Can you provide some more details? As to what are you trying to do?

On Thu, Nov 11, 2010 at 10:53 AM, kypriakos  wrote:

>
> HI all,
>
> I can run the app on the emulator without issues - when I run it on a
> real device
> I get the exception that certain classes are not found (see below for
> exception).
> I am sure this is a loaded question and I know an emulator is not a
> real device
> and many things can alter their behavior during this transition but
> loading classes
> seems a bit fundamental - any ideas? Perms and everything else in the
> corresponding
> directories are identical. I am just wondering if anyone else has
> seen  similar
> issue before and if they have any hints as to what to look for -
> thanks again
>
> I/System.out(  297): P2PA - ## - fatal error : group creation
> failure
> W/System.err(  297): exception.PeerGroupException: Could not locate
> World PeerGroup Module Implementation.
>
> com.p2pSOAAndroidP2PA_16.P2PA.PeerToPeerAdapter.main(PeerToPeerAdapter.java:
> 808)
> W/System.err(  297):at
>
> com.p2pSOAAndroidP2PA_16.p2pSOAAndroidP2PA_16.onCreate(p2pSOAAndroidP2PA_16.java:
> 124)
> W/System.err(  297):at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1123)
> W/System.err(  297):at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2364)
> W/System.err(  297):at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2417)
> W/System.err(  297):at android.app.ActivityThread.access
> $2100(ActivityThread.java:116)
> W/System.err(  297):at android.app.ActivityThread
> $H.handleMessage(ActivityThread.java:1794)
> W/System.err(  297):at
> android.os.Handler.dispatchMessage(Handler.java:99)
> W/System.err(  297):at android.os.Looper.loop(Looper.java:123)
> W/System.err(  297):at
> android.app.ActivityThread.main(ActivityThread.java:4203)
> W/System.err(  297):at
> java.lang.reflect.Method.invokeNative(Native Method)
> W/System.err(  297):at java.lang.reflect.Method.invoke(Method.java:
> 521)
> W/System.err(  297):at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:791)
> W/System.err(  297):at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
> W/System.err(  297):at dalvik.system.NativeStart.main(Native
> Method)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




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

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

[android-developers] From emulator to real device

2010-11-10 Thread kypriakos

HI all,

I can run the app on the emulator without issues - when I run it on a
real device
I get the exception that certain classes are not found (see below for
exception).
I am sure this is a loaded question and I know an emulator is not a
real device
and many things can alter their behavior during this transition but
loading classes
seems a bit fundamental - any ideas? Perms and everything else in the
corresponding
directories are identical. I am just wondering if anyone else has
seen  similar
issue before and if they have any hints as to what to look for -
thanks again

I/System.out(  297): P2PA - ## - fatal error : group creation
failure
W/System.err(  297): exception.PeerGroupException: Could not locate
World PeerGroup Module Implementation.
com.p2pSOAAndroidP2PA_16.P2PA.PeerToPeerAdapter.main(PeerToPeerAdapter.java:
808)
W/System.err(  297):at
com.p2pSOAAndroidP2PA_16.p2pSOAAndroidP2PA_16.onCreate(p2pSOAAndroidP2PA_16.java:
124)
W/System.err(  297):at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
W/System.err(  297):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
W/System.err(  297):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
W/System.err(  297):at android.app.ActivityThread.access
$2100(ActivityThread.java:116)
W/System.err(  297):at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1794)
W/System.err(  297):at
android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(  297):at android.os.Looper.loop(Looper.java:123)
W/System.err(  297):at
android.app.ActivityThread.main(ActivityThread.java:4203)
W/System.err(  297):at
java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(  297):at java.lang.reflect.Method.invoke(Method.java:
521)
W/System.err(  297):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(  297):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
W/System.err(  297):at dalvik.system.NativeStart.main(Native
Method)

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


[android-developers] Re: Downloading Problem

2010-11-10 Thread Android Humanoid
The code is working fine for the links that I got from internet,

Hi Kostya Vasilyev ,

The problem is same even with DefaultHttpClient.

On Nov 11, 10:16 am, Android Humanoid  wrote:
> Hi Bob Kerns,
>
> I'm not using any browser dependent code in my application, I'm just
> sending the request from the business logic.
>
> Hi catalin Braica,
>
> The length of the content that am getting is -1, The server is ours
> only, so I asked the server persons to look into the logs what exactly
> logged, They informed that
> there is nothing logged, Is there any chance for android to change
> url, because, the same url is working on desktop.
> On Nov 10, 3:29 pm, Catalin Braica  wrote:
>
> > Hello
>
> > Shouldn't you be testing for the HTTP status code ? Just a quick example:
> > you can get zero-byte content in case of a redirect from the part of the
> > server (3xx status code). In this case I see there is a flag to
> > automatically follow redirects (HTTPUrlConnection.instanceFollowRedirects),
> > but I don't see that you set it.
> > But in all cases you need to test the HTTP status code.
>
> > Just my 2 cents
>
> > On Wed, Nov 10, 2010 at 5:46 AM, Android Humanoid 
> > wrote:
>
> > > No... nothing in logcat, download competed in 0sec am getting, but
> > > there is nothing in thefile.
>
> > > On Nov 9, 2:21 pm, Kumar Bibek  wrote:
> > > > What is theproblem? Any exceptions/errors in our logcat?
>
> > > > On Tue, Nov 9, 2010 at 2:33 PM, Android Humanoid  > > >wrote:
>
> > > > > Hi All,
>
> > > > > The following is the code that am using to download afilefrom the
> > > > > web server on android mobile,
>
> > > > > imageURL="http://rokon.googlecode.com/files/rokon_src_2-0-3.zip";;
>
> > > > > try {
> > > > >                URL url = new URL(imageURL); //you can write here any
> > > > > link
>
> > > > >                Filefile= newFile(fileName);
>
> > > > >                long startTime = System.currentTimeMillis();
> > > > >                Log.i("DownloadManager", "download begining");
> > > > >                Log.i("DownloadManager", "download url:" + url);
> > > > >                Log.i("DownloadManager", "downloadedfilename:" +
> > > > > fileName);
>
> > > > >                /* Open a connection to that URL. */
>
> > > > >                URLConnection ucon = url.openConnection();
>
> > > > >                /*
> > > > >                 * Define InputStreams to read from the URLConnection.
> > > > >                 *
> > > > >                 */
>
> > > > >                InputStream is = ucon.getInputStream();
> > > > >                BufferedInputStream bis = new BufferedInputStream(is);
>
> > > > >                /*
> > > > >                 * Read bytes to the Buffer until there is nothing
> > > > > more to read(-1).
> > > > >                 */
>
> > > > >                ByteArrayBuffer baf = new ByteArrayBuffer(50);
> > > > >                int current = 0;
> > > > >                while ((current = bis.read()) != -1) {
> > > > >                        baf.append((byte) current);
> > > > >                }
>
> > > > >                /* Convert the Bytes read to a String. */
>
> > > > >                FileOutputStream fos = new FileOutputStream(PATH
> > > > > +file);
> > > > >                fos.write(baf.toByteArray());
> > > > >                fos.close();
> > > > >                Log.i("DownloadManager", "download ready in" +
> > > > > ((System.currentTimeMillis() - startTime) / 1000)+ " sec");
>
> > > > >        }
> > > > >        catch (IOException e) {
> > > > >                Log.e("DownloadManager", "IOException: " + e);
> > > > >        }
> > > > >        catch(Exception ex)
> > > > >        {
> > > > >                Log.e("DownloadManager", "Exception: " + ex);
> > > > >        }
>
> > > > > this code is working fine for the above imageURL string, but when i
> > > > > replace the url with the web server that am accessing then it is
> > > > > givingproblem. can anyone help me in this..
>
> > > > > Thanks&Regards.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscr...@googlegroups.com
> > > 
>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are 

[android-developers] Re: Downloading Problem

2010-11-10 Thread Android Humanoid
Hi Bob Kerns,

I'm not using any browser dependent code in my application, I'm just
sending the request from the business logic.

Hi catalin Braica,

The length of the content that am getting is -1, The server is ours
only, so I asked the server persons to look into the logs what exactly
logged, They informed that
there is nothing logged, Is there any chance for android to change
url, because, the same url is working on desktop.
On Nov 10, 3:29 pm, Catalin Braica  wrote:
> Hello
>
> Shouldn't you be testing for the HTTP status code ? Just a quick example:
> you can get zero-byte content in case of a redirect from the part of the
> server (3xx status code). In this case I see there is a flag to
> automatically follow redirects (HTTPUrlConnection.instanceFollowRedirects),
> but I don't see that you set it.
> But in all cases you need to test the HTTP status code.
>
> Just my 2 cents
>
> On Wed, Nov 10, 2010 at 5:46 AM, Android Humanoid 
> wrote:
>
> > No... nothing in logcat, download competed in 0sec am getting, but
> > there is nothing in the file.
>
> > On Nov 9, 2:21 pm, Kumar Bibek  wrote:
> > > What is the problem? Any exceptions/errors in our logcat?
>
> > > On Tue, Nov 9, 2010 at 2:33 PM, Android Humanoid  > >wrote:
>
> > > > Hi All,
>
> > > > The following is the code that am using to download a file from the
> > > > web server on android mobile,
>
> > > > imageURL="http://rokon.googlecode.com/files/rokon_src_2-0-3.zip";;
>
> > > > try {
> > > >                URL url = new URL(imageURL); //you can write here any
> > > > link
>
> > > >                File file = new File(fileName);
>
> > > >                long startTime = System.currentTimeMillis();
> > > >                Log.i("DownloadManager", "download begining");
> > > >                Log.i("DownloadManager", "download url:" + url);
> > > >                Log.i("DownloadManager", "downloaded file name:" +
> > > > fileName);
>
> > > >                /* Open a connection to that URL. */
>
> > > >                URLConnection ucon = url.openConnection();
>
> > > >                /*
> > > >                 * Define InputStreams to read from the URLConnection.
> > > >                 *
> > > >                 */
>
> > > >                InputStream is = ucon.getInputStream();
> > > >                BufferedInputStream bis = new BufferedInputStream(is);
>
> > > >                /*
> > > >                 * Read bytes to the Buffer until there is nothing
> > > > more to read(-1).
> > > >                 */
>
> > > >                ByteArrayBuffer baf = new ByteArrayBuffer(50);
> > > >                int current = 0;
> > > >                while ((current = bis.read()) != -1) {
> > > >                        baf.append((byte) current);
> > > >                }
>
> > > >                /* Convert the Bytes read to a String. */
>
> > > >                FileOutputStream fos = new FileOutputStream(PATH
> > > > +file);
> > > >                fos.write(baf.toByteArray());
> > > >                fos.close();
> > > >                Log.i("DownloadManager", "download ready in" +
> > > > ((System.currentTimeMillis() - startTime) / 1000)+ " sec");
>
> > > >        }
> > > >        catch (IOException e) {
> > > >                Log.e("DownloadManager", "IOException: " + e);
> > > >        }
> > > >        catch(Exception ex)
> > > >        {
> > > >                Log.e("DownloadManager", "Exception: " + ex);
> > > >        }
>
> > > > this code is working fine for the above imageURL string, but when i
> > > > replace the url with the web server that am accessing then it is
> > > > giving problem. can anyone help me in this..
>
> > > > Thanks&Regards.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > 
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: How to change network service permission without modifying init.rc file

2010-11-10 Thread chandra shekar
My application speaks to JNI interface which has some socket connection
written in C to talk to the underlined Hardware. I am starting some network
service in order to make my application work since its dependent on it. so
in order to do that my application doesnt support talking to such services
unless untill you explictly change the permission. Its working if i do it
from init.rc. But I dont want to do that I want some way I can change the
permission without modifying init.rc. Please let me know if der is any
alternatives.

Regards,
chandrashekar

On Wed, Nov 10, 2010 at 4:18 AM, FrankG  wrote:

> This will not help, because it requires the platform key.
> And he said that he will not run his app as root.
>
>
> On 9 Nov., 04:13, gujian  wrote:
> > You can try to add "android:sharedUserId='android.uid.system'" to
> > AndroidManifest.xml.
> >
> > 2010/11/8 chandu 
> >
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] The best way to download webpage and parse it into simple UI

2010-11-10 Thread TreKing
On Wed, Nov 10, 2010 at 3:02 AM, SHADOW-XIII  wrote:

> Question is: is there a better/faster/easier way to pull the source of
> webpage (or part of it)?
>

Possibly better / easier but probably not faster, but there are various HTML
parsers out there that will parse HTML and make it easier to transverse.
Just google for Java HTML parser and you'll find a few.

-
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] standard power widget icons

2010-11-10 Thread Dianne Hackborn
It is implemented in the settings app.

On Wed, Nov 10, 2010 at 4:03 PM, Hendrik Greving wrote:

> I am talking about the power control widget that comes free with android
> since android 1.6.
>
> - Original Message - From: "Kostya Vasilyev" 
>
> To: 
> Sent: Wednesday, November 10, 2010 1:03 PM
>
> Subject: Re: [android-developers] standard power widget icons
>
>
> Hendrik,
>
> Power Control Plus is a commercial project, and I don't see a link to
> download their source:
>
> http://www.siriusapplications.com/powercontrolplus/
>
> -- Kostya
>
> 10.11.2010 23:27, Mark Murphy пишет:
>
>> Maybe in Launcher2.
>>
>> On Wed, Nov 10, 2010 at 2:51 PM, Hendrik Greving
>> wrote:
>>
>>> I am looking for the buttons or icon images of the power control widget
>>> (wireless, bluetooth, gps, sync and display brightness). Couldn't find it
>>> in
>>> there. Are they open source and available at source.android.com by any
>>> chance?
>>>
>>> - Original Message - From: "Mark Murphy">> >
>>> To:
>>> Sent: Wednesday, November 10, 2010 4:02 AM
>>> Subject: Re: [android-developers] standard power widget icons
>>>
>>>
>>>  I have no idea what "the standard power control widget icons" are.
 However, all icons that are part of the SDK can be found in:

 $ANDROID_HOME/platforms/$SDK/data/res

 where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
 is some platform version (e.g., android-8).

 If the icons you seek are not there, then try http://source.android.com
 .

 On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Greving
 wrote:

> Does anybody know where to get the standard power control widget icons
> from?
>
 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 3.0.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

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>>
>>
>>
>
> --
> Kostya Vasilyev -- 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
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: AlarmManager starting service, API Level?

2010-11-10 Thread Dianne Hackborn
On Wed, Nov 10, 2010 at 6:13 PM, Mark Murphy wrote:

> As soon as all y'all want to make my WakefulIntentService obsolete,
> though, go right ahead. Please don't hold back on my account. :-)
>

It's been something I've really wanted to do for over a year.  Some day, but
too many higher priority things so far. :/

-- 
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: AlarmManager starting service, API Level?

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 9:05 PM, Dianne Hackborn  wrote:
> Note that currently the alarm manager WILL NOT hold a wake lock for
> sufficient time when starting a service, so if you are using a wake up alarm
> you must go through a receive and do a fun dance with wake locks.

Yeah, that's what I thought. I hadn't checked the implementation
recently. Thanks!

As soon as all y'all want to make my WakefulIntentService obsolete,
though, go right ahead. Please don't hold back on my account. :-)

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

_Android Programming Tutorials_ Version 3.0.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] How to detect that Force Stop was called

2010-11-10 Thread Dianne Hackborn
Sorry, by design there is no way at all.

On Wed, Nov 10, 2010 at 6:07 PM, kl4232  wrote:

> Is there any way for a process to detect that its being stopped as a
> result of the user going to Settings->Applications->Manage
> Applications->My App->Force Stop?
> I see onDestroy() isnt being called under those circumstances.
> 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
>



-- 
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] Finish multiple tasks (stacks)

2010-11-10 Thread Dianne Hackborn
You can't do this without programmatically getting all of your activities to
call finish() (possible using CLEAR_TOP to reduce some of that), implying
that they may need to be re-instantiated to be able to do so.

What you are trying to do here isn't really how tasks are supposed to work.
 The whole point of them is that they are entirely separate, unrelated
things (basically applications).

On Wed, Nov 10, 2010 at 3:22 PM, raukodraug wrote:

> Hi everyone,
> I have an app that contains multiple tasks (stacks of activities).
> I can jump from one to another with no problem, but when i finish a
> task it goes to the previous stack. I would like to finish all stacks
> whenever i finish one of them, because I want my application to
> finish.
> Does anyone have an idea on how to achieve this?
>
> Cheers,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] How to detect that Force Stop was called

2010-11-10 Thread kl4232
Is there any way for a process to detect that its being stopped as a
result of the user going to Settings->Applications->Manage
Applications->My App->Force Stop?
I see onDestroy() isnt being called under those circumstances.
Thanks

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


Re: [android-developers] Re: AlarmManager starting service, API Level?

2010-11-10 Thread Dianne Hackborn
Note that currently the alarm manager WILL NOT hold a wake lock for
sufficient time when starting a service, so if you are using a wake up alarm
you must go through a receive and do a fun dance with wake locks.

On Wed, Nov 10, 2010 at 4:39 PM, Henrik Lindqvist <
henrik.lindqv...@gmail.com> wrote:

> Thank. I'll sleep well tonight knowing raptors are extinct.
>
> On Nov 11, 1:30 am, Mark Murphy  wrote:
> > On Wed, Nov 10, 2010 at 7:27 PM, Henrik Lindqvist
> >
> >  wrote:
> > > Thanks. I'am using the AlarmManager to send PendingIntent.getService
> > > with a "Explicit Intent" to an IntentService.
> >
> > > Read this post from July 2008:
> >
> > > "The "Alarm Service" sample code in ApiDemos at
> > >http://code.google.com/android/samples/ApiDemos/src/com/google/androi.
> ..
> > > is intended to provide the best practices for this.  The current
> > > example is a little overly complex because of the need of the
> > > intermediate receiver.  In a future SDK where you can have the alarm
> > > manager directly start a service, this is a lot cleaner."
> >
> > July of 2008 is the Jurassic era of Android development. Personally, I
> > was nearly eaten by a raptor.
> >
> > :-)
> >
> > Seriously, that would have been the Android M5 pre-release. Anything
> > older than, say, October 2008 should be viewed with a bit of
> > skepticism.
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
> >
> > _Android Programming Tutorials_ Version 3.0.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: Obfuscation/optimization causing error?

2010-11-10 Thread Zsolt Vasvari
Ok thanks.  But why does this seem to happen infrequently?

I cannot duplicate it at all when running the same obfuscated app on
my Nexus One phone.





On Nov 10, 4:02 pm, maxmpz  wrote:
> This one can be caused by obfuscating the CREATOR field used for
> saving/loading widget state.

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


[android-developers] Stop AlarmManager sending past repeating alarm.

2010-11-10 Thread Henrik Lindqvist
When the device awakens from sleep state the AlarmManager sends all
"missed" alarms. Can I prevent this from happening, grouping past
alarm to a single intent instead?

There is an intent extra "android.intent.extra.ALARM_COUNT" which
seems to suggest it's possible?

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


[android-developers] Re: AlarmManager starting service, API Level?

2010-11-10 Thread Henrik Lindqvist
Thank. I'll sleep well tonight knowing raptors are extinct.

On Nov 11, 1:30 am, Mark Murphy  wrote:
> On Wed, Nov 10, 2010 at 7:27 PM, Henrik Lindqvist
>
>  wrote:
> > Thanks. I'am using the AlarmManager to send PendingIntent.getService
> > with a "Explicit Intent" to an IntentService.
>
> > Read this post from July 2008:
>
> > "The "Alarm Service" sample code in ApiDemos at
> >http://code.google.com/android/samples/ApiDemos/src/com/google/androi...
> > is intended to provide the best practices for this.  The current
> > example is a little overly complex because of the need of the
> > intermediate receiver.  In a future SDK where you can have the alarm
> > manager directly start a service, this is a lot cleaner."
>
> July of 2008 is the Jurassic era of Android development. Personally, I
> was nearly eaten by a raptor.
>
> :-)
>
> Seriously, that would have been the Android M5 pre-release. Anything
> older than, say, October 2008 should be viewed with a bit of
> skepticism.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 3.0.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: AlarmManager starting service, API Level?

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 7:27 PM, Henrik Lindqvist
 wrote:
> Thanks. I'am using the AlarmManager to send PendingIntent.getService
> with a "Explicit Intent" to an IntentService.
>
> Read this post from July 2008:
>
> "The "Alarm Service" sample code in ApiDemos at
> http://code.google.com/android/samples/ApiDemos/src/com/google/androi...
> is intended to provide the best practices for this.  The current
> example is a little overly complex because of the need of the
> intermediate receiver.  In a future SDK where you can have the alarm
> manager directly start a service, this is a lot cleaner."

July of 2008 is the Jurassic era of Android development. Personally, I
was nearly eaten by a raptor.

:-)

Seriously, that would have been the Android M5 pre-release. Anything
older than, say, October 2008 should be viewed with a bit of
skepticism.

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

_Android Programming Tutorials_ Version 3.0.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: "Local" Service vs "Remote" Service

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 7:17 PM, William Ferguson
 wrote:
> But if using Thread.setDefaultUncaughtExceptionHandler() actually
> stops the force close then there is opportunity to dispatch the crash
> report since the app won't be destroyed. Whether the crash dispatch
> happens in the app process or another process is irrelevant.

Correct. If you catch the unhandled exception yourself, none of the
automated stuff (force close dialog, etc.) kicks in. It is up to you
how to deal with it. I'd always try reporting it, assuming you're
hooked up to a system to do that. After that, the strategy is up to
you: just continue along, finish()/stopSelf() the offending component,
System.exit() to blow away the process, etc. Similarly, it's up to you
how you inform the user about what transpired (dialog, toast,
nothing).

> And yes, I was only imagining having the 2nd process exist briefly.
> Something like an IntentService solely tasked with dispatching the
> crash and handling disconnection and other dispatch failures. But that
> doesn't seem as relevant now.
>
> Am I back on track?

Yup. And you probably weren't all that far off the track originally --
I was overreacting. I too am short of sleep. My apologies.

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

_Android Programming Tutorials_ Version 3.0.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: AlarmManager starting service, API Level?

2010-11-10 Thread Henrik Lindqvist
Thanks. I'am using the AlarmManager to send PendingIntent.getService
with a "Explicit Intent" to an IntentService.

Read this post from July 2008:

"The "Alarm Service" sample code in ApiDemos at
http://code.google.com/android/samples/ApiDemos/src/com/google/androi...
is intended to provide the best practices for this.  The current
example is a little overly complex because of the need of the
intermediate receiver.  In a future SDK where you can have the alarm
manager directly start a service, this is a lot cleaner."



On Nov 11, 1:10 am, Mark Murphy  wrote:
> On Wed, Nov 10, 2010 at 7:00 PM, Henrik Lindqvist
>
>  wrote:
> > I've read comment that the AlarmManager in a earlier API version
> > couldn't start services. Prior to which API Level was that?
>
> I don't know where you read that. PendingIntents have been able to
> start services since the beginning.
>
> I am a bit nervous about how WakeLocks work when starting a service
> directly versus going through a BroadcastReceiver, but otherwise
> AlarmManager starting services works like a champ. It's great for app
> widgets, if you have an IntentService that is doing the updates and
> you are controlling the update schedule yourself rather than using
> android:updatePeriodMillis, for example.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 3.0.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: "Local" Service vs "Remote" Service

2010-11-10 Thread William Ferguson
Sorry, I may have muddled several concepts here .. I'll blame lack of
sleep.

I was thinking that a RuntimeException force closes an app and that
there is limited opportunity to capture the failure (pre Froyo) before
the app is destroyed.

But if using Thread.setDefaultUncaughtExceptionHandler() actually
stops the force close then there is opportunity to dispatch the crash
report since the app won't be destroyed. Whether the crash dispatch
happens in the app process or another process is irrelevant.

And yes, I was only imagining having the 2nd process exist briefly.
Something like an IntentService solely tasked with dispatching the
crash and handling disconnection and other dispatch failures. But that
doesn't seem as relevant now.

Am I back on track?


On Nov 11, 9:56 am, Mark Murphy  wrote:
>
> Your strategy only makes sense if you feel that your "failed process"
> will be able to successfully do IPC to start a service to report the
> exception and *not* successfully be able to report the exception
> itself. I am dubious that this is the case. If your process truly is
> failed, neither will work. I think both will work, in which case why
> add the overhead and complexity?
>
> In the end, though, this isn't a huge deal...*if* your proposed
> crash-reporting service isn't running all of the time. Saying there's
> a 2nd process briefly is one thing -- having a long-lived service
> chewing up a 2nd process is another matter entirely. We still have too
> many devices with too little RAM to be using that sort of technique
> today.
>
> --
> 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.2 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] AlarmManager starting service, API Level?

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 7:00 PM, Henrik Lindqvist
 wrote:
> I've read comment that the AlarmManager in a earlier API version
> couldn't start services. Prior to which API Level was that?

I don't know where you read that. PendingIntents have been able to
start services since the beginning.

I am a bit nervous about how WakeLocks work when starting a service
directly versus going through a BroadcastReceiver, but otherwise
AlarmManager starting services works like a champ. It's great for app
widgets, if you have an IntentService that is doing the updates and
you are controlling the update schedule yourself rather than using
android:updatePeriodMillis, for example.

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

_Android Programming Tutorials_ Version 3.0.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] standard power widget icons

2010-11-10 Thread Hendrik Greving
I am talking about the power control widget that comes free with android 
since android 1.6.


- Original Message - 
From: "Kostya Vasilyev" 

To: 
Sent: Wednesday, November 10, 2010 1:03 PM
Subject: Re: [android-developers] standard power widget icons


Hendrik,

Power Control Plus is a commercial project, and I don't see a link to
download their source:

http://www.siriusapplications.com/powercontrolplus/

-- Kostya

10.11.2010 23:27, Mark Murphy пишет:

Maybe in Launcher2.

On Wed, Nov 10, 2010 at 2:51 PM, Hendrik Greving 
wrote:

I am looking for the buttons or icon images of the power control widget
(wireless, bluetooth, gps, sync and display brightness). Couldn't find it 
in

there. Are they open source and available at source.android.com by any
chance?

- Original Message - From: "Mark Murphy"
To:
Sent: Wednesday, November 10, 2010 4:02 AM
Subject: Re: [android-developers] standard power widget icons



I have no idea what "the standard power control widget icons" are.
However, all icons that are part of the SDK can be found in:

$ANDROID_HOME/platforms/$SDK/data/res

where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
is some platform version (e.g., android-8).

If the icons you seek are not there, then try http://source.android.com.

On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Greving
wrote:

Does anybody know where to get the standard power control widget icons
from?

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

_Android Programming Tutorials_ Version 3.0.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

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







--
Kostya Vasilyev -- 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 


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


[android-developers] AlarmManager starting service, API Level?

2010-11-10 Thread Henrik Lindqvist
I've read comment that the AlarmManager in a earlier API version
couldn't start services. Prior to which API Level was that?

I'am currently testing in the emulator with API Level 4 and it start a
service just fine.

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

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 6:41 PM, William Ferguson
 wrote:
> Mark, as I noted above, the reason I think a remote process is a valid
> solution here is to ensure that the crash info is actually sent. I
> wouldn't rely upon the failed process to send that data.

Your strategy only makes sense if you feel that your "failed process"
will be able to successfully do IPC to start a service to report the
exception and *not* successfully be able to report the exception
itself. I am dubious that this is the case. If your process truly is
failed, neither will work. I think both will work, in which case why
add the overhead and complexity?

In the end, though, this isn't a huge deal...*if* your proposed
crash-reporting service isn't running all of the time. Saying there's
a 2nd process briefly is one thing -- having a long-lived service
chewing up a 2nd process is another matter entirely. We still have too
many devices with too little RAM to be using that sort of technique
today.

-- 
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.2 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: "Local" Service vs "Remote" Service

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 6:38 PM, William Ferguson
 wrote:
> rather than relying on a process that is already in a bad state and is
> trying to destroy itself.

The process is not in a bad state. Some piece of your code is in a bad state.

> That way the process that is responsible for
> sending the crash info can handle all the flows associated with a
> remote connection without being constrained by immediate destruction
> or UI responsiveness.

The process will not be destroyed, because your code is running and no
components have been destroyed. The UI is no more a factor for
reporting an unhandled exception than it is for anything else.

> Mark, as I noted above, the reason I think a remote process is a valid 
> solution here is to ensure that the
> crash info is actually sent.

I cannot disagree more.

> I wouldn't rely upon the failed process to send that data.

There is no failed process.

-- 
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.2 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: "Local" Service vs "Remote" Service

2010-11-10 Thread William Ferguson
Mark, as I noted above, the reason I think a remote process is a valid
solution here is to ensure that the crash info is actually sent. I
wouldn't rely upon the failed process to send that data.

I presume that is what the Froyo Exception logging (to Market) does,
but perhaps it just wings it.


On Nov 10, 9:58 pm, Mark Murphy  wrote:
> Personally, I would use Thread.setDefaultUncaughtExceptionHandler() to
> eliminate the force-close dialog and deal with the unexpected
> exception myself, such as logging it to a server. This does not
> require a remote process.
>
> On Wed, Nov 10, 2010 at 4:29 AM, Dianne Hackborn  wrote:
> > On Wed, Nov 10, 2010 at 1:25 AM, William Ferguson
> >  wrote:
>
> >> Um, I think the point that Lance was trying to make was that he won't
> >> actually know about the force close UNLESS he uses the remote service.
> >> But sure, once he knows about, then he could fix it.
>
> > If the user hits the report button, the crash information will be available
> > through market feedback.
> > If you are just catching the error to report it yourself, there wouldn't be
> > a crash dialog, so no button for the user to press to kill the app before
> > you are done.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 3.0.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: "Local" Service vs "Remote" Service

2010-11-10 Thread William Ferguson
Forgive if I have this wrong, but I thought the report button only
shows for Froyo and beyond.
I certainly don't see it on 2.1 on my GalaxyS.

If its for reporting the crash to oneself (as it seems to be - to
handle all Android versions), then handing it off to another process
to send the data to a remote site seems to be a practical solution,
rather than relying on a process that is already in a bad state and is
trying to destroy itself. That way the process that is responsible for
sending the crash info can handle all the flows associated with a
remote connection without being constrained by immediate destruction
or UI responsiveness.



On Nov 10, 7:29 pm, Dianne Hackborn  wrote:
> On Wed, Nov 10, 2010 at 1:25 AM, William Ferguson 
> gmail.com> wrote:
> > Um, I think the point that Lance was trying to make was that he won't
> > actually know about the force close UNLESS he uses the remote service.
> > But sure, once he knows about, then he could fix it.
>
> If the user hits the report button, the crash information will be available
> through market feedback.
>
> If you are just catching the error to report it yourself, there wouldn't be
> a crash dialog, so no button for the user to press to kill the app before
> you are done.
>
> --
> 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: French character encoding issues

2010-11-10 Thread Bob Kerns
Note that what Android documents as the behavior (including dependency
on a system property) is just one form of "you don't know what it will
do". The standard Java behavior is documented thus:

"Constructs a new String by decoding the specified array of bytes
using the platform's default charset. The length of the new String is
a function of the charset, and hence may not be equal to the length of
the byte array."

"The behavior of this constructor when the given bytes are not valid
in the default charset is unspecified. The CharsetDecoder class should
be used when more control over the decoding process is required."

Note how loosely-specified "the platform's default charset" is, and
even when Android narrows the behavior somewhat, it still leaves you
not knowing what to expect "file.encoding" to be set to, and what you
might break if you dared to change it!

This is indeed something that was a gaping flaw in the early history
of Java that they cleaned up later, in JDK 1.1. Which was a very long
time ago, but it's still causing problems.

I could never figure out what planet those hibyte variants originated
on. On ours, there is no way to use them to produce any correct
behavior, that isn't a completely useless special-case hack.

On Nov 10, 12:51 pm, Kostya Vasilyev  wrote:
> Good catch, Bob.
>
> You are right of course - I missed the lack of encoding parameter in the
> second call.
>
> The docs say this:
>
> http://developer.android.com/reference/java/lang/String.html#String(byte[])
>
> > Converts the byte array to a string using the default encoding as
> > specified by the file.encoding system property. If the system property
> > is not defined, the default encoding is ISO8859_1 (ISO-Latin-1). If
> > 8859-1 is not available, an ASCII encoding is used.
>
> Looks like the encoding is quite likely to be single-byte based, this is
> implied by the choice of ASCII (not UTF-8) as the fallback.
>
> Then there is the deprecated "public String (byte[] data, int high)", I
> see it as a failed attempt to fix things in a simple, but incorrect way.
>
> Overall, it looks like the designers of Java did not push for proper and
> consistent use of character encodings across the board when the language
> was still young.
>
> Over time, though, the Java standard library evolved to make consistent
> use of encodings, because only that is guaranteed to give correct results.
>
> -- Kostya
>
> 10.11.2010 20:36, Bob Kerns пишет:
>
>
>
>
>
>
>
>
>
> > It's clearly not logcat that's the issue here, because the two strings
> > output differently. He's expecting them to be the same for some
> > reason.
>
> > It just now occurs to me that he may be assuming that the the one-
> > argument version defaults to UTF-8; it defaults to *something*, but
> > something ill-specified that is probably never UTF-8. That's now now
> > it's worded, of course, but that's the effect.
>
> > I couldn't begin to tell you how many bugs I've tracked down and fixed
> > in people's code due to this.
>
> > On Nov 8, 12:19 pm, Kostya Vasilyev  wrote:
> >> I wouldn't count on logcat output to be always correct with respect to
> >> localization.
>
> >> What do you get if you use decoded strings in a TextView (for example)?
>
> >> -- Kostya
>
> >> 08.11.2010 19:46, Simon MacDonald пишет:
>
> >>> Hi all,
> >>> I'm wondering if I found a bug in Android.  When I run this code on my
> >>> laptop:
> >>> String myData = "hockey,marché,football";
> >>> byte[] rawData;
> >>> rawData = myData.getBytes("UTF-8");
> >>> System.out.println("UTF-8 decoded: "+new String(rawData,"UTF-8"));
> >>> System.out.println("Default decoded: "+new String(rawData));
> >>> I get the output:
> >>> *UTF-8 decoded: hockey,marché,football*
> >>> *Default decoded: hockey,marché,football*
> >>> However, when I run the same code in an Android application and view
> >>> the output it "adb logcat" I get:
> >>> *D/FileUtils(  485): UTF-8 decoded: hockey,march∩┐╜,football*
> >>> *D/FileUtils(  485): Default decoded: hockey,march∩┐╜,football*
> >>> I get the same issue if I change the locale of my phone to French
> >>> (Canada) as well.  It doesn't seem like French characters are getting
> >>> encoded properly.
> >>> Any thoughts?
> >>> Simon Mac Donald
> >>>http://hi.im/simonmacdonald
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en
> >> --
> >> Kostya Vasilyev -- WiFi Manager + pretty widget 
> >> --http://kmansoft.wordpress.com
>
> --
> 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 th

[android-developers] Finish multiple tasks (stacks)

2010-11-10 Thread raukodraug
Hi everyone,
I have an app that contains multiple tasks (stacks of activities).
I can jump from one to another with no problem, but when i finish a
task it goes to the previous stack. I would like to finish all stacks
whenever i finish one of them, because I want my application to
finish.
Does anyone have an idea on how to achieve this?

Cheers,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] The onConfigurationChanged is not getting called when changing the orientation from portrait to landscape

2010-11-10 Thread Dianne Hackborn
If you are relying on string values changing for landscape vs. portrait, I
would strongly urge *not* using android:configChanges, and just letting your
activity be restarted.

On Wed, Nov 10, 2010 at 2:26 AM, sambit wrote:

> Hi,
>
> While working on orientation change I have found that the
> onConfigurationChanged is not getting called when changing the
> orientation from portrait to landscape.But when I am changing from
> landscape to portrait the method is getting called.
> Is it the correct behavior because the onConfigurationChanged should
> by called whenever we are changing the orientation.
> (android:configChanges="orientation")?
>
> I have also found one strange behavior or error, When we are changing
> from  portrait to landscape orientation the string value is displayed
> correctly(automatically by android system) but when in am changing the
> orientation from landscape to portrait the same string is
> displayed(i.e the string in landscape mode).The expected behavoiur is
> the string id specified in the portrait mode should be displayed.Is it
> an platform bug or something worng in my code/programming.
>
>
> Wait for the response.
>
> Regards
> Sambit
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Is it a UNIT Test or an Integration test?

2010-11-10 Thread Paa-kofi Amissah
i dont know beacuse i am more of a computer guy

On Wed, Nov 10, 2010 at 7:32 PM, A. Elk  wrote:
> Good catch!
>
> The entire test package contains a *suite* of unit tests against
> methods in the application under test.
>
> They are unit tests because they test the smallest testable part of
> the application, which is a single method written by the user.
>
> In practice, multiple unit tests are run sequentially in a test suite.
> Each test is independent, not relying on the results of a previous
> test. The tests are usually grouped together into a test case class so
> that each application class has a test case class. All of this is just
> practice and subject to individual use.
>
> JUnit (version 3), on which Android test case classes are based,
> simplifies this strategy. The special methods setUp() and tearDown()
> are run before and after each test to ensure that each unit test is
> independent. Any other method beginning with the string "test" is run
> as a unit test.
>
> The only thing that is different is the environment in which an
> Android unit test runs. Anything that uses Android has to run within
> the Android environment. For that reason, simply calling the
> onCreate() method for one of your Activity classes won't work, because
> Android has its own lifecycle for objects. That's why the test case
> class in the example you cite subclasses
> ActivityInstrumentationTestCase2. It is using both JUnit and
> InstrumentationTestCase to provide the test case. JUnit allows you to
> run the test case class like a JUnit test case, while
> InstrumentationTestCase allows you to use Android instrumentation to
> control the Activity under test. Even using the virtual machine to run
> the class under test wouldn't work correctly.
>
> The Activity context is a dependency. You can have dependencies in a
> unit test. It's perfectly OK to run a unit test in a particular
> context, as long as you have complete control over the context.
> ActivityInstrumentationTestCase2 gives you this control, as do other
> mock classes in the Android API.
>
> In short, the differences you see between the example and a standard
> test case are because of the Android environment.
>
> I would include unit tests of *everything* in my test suite. It's not
> so much a matter of it being a GUI, as much as it being a testable
> unit. A test in which you enter text in an edit box, click a button,
> and see the result is not necessarily a unit test; I would call it a
> "functional" test. A test in which you start  put text in an edit box,
> call the method processEditBox(), and look at the result that the
> method returns *is* a unit test. Putting text in the edit box is
> setting up a dependency.
>
> It seems to me that the key point in a unit test is to isolate the
> behavior you're testing from all other behaviors in the application,
> so that you're not unconsciously using external dependencies.
>
> I'm interested in hearing the responses of others in your class, and
> your instructor as well.
>
>
>
> On Nov 9, 5:47 am, Ians  wrote:
>> I'm working on a school project and I'm researching testing
>> possibilities for Android applications.
>>
>> On this 
>> page:http://developer.android.com/resources/tutorials/testing/helloandroid...
>> Google writes about a unit test.
>>
>> Is this really a unit test? A Unit test will not integrate all classes
>> and will not test in his context. So my opinion is it is not a Unit
>> Test but an Integration Test.
>>
>> What do you think?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Failed to fetch URL: https://dl-ssl.google.com/android/repository/repository.xml

2010-11-10 Thread ida
Hi,

My dev. machine is uBuntu where the SDK starter package is installed.
Eclipse 5.2 is running.  When I tried to download the rest of the SDK,
from within the Android SDK and ADT Manager menu, I got the "Failed to
fetch URL" problem.

My target H/W is a Real6410 reference board running Android 2.1 (no
plan to upgrade to 2.2 soon).  It looks like I'd choose API level 7 to
match my target system.  Is Eclipse 5.2::SDK v?::ADT 0.9.9 a safe
combo to use?

Appreciate any suggestions/hints you may have for a beginner!

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


[android-developers] Animating different views during the same animation

2010-11-10 Thread gontran
Hello,

does anyone knows if it's possible to animate different views during
the same animation:
I have a linear layout containing 6 dices (each dice extends a
textview) and I need to animate each dice to simulate a roll (each
dice will rotate on itself).
I know how to do this rotation on each dice by using 6 animations, but
I want to group these animations in one, so that I would be able to
add an animation listener to execute further instructions at the end
of this animation. I tried with an animationset but didn't manage to
do it.

Thank you by advance.

regards,

Gontran

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


[android-developers] How to show the SampleSyncAdapter on HTC Sense?

2010-11-10 Thread count negative
Hi,

I've tried the code from 
http://developer.android.com/resources/samples/SampleSyncAdapter/index.html
and it worked well with my Samsung I-9000 but on the HTC Desire of my
collegue the SyncAdapter didn't even show.

What am I missing?

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


[android-developers] Download finished with wrong size

2010-11-10 Thread Dale
So far, I have been getting this error for every package. Only a few
packages have loaded with one or fewer retries.
- Documentation for Android SDK, API 8, revision 1
- Samples for SDK API 8, revision 1
- Samples for SDK API 7, revision 1
- Usb Driver package, revision 3
- Market Licensing package, revision 1

I've tried dozens of times to download "SDK Platform Android 2.2, API
8, revision 2" with absolutely no luck. I have no ability to change
proxy settings or even disable antivirus (as other sites have
suggested).

On the other hand, I can directly download the zip files using firefox
with no problem at all from 
http://dl.google.com/android/repository/android-2.2_r02-windows.zip.
I have, however, noticed that it can take upwards of 15 minutes to
start the download, the download doesn't proceed for long periods of
time and then downloads the entire file in about a minute.

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

2010-11-10 Thread Paa-kofi Amissah
good thing hank

On Wed, Nov 10, 2010 at 7:41 PM, Hank  wrote:
> I managed to fix it, apparently I was not associating the handler and
> looper to the child thread
>
> On Oct 28, 5:22 pm, DanH  wrote:
>> Assuming that post() or postDelayed() starts the Thread is even more
>> popular.
>>
>> On Oct 28, 4:47 pm, fadden  wrote:
>>
>> > On Oct 28, 12:35 pm, DanH  wrote:
>>
>> > > Lemme guess:  You created a Thread but you never started it.
>>
>> > Calling run() instead of start() is tremendously popular. :-)
>>
>> > It also causes a memory leak, because Threads get added to ThreadGroup
>> > when they're created and don't get removed until they stop executing.
>> > If they never start executing, they never get removed.  (We're going
>> > to change this in a future release to use weak references, which isn't
>> > perfect but avoids this situation.)
>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Is there a way to keep an Android microSD card interface awake while the rest of the device is asleep?

2010-11-10 Thread JackN
I am working with custom microSD cards. I'd like to be able to
maintain power to the microSD card while the handset sleeps.

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

2010-11-10 Thread Hendrik Greving

No. Another take :)? I've checked launcher, too

- Original Message - 
From: "Mark Murphy" 

To: 
Sent: Wednesday, November 10, 2010 12:27 PM
Subject: Re: [android-developers] standard power widget icons



Maybe in Launcher2.

On Wed, Nov 10, 2010 at 2:51 PM, Hendrik Greving  
wrote:

I am looking for the buttons or icon images of the power control widget
(wireless, bluetooth, gps, sync and display brightness). Couldn't find it 
in

there. Are they open source and available at source.android.com by any
chance?

- Original Message - From: "Mark Murphy" 


To: 
Sent: Wednesday, November 10, 2010 4:02 AM
Subject: Re: [android-developers] standard power widget icons



I have no idea what "the standard power control widget icons" are.
However, all icons that are part of the SDK can be found in:

$ANDROID_HOME/platforms/$SDK/data/res

where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
is some platform version (e.g., android-8).

If the icons you seek are not there, then try http://source.android.com.

On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Greving 
wrote:


Does anybody know where to get the standard power control widget icons
from?


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

_Android Programming Tutorials_ Version 3.0.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


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





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

_Android Programming Tutorials_ Version 3.0.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 


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


[android-developers] The best way to download webpage and parse it into simple UI

2010-11-10 Thread SHADOW-XIII
I am just starting developing first app and not sure which way is the
best fit for my needs.

The key is to download a page source, get small part of it and display
it using Android UI, with possibility to submit it later as a form
action.

The simplest way would be probably to ditch UI and go with WebView
however I decided to parse it into UI, so no WebView for me.

Currently I am trying to download page source using org.apache
packages (from SDK Wiktionary simplified sample) and parse it using
some regex (this will give me known incompatibilities when website
changes layout but I am willing to go this way).
Question is: is there a better/faster/easier way to pull the source of
webpage (or part of it)?
Or I will have to stick to org.apache due to the fact I want to submit
a form based on user selection)?
Maybe someone got a hold to more source code examples of similar app ?

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


[android-developers] Hello Android

2010-11-10 Thread Raysen Jia
Hi All,

I am a newer of Android develop.

Regards,
Raysen

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


[android-developers] The onConfigurationChanged is not getting called when changing the orientation from portrait to landscape

2010-11-10 Thread sambit
Hi,

While working on orientation change I have found that the
onConfigurationChanged is not getting called when changing the
orientation from portrait to landscape.But when I am changing from
landscape to portrait the method is getting called.
Is it the correct behavior because the onConfigurationChanged should
by called whenever we are changing the orientation.
(android:configChanges="orientation")?

I have also found one strange behavior or error, When we are changing
from  portrait to landscape orientation the string value is displayed
correctly(automatically by android system) but when in am changing the
orientation from landscape to portrait the same string is
displayed(i.e the string in landscape mode).The expected behavoiur is
the string id specified in the portrait mode should be displayed.Is it
an platform bug or something worng in my code/programming.


Wait for the response.

Regards
Sambit

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


[android-developers] Hello Android

2010-11-10 Thread Panlong Jia
Hi All,

I am a newer of Android develop.

Regards,
Raysen

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

[android-developers] Re: Android dev using the Samsung Galaxy S on OSX

2010-11-10 Thread heejun
I've worked using macbook(snow leopard), but there is no matter about
that.
I also tested galaxy s / HTC desire.

I think OSX is better than windows for android development.
(OSX doesn't have to install cygwin, and easy to convert iPhone
application to android application)


check this site below

- system requirements
http://developer.android.com/sdk/requirements.html

- installation guide
http://developer.android.com/sdk/index.html


On 11월9일, 오후9시55분, Quigley  wrote:
> I've never worked with it under OSX, but I know I needed a specific
> driver for Windows. I expect it is possible to get it running, and
> from what I remember as I was poking at the problem, it should be
> doable under Mac. I guess all I've got is a ray of hope that it should
> be possible.
>
> On Nov 7, 3:05 pm, Shiraz  wrote:> I've searched in 
> various forums and sites but haven't found out
> > whether it's possible to develop and test apps using the Samsung
> > Galaxy S on Mac OSX with Eclipse?
>
> > Please can you folks share your advice and experiences?
>
> > Thanks,
> > Shiraz Azizali

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


[android-developers] Can't launch setup for android SDK

2010-11-10 Thread .Net Sports
New to android, trying to work with the SDK, but when launching the
setup.exe, get this error:

Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml,
reason: HTTPS SSL error. You might want to force download through HTTP
in the settings.

NS

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 AVD manager (last version) on XML verification failed.

2010-11-10 Thread Dani
Hi,
I'm trying to install the Android SDK using AVD Manager.
When it try to verificate the XML of the repository appears the
following error:
XML verification failed for 
http://dl-ssl.google.com/android/repository/repository.xml.
Error: cvc-elt.1: Cannot find the declaration of element 'HTML'.

I have the last ADV version (r7) and the last ADT plugin for Eclipse
(0.99), downloaded today.

Thank you,
Daniele

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


[android-developers] Parsing response of a WCF webservice under Android?

2010-11-10 Thread Wolkenjaeger
I need to consume a WCF webservice via SOAP under Android. I am doing
this by using KSOAP2.5.2. Now as we are not allowed to edit the WCF in
any way, I am currently not able to change the output which the WCF
service returns. That is my main problem. To solve the problem, I need
to take what I get from the WCF (workaround):

anyType{schema=anyType{element=anyType{complexType=anyType{choice=anyType{element=anyType{complexType=anyType{sequence=anyType{element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{};
 }; }; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{};
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{}; element=anyType{}; element=anyType{};
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; };
element=anyType{}; element=anyType{}; element=anyType{};
element=anyType{simpleType=anyType{restriction=anyType{maxLength=anyType{}; }; 
}; }; }; }; }; }; }; }; };
diffgram=anyType{DocumentElement=anyType{CL_9_2_4_DestInfo=anyType{DESTINATION=
plus LOTs of other data.

Now, as it seems this is some Microsoft propretary code which is in
fact a full dataset/xsd(?) How can I parse this thing into a working
dataset or at least make it somehow readable to my little Android?

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


[android-developers] passing data between views

2010-11-10 Thread mannyk
Hi,

I am trying to create an app with two view classes - portrait and
landscape. I use the portrait view in my layout.xml and use the
landscape in layout.xml under the layout-land folder.

My both view classes (portrait and landscape) are essentially the some
bitmap placement differences. My end goal is - to fetch some pictures
in these classes and manipulate them before displaying. I obviously
don't want to refetch the pictures on orientation change, so would
like to pass bitmaps between these views. Is that possible? Here is my
first iteration of one of these view classes and for now I am just
trying to pass an integer between classes.

My Main Activity is like this:

public class flipperActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState)
{
super.onRestoreInstanceState(savedInstanceState);
}
protected void onSaveInstanceState(Bundle outState)
{
outState.putBoolean("bs", true);
super.onSaveInstanceState(outState);
}

And my View class is like this:

public class FlipperVerticalView extends View
{
String time;
Paint paint = new Paint();
private Bitmap[] pictureArray = new Bitmap[5];
int i = 0;
boolean forward = true;
public FlipperVerticalView(Context context, AttributeSet attrs)
{
super(context, attrs);

paint.setColor(Color.BLUE);
paint.setStyle(Paint.Style.FILL);
paint.setAntiAlias(true);
GetPhotoClass getPhotos = new GetPhotoClass();
pictureArray = getPhotos.GetPhotoArray();
this.setOnClickListener(new OnClickListener()
{
//change picture index here
});
}
@Override
protected void onDraw(Canvas canvas)
{
super.onDraw(canvas);
canvas.drawBitmap(pictureArray[i], 20, 20, paint);
}
/***SaveState/

@Override
public Parcelable onSaveInstanceState()
{
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.stateToSave = this.i;
return ss;
}
@Override
public void onRestoreInstanceState(Parcelable state)
{

SavedState ss = new SavedState(state);
super.onRestoreInstanceState(ss.getSuperState());

this.i = ss.stateToSave;
}
static class SavedState extends BaseSavedState
{
int stateToSave;
SavedState(Parcelable superState)
{
super(superState);
}
private SavedState(Parcel in)
{
super(in);
this.stateToSave = in.readInt();
}
@Override
public void writeToParcel(Parcel out, int flags)
{
super.writeToParcel(out, flags);
out.writeInt(this.stateToSave);
}
public static final Parcelable.Creator CREATOR =
new Parcelable.Creator()
{
public SavedState createFromParcel(Parcel in)
{
return new SavedState(in);
}
public SavedState[] newArray(int size)
{
return new SavedState[size];
}
};
}
/
***EndSaveStateCode***/
}

}

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


[android-developers] Camera Callback onPreviewFrame

2010-11-10 Thread Maurizio Mento
Hi,
I am working on an application in Android and I have to manipulate the
data coming from the preview.

I read that the default frame rate is 15fps.
I measured the time from one call of the onPreviewFrame function and
the next one and I noticed that I got different times depending on the
size of the preview (at the moment no other operations are done in
this function).
How can it be possible?
I thought it would be called at any frame so 15 times in a second
(approximately every 66ms) independently of the previewFrameSize.

Can someone help me please?
Thank you!
Maurizio

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


[android-developers] Re: Obfuscation/optimization causing error?

2010-11-10 Thread maxmpz
This one can be caused by obfuscating the CREATOR field used for
saving/loading widget state.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 embed youtube video on mobile site to allow android device to see the video

2010-11-10 Thread StErMi
Hi everyone.
At the moment I've developed a mobile version of my site using jQTouch
( jQuery framework for mobile ).
It works perfectly on iphone and android devise with touch, slides,
and so on.
The problem is when I need to show to the user a youtube video.

On ipod touch/iphone i simply put the html5 embed code of the video in
the page and show to the user. Then it will load normally.
If I do the same thing with android devices it will show a black
iframe and nothing more...
What can I do?
How can I do the same think done by http://m.youtube.com ?

Anyway the mobile site i'm talking about is: http://www.sc2vod.eu
I've tested it with Android Emulator :)

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

2010-11-10 Thread xamous
Hi There,

I'm trying the Surface.setMatrix api, however, it acts not same with I
expected when I rotate the matrix.

The code looks like:

matrix.setRotate(degrees, width / 2, height / 2);
matrix.getValues(tmpValues);
Surface.openSession();
surface.setMatrix(tempValues[Matrix.MSCALE_X],
tempValues[Matrix.MSKEW_X],
tempValues[Matrix.MSKEW_Y],
tempValues[Matrix.MSCALE_Y]);
Surface.closeSession();

The usage is extracted from WindowManagerService.java.

Can anyone explain the four parameters of Surface.setMatrix (float
dsdx, float dtdx, float dsdy, float dtdy)?

Thanks a lot!

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


[android-developers] Calculating correct location on a resized background bitmap

2010-11-10 Thread Kirgan

Hello,

Been learning Android over the last 2 months. I am currently working
on an game that is a turn based board game. It currently has a main
layout that uses a spinner and an adapter to pull a list of saved
games out of a sqlite db. It also has a new game function that stores
initial game settings in the db. I have now moved on to getting the
initial board and player controls drawn when a new game is started or
when a saved game is selected.

I first learned to create the board with standard drawLine & drawRect
commands. I used the width and height in onSizeChanged to calculate
how and where to place each part of the board. This method works great
for all screen sizes. I can calculate exactly what controls a player
touches or what squares a player touches.

But I am no artist, so if figure if I want better graphics I will need
to hire someone to create bitmaps for me, instead of just drawing the
board.

My question about doing this with bitmaps is that since I need to
calculate exactly what area of the board has been touched - both for
specific player commands and to know what square to put the piece in,
how do I calculate that with using bitmaps when there are so many
screensizes that the bitmaps will be scaled to. For example, I watched
a Google I/O 2010 video where it showed an example of how a bitmap
would be scaled and although you can prescale the width and height to
whatever you want, the actual pixels for say a "boarder" may end up
being 2 pixels wide or 4 pixels wide or 1 - depending on the image and
how the system scales it. But for my game, I would need to know
exactly how wide the boarders are, their location and exactly where
each square block is on every screen resolution in order to know what
area has been touched.

So, far everything I have found just shows how to scale bitmaps and
used the three standard densities in the drawable directories. What I
wonder about the drawable directories is if I created three sizes for
different densities wouldn't the system just scale it to a different
size anyway sometimes, because there are more than 3 screen sizes out
there. From what I read there used to be 5 and now there are even more
with the tablets.

I would appreciate it, if someone could point me in the right
direction to learn how to calculate specific locations on a background
bitmap (in this case a background board game) no matter what
dimensions the bitmap is resized to.

Thank you,

--Mike

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


[android-developers] write with the finger in the screen

2010-11-10 Thread Víctor

Hi, I have a question, do you know if exists some manual, or somebody
has a source code that allow to capture what you write or drow with
the finger in the screen and keeps it as a photo?

That is to say, what I`m looking for is to sign in the mobile phone
with the finger and keep it like an image.

I don't know how/where start to investigate for doing this
application.

I would be pleased if somebody could give me a hand,

Thanks 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: Downloading Problem

2010-11-10 Thread Catalin Braica
Hello

Shouldn't you be testing for the HTTP status code ? Just a quick example:
you can get zero-byte content in case of a redirect from the part of the
server (3xx status code). In this case I see there is a flag to
automatically follow redirects (HTTPUrlConnection.instanceFollowRedirects),
but I don't see that you set it.
But in all cases you need to test the HTTP status code.

Just my 2 cents

On Wed, Nov 10, 2010 at 5:46 AM, Android Humanoid wrote:

> No... nothing in logcat, download competed in 0sec am getting, but
> there is nothing in the file.
>
> On Nov 9, 2:21 pm, Kumar Bibek  wrote:
> > What is the problem? Any exceptions/errors in our logcat?
> >
> > On Tue, Nov 9, 2010 at 2:33 PM, Android Humanoid  >wrote:
> >
> >
> >
> > > Hi All,
> >
> > > The following is the code that am using to download a file from the
> > > web server on android mobile,
> >
> > > imageURL="http://rokon.googlecode.com/files/rokon_src_2-0-3.zip";;
> >
> > > try {
> > >URL url = new URL(imageURL); //you can write here any
> > > link
> >
> > >File file = new File(fileName);
> >
> > >long startTime = System.currentTimeMillis();
> > >Log.i("DownloadManager", "download begining");
> > >Log.i("DownloadManager", "download url:" + url);
> > >Log.i("DownloadManager", "downloaded file name:" +
> > > fileName);
> >
> > >/* Open a connection to that URL. */
> >
> > >URLConnection ucon = url.openConnection();
> >
> > >/*
> > > * Define InputStreams to read from the URLConnection.
> > > *
> > > */
> >
> > >InputStream is = ucon.getInputStream();
> > >BufferedInputStream bis = new BufferedInputStream(is);
> >
> > >/*
> > > * Read bytes to the Buffer until there is nothing
> > > more to read(-1).
> > > */
> >
> > >ByteArrayBuffer baf = new ByteArrayBuffer(50);
> > >int current = 0;
> > >while ((current = bis.read()) != -1) {
> > >baf.append((byte) current);
> > >}
> >
> > >/* Convert the Bytes read to a String. */
> >
> > >FileOutputStream fos = new FileOutputStream(PATH
> > > +file);
> > >fos.write(baf.toByteArray());
> > >fos.close();
> > >Log.i("DownloadManager", "download ready in" +
> > > ((System.currentTimeMillis() - startTime) / 1000)+ " sec");
> >
> > >}
> > >catch (IOException e) {
> > >Log.e("DownloadManager", "IOException: " + e);
> > >}
> > >catch(Exception ex)
> > >{
> > >Log.e("DownloadManager", "Exception: " + ex);
> > >}
> >
> > > this code is working fine for the above imageURL string, but when i
> > > replace the url with the web server that am accessing then it is
> > > giving problem. can anyone help me in this..
> >
> > > Thanks&Regards.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Is it a UNIT Test or an Integration test?

2010-11-10 Thread Ians
So we can say that this: 
https://sites.google.com/site/androiddevtesting/notepadsample
is a real unit test (using the JVM) and the one on the android
developers site is a integration test (DVM).

On Nov 9, 11:21 pm, Frank Weiss  wrote:
> You've raised a good question. It's correct to to say that a unit test does
> not involve all the classes of an application. Unit tests are also supposed
> to run very quickly. We also usually don't include the GUI in unit tests.
> Neither external web services.
>
> In Android, though, we have a bit of a problem. To really run even by the
> book unit tests, we'd have to either run them on the JVM or the DVM. In the
> first case, we would be using .class files, in the latter case, .dex files.
> But I don't know if we have DVM for anything but the emulator or the device.
> And the emulator's DVM tends to run slow. Hmmm.
>
> I would tend to agree that what is called unit testing in the Android SDK is
> a bit different than the norm. I'd like to hear what others have to say.

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


[android-developers] Graphing nodes and edges

2010-11-10 Thread timon reynolds
has anyone worked on creating a graph of various vertices and edges
connecting them? i would like to be able to create an app that does
this but having a hard time with being able to create these drawable
vertices and then allow the user to draw them any where on a canvas? i
have a feeling that i am over complicating this. any ideas or guidance
would be helpful thanks

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


Re: [android-developers] Starting a service in another applicaion

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 5:24 PM, kl4232  wrote:
> What information do I need to put in the intent to start a remote
> service?

Step #1: Add an  to the service, with your own custom
action string

Step #2: Use new Intent("whatever the action string is") in your call
to startService()

-- 
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.2 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] AppsLib (Archos store) is not legit?

2010-11-10 Thread Raymond C. Rodgers
A few months ago, I received a notice out of the blue that my app was 
being included at AppsLib and that I could click a link to manage the 
application at their site. They apparently skimmed some apps directly 
from Android Market to build their library, and then retroactively 
contacted the authors to invite them to use AppsLib. It took several 
days of me trying to contact them (during which I watched as my app went 
through their QA compatibility verification process), but they pulled my 
app when I explicitly told them they didn't have permission to use it on 
their site or system.


At this point, I consider them just barely more legal than pirates.
Raymond

On 11/9/2010 4:51 PM, SoftwareForMe.com SoftwareForMe.com wrote:

Hello,

What do you all know about AppsLib?

I know they were a small startup store who partnered with Archos to 
provide them with an app store on their devices.


Recently we found that they are distributing pirated software, 
including an old copy of our product, PhoneMyPC, for free.


We have contacted AppsLib several times, and Archos directly twice, 
only to be ignored by all parties.


We had AppsLib in our list of markets to release products into once 
our licensing mechanism is finalized, but we have now removed them and 
will not do business with them. I sincerely hope Archos device owners 
can download SAM from SlideMe, or some other reputable app market.


What's your experience? Is this unusual for that store, or is this 
just how they do "business"?


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


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


[android-developers] Indeterminate ProgressDialog Spinner Stops

2010-11-10 Thread Dan
Hello all,

The spinner in my ProgressDialog appears to stop spinning for the
duration of the task I'm doing, I am using a 2.2 emulator. What can I
do to avoid this stop to make the application look like its not
frozen?  This is the code i'm using:

 private class NetworkTask extends AsyncTask{
private ProgressDialog progress;

@Override
protected void onPreExecute() {
progress = new ProgressDialog(OuterActivity.this);
progress.setIndeterminate(true);
progress.setMessage(getText(R.string.progressText));
progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progress.show();
}

@Override
protected Void doInBackground(Void... params) {
performLongNetworkOperation();
return null;
}

@Override
protected void onPostExecute(Void result) {
OuterActivity.this.listAdapter.notifyDataSetChanged();
progress.dismiss();
}
}

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


[android-developers] Re: Full Screen Caller Pictures and Full Screen Caller ID

2010-11-10 Thread Kavinder Dhaliwal
bump

On Nov 10, 11:02 am, Kavinder Dhaliwal  wrote:
> So I've been searching for some time on how to either replace the in
> call screen or put something on top of itthe only solution I have
> found thus far is to make my own ROM, which doesn't make sense for
> such a small portion of an OS.  however I found these two apps (Full
> Screen Caller Pictures and Full Screen Caller ID) that are able to put
> a contact image and button on top of the standard in call screen.
>
> I don't know exactly what either of these developers have done, but
> hope someone on the forums does.
>
> Any ideas?

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


[android-developers] OpenGL glScissor not working on HTC phones

2010-11-10 Thread Warren
I am optimizing a game for performance. A large part of the screen
remains the same from frame to frame and it takes a while to render,
so I intend to use glScissor() to limit new drawing to only certain
parts of the screen. I do not do a
gl.glClear(GL10.GL_COLOR_BUFFER_BIT); so the bits that were drawn
previously should remain.

This provides a large speed increase and works very well on the Droid
and on the emulator. However, it is not working on the G1 or Droid
Eris, both made by HTC. The areas outside the scissor region are still
being drawn over in a strange way. It's as if what's being drawn
inside the scissor region is being wrapped outside the region. There
is a large rectangle in the middle of the screen that has the correct
contents. This is the defined scissor region. Immediately below the
scissor region is a row, maybe 150-200 pixels high that looks like an
exact copy of the bottom of the scissor region.

Again, this only is happening on the HTC phones.

I believe that unless I specifically clear the color bits, they should
remain from frame to frame. Is this correct? Any ideas? Is this an HTC
OpenGL library bug?

Thank you,
Warren

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


[android-developers] Starting a service in another applicaion

2010-11-10 Thread kl4232
I have 2 applications. The first is a standard activity with a "start
service" button. The second is a service only application. It has no
activity. It does have a receiver which listens for the BOOT_COMPLETED
intent.

After I've installed both applications on my handset I run the first
app. When I press the "start service" button on the first app, I'd
like to send an intent to the second app to starts its service.
If the service was part of app1, I could create an intent like this...
startService(new Intent(this, MyService.class));... and the service
would start. But MyService is part of another application so I cant
use MyService.class, in app1.
I've tried creating an intent like this in app1
Intent i = new Intent();
i.setClassName("com.backgroundService", "MyService ");
startService(i);
but the service doesnt start.
What information do I need to put in the intent to start a remote
service?
Do I need a receiver associated with the service to handle the intent
and start the service? If so, what ACTION and  CATEGORY do I use in
the services manifest for the receiver?
Thanks for your help

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


[android-developers] Re: Controlling a service

2010-11-10 Thread Federico Paolinelli
.. but on the other hand I can't handle results from different
activities as I could do firing a broadcast message from the
service

On 10 Nov, 23:03, Kostya Vasilyev  wrote:
> Yes, ResultReceiver seems really nice - it's more lightweight than a
> broadcast intent, and requires less "wiring" both in the manifest and in the
> code.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
>
> 11.11.2010 0:49 пользователь "Federico Paolinelli" 
> написал:
>
> I was looking to existing source code to get some inspiration, and I
> came across the google io 2010 schedule app.
>
> They still use an intent service to perform the calls, but they use
> another way to fetch the result of the webservice interaction, which
> is sending to the intent service a parceled ResultReceiver to be
> called to be notified of the result.
>
> I am not sure that this approach is better compared to returning the
> result bundled in a broadcast (any ideas?), but in any case I think I
> will go with the intent service in order to save some resources.
>
> Federico
>
> On Wed, Nov 10, 2010 at 8:12 AM, Federico Paolinelli 
> wrote:> On 10 Nov, 00:58...
>
> --
> 
>
> Federico
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Dev...

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

2010-11-10 Thread Kostya Vasilyev
Yes, ResultReceiver seems really nice - it's more lightweight than a
broadcast intent, and requires less "wiring" both in the manifest and in the
code.

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

11.11.2010 0:49 пользователь "Federico Paolinelli" 
написал:

I was looking to existing source code to get some inspiration, and I
came across the google io 2010 schedule app.

They still use an intent service to perform the calls, but they use
another way to fetch the result of the webservice interaction, which
is sending to the intent service a parceled ResultReceiver to be
called to be notified of the result.

I am not sure that this approach is better compared to returning the
result bundled in a broadcast (any ideas?), but in any case I think I
will go with the intent service in order to save some resources.

Federico


On Wed, Nov 10, 2010 at 8:12 AM, Federico Paolinelli 
wrote:
> On 10 Nov, 00:58...
--


Federico

-- 
You received this message because you are subscribed to the Google
Groups "Android Dev...

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

2010-11-10 Thread Kostya Vasilyev
Congratulations, your cellular operator is performing network maintenance,
or else is implementing new policies of some sort.

:) :) :)

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

11.11.2010 0:44 пользователь "William Añez"  написал:

Mmm, Im able to reach the WS from the browser, but only with WIFI,
with my operator network I cant reach that.. the funny thing is that
the application work once two days ago, and yesterday in the other
phone.


On Nov 10, 5:05 pm, Kostya Vasilyev  wrote:
> Can you try opening the web servi...
--

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

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: Controlling a service

2010-11-10 Thread Mark Murphy
IntentServices are awesome. I haven't used ResultReceiver yet, though.
I have just used android.os.Messenger in an IntentService, and that
works nicely.

On Wed, Nov 10, 2010 at 4:49 PM, Federico Paolinelli  wrote:
> I was looking to existing source code to get some inspiration, and I
> came across the google io 2010 schedule app.
>
> They still use an intent service to perform the calls, but they use
> another way to fetch the result of the webservice interaction, which
> is sending to the intent service a parceled ResultReceiver to be
> called to be notified of the result.
>
> I am not sure that this approach is better compared to returning the
> result bundled in a broadcast (any ideas?), but in any case I think I
> will go with the intent service in order to save some resources.
>
> Federico
>
> On Wed, Nov 10, 2010 at 8:12 AM, Federico Paolinelli  
> wrote:
>> On 10 Nov, 00:58, Mark Murphy  wrote:
>>> On Tue, Nov 9, 2010 at 6:52 PM, Federico Paolinelli  
>>> wrote:
>>> > And a more general question: is the bind mechanism suitable for one
>>> > shot services, or it just make sense for persistent services?
>>>
>>> To me, that is a bit like asking if a wheel is suitable for bananas,
>>> or does it just make sense for apples. :-)
>>
>> :-((
>>
>>>
>>> Bind if:
>>>
>>> -- You are going to be around for the duration of the operation
>>> -- The service needs to be around
>>> -- You need a rich API
>>>
>>> For example, if you have a Service that is providing a local API
>>> around a synchronous Web service, binding is a fine solution.
>>>
>>
>> I think it still depends on how many calls you are going to do. I
>> mean, even in case of a synchronous web service, this may be
>> implemented with an intent service (with the overhead of the
>> conversion to intents back and forward for the query parameters and
>> the result). In this way you can still save resources.
>>
>> What keeps bugging me is that you never really __need__ to be around,
>> but on the other hand my laziness pushed to the rich api solution.
>>
>>
>>
>>
>>> > What happens if I call the startService method but the service is
>>> > already active? Will it start another service, or will it call the
>>> > onStartCommand of the same service?
>>>
>>> The latter. There cannot be more than one copy of a service running at a 
>>> time.
>>>
>>> --
>>
>>
>> Thanks as always,
>>
>> Federico
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> 
> Federico
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

_The Busy Coder's Guide to Android Development_ Version 3.2 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] Evaluate javascript value on WebView, Android

2010-11-10 Thread filiz_gokce
hi, I open a webview page that page have

var addToBasketDisabled=false; var iPhoneStatus=""; function
GetStatus() { return iPhoneStatus;//Master Pagelerde tanımlı } var
path = "http://www.yemeksepeti.com/App_Themes/Default_tr-TR/images/
IPhone/"; function PreLoadDisabledButton() { var image = new Image();
image.src=path + "Iphone-button-ekle-pasif.png"; } function
DisableAddButton() { addToBasketDisabled= true; var buttonObject =
document.getElementById("ctl00_AddToBasket"); buttonObject.src = path
+ "Iphone-button-ekle-pasif.png"; } function EnableAddButton()
{ addToBasketDisabled= false; var buttonObject =
document.getElementById("ctl00_AddToBasket"); buttonObject.src = path
+ "Iphone-button-ekle.png"; } function OnAddButtonClick()
{ if(addToBasketDisabled) { return false; } DisableAddButton(); var
validateValue= ValidateInput(); if(!validateValue)
{ EnableAddButton(); return false; } } PreLoadDisabledButton();

these javascript When I press a button on the webview I have to read
the "iPhoneStatus" value and close the webview screen and decide the
result.

I wrote these codes in my .java class

 mWebView = (WebView) findViewById(R.id.webview);

WebSettings webSettings = mWebView.getSettings();
webSettings.setSavePassword(false);
webSettings.setSaveFormData(false);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webSettings.setJavaScriptEnabled(true);
webSettings.setSupportZoom(false);

mWebView.setWebChromeClient(new MyWebChromeClient());

mWebView.addJavascriptInterface(new DemoJavaScriptInterface(),
"demo");

mWebView.loadUrl(feedurl);
final class DemoJavaScriptInterface
 {

  DemoJavaScriptInterface()
  {
  }

  public void clickOnAndroid()
  {
   mHandler.post(new Runnable()
   {
public void run()
{
 mWebView.loadUrl("javascript: GetStatus()");
}
   });

  }
 }

 final class MyWebChromeClient extends WebChromeClient
 {
  public void onCloseWindow(WebView window)
  {
   window.destroy();
  }
  public boolean onJsAlert(WebView view, String url, String message,
JsResult result)
  {
   Log.i("log ", message);
   result.confirm();
   return true;
  }
 }

But it never go in the onJsAlert method, is there any way to evaluate
the value of GetStatus()

Thanks

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


Re: [android-developers] Re: Controlling a service

2010-11-10 Thread Federico Paolinelli
I was looking to existing source code to get some inspiration, and I
came across the google io 2010 schedule app.

They still use an intent service to perform the calls, but they use
another way to fetch the result of the webservice interaction, which
is sending to the intent service a parceled ResultReceiver to be
called to be notified of the result.

I am not sure that this approach is better compared to returning the
result bundled in a broadcast (any ideas?), but in any case I think I
will go with the intent service in order to save some resources.

Federico

On Wed, Nov 10, 2010 at 8:12 AM, Federico Paolinelli  wrote:
> On 10 Nov, 00:58, Mark Murphy  wrote:
>> On Tue, Nov 9, 2010 at 6:52 PM, Federico Paolinelli  
>> wrote:
>> > And a more general question: is the bind mechanism suitable for one
>> > shot services, or it just make sense for persistent services?
>>
>> To me, that is a bit like asking if a wheel is suitable for bananas,
>> or does it just make sense for apples. :-)
>
> :-((
>
>>
>> Bind if:
>>
>> -- You are going to be around for the duration of the operation
>> -- The service needs to be around
>> -- You need a rich API
>>
>> For example, if you have a Service that is providing a local API
>> around a synchronous Web service, binding is a fine solution.
>>
>
> I think it still depends on how many calls you are going to do. I
> mean, even in case of a synchronous web service, this may be
> implemented with an intent service (with the overhead of the
> conversion to intents back and forward for the query parameters and
> the result). In this way you can still save resources.
>
> What keeps bugging me is that you never really __need__ to be around,
> but on the other hand my laziness pushed to the rich api solution.
>
>
>
>
>> > What happens if I call the startService method but the service is
>> > already active? Will it start another service, or will it call the
>> > onStartCommand of the same service?
>>
>> The latter. There cannot be more than one copy of a service running at a 
>> time.
>>
>> --
>
>
> Thanks as always,
>
> Federico
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 

Federico

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


[android-developers] Re: Strange network behavior with two phones

2010-11-10 Thread William Añez
Mmm, Im able to reach the WS from the browser, but only with WIFI,
with my operator network I cant reach that.. the funny thing is that
the application work once two days ago, and yesterday in the other
phone.

On Nov 10, 5:05 pm, Kostya Vasilyev  wrote:
> Can you try opening the web service URL from the phone browser, to see
> if it's actually reachable through your cellular provider?
>
> -- Kostya
>
> 10.11.2010 23:41, William Añez пишет:
>
>
>
>
>
>
>
>
>
> > Not exactly, but my app have two kind of connections, one of those is
> > a Socket that Im oppening in a Android Service of my own, in a Thread,
> > this socket always is running sending a PING command each 5 minutes,
> > for that way I spect to receive some messages for my application.
>
> > The other connection are thos web services I have to call for
> > notificactions.
>
> > The socket part always work, no matter if Im running the application
> > on the phone or on the emulator, this ALWAYS work just fine, but the
> > WS on the phone always give me the exception:
>
> > java.net.SocketTimeoutException: The operation timed out
>
> > On Nov 10, 4:34 pm, Kostya Vasilyev  wrote:
> >> I wouldn't discard issues with the operator - quite the opposite, since
> >> you now have consistent misbehavior on two phones connected to the
> >> operator's network.
>
> >> The emulator doesn't go through the cellular network, so it's different
> >> from both phones, which are the same.
>
> >> Does you code make an outgoing connection, or expect an incoming one
> >> (server running on the phone)?
>
> >> -- Kostya
>
> >> 10.11.2010 18:48, William Añez пишет:
>
> >>> I just discovered that the problem comes with the fact of reinstalling
> >>> the application, I mean, now the two phones are giving the Operation
> >>> Timeout, The phone that was working yesterday now is not, the only
> >>> thing I did was uninstall the applciation and reinstall againg using
> >>> Eclipse, now gives me the timeout all the time, mean while the
> >>> emulator works perfectly, so I think we can discard an Operator Issue.
> >>> On Nov 10, 10:31 am, Julie Andrews    wrote:
>  On Wed, Nov 10, 2010 at 6:40 PM, William Añez    
>  wrote:
> > Hi, I have two phones (Motorola Milestone) and I has developed a
> > simple application that does some network operations using web
> > services, the applications runs perfectly calling a method on the
> > emulator and in the phones, but just in one of the phones, in the
> > other one i always get a "operation timeout exception".
> > I have checked the network configuration in the 2 phones and is
> > identical, and the two phones has the same operator with unlimited
> > network plan, Im little lost here, and I dont know what else to check
> > or try.
> > If anyone has an idea or a possible explanation to this behavior, I
> > will appreciate your help.
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com >  cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>  --
>  Juliehttp://tradinglogically.blogspot.comhttp://vikitionary.blogspot.comhttp://gandhi-the-man-of-millenium.blo...
> >> --
> >> Kostya Vasilyev -- WiFi Manager + pretty widget 
> >> --http://kmansoft.wordpress.com
>
> --
> 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


[android-developers] Re: ADT painstakingly remove my exclusion setting for android library

2010-11-10 Thread Bob Kerns
Do you have Subclipse (Eclipse's Subversion plugin) installed?

If not, install it. It should solve your problem, if the .svn entries
are being copied into the bin/ directory from elsewhere.

Also, if you have not added the bin directories to svn:ignore on the
parent, do so now, then delete the bin directories from Eclipse. They
should *never, ever* be checked in.

In general -- if you have a .svn directory in your bin folder, you
should figure out how it got there, and stop it from happening.

This should never involve any exclusion settings in your Eclipse
project. That should be completely unnecessary.

On Nov 10, 4:38 am, mianwo  wrote:
> I can confirm that this problem exists.
> How to reproduce this:
> 1 Create an android project and set it as an Android library.
> 2 Create another android project that uses the previous library.
> 3 Commit these source code into a svn repository.
> 4 Change something in your library project, then commit it.
> 5 An error will occur in the project that uses the library. The
> message says the project can't compile because bin/[path to your
> source code]/.svn/entries file already exists.
>
> This is obvious because when importing library source code, the .svn
> folder is also included and copied to bin folder when project
> compiles.
> That is not a big problem because you can set to exclude .svn folder
> and its contents in Eclipse.
> But my real problem is that the current ADT always tries to remove the
> exclusion setting for my projects.
>
> My ADT version is 0.9.9.v201009221407-60953
>
> On Nov 3, 10:45 pm, Marcin Orlowski  wrote:
>
>
>
>
>
>
>
> > On 3 November 2010 14:11,mianwo wrote:
>
> > > I have a common library android project being used by several other
> > > projects. And I use svn to manage my source code.
> > > So I have to exclude svn files from compiling process otherwise
> > > eclipse will generate errors saying something already exists bla
> > > bla...
>
> > I never had to exclude any SVN folders here nor seen Eclipse
> > complaining about these folders. That would be silly as Eclipse
> > got nothing to say here. I also got lot of other folders in
> > project tree and it's not a problem at all.

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

2010-11-10 Thread Bob Kerns
This considerably overstates the issues around rooting. Rooting does
not give arbitrary code arbitrary access. It does give the user (or
whoever rooted it, perhaps the corporate IT department) the ability to
run arbitrary code of his choosing with arbitrary access. On my phone,
I am prompted to grant such access.

That's as a general statement. Specific techniques of rooting may open
up more, and introduce other issues. But rooting can enhance security,
too, by allowing you to impose controls that otherwise would not be
possible.

If you're serious about security, write your own authenticator, based
on certificates and a PKI infraststructure, and if needed, a second/
third factor, e.g. a password (never stored or transmitted) and an
auth token with a reasonably short timeout, and a onetime token
generator device.

There's not much you can do to protect against a user being held up at
gunpoint while accessing your system, but you can protect against lost
phones (revoke the certificate on any compromise, good password, and
keep that token generator separately from the phone).

Those factors come at a cost of usability. Maybe we'll see biometrics
capabilities built into future devices. Maybe the camera and
microphone can even do the job..

On Nov 10, 7:40 am, Kostya Vasilyev  wrote:
> 10.11.2010 17:11, Marcin Orlowski пишет:> And if you rooted your device, you 
> can be a victim too,
> > no matter how clever you think you are. And (far too) many people rooted 
> > their
> > phones because "it's h4x0r" or they simply found a tool for that, and
> > not because
> > they really neded to. Majority got not much idea what "rooting" really 
> > means.
>
> Rooting your phone is like base jumping - seems like fun, but can come
> to a sticky end.
>
> By doing this, the user deliberately and purposefully violates Android's
> security architecture, and this can have side effects, such as possibly
> compromised passwords.
>
> And doing this in a corporate environment is likely to be frowned upon
> by the IT department, just like running hacked Windows from a warez site
> on your work computer :)
>
> To OP - you might want to look at source.android.com, starting with the
> method that returns a password, mentioned by Martin. Or ask on
> android-platform mailing list.
>
> --
> 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


[android-developers] Restricted location in publisher GUI is not working on some devices

2010-11-10 Thread Chister Nordvik
We have an application that is restricted to one country (Norway). But
I am sitting here with multiple devices, HTC Wildfire, SE XP10 (after
2.1 upgrade) and SE XP 10 Mini (after 2.1 upgrade) that fails to find
the application even though they are registered on a Norwegian network
(Tele2). The SE devices found the application before they got the 2.1
upgrade, and I have lots of other devices (Nexus One, HTC Desire, HTC
Tattoo, Galaxy Tab) that finds the app without any problems.

This is very important for us since we can't enable the app worldwide
due to copyright issues, so is there any way to resolve this issue? Is
it the operator or the Android device that fails to report the correct
country here?

Any help would be greatly 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


Re: [android-developers] Re: Strange network behavior with two phones

2010-11-10 Thread Kostya Vasilyev
Can you try opening the web service URL from the phone browser, to see 
if it's actually reachable through your cellular provider?


-- Kostya

10.11.2010 23:41, William Añez пишет:

Not exactly, but my app have two kind of connections, one of those is
a Socket that Im oppening in a Android Service of my own, in a Thread,
this socket always is running sending a PING command each 5 minutes,
for that way I spect to receive some messages for my application.

The other connection are thos web services I have to call for
notificactions.

The socket part always work, no matter if Im running the application
on the phone or on the emulator, this ALWAYS work just fine, but the
WS on the phone always give me the exception:

java.net.SocketTimeoutException: The operation timed out



On Nov 10, 4:34 pm, Kostya Vasilyev  wrote:

I wouldn't discard issues with the operator - quite the opposite, since
you now have consistent misbehavior on two phones connected to the
operator's network.

The emulator doesn't go through the cellular network, so it's different
from both phones, which are the same.

Does you code make an outgoing connection, or expect an incoming one
(server running on the phone)?

-- Kostya

10.11.2010 18:48, William Añez пишет:










I just discovered that the problem comes with the fact of reinstalling
the application, I mean, now the two phones are giving the Operation
Timeout, The phone that was working yesterday now is not, the only
thing I did was uninstall the applciation and reinstall againg using
Eclipse, now gives me the timeout all the time, mean while the
emulator works perfectly, so I think we can discard an Operator Issue.
On Nov 10, 10:31 am, Julie Andrewswrote:

On Wed, Nov 10, 2010 at 6:40 PM, William Añezwrote:

Hi, I have two phones (Motorola Milestone) and I has developed a
simple application that does some network operations using web
services, the applications runs perfectly calling a method on the
emulator and in the phones, but just in one of the phones, in the
other one i always get a "operation timeout exception".
I have checked the network configuration in the 2 phones and is
identical, and the two phones has the same operator with unlimited
network plan, Im little lost here, and I dont know what else to check
or try.
If anyone has an idea or a possible explanation to this behavior, I
will appreciate your help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Juliehttp://tradinglogically.blogspot.comhttp://vikitionary.blogspot.comhttp://gandhi-the-man-of-millenium.blo...

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



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


[android-developers] Re: ExtandableLists and LongClicks

2010-11-10 Thread Doug
> I want to receive a longpress event on my ExtandableList. The only way
> I found is to implement an OnItemLongClickListener and set it by using
> ExpandableListView view = this.getExpandableListView();
> view.setOnItemLongClickListener(onItemLongClickListener );
> in my ExpandableListActivity.
>
> How ever in the OnItemLongClickListener I only have the following
> method
> public boolean onItemLongClick(AdapterView parent, View view, int
> position, long id);

The documentation for that callback says to call getItemAtPosition to
get the item clicked.  What it doesn't tell you is that this is a
method on the AdapterView given to you in the parent parameter and you
need to pass it the position parameter.  The Adapter associated with
your view will then be queried to feed the object of interest back to
you through this method and you can check it to see if it's a group or
a item.

Doug

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

2010-11-10 Thread Kostya Vasilyev

Hendrik,

Power Control Plus is a commercial project, and I don't see a link to 
download their source:


http://www.siriusapplications.com/powercontrolplus/

-- Kostya

10.11.2010 23:27, Mark Murphy пишет:

Maybe in Launcher2.

On Wed, Nov 10, 2010 at 2:51 PM, Hendrik Greving  wrote:

I am looking for the buttons or icon images of the power control widget
(wireless, bluetooth, gps, sync and display brightness). Couldn't find it in
there. Are they open source and available at source.android.com by any
chance?

- Original Message - From: "Mark Murphy"
To:
Sent: Wednesday, November 10, 2010 4:02 AM
Subject: Re: [android-developers] standard power widget icons



I have no idea what "the standard power control widget icons" are.
However, all icons that are part of the SDK can be found in:

$ANDROID_HOME/platforms/$SDK/data/res

where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
is some platform version (e.g., android-8).

If the icons you seek are not there, then try http://source.android.com.

On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Greving
wrote:

Does anybody know where to get the standard power control widget icons
from?

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

_Android Programming Tutorials_ Version 3.0.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

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







--
Kostya Vasilyev -- 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] Getting ready to Publish

2010-11-10 Thread Kostya Vasilyev

I've not used ant for my builds, but...

If you are prompted for the password, and you see ant run zipalign, then 
it looks like you're all set.


You can further test this by trying to install your .apk with adb:

adb install 

Just make sure to first uninstall the debug version of your application, 
or you'll get a signature conflict.


adb uninstall 

-- Kostya

10.11.2010 19:31, jb пишет:

Hi,

I'm just about ready to Publish my application. I have a question
about the Signing/Aligning of the application.

In looking at the Android documentation they say to run "ant release"
to compile the application in release mode. Then to sign and align the
apk run "jarsigner" and "zipalign".

I had used "android create project" to create my build.xml. I modified
it to run proguard.
I find that when I run "ant release" it appears that signing is done
as part of the process (I'm prompted for my keystore password) and the
apk is zipaligned.

I guess I'm confused that the documentation makes it 3 steps, "run ant
release" then jarsign, then zipalign. BUT, my "ant release" seems to
do everything.

Is the documentation not upto date?  Is it safe/acceptable to just run
"ant release"?

TIA

jb




--
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: French character encoding issues

2010-11-10 Thread Kostya Vasilyev

Good catch, Bob.

You are right of course - I missed the lack of encoding parameter in the 
second call.


The docs say this:

http://developer.android.com/reference/java/lang/String.html#String(byte[])

Converts the byte array to a string using the default encoding as 
specified by the file.encoding system property. If the system property 
is not defined, the default encoding is ISO8859_1 (ISO-Latin-1). If 
8859-1 is not available, an ASCII encoding is used.


Looks like the encoding is quite likely to be single-byte based, this is 
implied by the choice of ASCII (not UTF-8) as the fallback.


Then there is the deprecated "public String (byte[] data, int high)", I 
see it as a failed attempt to fix things in a simple, but incorrect way.


Overall, it looks like the designers of Java did not push for proper and 
consistent use of character encodings across the board when the language 
was still young.


Over time, though, the Java standard library evolved to make consistent 
use of encodings, because only that is guaranteed to give correct results.


-- Kostya


10.11.2010 20:36, Bob Kerns пишет:

It's clearly not logcat that's the issue here, because the two strings
output differently. He's expecting them to be the same for some
reason.

It just now occurs to me that he may be assuming that the the one-
argument version defaults to UTF-8; it defaults to *something*, but
something ill-specified that is probably never UTF-8. That's now now
it's worded, of course, but that's the effect.

I couldn't begin to tell you how many bugs I've tracked down and fixed
in people's code due to this.

On Nov 8, 12:19 pm, Kostya Vasilyev  wrote:

I wouldn't count on logcat output to be always correct with respect to
localization.

What do you get if you use decoded strings in a TextView (for example)?

-- Kostya

08.11.2010 19:46, Simon MacDonald пишет:










Hi all,
I'm wondering if I found a bug in Android.  When I run this code on my
laptop:
String myData = "hockey,marché,football";
byte[] rawData;
rawData = myData.getBytes("UTF-8");
System.out.println("UTF-8 decoded: "+new String(rawData,"UTF-8"));
System.out.println("Default decoded: "+new String(rawData));
I get the output:
*UTF-8 decoded: hockey,marché,football*
*Default decoded: hockey,marché,football*
However, when I run the same code in an Android application and view
the output it "adb logcat" I get:
*D/FileUtils(  485): UTF-8 decoded: hockey,march�,football*
*D/FileUtils(  485): Default decoded: hockey,march�,football*
I get the same issue if I change the locale of my phone to French
(Canada) as well.  It doesn't seem like French characters are getting
encoded properly.
Any thoughts?
Simon Mac Donald
http://hi.im/simonmacdonald
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



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


[android-developers] Re: Is it a UNIT Test or an Integration test?

2010-11-10 Thread Bob Kerns
You can and should write normal unit tests for everything in your app
that doesn't depend on the Android-specific APIs.

It's a good idea to try to keep the android-specific stuff and the non-
android-specific functionality as separate as possible. Not only does
it aid testing, it aids porting to other platforms (say, a companion
desktop app, or migrating some of the functionality to a server).

I'm not entirely happy with what I've come up with so far for running
android-specific unit tests on the platform (emulator or device) as
part of an automated build procedure. But running non-android tests in
the JVM as part of the build gets you a lot of the benefit -- how much
I think will depend on the nature of your application. An app that's
all forms and no function (say, a data entry app) will probably derive
relatively little benefit from the non-Android test -- and even little
benefit for the Android-specific ones. Integration and UI testing may
be where most of the testing benefit is to be found.

A calculator app with a simple UI but a lot of functionality, could
benefit greatly from standard JVM-based unit testing.


On Nov 9, 2:21 pm, Frank Weiss  wrote:
> You've raised a good question. It's correct to to say that a unit test does
> not involve all the classes of an application. Unit tests are also supposed
> to run very quickly. We also usually don't include the GUI in unit tests.
> Neither external web services.
>
> In Android, though, we have a bit of a problem. To really run even by the
> book unit tests, we'd have to either run them on the JVM or the DVM. In the
> first case, we would be using .class files, in the latter case, .dex files.
> But I don't know if we have DVM for anything but the emulator or the device.
> And the emulator's DVM tends to run slow. Hmmm.
>
> I would tend to agree that what is called unit testing in the Android SDK is
> a bit different than the norm. I'd like to hear what others have to say.

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

2010-11-10 Thread Kostya Vasilyev

Phil,

If you want to get a response from Samsung, you might have better chance 
contacting the team that specifically maintains their web site, 
especially since you probably downloaded the image from their web site.


There is usually a special email, such as i...@. or w...@ listed 
along the bottom of the site's pages.


-- Kostya

10.11.2010 21:56, Mark Murphy пишет:

On Wed, Nov 10, 2010 at 1:05 PM, Phil Endecott
  wrote:

Is there anyone out there who can offer a sensible reply?

Only if you define "sensible" as "not what you want to hear".


  Do any
Android device vendors publish product images with terms that allow
developers to re-use them?

That would be a question for the media/press relations department at
the device manufacturer in question. For relatively-traditional media,
such as a newspaper or blog, stuff in a vendor's press area works
fine, but that doesn't appear to be your intended use. However, they
would be a fairly likely starting point to try to figure out what the
rules are for your sort of situation.

If you have some sort of co-marketing deal with a device manufacturer,
image licenses like the ones you seek are probably part of that
arrangement.


  Is anyone from Samsung reading this list?

> From Samsung's media/press relations department? I doubt it. And even
if Samsung engineers are on this list, they aren't exactly going to be
qualified, let alone authoritative, on this topic.

Note that this list is for programming assistance, and your questions
are not related to programming.




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


[android-developers] Re: Strange network behavior with two phones

2010-11-10 Thread William Añez
Not exactly, but my app have two kind of connections, one of those is
a Socket that Im oppening in a Android Service of my own, in a Thread,
this socket always is running sending a PING command each 5 minutes,
for that way I spect to receive some messages for my application.

The other connection are thos web services I have to call for
notificactions.

The socket part always work, no matter if Im running the application
on the phone or on the emulator, this ALWAYS work just fine, but the
WS on the phone always give me the exception:

java.net.SocketTimeoutException: The operation timed out



On Nov 10, 4:34 pm, Kostya Vasilyev  wrote:
> I wouldn't discard issues with the operator - quite the opposite, since
> you now have consistent misbehavior on two phones connected to the
> operator's network.
>
> The emulator doesn't go through the cellular network, so it's different
> from both phones, which are the same.
>
> Does you code make an outgoing connection, or expect an incoming one
> (server running on the phone)?
>
> -- Kostya
>
> 10.11.2010 18:48, William Añez пишет:
>
>
>
>
>
>
>
>
>
> > I just discovered that the problem comes with the fact of reinstalling
> > the application, I mean, now the two phones are giving the Operation
> > Timeout, The phone that was working yesterday now is not, the only
> > thing I did was uninstall the applciation and reinstall againg using
> > Eclipse, now gives me the timeout all the time, mean while the
> > emulator works perfectly, so I think we can discard an Operator Issue.
>
> > On Nov 10, 10:31 am, Julie Andrews  wrote:
> >> On Wed, Nov 10, 2010 at 6:40 PM, William Añez  wrote:
> >>> Hi, I have two phones (Motorola Milestone) and I has developed a
> >>> simple application that does some network operations using web
> >>> services, the applications runs perfectly calling a method on the
> >>> emulator and in the phones, but just in one of the phones, in the
> >>> other one i always get a "operation timeout exception".
> >>> I have checked the network configuration in the 2 phones and is
> >>> identical, and the two phones has the same operator with unlimited
> >>> network plan, Im little lost here, and I dont know what else to check
> >>> or try.
> >>> If anyone has an idea or a possible explanation to this behavior, I
> >>> will appreciate your help.
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com >>>  cr...@googlegroups.com>
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en
> >> --
> >> Juliehttp://tradinglogically.blogspot.comhttp://vikitionary.blogspot.comhttp://gandhi-the-man-of-millenium.blo...
>
> --
> 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] nest custom views

2010-11-10 Thread Kostya Vasilyev

Kavitha,

If your intent is to let the user drag and drop game pieces from the 
bottom portion of the screen to the game grid, then:


Implement a view that subclasses ViewGroup (possibly one of its 
subclasses, such as RelativeLayout or LinearLayout). Handle touch and 
drag events in that view.


Specify a transparent background for this view group so it's invisible, 
and put your current views inside this one.


This is how you can implement drag-and-drop that crosses the boundaries 
of individual views.


http://developer.android.com/guide/topics/ui/custom-components.html

-- Kostya

10.11.2010 20:42, kavitha b пишет:



-- Forwarded message --
From: *kavitha b* mailto:kkavith...@gmail.com>>
Date: 2010/11/10
Subject: Re: [android-developers] nest custom views
To: android-developers@googlegroups.com 




Hi Kumar,

my requirement is

I have a custom scrollview where i am scrolling a image.
That fills up half screen.

I want to move images upon entire screen,including upon custom 
scrollview also.


I cannot draw bitmaps using onDraw() because I cannot draw in entire 
screen.


How to move images now.

I wiill attach screenshot also for refernce.I want to move lettered 
tiles upon board and board is scrollview here.


My code is:

public class HorizoontalScroll extends Activity implements 
OnGestureListener

{

private static Vector squares;
private static Vector tiles;
private Tile tile;






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


setContentView(R.layout.main);

squares=Util.generateBoardSquares();
tiles=Util.generateTiles(this);




}

}


main.xml looks like this

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




And ScrollImageView.java
public class ScrollImageView extends View {
 private final int DEFAULT_PADDING = 0;
 private Display mDisplay;
 private Bitmap mImage;
 private Bitmap mTile;


 /* Current x and y of the touch */
 private float mCurrentX = 0;
 private float mCurrentY = 0;


 private float mTotalX = 0;
 private float mTotalY = 0;

 /* The touch distance change from the current touch */
 private float mDeltaX = 0;
 private float mDeltaY = 0;


 int mDisplayWidth;
 int mDisplayHeight;
 int mPadding;


 public ScrollImageView(Context context) {
 super(context);
 initScrollImageView(context);
 }
 public ScrollImageView(Context context, AttributeSet attributeSet) {
 super(context);
 initScrollImageView(context);
 }

 private void initScrollImageView(Context context) {
 mDisplay = 
((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();

 mPadding = DEFAULT_PADDING;
 mImage=BitmapFactory.decodeResource(getResources(), 
R.drawable.woodstandardboard);
 mTile=BitmapFactory.decodeResource(getResources(), 
R.drawable.woodtile);

 }

 @Override
 protected void onMeasure(int widthMeasureSpec, int 
heightMeasureSpec) {

 int width = measureDim(widthMeasureSpec, mDisplay.getWidth());
 int height = measureDim(heightMeasureSpec, mDisplay.getHeight());
 setMeasuredDimension(width, height-100);
 }


 private int measureDim(int measureSpec, int size) {
int result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);


if (specMode == MeasureSpec.EXACTLY) {
result = specSize;
} else {
result = size;
if (specMode == MeasureSpec.AT_MOST) {
   result = Math.min(result, specSize);
}
}
return result;
}

 public Bitmap getImage() {
 return mImage;
 }

 public void setImage(Bitmap image) {
 mImage = image;
 }


 public int getPadding() {
 return mPadding;
 }


 public void setPadding(int padding) {
 this.mPadding = padding;
 }


 private static int boardX=0;
 private static int boardY=0;

 @Override
 public boolean onTouchEvent(MotionEvent event) {
 if (event.getAction() == MotionEvent.ACTION_DOWN) {
 mCurrentX = event.getRawX();
 mCurrentY = event.getRawY();


 }
 else if (event.getAction() == MotionEvent.ACTION_MOVE) {
 float x = event.getRawX();
 float y = event.getRawY();


 // Update how much the touch moved
 mDeltaX = x - mCurrentX;
 mDeltaY = y - mCurrentY;



 mCurrentX = x;
 mCurrentY = y;

 invalidate();
 }
 // Consume event
 return true;
 }


 @Override
 protected void onDraw(Canvas canvas) {
 if (mImage == null) {
 return;
 }



Re: [android-developers] Re: Strange network behavior with two phones

2010-11-10 Thread Kostya Vasilyev
I wouldn't discard issues with the operator - quite the opposite, since 
you now have consistent misbehavior on two phones connected to the 
operator's network.


The emulator doesn't go through the cellular network, so it's different 
from both phones, which are the same.


Does you code make an outgoing connection, or expect an incoming one 
(server running on the phone)?


-- Kostya

10.11.2010 18:48, William Añez пишет:

I just discovered that the problem comes with the fact of reinstalling
the application, I mean, now the two phones are giving the Operation
Timeout, The phone that was working yesterday now is not, the only
thing I did was uninstall the applciation and reinstall againg using
Eclipse, now gives me the timeout all the time, mean while the
emulator works perfectly, so I think we can discard an Operator Issue.

On Nov 10, 10:31 am, Julie Andrews  wrote:

On Wed, Nov 10, 2010 at 6:40 PM, William Añez  wrote:

Hi, I have two phones (Motorola Milestone) and I has developed a
simple application that does some network operations using web
services, the applications runs perfectly calling a method on the
emulator and in the phones, but just in one of the phones, in the
other one i always get a "operation timeout exception".
I have checked the network configuration in the 2 phones and is
identical, and the two phones has the same operator with unlimited
network plan, Im little lost here, and I dont know what else to check
or try.
If anyone has an idea or a possible explanation to this behavior, I
will appreciate your help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Juliehttp://tradinglogically.blogspot.comhttp://vikitionary.blogspot.comhttp://gandhi-the-man-of-millenium.blogspot.com/



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


[android-developers] Re: Downloading Problem

2010-11-10 Thread Bob Kerns
I don't know what's happening to you specifically, but I do observe
this behavior with regular web browsers and certain broken web
servers. The server will get an error, either consistently or
occasionally, and fail in such a way that the browser just sees a
close.

If there's no Content-Length: header, the browser has no way to know
that the content has been truncated.

So if the web server is under your control, I'd suggest making sure
the Content-Length: header is set (and set correctly).

The other observation I'll make is you're copying the data a byte at a
time. This will be far slower than allocating a byte array as a
buffer, and copying a buffer at a time. It shouldn't make a difference
in behavior. Just be sure to pass the returned length from the
read(..) call (if not negative) as the length to the write(...) call.

On Nov 9, 8:46 pm, Android Humanoid  wrote:
> No... nothing in logcat, download competed in 0sec am getting, but
> there is nothing in the file.
>

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