[android-developers] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

2010-06-13 Thread Rahul Garg
Hi All,
   I am trying the MapDemo application, but I am unable to
launch the activity, it is showing following error message :
[2010-06-14 12:11:49 - TryMaps] Installation error:
INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2010-06-14 12:11:49 - TryMaps] Please check logcat output for more
details.
[2010-06-14 12:11:49 - TryMaps] Launch canceled!


I have gone through the previous thread on this error, And I have
already tried following suggestion :
1. Add maps.jar with Google API
2. and also mention the  attribute in manifest file.

But still I am unable to launch the activity, in logcat it is showing
that

package  requires unavailable shared library
com.google.android.maps ; Ignoring.

Please suggest me some solution.

Regards
Rahul Garg

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

2010-06-13 Thread spachner
Hi,

I encountered the same problems and finally solved them by installing
the Carbon version of Eclipse (eclipse-SDK-3.5.2-macosx-
carbon.tar.gz).

regards

spachner

On Jun 14, 8:07 am, Al Sutton  wrote:
> Of Eclipse?, yup, I'm using the 64 bit Coca build. I don't know if
> there is a 64 bit ADT, I just use what I'm offered in the Eclipse
> "Install Software" dialog.
>
> As a side note; my Macbook Pro runs everything it can in 64 bit mode
> (inc. the kernel), which isn't a common configuration and so might be
> an influencing factor, but I wouldn't have thought it would have such
> a noticeable effect, and it certainly doesn't have a similar effect on
> anything else I use (J2EE, Amazon plugin, Subversion, ...)
>
> Al.
>
> On Jun 13, 8:33 pm, Mariano Kamp  wrote:
>
>
>
> > Do you guys use the 64 bit download?
>
> > On Sun, Jun 13, 2010 at 6:12 PM, David Horn  wrote:
> > > Al,
>
> > > Exactly the same thing happens to me on OS X.  I've accepted that I
> > > need to restart Eclipse every so often to solve the problem.  It's
> > > particularly exacerbated if using the XML tools - for example, layout
> > > or editing the manifest file the "friendly" way.
>
> > > Dave.
>
> > > On Jun 13, 8:54 am, Al Sutton  wrote:
> > > > It's been a problem for a while, I opened a bug athttp://
> > > code.google.com/p/android/issues/detail?id=6183so you can put
> > > > a star on it if you want to vote it up.
>
> > > > My experience is that it seems to be down to the layout previewer, the
> > > > more I use it the faster performance degrades.
>
> > > > Al.
>
> > > > P.S. Before anyone suggests tweaks to my eclipse.ini, I already have
> > > > ms & max perm size at 256m, mx at 1024m. My machine is a 4GB box with
> > > > a flash SSD, so the problem isn't physical memory space or disk i/o.
>
> > > > On Jun 12, 10:22 pm, Bill Lumberg  wrote:
>
> > > > > I am running Eclipse Galileo on an Intel Mac and after using it for a
> > > > > bit, it becomes very slow.  By slow I mean switching between tabs and
> > > > > scrolling through source becomes nearly unusable.  I have to close
> > > > > Eclipse and re-open it, and that usually only solves the problem for a
> > > > > short time.
>
> > > > > Has anyone else ran into this and discovered a way to fix it?
>
> > > > > Thank you.
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Location distanceBetween()

2010-06-13 Thread Bob Kerns
I don't know if I would term anything to do with spherical trig as
"easy", exactly, even with my background in math.

On the other hand, it's simple to program, once you know the right
theorems. This is well covered in any serious textbook on nautical
navigation.

On Jun 13, 10:00 pm, Frank Weiss  wrote:
> Why not do it yourself? The math is easy - Google is your friend: get
> bearing between two lat longs

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


[android-developers] Re: Bug in Android framework connecting to url?

2010-06-13 Thread Ajay
This crash can be reproduced when you type more than 80 characters in URL (no
spaces and no commas). 

This doesnt happen in emulator.

When you load "http://aac.jetcitylounge.groovera.com/"; on ur desktop browser you
can see it fetches a page with URL more than 80 characters. 

So i guess its not a bug in Http error codes. But am not sure :)

Thanks & regards, 
Ajay





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

2010-06-13 Thread Tomáš Hubálek
The same for me. Number of people ratings dropped by two since Friday. I
guess that this number cannot decrease...

Number of ratings for my two other my apps didn't decrease but they get a
lot of ratings everyday so small drop wouldn't be visible.

Tom

On Jun 14, 2010 7:35 AM, "Zsolt Vasvari"  wrote:

I am not 100% sure.   My app's ranking is much lower than it was
before the problem.  Not sure if it's related or not, but sure is a
coincidence.


>  wrote:
> > Issue appears to be resolved.
>
> > -John Coryat- Hide quoted text -
>
> - Show quoted text -


-- 
You received this message because you are subscribed to the Google
Groups "Android 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: Slow Eclipse on OS X

2010-06-13 Thread Al Sutton
Of Eclipse?, yup, I'm using the 64 bit Coca build. I don't know if
there is a 64 bit ADT, I just use what I'm offered in the Eclipse
"Install Software" dialog.

As a side note; my Macbook Pro runs everything it can in 64 bit mode
(inc. the kernel), which isn't a common configuration and so might be
an influencing factor, but I wouldn't have thought it would have such
a noticeable effect, and it certainly doesn't have a similar effect on
anything else I use (J2EE, Amazon plugin, Subversion, ...)

Al.

On Jun 13, 8:33 pm, Mariano Kamp  wrote:
> Do you guys use the 64 bit download?
>
>
>
> On Sun, Jun 13, 2010 at 6:12 PM, David Horn  wrote:
> > Al,
>
> > Exactly the same thing happens to me on OS X.  I've accepted that I
> > need to restart Eclipse every so often to solve the problem.  It's
> > particularly exacerbated if using the XML tools - for example, layout
> > or editing the manifest file the "friendly" way.
>
> > Dave.
>
> > On Jun 13, 8:54 am, Al Sutton  wrote:
> > > It's been a problem for a while, I opened a bug athttp://
> > code.google.com/p/android/issues/detail?id=6183so you can put
> > > a star on it if you want to vote it up.
>
> > > My experience is that it seems to be down to the layout previewer, the
> > > more I use it the faster performance degrades.
>
> > > Al.
>
> > > P.S. Before anyone suggests tweaks to my eclipse.ini, I already have
> > > ms & max perm size at 256m, mx at 1024m. My machine is a 4GB box with
> > > a flash SSD, so the problem isn't physical memory space or disk i/o.
>
> > > On Jun 12, 10:22 pm, Bill Lumberg  wrote:
>
> > > > I am running Eclipse Galileo on an Intel Mac and after using it for a
> > > > bit, it becomes very slow.  By slow I mean switching between tabs and
> > > > scrolling through source becomes nearly unusable.  I have to close
> > > > Eclipse and re-open it, and that usually only solves the problem for a
> > > > short time.
>
> > > > Has anyone else ran into this and discovered a way to fix it?
>
> > > > Thank you.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Gallery elasticity at the ends

2010-06-13 Thread droidful
Hi Nik, thanks for posting the sample code. I used a lot of that when
working on my own project. If your interested I have posted up some
sample code that does a similar thing in a different way (gets round
some problems I had with Gallery) at 
http://groups.google.com/group/android-developers/t/c45bbf070a58303b

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


[android-developers] Example gallery style view with fling, bounce, animation, etc.

2010-06-13 Thread droidful
In my other topics about animation methods and problems with gallery
views I made mention of writing my own gallery view. I'm pretty new to
Android but I found some helpful posts and helpful people on this
group so I am posting up my code for the benefit of anyone who is
curious. Feel free to critique, comment or offer suggestions.

For a limited time I will have the full project on my Zumo drive at
http://www.zumodrive.com/share/5SBbYzk0Mj

(The original topics were: " Soft keyboard “del” key fails in edittext
on Gallery widget " and "What is best method for an animation worker
thread?" if you want to reference them)

Class "FlingGallery"
-
package com.droidful.flinggallery;

import android.content.Context;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.view.animation.Transformation;
import android.widget.Adapter;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

public class FlingGallery extends FrameLayout
{
// Constants

private final int swipe_min_distance = 120;
private final int swipe_max_off_path = 250;
private final int swipe_threshold_veloicty = 400;

// Properties

private int mViewPaddingWidth = 0;
private int mAnimationDuration = 400;
private float mSnapBorderRatio = 0.4f;
private boolean mIsFastFlingLinear = true;
private boolean mIsGalleryCircular = true;

// Members

private int mDisplayWidth = 0;
private int mGalleryWidth = 0;
private boolean mIsTouched = false;
private boolean mIsDragging = false;
private float mCurrentOffset = 0.0f;
private int mFlingDirection = 0;
private float mFlingVelocity = 0.0f;
private int mCurrentPosition = 0;
private int mCurrentViewNumber = 0;

private Context mContext;
private Adapter mAdapter;
private FlingGalleryView[] mViews;
private FlingGalleryAnimation mAnimation;
private GestureDetector mGestureDetector;
private Interpolator mDecelerateInterpolater;
private Interpolator mLinearInterpolater;

public FlingGallery(Context context)
{
super(context);

mContext = context;
mAdapter = null;

WindowManager windowManager =
(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
mDisplayWidth = windowManager.getDefaultDisplay().getWidth();

mViews = new FlingGalleryView[3];
mViews[0] = new FlingGalleryView(0, this);
mViews[1] = new FlingGalleryView(1, this);
mViews[2] = new FlingGalleryView(2, this);

mAnimation = new FlingGalleryAnimation();
mGestureDetector = new GestureDetector(new 
FlingGestureDetector());
mDecelerateInterpolater = 
AnimationUtils.loadInterpolator(mContext,
android.R.anim.decelerate_interpolator);
mLinearInterpolater = AnimationUtils.loadInterpolator(mContext,
android.R.anim.linear_interpolator);
}

public void setPaddingWidth(int viewPaddingWidth)
{
mViewPaddingWidth = viewPaddingWidth;
}

public void setAnimationDuration(int animationDuration)
{
mAnimationDuration = animationDuration;
}

public void setSnapBorderRatio(float snapBorderRatio)
{
mSnapBorderRatio = snapBorderRatio;
}

public void setIsFastFlingLinear(boolean isFastFlingLinear)
{
mIsFastFlingLinear = isFastFlingLinear;
}

public void setIsGalleryCircular(boolean isGalleryCircular)
{
if (mIsGalleryCircular != isGalleryCircular)
{
mIsGalleryCircular = isGalleryCircular;

if (mCurrentPosition == getFirstPosition())
{
// We need to reload the view immediately to 
the left to change it
to circular view or blank

mViews[getPrevViewNumber(mCurrentViewNumber)].recycleView(getPrevPosition(mCurrentPosition));
}

if (mCurrentPosition == getLastPosition())
{
// We need to reload the view immediately to 
the right to change
it to circular view or blank

mViews[getNextViewNumber(mCurrentViewNumber)].recycleView(getNextPosition(mCurrentPosition));
}
}
}

public int getGalleryCount()
{
return (mAdapter == null) ? 0 : mAdapter.getCount();
}

public int getFirstPosition()
{

[android-developers] Any standard "Available on Android Market" graphic?

2010-06-13 Thread patbenatar
Hey guys-

I'm wondering if there is any sort of standard "Available on Market"
graphic, similar to Apple's "Available on the App Store" graphic.. Or
does every dev just make their own?

Thanks!
Nick

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

2010-06-13 Thread Bob Kerns
If you do that, then users will complain that your spinners are
different than every other app on their device.

Once device manufacturers start pulling stuff like this, there's no
hope for us poor developers. Or our users.

On Jun 13, 8:58 pm, Kumar Bibek  wrote:
> A better approach would be to create your own spinner adapter with a
> custom layout. If you try to use the androids', they might have been
> modified by the device manufacturers. And you wont have any control
> over that.
>
> Thanks and Regards,
> Kumar Bibekhttp://tech-droid.blogspot.com
>
> On Jun 14, 6:46 am, Gabriel Simões  wrote:
>
>
>
> > Thanks...
>
> > While this may work ... there´s a button in the list that appears also
> > in the widget before the choosen option´s text.
> > My spinner is small so the text doesn´t even appear. I guess I will
> > have to give up the spinner .
>
> > Thanks,
> > Gabriel
>
> > On 13 jun, 01:03, Seni Sangrujee  wrote:
>
> > > I ran into complaints from Motorola Backflip users about white on
> > > white spinners.
>
> > > My workaround was to give up on the svelte simple_spinner_items and
> > > use the big and beautiful simple_spinner_dropdown_items.
>
> > > //
> > > adapter.setDropDownViewResource(android.R.layout.simple_spinner_item);
> > > adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_it
> > >  em);
>
> > > On Jun 12, 8:36 pm, Gabriel Simões  wrote:
>
> > > > Hello,
>
> > > > I have an app which uses 3 different spinners to allow users to choose
> > > > from some options.
> > > > I´ve added those spinners to my layout without editing most of it´s
> > > > properties and this way it works for most of my users. Unfortunately
> > > > most isn´t all and then some of them started complaining that the list
> > > > of options is showing text in white with over a white background!
> > > > I´d like to know if there´s a way (or a property) so I can force those
> > > > spinners to show the options list using text in black.
>
> > > > Thanks,
> > > > Gabriel Simões

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

2010-06-13 Thread Zsolt Vasvari
I am not 100% sure.   My app's ranking is much lower than it was
before the problem.  Not sure if it's related or not, but sure is a
coincidence.

>  wrote:
> > Issue appears to be resolved.
>
> > -John Coryat- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] Location distanceBetween()

2010-06-13 Thread Frank Weiss
Why not do it yourself? The math is easy - Google is your friend: get
bearing between two lat longs

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


[android-developers] Re: How to send mms from my code

2010-06-13 Thread mike
hi sean,

when i try to send a mms using your code it pop up a box to select a
relevant application to send the message?? why is that


regards,
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] Re: Spinners showing text in white with white background!

2010-06-13 Thread Kumar Bibek
A better approach would be to create your own spinner adapter with a
custom layout. If you try to use the androids', they might have been
modified by the device manufacturers. And you wont have any control
over that.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jun 14, 6:46 am, Gabriel Simões  wrote:
> Thanks...
>
> While this may work ... there´s a button in the list that appears also
> in the widget before the choosen option´s text.
> My spinner is small so the text doesn´t even appear. I guess I will
> have to give up the spinner .
>
> Thanks,
> Gabriel
>
> On 13 jun, 01:03, Seni Sangrujee  wrote:
>
> > I ran into complaints from Motorola Backflip users about white on
> > white spinners.
>
> > My workaround was to give up on the svelte simple_spinner_items and
> > use the big and beautiful simple_spinner_dropdown_items.
>
> > //
> > adapter.setDropDownViewResource(android.R.layout.simple_spinner_item);
> > adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_it 
> > em);
>
> > On Jun 12, 8:36 pm, Gabriel Simões  wrote:
>
> > > Hello,
>
> > > I have an app which uses 3 different spinners to allow users to choose
> > > from some options.
> > > I´ve added those spinners to my layout without editing most of it´s
> > > properties and this way it works for most of my users. Unfortunately
> > > most isn´t all and then some of them started complaining that the list
> > > of options is showing text in white with over a white background!
> > > I´d like to know if there´s a way (or a property) so I can force those
> > > spinners to show the options list using text in black.
>
> > > Thanks,
> > > Gabriel Simões
>
>

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

2010-06-13 Thread Kumar Bibek
BitmapFactory.Options bf = new BitmapFactory.Options();
bf.inSampleSize = 4;
Bitmap bmp = BitmapFactory.decodeFile(path, bf);

This will scale your bitmap to 1/4th of the original size
Thanks and Regards,
Kumar Bibek

On Jun 12, 2:21 pm, pawan nimje  wrote:
> I tried this method [ Bitmap.createScaledBitmap].. its working ..but the
> problem is aspect ratio is not maintained  ...
>
> On Thu, Jun 10, 2010 at 1:12 PM, Goran Genter wrote:
>
>
>
> > On Jun 10, 6:20 am, pawan nimje  wrote:
>
> > > Can you suggest some method to pre-scale the bitmap.
>
> > Bitmap bmpScaled = Bitmap.createScaledBitmap(Bitmap bmpSource, 50, 50,
> > true)
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>

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


[android-developers] Re: How trigger intent to execute a specific method from a specific activity

2010-06-13 Thread Kumar Bibek
Broadcast will only work if your activity is in the foreground. If
your activity is not yet started, you can however start it with
specific data passed via bundle and in the onCreate() do specific
task.

If your activity is currently in the foreground, you need to listen to
broadcasts.

Thanks and Regards,
Kumar Bibek

On Jun 14, 6:17 am, Gabriel Simões  wrote:
> Hello,
>
> I´ve been searching a way to implement an intent so when a user clicks
> on a notification, an specific method from an activity is executed (or
> an specific behavior happens).
> Right now I´m thinking about using broadcast but I don´t know if this
> is the best way to implement this functionality.
> How would you implement it?
>
> Thanks,
> Gabriel

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

2010-06-13 Thread Gabriel Simões
Thanks...

While this may work ... there´s a button in the list that appears also
in the widget before the choosen option´s text.
My spinner is small so the text doesn´t even appear. I guess I will
have to give up the spinner .

Thanks,
Gabriel

On 13 jun, 01:03, Seni Sangrujee  wrote:
> I ran into complaints from Motorola Backflip users about white on
> white spinners.
>
> My workaround was to give up on the svelte simple_spinner_items and
> use the big and beautiful simple_spinner_dropdown_items.
>
> //
> adapter.setDropDownViewResource(android.R.layout.simple_spinner_item);
> adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_it 
> em);
>
> On Jun 12, 8:36 pm, Gabriel Simões  wrote:
>
>
>
> > Hello,
>
> > I have an app which uses 3 different spinners to allow users to choose
> > from some options.
> > I´ve added those spinners to my layout without editing most of it´s
> > properties and this way it works for most of my users. Unfortunately
> > most isn´t all and then some of them started complaining that the list
> > of options is showing text in white with over a white background!
> > I´d like to know if there´s a way (or a property) so I can force those
> > spinners to show the options list using text in black.
>
> > Thanks,
> > Gabriel Simões

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

2010-06-13 Thread Gabriel Simões
Hello,

I´ve been searching a way to implement an intent so when a user clicks
on a notification, an specific method from an activity is executed (or
an specific behavior happens).
Right now I´m thinking about using broadcast but I don´t know if this
is the best way to implement this functionality.
How would you implement it?

Thanks,
Gabriel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 is the camera view angle determined in getHorizontalViewAngle ()?

2010-06-13 Thread Stephen Lebed
I'm bumping this thread because I could really use an answer.  I'm
developing an app on the G1 phone and I can't find any info on the
focal length or field of view for the camera.  If anyone has this
info, or knows where I can find it I'd greatly appreciate it.  The
camera.getHorizontalViewAngle () command seems like it would return a
value from the camera that I could use, but I'd like my app to run on
pre 2.2 hardware.

Thanks,

Stephen


On May 21, 4:46 am, Stephen Lebed  wrote:
> I'm curious how the camera view angle determined using
> getHorizontalViewAngle?
>
> Is it predefined within the API, or is it provided by the hardware?
>
> Thanks,
>
> Stephen
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: How to catch a "Done" key press from the soft keyboard

2010-06-13 Thread Ken Hughes
Look here for an example.  I'm guessing by the "Done" key you mean
KEYCODE_DPAD_CENTER.

http://developer.android.com/reference/android/app/Activity.html

Ken

On Jun 13, 3:32 am, oriharel  wrote:
> Hi,
> how do I catch specific key events from the soft keyboard?
> specifically I'm interested in the "Done" key.
>
> thanks,
> Ori

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: app can't run in full screen mode with avd 800*480 (skin wvga800)

2010-06-13 Thread Samsyn
Any chance you declared something like this in your manifest?



the described outcome of such a setting is something like what you
describe, with your app displayed as a postage stamp with black
borders on sides and bottom (but not top?)

On Jun 13, 1:43 am, "xuxiake2...@gmail.com" 
wrote:
> I create a avd using android avd manager. The detail in config.ini  as
> fellow:
>
> hw.lcd.density=160
> skin.name=WVGA800
> skin.path=platforms\android-4\skins\WVGA800
> vm.heapSize=16
> sdcard.path=C:\Documents and Settings\xuwan\.android\avd\1.6.avd
> \sdcard.img
> image.sysdir.1=platforms\android-4\images\
>
> But I found that my app can't run in full screen mode, it just occupy
> a small area which looks as 480*320.

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

2010-06-13 Thread Mark H. Nichols

On Jun 13, 2010, at 5:39 PM, shakeel wrote:

> How to get IP address and MAC address.

A quick Google search for "get ip address in android app" led me to this tread:

http://osdir.com/ml/AndroidDevelopers/2009-03/msg02701.html

And the android.net.wifi.getMacAddress() returns a string with the device MAC 
address.

Mark

P. S. You might consider not replying to an existing thread with a new topic. 
Better, perhaps, to start a new thread so your question doesn't get lost or 
ignored.

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

2010-06-13 Thread svebee
Problem was 480x800 backgrond (~20KB) which after ~4 activity re-
creates occupied ~16MB. After deleting, everything works just fine.

On Jun 11, 12:07 pm, svebee  wrote:
> One is (background) 480x800, others are approx. 70x70px.
> (40x40,80x80,50x50...).
>
> I understood your answer but I don't know (technically, exactly) what
> I need to find. I sent you an e-mail.
>
> On Jun 11, 3:18 am, Eric F  wrote:
>
> > Look at the dimensions of your images, not the file sizes. Because the
> > file sizes are the result of PNG compression. But let's assume that's
> > not the problem.
>
> > First place to look is any static data structure, view, or drawable
> > that you might be stashing somewhere and preventing the GC from
> > cleaning it up. Remember that many Android objects will hold an
> > internal reference to a context or other views which will keep your
> > entire view hierarchy in memory. So holding a reference to just one of
> > those could be the entire problem.
>
> > -E
>
> > On Jun 10, 11:00 am, svebee  wrote:
>
> > > "if you had a png that was mostly white so compressed very well
> > > you might have a 200KB png file that actually is using 6MB of RAM on
> > > your device" - I didn't know it can use so much space :/
>
> > > About 90% of images (in total application, about 60% of them (this one
> > > 1KB) are used per activity, so I would say approx. 50KB per activity)
> > > are 1KB (or less), 5% are 10-60KB and 5% are 1-5KB so I think image
> > > size isn't a problem.
>
> > > So I'm pretty sure it's A) but how to solve it? And yes, I'm
> > > constantly switching between two-three activities (and I disabled
> > > rotation for some other reasons).
>
> > > On Jun 10, 7:20 pm, Eric F  wrote:
>
> > > > First you need to figure out what is taking up all the space in your
> > > > memory as well as what is causing the OOM. Like is OOM caused when you
> > > > switch between two activities over and over again? or if you rotate
> > > > the phone over and over causing the activity to be re-created over and
> > > > over. In which case you are probably leaking a context. Or are you
> > > > running out of memory because you are loading just too many images? I
> > > > don't think you've really given us enough information to help. If you
> > > > use DDMS to inspect your heap, what's taking up all the space? If it's
> > > > images, how big are the images? Remember in order for them to be drawn
> > > > they need to be *uncompressed* into device's RAM. at say 24 bits per
> > > > pixel, if you had a png that was mostly white so compressed very well
> > > > you might have a 200KB png file that actually is using 6MB of RAM on
> > > > your device. It's just too big, and you might not think about it
> > > > because if you come from a desktop PC mindset it's just a 200KB png
> > > > file in your mind. At this point I am guessing that either:
>
> > > > A) you are leaking a context so the images aren't being recycled
> > > > B) your images are too large uncompressed
>
> > > > But without more information it's hard to be sure
>
> > > > -E
>
> > > > On Jun 10, 7:28 am, svebee  wrote:
>
> > > > > hello, as I'm beginner in Android I have problem with memory - after
> > > > > only 2-3 minutes I get Force Close and outOfMemory Error.
>
> > > > > I have only onCreate (I know, stupid, but I didn't knew for anything
> > > > > else as I started only few weeks ago) and inside I have...
>
> > > > > @Override
> > > > >  public void onCreate(Bundle savedInstanceState) {
> > > > >   super.onCreate(savedInstanceState);
> > > > >   setContentView(R.layout.main);
>
> > > > >   many lines of code...manipulating with SQLite databases...
>
> > > > > }
>
> > > > > inside main XML layout I have many images, small, big (background) and
> > > > > so on...How can I on every onCreate "delete" all content from memory
> > > > > that was before in it - so when I open activity again, it deletes all
> > > > > images and everything out and insert the new (old) one inside.
> > > > > "Little" awkward but that's only thing I have on mind.
>
> > > > > Also, inside "many lines of code" I don't declare any images!
>
> > > > > Or simply, how can I "bypass" outOfMemoryError? Do I have to do
> > > > > something like this?
>
> > > > > �...@override
> > > > >      public void onCreate(Bundle savedInstanceState) {
> > > > >       super.onCreate(savedInstanceState);
>
> > > > >         BitmapFactory.Options options=new BitmapFactory.Options();
> > > > >         options.inSampleSize = 8;
> > > > >         Bitmap buildingBitmap =
> > > > > BitmapFactory.decodeResource(null,R.drawable.background,options);
>
> > > > > if (buildingBitmap != null)
> > > > >         {
> > > > >         buildingBitmap.recycle();
> > > > >         System.gc();
> > > > >         buildingBitmap = null;
> > > > >         }
>
> > > > >       setContentView(R.layout.main);
>
> > > > >       many lines of code...manipulating with SQLite databases...
>
> > > > >     }
>
> > > > > or...? Also on other activity

[android-developers] get IP and MAC address

2010-06-13 Thread shakeel
How to get IP address and MAC address.

 

Thanks

shakeel

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

[android-developers] Location distanceBetween()

2010-06-13 Thread Lars Nielsen Lind
Hi,

we try to make use of Location distanceBetween() with local lat/lon and
remote users lat/lon in order to get bearing.

The method always return a negative value for instace -109.

Anyone that knows how to make use of this? How do we translate it for
instance to 0-360 degrees.

We want to show the direction in degrees from on location to another.

thanks,

Lars

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

2010-06-13 Thread Olivier Guilyardi
On 06/14/2010 12:00 AM, Olivier Guilyardi wrote:
> On 06/13/2010 06:49 PM, tarek attia wrote:
>> Thanks you so much for this clarification ,,exactly I want to make an
>> application that keeps running while the user may went of the main
>> application ,,and I guess Service will be the best candidate for doing
>> that  ,,,
>>
>> But what if the application will take much time ,,so should I make a
>> thread that embedded inside it a Service??
> 
> Yes, exactly. If you need to do something heavy in the service, it must happen
> in a dedicated thread, otherwise you will freeze the application main thread
> (and thus the UI) which you should never do.
> 
> So, you might need both a service *and* a thread.

Little clarification: of course this thread must be "embedded" in the service,
not the opposite. The service acts as an entry point, in which you can create
several threads if you like.

--
  Olivier

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

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 06:49 PM, tarek attia wrote:
> Thanks you so much for this clarification ,,exactly I want to make an
> application that keeps running while the user may went of the main
> application ,,and I guess Service will be the best candidate for doing
> that  ,,,
> 
> But what if the application will take much time ,,so should I make a
> thread that embedded inside it a Service??

Yes, exactly. If you need to do something heavy in the service, it must happen
in a dedicated thread, otherwise you will freeze the application main thread
(and thus the UI) which you should never do.

So, you might need both a service *and* a thread.

--
  Olivier


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

2010-06-13 Thread Samsyn
and no, it's not 'the last triangle in the mesh'  Seems fairly evenly
distributed in that way, so I no longer blame my ShortBuffer (at least
not in that way).

It does maybe have a sweet spot though.  the last few failures I have
seen have all occured when looking just shy of due east (88 degrees
from north, where north in my coord system is (0, 0, -1);  so the
failure is when looking about (.9, 0, 0 ).

But now I have a cool texture diagnostic mode to more easily identify
exactly which triangle I am looking at, so that's nice :-)

I know, I will just prevent the camera from looking in that
direction!  turn turn SNAP turn turn SNAP.  I can have a little on-
shoulder-conscience-pet that hits you in the head when you get close
to looking in the bad direction.

The actual visual defect looks more like a triangle that is
intersecting the near plane, more so than simply gone.  But there is
no way this triangle would be intersecting the near plane.  It's like
one of the verts is suddenly mis-placed "behind the camera"  (again,
static vertex buffer, the vert has not really moved, only the camera
has moved).  Well, only the transform has changed.

Definitely a bug, just only 99% sure it's not mine :-)

ON another note, I think this game just started to be fun today.
Which is to say, it's now possible to get killed if you're not
careful.  Plus the code is still young enough that's it's all pretty
and organized and easy to understand.

On Jun 13, 1:34 pm, Samsyn  wrote:
> Well, with that special hubris that comes just before you realize you
> did something super stupid:
>
> "no, the code is PERFECT!"
>
> :-)
>
> For some reason, I found some other threads talking about this (sort
> of) AFTER making my post (I looked first, honest!), but I guess those
> were sort of off-topic comments, so maybe a new post just for this is
> not a huge sin.
>
> I should mention I do not have the issue in the emulator (when I can
> stomach running at 4 fps), just on my Droid.  (and maybe not on the
> Eris, the only other test phone I have), so this might be a Droid-
> specific issue.
>
> So far, I have only noticed it on my terrain, though the same code is
> used to render other meshes in the game (the poseable-skeleton
> characters, for example).  It's possible it happens there as well and
> I just haven't noticed yet (I mean, if it's a Droid bug, I would think
> it would have some probability of happening on any of my meshes).  But
> the terrain mesh has fairly large triangles, which is why I am willing
> to suspect a math overflow issue.  Still, lots of nearby triangles,
> sharing the same verts, will be non-problematic.
>
> I guess the most LIKELY explanation would be the short index buffer.
> something like the first or last entry in the list, maybe.
>
> I lied a little implying there was just one terrain mesh, when really
> the full terrain is tiled with multiple meshes, and I haven't tried
> using goofy texturing to help identify if this is always a particular
> corner of such a mesh (i.e. first/last triangle).  I guess I will try
> that now.
>
> But to answer your question, I pass the gl check stuff when I turn it
> on.
>
> And again, all the buffers are completely static, so their content
> should not be flakily changing.  If I had bad numbers in the buffers,
> I would expect the problem to be pretty constant.
>
> - Dan
>
> On Jun 13, 1:21 pm, Frank Weiss  wrote:
>
>
>
> > I'm no GL expert by far, but is there possibly a debug or logging mode
> > which might expose a calculation or data error?- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Re: Activity within TabActivity: onResume not always called when tab selected?

2010-06-13 Thread Thierry Legras
It works. The exact code is:

public void onTabChanged(String tabId) {
if(TAG_B.equals(tabId)) {
MyBActivity bActivity = (MyBActivity
)getLocalActivityManager().getActivity(tabId);
bActivity.refreshFromDB();
}
}


However it is a bit strange that onResume is not called. It would be a much
nicer solution.

Thierry.




2010/6/13 Thierry Legras 

> Maybe I have found something:
>
> From TabActivity, set a OnTabChangedListener,
> then the listener is called:
>
> String tabTag = getTabHost().getCurrentTabTag();
> if tabTag.isEqual(TAB_B) {
>   MyBActivity bActivity = (MyBActivity
> )getLocalActivityManager().getActivity(tabTag);
>   bActivity->refreshFromDB(); //
> }
>
> I will try that.
>
> Thierry.
>
>
> 2010/6/13 Thierry Legras 
>
> Hi,
>>
>> I have a TabActivity with 3 tabs:
>> - tab A is created with a TabContentFactory,
>> - tabs B & C are created as Activity.
>>
>> When I switch from B to C, B activity is resumed (onResume called). But
>> when i switch from A to B, onResume is NOT called.
>> Unfortunately i need B to be aware that it has been selected. How can B
>> activity knows that i has just been selected?
>>
>> Any clue?
>> Thanks for any help.
>> --
>> Thierry.
>>
>
>
>
> --
> Thierry.
>



-- 
Thierry.

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

2010-06-13 Thread arnoldl
Hello ..

With froyo users can move a app to the sd card...
How can i test if my app is on internam memory or on sd?

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] Finalizing a Cursor that has not been deactivated or closed non-fatal error

2010-06-13 Thread arnoldl
Hello all,

i'm getting a "Finalizing a Cursor that has not been deactivated or
closed" error on this piece of code.
The code is used to fill a listview.
Since it's a non-fatal error , there is no crash and all works
fine..but i don't like a error.

If i close the cursor at the end of this code..the listview stay's
empty.
if i close the cursor in onStop , i get the same error.

How do i fix this??

private void updateList() {
DBAdapter db = new DBAdapter(this);
db.open();
//load all waiting alarm
mCursor=db.getTitles("state<2");
setListAdapter(new MyCursorAdapter(this, mCursor));
registerForContextMenu(getListView());
db.close();
}

error :


E/Cursor  ( 2318): Finalizing a Cursor that has not been deactivated
or closed. database = /data/data/xxx.db, table = alerts,
query = SELECT _id, alert_id,
E/Cursor  ( 2318):
android.database.sqlite.DatabaseObjectNotClosedException: Application
did not close the cursor or database
object that was opened here
E/Cursor  ( 2318):  at
android.database.sqlite.SQLiteCursor.(SQLiteCursor.java:210)
E/Cursor  ( 2318):  at
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:
53)
E/Cursor  ( 2318):  at
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:
1345)
E/Cursor  ( 2318):  at
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:
1229)



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

2010-06-13 Thread Samsyn
Well, with that special hubris that comes just before you realize you
did something super stupid:

"no, the code is PERFECT!"

:-)

For some reason, I found some other threads talking about this (sort
of) AFTER making my post (I looked first, honest!), but I guess those
were sort of off-topic comments, so maybe a new post just for this is
not a huge sin.

I should mention I do not have the issue in the emulator (when I can
stomach running at 4 fps), just on my Droid.  (and maybe not on the
Eris, the only other test phone I have), so this might be a Droid-
specific issue.

So far, I have only noticed it on my terrain, though the same code is
used to render other meshes in the game (the poseable-skeleton
characters, for example).  It's possible it happens there as well and
I just haven't noticed yet (I mean, if it's a Droid bug, I would think
it would have some probability of happening on any of my meshes).  But
the terrain mesh has fairly large triangles, which is why I am willing
to suspect a math overflow issue.  Still, lots of nearby triangles,
sharing the same verts, will be non-problematic.

I guess the most LIKELY explanation would be the short index buffer.
something like the first or last entry in the list, maybe.

I lied a little implying there was just one terrain mesh, when really
the full terrain is tiled with multiple meshes, and I haven't tried
using goofy texturing to help identify if this is always a particular
corner of such a mesh (i.e. first/last triangle).  I guess I will try
that now.

But to answer your question, I pass the gl check stuff when I turn it
on.

And again, all the buffers are completely static, so their content
should not be flakily changing.  If I had bad numbers in the buffers,
I would expect the problem to be pretty constant.

- Dan


On Jun 13, 1:21 pm, Frank Weiss  wrote:
> I'm no GL expert by far, but is there possibly a debug or logging mode
> which might expose a calculation or data error?

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

2010-06-13 Thread Frank Weiss
I'm no GL expert by far, but is there possibly a debug or logging mode
which might expose a calculation or data error?

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


[android-developers] GLES/IntBuffer/?? Mis-placed verts?

2010-06-13 Thread Samsyn
so... I have a simple terrain mesh which, generally speaking, works
fine.

But as I walk around, occasionally, from some camera angles, a
triangle of that mesh is clearly being rendered incorrectly.  As if
one of its verts has moved (considerably).

But the vertex IntBuffer has not changed. (nor any of the other
buffers associated with that drawElements call)

I can change my heading and the badness will come and go at the same
point.

If I move a bit or change heading, it will fix itself.

---

So same code, same data, but from some locations and some view
directions, one triangle will be messed up.  As if GLES is mis-reading
the vertex buffer (again, whose contents are calculated once and never
changed)

And I will go so far as to say it is never more than one triangle at a
time (though I can't prove that).

I can also fantasize it might be some internal math overflow dealing
with the integer coordinates (I mean the "one = 1<<16" form).

The Index buffer (a ShortBuffer) is also constant.  But mis-reading
that could also lead to wackiness.

It's.. weird.  But luckily, it's also rare.  Just disturbing to see a
hole in the terrain that ought not be there.

- Dan

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


Re: [android-developers] Make entire screen disabled

2010-06-13 Thread Dianne Hackborn
On Sat, Jun 12, 2010 at 4:39 AM, pawan nimje  wrote:

> thats ok .. i have tried that .. thats working ... but wat i want is the
> screen to look in background ...i.e i want the entire activity screen to
> look as if its in the background ( how an sctivity screen looks when theres
> dilog box above it) ... hope u r getting wat im trying to say ...


Um...  then open a dialog?

If you just want to dim out the entire activity like dialog does, you can do
somethung like that by for example implementing dispatchDraw() at the root
to draw a transparent dark layer on top.  Or creating a full-screen
transparent window that is dark and not fully opaque.  Or just open a Dialog
(or window with the layout params set up like a dialog) that does this.

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

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

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

Re: [android-developers] Re: TaskAffinity causes new instance being created when startActivity

2010-06-13 Thread Dianne Hackborn
If you want everything running in the same task, then don't use
FLAG_ACTIVITY_NEW_TASK.

On Sun, Jun 13, 2010 at 5:59 AM, James Wang  wrote:

> Thanks, YangJian.
>
> What we want is to put all activities started by L stay in the same
> task as L. So we have to set all activities`s taskAffinity the same
> one.
> For that reason, "Single Task" is not for what we want, because it is
> goint to make A as root of that task which is L in fact.
>
> Thanks, Dianne.
> We just want all activities developed by as in the same task.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Slow Eclipse on OS X

2010-06-13 Thread Mariano Kamp
Do you guys use the 64 bit download?

On Sun, Jun 13, 2010 at 6:12 PM, David Horn  wrote:

> Al,
>
> Exactly the same thing happens to me on OS X.  I've accepted that I
> need to restart Eclipse every so often to solve the problem.  It's
> particularly exacerbated if using the XML tools - for example, layout
> or editing the manifest file the "friendly" way.
>
> Dave.
>
> On Jun 13, 8:54 am, Al Sutton  wrote:
> > It's been a problem for a while, I opened a bug athttp://
> code.google.com/p/android/issues/detail?id=6183so you can put
> > a star on it if you want to vote it up.
> >
> > My experience is that it seems to be down to the layout previewer, the
> > more I use it the faster performance degrades.
> >
> > Al.
> >
> > P.S. Before anyone suggests tweaks to my eclipse.ini, I already have
> > ms & max perm size at 256m, mx at 1024m. My machine is a 4GB box with
> > a flash SSD, so the problem isn't physical memory space or disk i/o.
> >
> > On Jun 12, 10:22 pm, Bill Lumberg  wrote:
> >
> >
> >
> > > I am running Eclipse Galileo on an Intel Mac and after using it for a
> > > bit, it becomes very slow.  By slow I mean switching between tabs and
> > > scrolling through source becomes nearly unusable.  I have to close
> > > Eclipse and re-open it, and that usually only solves the problem for a
> > > short time.
> >
> > > Has anyone else ran into this and discovered a way to fix it?
> >
> > > Thank you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2010-06-13 Thread Jeremy Statz
There's a bug on the Droid that prevents it from showing anything with
uses-feature live_wallpaper set, unless that's been fixed recently.
Doesn't explain a 2.1 Nexus, though...

On Jun 13, 11:17 am, David Horn  wrote:
> Hi all,
>
> People are having problems finding my app (Advanced Map Live
> Wallpaper) in the Android Market.  It's free, not copy-protected, and
> the only requirement is SDK level 7 or above.  However, it's invisible
> on some Nexus 2.1 devices, a lot of Droids (2.1), and a smattering of
> other phones.
>
> The fact it disappears seems to be completely random, and it's driving
> me nuts because I don't know if it's a misconfiguration by me
> somewhere or a Market problem.  I know there's been an issue for copy-
> protected apps, but I can't see how this applies to me.
>
> * Copy protection is off
> * It's set to list in all locations
> * It's free
> * It's not localised ("Localized to: unknown")
>
> Any suggestions?
>
> Cheers,
>
> Dave.

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

2010-06-13 Thread Mr Pants
Same here - thanks Google dudes.

On Jun 13, 5:43 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> Issue appears to be resolved.
>
> -John Coryat

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


Re: [android-developers] Service Vs Thread

2010-06-13 Thread Frank Weiss
The problem appears to mainly be the formulation of the question. In
Android, an application doesn't run - it's just a collection of
resources. Of those resources, Activities and Services can run, but
their runtimes are relatively brief. Please try to explain what your
application needs to do when it has no visible Activity. The
recommended solution would depend on that.

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


Re: [android-developers] Service Vs Thread

2010-06-13 Thread tarek attia
Thanks you so much for this clarification ,,exactly I want to make an
application that keeps running while the user may went of the main
application ,,and I guess Service will be the best candidate for doing
that  ,,,

But what if the application will take much time ,,so should I make a thread
that embedded inside it a Service??

On Sun, Jun 13, 2010 at 7:35 PM, Olivier Guilyardi wrote:

> On 06/13/2010 06:23 PM, Olivier Guilyardi wrote:
> > On 06/13/2010 03:46 PM, tarek.attia wrote:
> >> I have a question what to Use ,Service Or Thread,as both run in the
> >> background
> >
> > There is confusion here, because you are referring to two different
> meanings of
> > the word "background".
> >
> > A thread, in Java but also in many other languages, allows for
> parallelization
> > within a single program/process, that is: doing several things at the
> same time.
> > If your program has a GUI and needs to do something heavy then you need
> to do it
> > in the "background" and thus within a separate thread, to avoid freezing
> the UI.
> > But this thread will terminate when your program terminates.
> >
> > A service, in Android, is something which runs even when the application
> is not
> > in the foreground, that is: it continues to run when the user leaves your
> > activity and returns to home, or when the phone goes to sleep. If you
> don't need
> > this then you don't need a service.
>
> One thing that I forgot: if you need to have something to keep on running
> while
> the user goes from one of your activities to the other, then you may also
> need a
> service.
>
> But the best would be that you explain what you are trying to do.
>
> > As you may see, "background" here means something quite different,
> because a
> > service never runs in a dedicated /thread/. By default it runs in the
> main
> > application thread, and may optionally run in a separate /process/:
> > http://developer.android.com/intl/fr/reference/android/app/Service.html
>
> --
>  Olivier
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
tarek

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

2010-06-13 Thread Maps.Huge.Info (Maps API Guru)
Issue appears to be resolved.

-John Coryat

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


[android-developers] Content provider implementation questions

2010-06-13 Thread Alex Xin
Hi, All

I'm now trying to implement my own content provider. My original data was
stored on network or local/remote file systems, so I want to provide data
via input stream. I know that client may call ContentResolver.getnputStream
to retrieve the input stream to access data. But I don't know how to
implement content provider in this situation, I searched the Internet but
all the tutorials for content provider are talks about how to expose data
that stored on local database.

Could anyone please help me on this or give me some code snippets to show
how to expose data that stored on file systems using a content provider?

Also could anyone please tell me what happened when client
call ContentResolver.getnputStream? I want to know how to return an input
stream to my client.

Thank you

Alex

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

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 06:23 PM, Olivier Guilyardi wrote:
> On 06/13/2010 03:46 PM, tarek.attia wrote:
>> I have a question what to Use ,Service Or Thread,as both run in the
>> background
> 
> There is confusion here, because you are referring to two different meanings 
> of
> the word "background".
> 
> A thread, in Java but also in many other languages, allows for parallelization
> within a single program/process, that is: doing several things at the same 
> time.
> If your program has a GUI and needs to do something heavy then you need to do 
> it
> in the "background" and thus within a separate thread, to avoid freezing the 
> UI.
> But this thread will terminate when your program terminates.
> 
> A service, in Android, is something which runs even when the application is 
> not
> in the foreground, that is: it continues to run when the user leaves your
> activity and returns to home, or when the phone goes to sleep. If you don't 
> need
> this then you don't need a service.

One thing that I forgot: if you need to have something to keep on running while
the user goes from one of your activities to the other, then you may also need a
service.

But the best would be that you explain what you are trying to do.

> As you may see, "background" here means something quite different, because a
> service never runs in a dedicated /thread/. By default it runs in the main
> application thread, and may optionally run in a separate /process/:
> http://developer.android.com/intl/fr/reference/android/app/Service.html

--
  Olivier

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

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 03:46 PM, tarek.attia wrote:
> 
> I have a question what to Use ,Service Or Thread,as both run in the
> background

There is confusion here, because you are referring to two different meanings of
the word "background".

A thread, in Java but also in many other languages, allows for parallelization
within a single program/process, that is: doing several things at the same time.
If your program has a GUI and needs to do something heavy then you need to do it
in the "background" and thus within a separate thread, to avoid freezing the UI.
But this thread will terminate when your program terminates.

A service, in Android, is something which runs even when the application is not
in the foreground, that is: it continues to run when the user leaves your
activity and returns to home, or when the phone goes to sleep. If you don't need
this then you don't need a service.

As you may see, "background" here means something quite different, because a
service never runs in a dedicated /thread/. By default it runs in the main
application thread, and may optionally run in a separate /process/:
http://developer.android.com/intl/fr/reference/android/app/Service.html

--
  Olivier

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


[android-developers] App not showing in Market - 2.1, not copy protected

2010-06-13 Thread David Horn
Hi all,

People are having problems finding my app (Advanced Map Live
Wallpaper) in the Android Market.  It's free, not copy-protected, and
the only requirement is SDK level 7 or above.  However, it's invisible
on some Nexus 2.1 devices, a lot of Droids (2.1), and a smattering of
other phones.

The fact it disappears seems to be completely random, and it's driving
me nuts because I don't know if it's a misconfiguration by me
somewhere or a Market problem.  I know there's been an issue for copy-
protected apps, but I can't see how this applies to me.

* Copy protection is off
* It's set to list in all locations
* It's free
* It's not localised ("Localized to: unknown")

Any suggestions?

Cheers,

Dave.

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

2010-06-13 Thread David Horn
Al,

Exactly the same thing happens to me on OS X.  I've accepted that I
need to restart Eclipse every so often to solve the problem.  It's
particularly exacerbated if using the XML tools - for example, layout
or editing the manifest file the "friendly" way.

Dave.

On Jun 13, 8:54 am, Al Sutton  wrote:
> It's been a problem for a while, I opened a bug 
> athttp://code.google.com/p/android/issues/detail?id=6183so you can put
> a star on it if you want to vote it up.
>
> My experience is that it seems to be down to the layout previewer, the
> more I use it the faster performance degrades.
>
> Al.
>
> P.S. Before anyone suggests tweaks to my eclipse.ini, I already have
> ms & max perm size at 256m, mx at 1024m. My machine is a 4GB box with
> a flash SSD, so the problem isn't physical memory space or disk i/o.
>
> On Jun 12, 10:22 pm, Bill Lumberg  wrote:
>
>
>
> > I am running Eclipse Galileo on an Intel Mac and after using it for a
> > bit, it becomes very slow.  By slow I mean switching between tabs and
> > scrolling through source becomes nearly unusable.  I have to close
> > Eclipse and re-open it, and that usually only solves the problem for a
> > short time.
>
> > Has anyone else ran into this and discovered a way to fix it?
>
> > Thank you.

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


Re: [android-developers] Re: Service Vs Thread

2010-06-13 Thread tarek attia
Services Run in the background as stated here

*Services*A *service* doesn't have a visual user interface, but rather runs
in the background for an indefinite period of time
http://developer.android.com/guide/topics/fundamentals.html
So my question is when to use Services and When to Use threads ??...and Can
I make services inside threads??

On Sun, Jun 13, 2010 at 6:21 PM, skink  wrote:

>
>
> Kumar Bibek wrote:
> > Services obviously don't run on the UI thread. It runs in the
> > background. However, Services have their own lifecycle, and can be
> > easily managed by applications. You can think of Services as an
> > extension of threads, in the sense that both of them do not run on the
> > UI thread.
> >
>
> only IntentService runs in its own thread.
>
> ordinary Services run in the main (UI) thread of their hosting
> processes:
>  http://developer.android.com/intl/fr/reference/android/app/Service.html
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
tarek

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

2010-06-13 Thread skink


Kumar Bibek wrote:
> Services obviously don't run on the UI thread. It runs in the
> background. However, Services have their own lifecycle, and can be
> easily managed by applications. You can think of Services as an
> extension of threads, in the sense that both of them do not run on the
> UI thread.
>

only IntentService runs in its own thread.

ordinary Services run in the main (UI) thread of their hosting
processes:
 http://developer.android.com/intl/fr/reference/android/app/Service.html

pskink

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


[android-developers] Re: Service Vs Thread

2010-06-13 Thread Kumar Bibek
Services obviously don't run on the UI thread. It runs in the
background. However, Services have their own lifecycle, and can be
easily managed by applications. You can think of Services as an
extension of threads, in the sense that both of them do not run on the
UI thread.

Thanks and Regards,
Kumar Bibek

On Jun 13, 7:47 pm, skink  wrote:
> On Jun 13, 11:46 am, "tarek.attia"  wrote:
>
> > Hi all,
>
> > I have a question what to Use ,Service Or Thread,as both run in the
> > background
>
> no, services run in the UI thread
>
> pskink

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


[android-developers] Re: Service Vs Thread

2010-06-13 Thread skink


On Jun 13, 11:46 am, "tarek.attia"  wrote:
> Hi all,
>
> I have a question what to Use ,Service Or Thread,as both run in the
> background

no, services run in the UI thread

pskink

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


[android-developers] Strange behavior of ProgressDialog when using its two arguments constructor

2010-06-13 Thread PP
Hello,

   Since I am using a theme with a light background and thus dark text
color, I am trying to change the text color of a ProgressDialog from
black to white as follow  in my res/values/style.xml






@drawable/back_repeat
#000