[android-developers] Re: character replace

2011-09-10 Thread Zsolt Vasvari
How are you trying to do this conversion?

On Sep 11, 11:37 am, bob  wrote:
> How do I tell Java what to replace a special UTF-8 character with when
> converting to US-ASCII?

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


[android-developers] not able to create image and save resized image except the type Bitmap.Config.RGB_565

2011-09-10 Thread Honest
i have made simple application which load image in canvas scale it
according to screen height and width and after that user can write and
draw something on it using his finger and once user complete its
drawing. He should be able to save it. But i have to save the image as
same width and height as original image.(not according to phone screen
size). So i am scaling the image to its original height and width. But
it is only able to scale if i use Bitmap type Bitmap.Config.RGB_565 as
it uses law memory(but very poor quality). For others type like
Bitmap.Config.ALPHA_8, Bitmap.Config.ARGB_ it is giving
MemoryOutOfException. The code to re size image to its original width
and height is as follow.

public Bitmap getResizedBitmap(Bitmap bm, int newHeight, int newWidth)
{

int width = bm.getWidth();
int height = bm.getHeight();
float scaleWidth = ((float) newWidth) / width;
float scaleHeight = ((float) newHeight) / height;

// create a matrix for the manipulation
Matrix matrix = new Matrix();
// resize the bit map
matrix.postScale(scaleWidth, scaleHeight);
// recreate the new Bitmap
BitmapFactory.Options options = new BitmapFactory.Options();
options.inTempStorage = new byte[16*1024];
//bm.
//BitmapFactory.decodeByteArray(bm.getRowBytes(), 0, length,
opts)
Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, width,
height,
matrix, false);


 //  return Bitmap.createScaledBitmap(bm, newWidth, newHeight,
true);
return resizedBitmap;
}
The following is code to create blank bitmap on which i draw the
content which is in my view and then i try to resize it.

Bitmap b = Bitmap.createBitmap(view.getWidth(), view.getHeight(),
Bitmap.Config.RGB_565);

The main problem with Bitmap.Config.RGB_565 is the quality of image is
very poor compare to original image which has very good quality. so i
want to use Bitmap.Config.ARGB_ if possible. any suggestion and
advise is more then welcome.

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


[android-developers] Hide Phone Number in the Dialer

2011-09-10 Thread mwllace
Im using  and intent to invoke the default dialer and automatically
call  phone number stored in my application. Everything works fine,
but the number is visible in the default dialer UI. I need to display
something else in place of the number like "My Special Number". The
behavior would be much like when a user dials a number already stored
in contacts, where the name of the person is visible and not the
underying phone number.

I am able to update the call logs so they read "My Special Number"
when my app dials this number, but this is only after the phone is
hung up.

This is the way I update the Call Log:

values.put(CallLog.Calls.CACHED_NAME, "My Special Number");

Is there a similar method for writing to the default dialer when the
call is initiated?

Thanks for any pointers you can provide!

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

2011-09-10 Thread Mohit Agarwal
i tried to run internet in web browser,it still doesn't work
pls help...

On Sat, Sep 10, 2011 at 10:56 PM, Mark Murphy wrote:

> On Sat, Sep 10, 2011 at 12:53 PM, Mohit Agarwal 
> wrote:
> > surely api key is at right place n also i hv included INTERNET PERMISSION
> in
> > manifest..i also hv internet access...
> > the only option left is emulator does nt hv internet accessHow to get
> it
> > accessedpls tell me
>
> Try launching the Web browser. If the Web browser can get to the
> Internet, then one of your other two presumptions is faulty.
>
> --
> 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 *Advanced* Android Development_ Version 2.0
> Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] URI-escape

2011-09-10 Thread bob
I'm looking at this WebView function:

public void loadData (String data, String mimeType, String encoding)
Since: API Level 1
Load the given data into the WebView. This will load the data into
WebView using the data: scheme. Content loaded through this mechanism
does not have the ability to load content from the network.
Parameters
data
A String of data in the given encoding. The date must be URI-escaped
-- '#', '%', '\', '?' should be replaced by %23, %25, %27, %3f
respectively.
mimeType
The MIMEType of the data. i.e. text/html, image/jpeg
encoding
The encoding of the data. i.e. utf-8, base64


I just noticed the "data must be URI-escaped".  Is there a function
for this?

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


[android-developers] character replace

2011-09-10 Thread bob
How do I tell Java what to replace a special UTF-8 character with when
converting to US-ASCII?

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

2011-09-10 Thread Doug
On Sep 9, 1:30 am, "B.Arunkumar"  wrote:
>     Would somebody have some idea what exactly has RockPlayer done in
> the Hardware Decoding mode on a high level basis? I mean have they
> used the mediaplayer as it is or they have changed something at the
> source code level of MediaPlayer to get more improvements than the
> MediaPlayer (support more RTSP Url formats) and things like that?

Why do you say that MediaPlayer does not support rtsp?  I ask this
because it does support rtsp.  It's documented.  The audio/video
format of the stream still has to be supported by the device, though.

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


[android-developers] same app one tablet and phone with differnt gui

2011-09-10 Thread rich friedel
You are on the correct path... use the different layouts to target the device. 

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

2011-09-10 Thread Christopher Van Kirk

Quite right. Sorry, thought this was on a different list.

I still think he (or she) needs to review memory usage. Running into the 
memory limit is a good indicator of a bad design.


On 9/11/2011 3:56 AM, TreKing wrote:
On Sat, Sep 10, 2011 at 2:36 AM, Christopher Van Kirk 
mailto:christopher.vank...@gmail.com>> 
wrote:


Check that the pointer returned to you when  you allocate memory
is non-null. If it's null, you're out of memory.


You don't use pointers or "allocate memory" directly in Java and even 
if you did you would not be getting back a null pointer - you'll get 
an OutOfMemoryException as the OP is getting.


-
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 


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

[android-developers] Get views and widgets of activities in a default android applications (Settings, contacts etc)

2011-09-10 Thread rich friedel
AFAIK you cannot do what you describe with the standard Android SDK.

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


Re: [android-developers] Need help building Android 2.2.2 (Unable to look up android.git.kernel.org)

2011-09-10 Thread Mark Murphy
Questions regarding building the firmware belong on one of the Google
Groups listed at:

http://source.android.com/community/

such as the [android-building] Google Group.

Please bear in mind that android.git.kernel.org is still unavailable,
after the kernel.org hack attack.

On Sat, Sep 10, 2011 at 5:22 PM, Anuj Goyal  wrote:
> I am trying to build Android 2.2.2 from scratch - is this the right way to
> do so?
>
> ~/bin/repo init -u git://android.git.kernel.org/platform/manifest.git -b
> froyo
> Getting repo ...
>    from git://android.git.kernel.org/tools/repo.git
> fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service
> not known)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 *Advanced* Android Development_ Version 2.0
Available!

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


[android-developers] Need help building Android 2.2.2 (Unable to look up android.git.kernel.org)

2011-09-10 Thread Anuj Goyal
I am trying to build Android 2.2.2 from scratch - is this the right way to 
do so?

~/bin/repo init -u git://android.git.kernel.org/platform/manifest.git -b 
froyo
Getting repo ...
   from git://android.git.kernel.org/tools/repo.git
fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service 
not known)

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

[android-developers] Webview session or how to hold some particular view

2011-09-10 Thread ANKUR GOEL
can anybody help me for maintain the session in webview

suppose i am login in some url then i go different activities when i return
back to webview it should show the last page only

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

[android-developers] Bitmap upload issue

2011-09-10 Thread ANKUR GOEL
i am taking the photo from camera and converting it to ...bytearray 

Bitmap bmp = intent.getExtras().get("data");
ByteArrayOutputStream stream = new ByteArrayOutputStream();

bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();

something like that ..

but the image quality is very poor ..
can anyone help me in this ..
what will be the problem ..

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

Re: [android-developers] OutOfMemory exceptions

2011-09-10 Thread TreKing
On Sat, Sep 10, 2011 at 2:36 AM, Christopher Van Kirk <
christopher.vank...@gmail.com> wrote:

> Check that the pointer returned to you when  you allocate memory is
> non-null. If it's null, you're out of memory.


You don't use pointers or "allocate memory" directly in Java and even if you
did you would not be getting back a null pointer - you'll get an
OutOfMemoryException as the OP is getting.

-
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] Is there some APIs to monitor the RAM/CPU utilized by another app?

2011-09-10 Thread Mark Murphy
On Sat, Sep 10, 2011 at 2:47 PM, Jim Graham  wrote:
> So when
> developing a live wallpaper, for example, and getting advice to check
> its usage of RAM, CPU, and battery, there is no valid way of doing so,
> and the advice is therefore equally invalid?  Or is even an approximate
> number on those valid?

Your previous question asked how other apps that report this data do
it. That is only loosely tied to how you as a developer testing your
own app on your own equipment would do it. What is workable for a
developer in a lab is not necessarily something that is
production-grade and should be foisted upon unsuspecting users.
Unfortunately, there are too many lousy engineers who can't tell the
difference, or their ego is yapping too loudly in their ears to just
go use those techniques anyway, risks be damned.

With respect to RAM, Ms. Hackborn's post on SO that I linked to
previously will help you measure this, and much of her post is about
developer tools (e.g., using adb).

With respect to CPU, for any single device that you are holding in
your hand, if you can run top or can get raw stuff out of /proc/,
those should be valid.

With respect to battery... well, that's a pain to measure. If you
don't show up on the "battery blame screen" (usually off of Settings >
About) after you've been running for many hours, users probably will
not complain about your battery consumption. For more details than
that, you either gotta shell out for a Qualcomm MDP (around $1,400),
or try to get PowerTutor or the equivalent to work for you, or tear
apart a phone and figure out where to hook up leads for a wattmeter,
or something.

-- 
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 *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] Is there some APIs to monitor the RAM/CPU utilized by another app?

2011-09-10 Thread Jim Graham
On Sat, Sep 10, 2011 at 02:30:58PM -0400, Mark Murphy wrote:

> Apps are probably using various Linux values out of /proc/ and hoping
> they are doing it correctly, that the results will be available on all
> devices, etc. This is not part of the Android SDK and there are no
> guarantees here.

Ahh, ok, thanks.  I was wondering if it was something like that,
but I wasn't quite ready to make that (educated) guess.  :-)   So when
developing a live wallpaper, for example, and getting advice to check
its usage of RAM, CPU, and battery, there is no valid way of doing so,
and the advice is therefore equally invalid?  Or is even an approximate
number on those valid?

Later,
   --jim

-- 
73 DE N5IAL (/4)| Remember your spelling rules, including:
spooky1...@gmail.com|   I before E except after C
< Running FreeBSD 7.0 > | 
ICBM / Hurricane:   |   BEING a native-born American, I don't
   30.44406N 86.59909W  |   always notice our WEIRD spelling

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is there some APIs to monitor the RAM/CPU utilized by another app?

2011-09-10 Thread Mark Murphy
On Sat, Sep 10, 2011 at 2:21 PM, Jim Graham  wrote:
> Ok, I'm confused now (so what's new?)  What, then, are all of the
> apps that list system memory usage, both total and per app, doing to
> get the information?

http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android/2299813#2299813

Apps are probably using various Linux values out of /proc/ and hoping
they are doing it correctly, that the results will be available on all
devices, etc. This is not part of the Android SDK and there are no
guarantees here.

> Same question for cpu usage (total and per app)

See above /proc/ note.

-- 
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 *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] Is there some APIs to monitor the RAM/CPU utilized by another app?

2011-09-10 Thread Jim Graham
On Sat, Sep 10, 2011 at 10:49:59AM -0700, Dianne Hackborn wrote:
> Sorry there is no API in the SDK.  There are non-supported things you
> can do to get CPU info, but no way to get good memory use info.

Ok, I'm confused now (so what's new?)  What, then, are all of the
apps that list system memory usage, both total and per app, doing to
get the information?  Same question for cpu usage (total and per app)

Thanks,
   --jim

-- 
73 DE N5IAL (/4)| Peter da Silva:  No, try "rm -rf /"
spooky1...@gmail.com| Dave Aronson:As your life flashes before
< Running FreeBSD 7.0 > |  your eyes, in the unit of time known as an
ICBM / Hurricane:   |  ohnosecond (alt.sysadmin.recovery)
   30.44406N 86.59909W  |

Android Apps Listing at http://www.jstrack.org/barcodes.html

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

2011-09-10 Thread Dianne Hackborn
And note that holding a partial wake lock will have a *very* noticeable
impact on battery life.

On Fri, Sep 9, 2011 at 3:18 PM, nexbug  wrote:

> Get the lock in the oncreate of the service and release it at the end
> of the thread
>
> On Sep 9, 4:41 am, Evelyon  wrote:
> > I have got a service which runs a thread. The thread save some data in
> > a file (in the sdcard). When Android goes to sleep, I need that the
> > service and the thread continue running. I tried it with a
> > PARTIAL_WAKE_LOCK, but it doesn't work; the thread stops while Android
> > is sleeping. Other locks like FULL_WAKE_LOCK works, but I need to use
> > PARTIAL_WAKE_LOCK because, in the future, in that thread I will read
> > from a serial port and I don't care the screen turn off.
> >
> > I don't know if I have some mistake in the code, or if I don't
> > understand the PARTIAL_WAKE_LOCK. Somebody can tell me why my solution
> > doesn't wrok?
> >
> > This is part of the code of the main activity, where the service is
> > stareted:
> >
> > public void onClick(View v) {
> > if (SerialPortService.WAKELOCK == null) {
> > PowerManager pm = (PowerManager)
> > getSystemService(Context.POWER_SERVICE);
> > SerialPortService.WAKELOCK =
> > pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
> > SerialPortService.WL_TAG);
> > SerialPortService.WAKELOCK.acquire();
> > startService(new Intent(getApplicationContext(),
> > SerialPortService.class));
> > }
> > }
> >
> > This is the code of the service:
> >
> > public class SerialPortService extends Service {
> >
> > public static String WL_TAG = "serial_port_wl_tag";
> > public static PowerManager.WakeLock WAKELOCK = null;
> > private BufferedWriter out = null;
> >
> > public IBinder onBind(Intent intent) {
> > return null;
> > }
> >
> > public void onCreate() {
> > super.onCreate();
> > try {
> > File root = Environment.getExternalStorageDirectory();
> > if (root.canWrite()){
> > File dataFile = new File(root, "batterytest.txt");
> > FileWriter dataFileWritter = new
> > FileWriter(dataFile);
> > out = new BufferedWriter(dataFileWritter);
> > }
> > } catch (IOException ioe) {
> > Log.d("TEST", "Could not open file " +
> > ioe.getMessage());
> > }
> > readThread = new ReadThread();
> > readThread.start();
> > }
> >
> > public void onDestroy() {
> > if (readThread != null) readThread.interrupt();
> > WAKELOCK.release();
> > WAKELOCK = null;
> > try {
> > out.close();
> > } catch (IOException ioe) {
> > Log.d("TEST", "Could not close file " +
> > ioe.getMessage());
> > }
> > super.onDestroy();
> > }
> >
> > private class ReadThread extends Thread {
> > public void run() {
> > super.run();
> > while (!isInterrupted()) {
> > try {
> > Thread.sleep(5000);
> > if (out != null) {
> > Calendar now = Calendar.getInstance();
> > out.write(now.getTime().toString());
> > out.newLine();
> > } catch (IOException ioe) {
> > Log.d("TEST", "Could not read file " +
> > ioe.getMessage());}
> > return;
> > } catch (InterruptedException e) {
> > return;
> > }
> > }
> > }
> >
> > }
> >
> > }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Is there some APIs to monitor the RAM/CPU utilized by another app?

2011-09-10 Thread Dianne Hackborn
Sorry there is no API in the SDK.  There are non-supported things you can do
to get CPU info, but no way to get good memory use info.

On Sat, Sep 10, 2011 at 5:29 AM, sblantipodi
wrote:

> As title.
>
> I have two apps.
> One app should monitor how much CPU and how much RAM is consuming the
> other app.
>
> Is there some API to do that?
>
> 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] Re: one AsyncTask at a time

2011-09-10 Thread Dianne Hackborn
I wouldn't trust that not to have a deadlock.  Not to mention sitting in a
tight loop polling is pretty wretched.

If the desire is: "I want to execute whatever is the most recent operation,
dropping any before it," then my general solution is to have a pointer to
the most recent operation, schedule the work for it when first setting it,
and when that work is done checking to see if there is another operation to
execute and starting again if so.

That way as you create new operations while the first one is running, you
just drop any that haven't started yet.  And when the last one that was
started running is done it will start execution of whatever was the last
thing you wanted to happen.

On Sat, Sep 10, 2011 at 7:13 AM, bob  wrote:

> That's a possibility.  Or, I might use this function I wrote:
>
>void replaceCurrentTask(android.os.AsyncTask
> newTask){
>if (currentTask != null)  {
>
>currentTask.cancel(true);
>while (!currentTask.isCancelled() &&
> currentTask.getStatus()!
> =AsyncTask.Status.FINISHED) trytosleep(1);
>}
>
>currentTask=newTask;
>currentTask.execute();
>
>}
>
>
>
> On Sep 10, 4:36 am, Marco Alexander Schmitz
>  wrote:
> > Hi. How about blocking the ui with some nice waiting dialog? Greetings
> marco
> > Am 10.09.2011 09:39 schrieb "bob" :
> >
> >
> >
> >
> >
> >
> >
> > > So, I have a bunch of buttons and each one launches an AsyncTask.
> >
> > > So, should I keep a variable like this:
> >
> > > AsyncTask currentTask=null;
> >
> > > Then should I do
> >
> > > if (currentTask != null) currentTask.cancel();
> >
> > > before I launch the new task?
> >
> > > I only want one task running at a time. Right now, if someone monkeys
> > > with the buttons, they get a bunch of tasks running simultaneously
> > > with weird UI results.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, 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] Why is the default to use dpi instead of screen size for drawables

2011-09-10 Thread Dianne Hackborn
They are two completely different things.

Please read:
http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html

On Sat, Sep 10, 2011 at 7:44 AM, ArcDroid  wrote:

> Directories are already created for ldpi, mdpi and hdpi, but it
> appears that normal, large, xlarge work much better for tablets and
> phone sizes since some old phones fall into the mdpi bucket.  why is
> the default to use dpi instead of screen size?
>
> Thanks,
> ArcDroid
> http://www.arcdroid.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
>



-- 
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] Autoreload of Webview

2011-09-10 Thread rich friedel
Have you attempted to discuss this with your IT people? You are asking how to 
break their currently implemented securtiy policies. No offense, but I would 
fire anyone who did this on the spot without question.

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

2011-09-10 Thread Mark Murphy
On Sat, Sep 10, 2011 at 12:53 PM, Mohit Agarwal  wrote:
> surely api key is at right place n also i hv included INTERNET PERMISSION in
> manifest..i also hv internet access...
> the only option left is emulator does nt hv internet accessHow to get it
> accessedpls tell me

Try launching the Web browser. If the Web browser can get to the
Internet, then one of your other two presumptions is faulty.

-- 
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 *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] How to run google map on Emulator

2011-09-10 Thread Mohit Agarwal
surely api key is at right place n also i hv included INTERNET PERMISSION in
manifest..i also hv internet access...
the only option left is emulator does nt hv internet accessHow to get it
accessedpls tell me

On Sat, Sep 10, 2011 at 10:18 PM, Mark Murphy wrote:

> Either:
>
> -- your API key is wrong (or is in the wrong place), or
> -- you do not have the INTERNET permission, or
> -- the emulator does not have Internet access
>
> On Sat, Sep 10, 2011 at 12:42 PM, Mohit Agarwal 
> wrote:
> > i m developing an app based on google mapsi hv the api key...
> > When i run my app instead of map it's showing some checkboxesno map
> can
> > be seen...help me
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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 *Advanced* Android Development_ Version 2.0
> Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-09-10 Thread blake
Tedd,
  I'm quite sure that you don't want to do any of this in onDraw.

  It's just a thought, but suppose that measureHeight, in addition to
remembering the width it had just returned, kept a number that
represented the error in that width.  When it returns, it requests a
re-layout, unless that error is small.  That would allow you to avoid
the second thread altogether... a thread that is, surely, going to be
hard to manage over your Activitiy's lifecycle.

-blake
Programming Android, FTW!
http://oreilly.com/catalog/0636920010364


On Sep 9, 1:48 pm, Ted Hopp  wrote:
> I asked this question on 
> SOa 
> month ago but got no answer. Maybe I'll have better luck here. :)
>
> I keep running into a sizing and layout problem for custom views and I'm
> wondering if anyone can suggest a "best practices" approach. The problem is
> as follows. Imagine a custom view where the height required for the content
> depends on the width of the view (similar to a multi-line TextView).
> (Obviously, this only applies if the height isn't fixed by the layout
> parameters.) The catch is that for a given width, it's rather expensive to
> compute the content height in these custom views. In particular, it's too
> expensive to be computed on the UI thread, so at some point a worker thread
> needs to be fired up to compute the layout and when it is finished, the UI
> needs to be updated.
>
> The question is, how should this be designed? I've thought of several
> strategies. They all assume that whenever the height is calculated, the
> corresponding width is recorded.
>
> The first strategy is shown in this code:
>
> protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
>    int width = measureWidth(widthMeasureSpec);
>    setMeasuredDimension(width, measureHeight(heightMeasureSpec, width));
>
> }
>
> private int measureWidth(int widthMeasureSpec) {
>    // irrelevant to this problem
>
> }
>
> private int measureHeight(int heightMeasureSpec, int width) {
>    int result;
>    int specMode = MeasureSpec.getMode(measureSpec);
>    int specSize = MeasureSpec.getSize(measureSpec);
>    if (specMode == MeasureSpec.EXACTLY) {
>        result = specSize;
>    } else {
>        if (width != mLastWidth) {
>            interruptAnyExistingLayoutThread();
>            mLastWidth = width;
>            mLayoutHeight = DEFAULT_HEIGHT;
>            startNewLayoutThread();
>        }
>        result = mLayoutHeight;
>        if (specMode == MeasureSpec.AT_MOST && result > specSize) {
>            result = specSize;
>        }
>    }
>    return result;
>
> }
>
> When the layout thread finishes, it posts a Runnable to the UI thread to set
> mLayoutHeight to the calculated height and then call requestLayout() (and
> invalidate()).
>
> A second strategy is to have onMeasure always use the then-current value for
> mLayoutHeight (without firing up a layout thread). Testing for changes in
> width and firing up a layout thread would be done by overriding
> onSizeChanged.
>
> A third strategy is to be lazy and wait to fire up the layout thread (if
> necessary) in onDraw.
>
> I would like to minimize the number of times a layout thread is launched
> and/or killed, while also calculating the required height as soon as
> possible. It would probably be good to minimize the number of calls to
> requestLayout() as well.
>
> From the docs, it's clear that onMeasure might be called several times
> during the course of a single layout. It's less clear (but seems likely)
> that onSizeChanged might also be called several times. So I'm thinking that
> putting the logic in onDraw might be the better strategy. But that seems
> contrary to the spirit of custom view sizing, so I have an admittedly
> irrational bias against it.
>
> Other people must have faced this same problem. Are there approaches I've
> missed? Is there a best approach?

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

2011-09-10 Thread Mark Murphy
Either:

-- your API key is wrong (or is in the wrong place), or
-- you do not have the INTERNET permission, or
-- the emulator does not have Internet access

On Sat, Sep 10, 2011 at 12:42 PM, Mohit Agarwal  wrote:
> i m developing an app based on google mapsi hv the api key...
> When i run my app instead of map it's showing some checkboxesno map can
> be seen...help me
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 *Advanced* Android Development_ Version 2.0
Available!

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


[android-developers] How to run google map on Emulator

2011-09-10 Thread Mohit Agarwal
i m developing an app based on google mapsi hv the api key...
When i run my app instead of map it's showing some checkboxesno map can
be seen...help me

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

2011-09-10 Thread Mohit Agarwal
thank u guys it worked i got my api key...

On Sat, Sep 10, 2011 at 2:08 PM, Mohit Agarwal wrote:

> i used debug.keystore to get my MDB fingerprint.
> It said the following
>
> "The fingerprint you entered is not valid. Please press the Back button on
> your browser and enter a valid certificate fingerprint."
>
> wat  to do nw
>
> On Sat, Sep 10, 2011 at 1:33 PM, Mohammed Hossain Doula <
> hossaindo...@gmail.com> wrote:
>
>> http://code.google.com/android/add-ons/google-apis/mapkey.html here you
>> can get the detailed information regarding this...
>>
>> On Sat, Sep 10, 2011 at 1:55 PM, Mohit Agarwal wrote:
>>
>>>  Thanku for ur reply.
>>> but i wrote the command in cmd and it is not showing any MD5 fingerprint.
>>> can u pls tell me t he full exact command to obtain MDR fingerprinti
>>> m using windows
>>>
>>> On Sat, Sep 10, 2011 at 12:29 PM, Michael Banzon wrote:
>>>
 The sign up page tells you how to obtain the MD5 fingerprint:

 http://code.google.com/android/maps-api-signup.html

 Use "keytool"...


 On Sat, Sep 10, 2011 at 8:52 AM, Mohit Agarwal 
 wrote:
 > Hello
 > This is the first time i m developing an app...
 > I need to know from where to get my api key..
 > i went on to the site getting an api key, it asks me MD5
 > fingerprint(wat's This??)
 > how to get MD5 fingerprint...
 >
 > pls 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
 >



 --
 Michael Banzon
 http://michaelbanzon.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
>>>
>>
>>
>>
>> --
>> *--
>> Mohammed Hossain Doula
>> Software Engineer
>> desme INC.*
>> *www: http://www.hossaindoula.com
>> @: ron...@desme.com*
>> *facebook: http://www.facebook.com/ROnyWorld*
>> *twitter: http://www.twitter.com/hossaindoula*
>> *blogspot: hossaindoula.blogspot.com
>> GSM: 00880-167-4347101*
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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: Got the Bluetooth blues: Service Discovery Failed

2011-09-10 Thread darrinps
I have two text books that cover Bluetooth and have read multiple
articles and not one has mentioned the need to do that.

What I read in the documentation is that the UUID is random:

"A Universally Unique Identifier (UUID) is a standardized 128-bit
format for a string ID used to uniquely identify information. The
point of a UUID is that it's big enough that you can select any random
and it won't clash. In this case, it's used to uniquely identify your
application's Bluetooth service. To get a UUID to use with your
application, you can use one of the many random UUID generators on the
web, then initialize a UUID with fromString(String)."

Are you saying that there is some sort of table that exists that
specifies my exact device?

On Sep 8, 10:45 pm, gjs  wrote:
> Hi,
>
> Are you sure you are using the correct UUID value for your device ?
>
> The default UUID in bluetoothchat usually needs to be changed, see the
> Android bluetooth docs.
>
> Regards
>
> On Sep 8, 2:45 pm, darrinps  wrote:
>
>
>
>
>
>
>
> > I've been fighting this for a long time now and thought I'd ask the
> > group.
>
> > I have a Samsung Galaxy S running 2.2. I am trying to connect to a
> > Bluetooth device (Free2move dongle).
>
> > I can get up to the point where I do the
> > createRfcommSocketToServiceRecord  and then I get Service Discovery
> > Failed.
>
> > Here is what my app (VERY closely based on BluetoothChat) is telling
> > me:
>
> > 09-07 23:41:09.582: DEBUG/BluetoothChatService(11472): Paired device
> > found: Free2move WU
> > 09-07 23:41:09.582: DEBUG/BluetoothChatService(11472): Found Free2move
> > device: 00:0B:CE:03:35:49
> > 09-07 23:41:16.644: DEBUG/BluetoothChatService(11472): Will try to
> > connect to: 00:0B:CE:03:35:49
> > 09-07 23:41:28.637: DEBUG/BluetoothChatService(11472): BluetoothSocket
> > created for device: Free2move WU
> > 09-07 23:41:28.641: INFO/BluetoothChatService(11472): BEGIN
> > ConnectThread
> > 09-07 23:41:28.656: INFO/BluetoothChatService(11472): Using socket to
> > connect now...
> > 09-07 23:41:30.621: DEBUG/BluetoothChatService(11472): setState()
> > STATE_NONE -> STATE_CONNECTING
> > 09-07 23:41:34.695: ERROR/BluetoothChatService(11472): Connection
> > failed
> > 09-07 23:41:34.711: DEBUG/BluetoothChatService(11472): setState()
> > STATE_CONNECTING -> STATE_LISTEN
> > 09-07 23:41:34.730: WARN/BluetoothChatService(11472): Connection
> > failed with exception: Service discovery failed
> > 09-07 23:41:34.730: WARN/BluetoothChatService(11472): With cause:
> > class java.io.IOException
> > 09-07 23:41:34.742: WARN/BluetoothChatService(11472):
> > android.bluetooth.BluetoothSocket$SdpHelper.doSdp: 377
> > 09-07 23:41:34.742: WARN/BluetoothChatService(11472):
> > android.bluetooth.BluetoothSocket.connect: 201
> > 09-07 23:41:34.762: WARN/BluetoothChatService(11472):
> > com.standardandroid.speedpro.bluetooth.BluetoothChatService
> > $ConnectThread.run: 569
>
> > The code that dies looks like this:
>
> > private class ConnectThread extends Thread
> >         {
> >                 private final BluetoothSocket mmSocket;
> >                 private final BluetoothDevice mmDevice;
>
> >                 public ConnectThread(BluetoothDevice device)
> >                 {
> >                         mmDevice = device;
> >                         BluetoothSocket tmp = null;
>
> >                         // Get a BluetoothSocket for a connection with the
> >                         // given BluetoothDevice
> >                         try
> >                         {
>
> >                                 tmp = 
> > device.createRfcommSocketToServiceRecord(MY_UUID);
>
> > I've seen some reports that this might be a bug in Android 
> > itself:http://groups.google.com/group/android-platform/browse_thread/thread/...
>
> > Does anyone know? Android folks?
>
> > 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: Why is the default to use dpi instead of screen size for drawables

2011-09-10 Thread ArcDroid
One example is the htc hero and the acer iconica a500 10" tablet both
use mdpi


On Sep 10, 7:44 am, ArcDroid  wrote:
> Directories are already created for ldpi, mdpi and hdpi, but it
> appears that normal, large, xlarge work much better for tablets and
> phone sizes since some old phones fall into the mdpi bucket.  why is
> the default to use dpi instead of screen size?
>
> Thanks,
> ArcDroid
http://www.arcdroid.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: How reliable is Google Marketplace Device Compatibility Report?

2011-09-10 Thread Mark Murphy
On Sat, Sep 10, 2011 at 10:48 AM, b0b  wrote:
> It has to be in a conditional test ie:
>
>   if (Build.VERSION.SDK_INT >=   {
>  // you can call any function defined only  since   or
> greater.
>   }

Ah, my apologies. I thought the issue remained for method invocations,
but you're right, it works.

Thanks!

-- 
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 *Advanced* Android Development_ Version 2.0
Available!

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


Re: [android-developers] Modules similar to DLLs in android

2011-09-10 Thread Michael Banzon
The JAR files are a standard Java thing - google'ing it should give
good resources.

The process have nothing to do with the final Android app - you deal
with all the magic in Eclipse or your favorite development env.

On Sat, Sep 10, 2011 at 4:37 PM, New Developer  wrote:
> Thanks Michael
>
> I'm not sure I'm going to use the Android Market, and I'm guessing I could
> host the apk (with no activity) on my own site.
>
> Do you know of any tutorials  (or care to share)  how to create a jar file
> and then link/include it inside an activity ?
>
>
> thanks again
>
>
> On 09/10/2011 08:12 AM, Michael Banzon wrote:
>
> I haven't actually tried to see if it's possible - but I suppose you
> could make an application with no activity for the launcher.
>
> The main problem I see is distribution - how do you get users to
> install the program package from Android Market?
>
> I make a few programs that share functionality and I've bundled this
> in it's own project and include the JAR-file in the projects that need
> it.
>
>
> On Sat, Sep 10, 2011 at 1:41 PM, New Developer  wrote:
>
> Hi All
>
> Is there a mechanism to create the equivalence of DLLs so that one can
> create modules.
>
> It's not quite an apk, can't be run by itself,  it must be called from a
> main.apk.
>
> and this main.apk will scan looking for these modules and based on what is
> or is not present
> will then have a certain set of functions and functionality ?
>
> just asking
>
> Thanks in advance
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Michael Banzon
http://michaelbanzon.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] Modules similar to DLLs in android

2011-09-10 Thread TreKing
On Sat, Sep 10, 2011 at 6:41 AM, New Developer  wrote:

> and this main.apk will scan looking for these modules and based on what is
> or is not present
> will then have a certain set of functions and functionality ?
>

Google "Android Plugins" or something - many apps do this.

On Sat, Sep 10, 2011 at 9:37 AM, New Developer  wrote:

> Do you know of any tutorials  (or care to share)  how to create a jar file
> and then link/include it inside an activity ?


Check out Android Library Projects in the documentation.

Note that in the former case you're talking about *dynamic* linking while in
the latter you're talking about *static* linking.

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

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

Re: [android-developers] Re: How reliable is Google Marketplace Device Compatibility Report?

2011-09-10 Thread b0b
It has to be in a conditional test ie:

  if (Build.VERSION.SDK_INT >=   {
 // you can call any function defined only  since   or 
greater.
  }


On Saturday, 10 September 2011 13:32:39 UTC+2, Mark Murphy (a Commons Guy) 
wrote:
>
>
> That might be true for data members (never tried that), but it is
> definitely not true for methods. You cannot load a class that refers
> to a method if that method does not exist -- you will get a
> VerifyError.
>
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
>

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

[android-developers] Why is the default to use dpi instead of screen size for drawables

2011-09-10 Thread ArcDroid
Directories are already created for ldpi, mdpi and hdpi, but it
appears that normal, large, xlarge work much better for tablets and
phone sizes since some old phones fall into the mdpi bucket.  why is
the default to use dpi instead of screen size?

Thanks,
ArcDroid
http://www.arcdroid.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] Modules similar to DLLs in android

2011-09-10 Thread New Developer

Thanks Michael

I'm not sure I'm going to use the Android Market, and I'm guessing I 
could host the apk (with no activity) on my own site.


Do you know of any tutorials  (or care to share)  how to create a jar 
file and then link/include it inside an activity ?



thanks again


On 09/10/2011 08:12 AM, Michael Banzon wrote:

I haven't actually tried to see if it's possible - but I suppose you
could make an application with no activity for the launcher.

The main problem I see is distribution - how do you get users to
install the program package from Android Market?

I make a few programs that share functionality and I've bundled this
in it's own project and include the JAR-file in the projects that need
it.


On Sat, Sep 10, 2011 at 1:41 PM, New Developer  wrote:

Hi All

Is there a mechanism to create the equivalence of DLLs so that one can
create modules.

It's not quite an apk, can't be run by itself,  it must be called from a
main.apk.

and this main.apk will scan looking for these modules and based on what is
or is not present
will then have a certain set of functions and functionality ?

just asking

Thanks in advance



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





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

Re: [android-developers] Re: one AsyncTask at a time

2011-09-10 Thread Mark Murphy
On Sat, Sep 10, 2011 at 10:13 AM, bob  wrote:
> That's a possibility.  Or, I might use this function I wrote:
>
>        void replaceCurrentTask(android.os.AsyncTask
> newTask){
>                if (currentTask != null)  {
>
>                        currentTask.cancel(true);
>                        while (!currentTask.isCancelled() && 
> currentTask.getStatus()!
> =AsyncTask.Status.FINISHED) trytosleep(1);
>                }
>
>                currentTask=newTask;
>                currentTask.execute();
>
>        }

Yuck.

Use a LinkedBlockingQueue and your own thread working jobs off of that
queue, rather than AsyncTask.

-- 
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 *Advanced* Android Development_ Version 2.0
Available!

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


[android-developers] Re: one AsyncTask at a time

2011-09-10 Thread bob
That's a possibility.  Or, I might use this function I wrote:

void replaceCurrentTask(android.os.AsyncTask
newTask){
if (currentTask != null)  {

currentTask.cancel(true);
while (!currentTask.isCancelled() && 
currentTask.getStatus()!
=AsyncTask.Status.FINISHED) trytosleep(1);
}

currentTask=newTask;
currentTask.execute();

}



On Sep 10, 4:36 am, Marco Alexander Schmitz
 wrote:
> Hi. How about blocking the ui with some nice waiting dialog? Greetings marco
> Am 10.09.2011 09:39 schrieb "bob" :
>
>
>
>
>
>
>
> > So, I have a bunch of buttons and each one launches an AsyncTask.
>
> > So, should I keep a variable like this:
>
> > AsyncTask currentTask=null;
>
> > Then should I do
>
> > if (currentTask != null) currentTask.cancel();
>
> > before I launch the new task?
>
> > I only want one task running at a time. Right now, if someone monkeys
> > with the buttons, they get a bunch of tasks running simultaneously
> > with weird UI results.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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] Autoreload of Webview

2011-09-10 Thread Jay Bloodworth
At my work, I have to access an intranet site several times a day. The
site has a short session inactivity logout - shorter than the frequency
with which I must access it - so I end up having to relog every time.
I'd like to write a small Webview app to just to a reload every ten
minutes or so to keep me logged in. What's the best way to implement the
reload trigger? Separate thread? Service? I'd like to maintain the
session when the ui side of the process is backgrounded or even killed,
if possible.

Thanks,
Jay

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 some APIs to monitor the RAM/CPU utilized by another app?

2011-09-10 Thread sblantipodi
As title.

I have two apps.
One app should monitor how much CPU and how much RAM is consuming the
other app.

Is there some API to do that?

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] Modules similar to DLLs in android

2011-09-10 Thread Michael Banzon
I haven't actually tried to see if it's possible - but I suppose you
could make an application with no activity for the launcher.

The main problem I see is distribution - how do you get users to
install the program package from Android Market?

I make a few programs that share functionality and I've bundled this
in it's own project and include the JAR-file in the projects that need
it.


On Sat, Sep 10, 2011 at 1:41 PM, New Developer  wrote:
> Hi All
>
> Is there a mechanism to create the equivalence of DLLs so that one can
> create modules.
>
> It's not quite an apk, can't be run by itself,  it must be called from a
> main.apk.
>
> and this main.apk will scan looking for these modules and based on what is
> or is not present
> will then have a certain set of functions and functionality ?
>
> just asking
>
> Thanks in advance
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Michael Banzon
http://michaelbanzon.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: hiding keyboard after button press

2011-09-10 Thread sblantipodi
to make it work on every phone you should delay the softInputMode only
once the keyboard is compeltely visible.

something like this really help that much:
Timer timer = new Timer();
timer.schedule(new TimerTask() {

@Override
public void run() {
InputMethodManager imm = (InputMethodManager)
getSystemService(INPUT_METHOD_SERVICE);

if (imm != null) {
 
imm.hideSoftInputFromWindow(input.getWindowToken(),
0);
}
}
}, 100);

But I don't know if 100milliseconds is enough for every phone/tablet.
On Sep 10, 1:36 pm, Mark Murphy  wrote:
> On Fri, Sep 9, 2011 at 11:02 PM, martypantsROK  wrote:
> > I am using
>
> >     confirmButton.setOnClickListener(new View.OnClickListener() {
> >        public void onClick(View view) {
> >         //hide keyboard :
>
> > getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
>
> >         // do stuff
> >       }
> >    });
>
> > but this doesn't hide the keyboard.
>
> This is not surprising.
>
> > Is being inside the view of the button
> > affecting my ability to hide the keyboard in the parent window?
>
> No. The parent window doesn't have the keyboard in the first place.
>
> Use:
>
> InputMethodManager
> imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
>
> imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
>
> where v is the EditText that has the input method editor open.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-09-10 Thread sblantipodi
this does not work for me neither.

On Sep 10, 1:36 pm, Mark Murphy  wrote:
> On Fri, Sep 9, 2011 at 11:02 PM, martypantsROK  wrote:
> > I am using
>
> >     confirmButton.setOnClickListener(new View.OnClickListener() {
> >        public void onClick(View view) {
> >         //hide keyboard :
>
> > getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
>
> >         // do stuff
> >       }
> >    });
>
> > but this doesn't hide the keyboard.
>
> This is not surprising.
>
> > Is being inside the view of the button
> > affecting my ability to hide the keyboard in the parent window?
>
> No. The parent window doesn't have the keyboard in the first place.
>
> Use:
>
> InputMethodManager
> imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
>
> imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
>
> where v is the EditText that has the input method editor open.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Modules similar to DLLs in android

2011-09-10 Thread New Developer

Hi All

Is there a mechanism to create the equivalence of DLLs so that one can 
create modules.


It's not quite an apk, can't be run by itself,  it must be called from a 
main.apk.


and this main.apk will scan looking for these modules and based on what 
is or is not present

will then have a certain set of functions and functionality ?

just asking

Thanks in advance



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

Re: [android-developers] hiding keyboard after button press

2011-09-10 Thread Mark Murphy
On Fri, Sep 9, 2011 at 11:02 PM, martypantsROK  wrote:
> I am using
>
>     confirmButton.setOnClickListener(new View.OnClickListener() {
>        public void onClick(View view) {
>         //hide keyboard :
>
> getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
>
>         // do stuff
>       }
>    });
>
> but this doesn't hide the keyboard.

This is not surprising.

> Is being inside the view of the button
> affecting my ability to hide the keyboard in the parent window?

No. The parent window doesn't have the keyboard in the first place.

Use:

InputMethodManager
imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);

imm.hideSoftInputFromWindow(v.getWindowToken(), 0);

where v is the EditText that has the input method editor open.

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

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

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


Re: [android-developers] Re: How reliable is Google Marketplace Device Compatibility Report?

2011-09-10 Thread Mark Murphy
On Sat, Sep 10, 2011 at 4:11 AM, b0b  wrote:
> It would crash on Android 1.x only, since starting with 2.0 the classloader
> loads the symbols only when they are reached.
> No need to use reflection for that kind of test if the target is Android
> 2.0+

That might be true for data members (never tried that), but it is
definitely not true for methods. You cannot load a class that refers
to a method if that method does not exist -- you will get a
VerifyError.

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

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

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


Re: [android-developers] Re: Webview android

2011-09-10 Thread Christian Bianchini
I found that the problem is the SVG, android doesn't support it but maybe
there is a library to implement  it.
Anyone know something about that?

On Sat, Sep 10, 2011 at 2:38 AM, IcedNet  wrote:

> I looked at xui before giving in and writing all the javascript by
> hand...
>
> on the other hand, the html5 and css3 are useful, though I haven't
> tried the Canvas object.
> if you're good with javascript and Canvas works, you might be better
> off...  The libraries usually do a lot of the work for you, but the
> webview is not a browser, and it has some real issues that the
> libraries aren't coding for.
>
> Peace,
> Dan
>
> On Sep 9, 3:35 pm, Christian Bianchini
>  wrote:
> > Yes I enabled the JS, I tried to setup a webclient or a chromeclient but
> > nothing is changed.
> >
> > I don't know why but the native webkit engine isn't so cool than firefox,
> > this is a big surprising for me because Chrome is a very good Browser...
> >
> > There is any library ?
> >
> >
> >
> >
> >
> > On Fri, Sep 9, 2011 at 9:22 PM, IcedNet  wrote:
> > > You are enabling JavaScript in the WebView, yes?
> >
> > > If so, and you still have problems, I would invite you to browse
> > > around with Android's "Browser" to the various library sites' demo
> > > pages and watch the fail unfold...
> > > It has issues with many things, JavaScript included.  It is the public
> > > facing version, and actually functions "better" than the API's WebView
> > > in many respects.
> > > If you are counting on using a JavaScript Library with the internal
> > > WebView, count on a world of hurt.
> >
> > > As for using Firefox's webkit as a webview, that is a project of
> > > enormous magnitude, as in porting yet another webkit to Android...
> >
> > > And I am not snarking, tyvm  ;)
> >
> > > Peace,
> > > Dan
> >
> > > On Sep 9, 3:07 pm, Jeremy Dagorn  wrote:
> > > > Hi,
> >
> > > > Look at the documentation, there is a simple example about how to
> load
> > > > an URL from a WebView!
> > >http://developer.android.com/resources/tutorials/views/hello-webview..
> ..
> >
> > > > Best,
> >
> > > > On Sep 9, 11:53 am, Christian Bianchini  wrote:
> >
> > > > > I have a problem with webview, I tried to use thehttp://
> raphaeljs.com/
> > > > > library but was working only on my computer. I tried to use the
> > > > > browser and doesn't work as well.
> > > > > I tried to download Firefox on my phone and it's work!
> >
> > > > > Anyone can suggest me any idea? I would like to use a webview of
> > > > > Firefox but I haven't any idea how to do it.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > ---
> > Web/Mobile Developer
> > Luiis Group
> > christ...@bianchini.ch 
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
---
Web/Mobile Developer
Luiis Group
christ...@bianchini.ch 

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

[android-developers] request for an interview

2011-09-10 Thread Lela Mose
Dear group members,

Please take a minute to read this request for an interview.

My name is Lela Mosemghvdlishvili, I am a PhD candidate at the Erasmus
University Rotterdam (
http://www.eshcc.eur.nl/english/personal/mosemghvdlishvili/) and for my
research am interviewing App developers.

The interview takes about 20 minutes and is an informal chat (typing) in
Skype or Google Talk, where I will ask you to share your experience about
app development, when and how did you start as well as which platform you
prefer.
As a participant you will receive the summary of my findings first, before
it gets published.

Looking forward to talk to you!
Feel free to reply to this email, or contact me through skype  or Google
talk (for both platforms my username is lelamose)


best  wishes,

Lela


-- 
best regards,
Lela Mosemghvdlishvili

Mobile: +31 (0) 6 26 68 75 72

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

[android-developers] Finding if softkeyboard is open in an alertdialog.

2011-09-10 Thread sblantipodi
Hi,
is there a way to detect if the softkeyboard is opened from an
alertdialog?

The alertdialog is shown upside my canvas.
If I call the getHieght() from the canvas once the alertdialog is
shown and the softkeyboard is shown, I get always the same height (the
full screen one).

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


[android-developers] Textview from thread

2011-09-10 Thread Kristoffer
Hello.

I have been searching for answer how to update a textview from another
thread, i have found several answer that point to using "Handler" but
i dont know how i should implement that in my code, maybe you could
point it out for me.

Iam checking if the user is logged in or not to Twitter,
here is my code.

SettingsActivity.java

public void updateLoginStatus() {
Thread f = new Thread() {
public void run() {

final TextView loginStatus = (TextView)
findViewById(R.id.loginstatus);
loginStatus.setText("Logged into Twitter : " +
TwitterUtils.isAuthenticated(prefs));

}

};
f.start();
}

and here is the code in TwitterUtils.java

public static boolean isAuthenticated(SharedPreferences prefs) {

String token = prefs.getString(OAuth.OAUTH_TOKEN, "");
String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, "");

AccessToken a = new AccessToken(token,secret);
Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(Constants.CONSUMER_KEY,
Constants.CONSUMER_SECRET);
twitter.setOAuthAccessToken(a);

try {
twitter.getAccountSettings();
return true;
} catch (TwitterException e) {
return false;
}
}


any good idees?
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: Publish modified APK to the Android Market without triggering an Update to existing users?

2011-09-10 Thread Yahel
> However, you should not discount the question for what it is. It
> benefits us all to understand the nuances of the Android market and
> the publishing process. Its a technical question, so let's find an
> answer.

As I told you in my previous answer :

Trying to upload an apk with the same or lower version number from the
current one will only give you an error message.

It will not break anything. It is actually one of the few thing that
doesn't break in the Android Market.

If you are afraid to try it for yourself and you don't seem to want to
hear it from us, then it is going to be hard to end that thread. So I
repeat :

YOU CAN NOT DO THAT BUT IF YOU TRY IT WILL NOT BREAK ANYTHING.

Loud and clear ?

:D

Yahel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 fetch friend list, profile image and status(online or offline) from facebook in listview

2011-09-10 Thread Nasreen
Hi friends,

i m creating an application who will show the facebook friend list,
image and its status, in a single listview,

my friend list is coming in my listview, but unable to show image ans
its status

if you have some idea about this then plz let me know


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] one AsyncTask at a time

2011-09-10 Thread Marco Alexander Schmitz
Hi. How about blocking the ui with some nice waiting dialog? Greetings marco
Am 10.09.2011 09:39 schrieb "bob" :
> So, I have a bunch of buttons and each one launches an AsyncTask.
>
> So, should I keep a variable like this:
>
> AsyncTask currentTask=null;
>
> Then should I do
>
> if (currentTask != null) currentTask.cancel();
>
> before I launch the new task?
>
> I only want one task running at a time. Right now, if someone monkeys
> with the buttons, they get a bunch of tasks running simultaneously
> with weird UI results.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] how to blit a row of a bitmap as fast as possible to the canvas?

2011-09-10 Thread Marco Alexander Schmitz
Hello,

Id like To take a row of a bitmap and paint IT To The canvas, as fast
as possible, and over and over again. This is going to be a retro
effekt... how can this be done? I rather dislike the idea of a for
loop which paints from the bitmap e.g. 480 times.

Thanks for advice,
Marco

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

2011-09-10 Thread Mohit Agarwal
i used debug.keystore to get my MDB fingerprint.
It said the following

"The fingerprint you entered is not valid. Please press the Back button on
your browser and enter a valid certificate fingerprint."

wat  to do nw

On Sat, Sep 10, 2011 at 1:33 PM, Mohammed Hossain Doula <
hossaindo...@gmail.com> wrote:

> http://code.google.com/android/add-ons/google-apis/mapkey.html here you
> can get the detailed information regarding this...
>
> On Sat, Sep 10, 2011 at 1:55 PM, Mohit Agarwal wrote:
>
>>  Thanku for ur reply.
>> but i wrote the command in cmd and it is not showing any MD5 fingerprint.
>> can u pls tell me t he full exact command to obtain MDR fingerprinti m
>> using windows
>>
>> On Sat, Sep 10, 2011 at 12:29 PM, Michael Banzon wrote:
>>
>>> The sign up page tells you how to obtain the MD5 fingerprint:
>>>
>>> http://code.google.com/android/maps-api-signup.html
>>>
>>> Use "keytool"...
>>>
>>>
>>> On Sat, Sep 10, 2011 at 8:52 AM, Mohit Agarwal 
>>> wrote:
>>> > Hello
>>> > This is the first time i m developing an app...
>>> > I need to know from where to get my api key..
>>> > i went on to the site getting an api key, it asks me MD5
>>> > fingerprint(wat's This??)
>>> > how to get MD5 fingerprint...
>>> >
>>> > pls 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
>>> >
>>>
>>>
>>>
>>> --
>>> Michael Banzon
>>> http://michaelbanzon.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
>>
>
>
>
> --
> *--
> Mohammed Hossain Doula
> Software Engineer
> desme INC.*
> *www: http://www.hossaindoula.com
> @: ron...@desme.com*
> *facebook: http://www.facebook.com/ROnyWorld*
> *twitter: http://www.twitter.com/hossaindoula*
> *blogspot: hossaindoula.blogspot.com
> GSM: 00880-167-4347101*
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 is RockPlayer doing hardware decoding?

2011-09-10 Thread gjs
Hi,

You should ask 'RockPlayer'

Regards

On Sep 9, 6:30 pm, "B.Arunkumar"  wrote:
> Hi,
>
>     Would somebody have some idea what exactly has RockPlayer done in
> the Hardware Decoding mode on a high level basis? I mean have they
> used the mediaplayer as it is or they have changed something at the
> source code level of MediaPlayer to get more improvements than the
> MediaPlayer (support more RTSP Url formats) and things like that?
>
> Thank you,
> B.Arunkumar
>
> On Sep 4, 6:42 am, Felix long  wrote:
>
>
>
>
>
>
>
> > Yes, You're right. The hardware decoding mode only means using inbuilt
> > MediaPlayer in these players.
>
> > 2011/9/3 B.Arunkumar 
>
> > > Thank you for your reply. The RockPlayer gives you the option of
> > > choosing either the Hardware or Software Decoding mode. The Software
> > > Decoding mode I am pretty sure does what you are saying, uses the
> > > FFMPEG package to decode the frames. Does the hardware decoding mode
> > > of RockPlayer also use FFMPEG? The question I have is the inbuilt
> > > MediaPlayer and VideoView classes of Android use the inbuilt hardware
> > > decoder of the device. Is the Hardware Decoding mode of RockPlayer
> > > doing something similar?
>
> > > A thought process along the same lines is if it possible to use the
> > > hardware decoder of the device programmatically through some means?
>
> > > Thank you,
> > > B.Arunkumar
>
> > > On Sep 2, 8:33 pm, Drezden  wrote:
> > > > I believe they're using a customized build of FFMpeg that gets
> > > > accessed through the NDK.  FFMpeg has the ability to do a lot of
> > > > manipulation with video, audio, and images.
>
> > > > On Sep 2, 9:15 am, "B.Arunkumar"  wrote:
>
> > > > > Hi,
>
> > > > >      Would somebody be able to guide me on howRockPlayer/MoboPlayer
> > > > > does the hardware decoding of image frames?
>
> > > > > Thank you,
> > > > > B.Arunkumar
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Best Regards
>
> > Felix Long

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

2011-09-10 Thread Pent
> store the value of the height and width at startup and compare
> the height with the initial value.

Would be nice if you could just query the IMM... would then also be
possible outside of activities.

Pent

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

2011-09-10 Thread b0b
It would crash on Android 1.x only, since starting with 2.0 the classloader 
loads the symbols only when they are reached.
No need to use reflection for that kind of test if the target is Android 
2.0+

On Saturday, September 10, 2011 1:14:39 AM UTC+2, Dianne Hackborn wrote:
>
> This will probably crash on older version of the platform, where 
> smallestScreenWidthDp isn't defined.  Is suggest using reflection to 
> retrieve that.
>
> On Fri, Sep 9, 2011 at 3:24 PM, MarkG123  wrote:
>
>> This is what I am using now to have a my single APK support tablets
>> and smartphones on-the-fly.   I use if from my start activity, which
>> decides which activity to use (my app differences are more than just
>> layout).
>>
>>
>>   public boolean isTablet()
>>{
>>if (Build.VERSION.SDK_INT >=
>> Build.VERSION_CODES.HONEYCOMB_MR2)
>>{
>>return
>> (getResources().getConfiguration().smallestScreenWidthDp >= 600);
>>}
>>
>>return (getResources().getConfiguration().screenLayout &
>> Configuration.SCREENLAYOUT_SIZE_MASK) >=
>> Configuration.SCREENLAYOUT_SIZE_XLARGE;
>>}
>>
>>
>>
>> This seems to work very well for me.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-develop...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> -- 
> Dianne Hackborn
> Android framework engineer
> hac...@android.com
>
> Note: please don't send private questions to me, as I don't have time to 
> provide private support, and so won't reply to such e-mails.  All such 
> questions should be posted on public forums, where I and others can see and 
> answer them.
>
>

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

Re: [android-developers] How to develop an app that involves google maps

2011-09-10 Thread Mohammed Hossain Doula
http://code.google.com/android/add-ons/google-apis/mapkey.html here you can
get the detailed information regarding this...

On Sat, Sep 10, 2011 at 1:55 PM, Mohit Agarwal wrote:

> Thanku for ur reply.
> but i wrote the command in cmd and it is not showing any MD5 fingerprint.
> can u pls tell me t he full exact command to obtain MDR fingerprinti m
> using windows
>
> On Sat, Sep 10, 2011 at 12:29 PM, Michael Banzon wrote:
>
>> The sign up page tells you how to obtain the MD5 fingerprint:
>>
>> http://code.google.com/android/maps-api-signup.html
>>
>> Use "keytool"...
>>
>>
>> On Sat, Sep 10, 2011 at 8:52 AM, Mohit Agarwal 
>> wrote:
>> > Hello
>> > This is the first time i m developing an app...
>> > I need to know from where to get my api key..
>> > i went on to the site getting an api key, it asks me MD5
>> > fingerprint(wat's This??)
>> > how to get MD5 fingerprint...
>> >
>> > pls 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
>> >
>>
>>
>>
>> --
>> Michael Banzon
>> http://michaelbanzon.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
>



-- 
*--
Mohammed Hossain Doula
Software Engineer
desme INC.*
*www: http://www.hossaindoula.com
@: ron...@desme.com*
*facebook: http://www.facebook.com/ROnyWorld*
*twitter: http://www.twitter.com/hossaindoula*
*blogspot: hossaindoula.blogspot.com
GSM: 00880-167-4347101*

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

2011-09-10 Thread Mohit Agarwal
Thanku for ur reply.
but i wrote the command in cmd and it is not showing any MD5 fingerprint.
can u pls tell me t he full exact command to obtain MDR fingerprinti m
using windows

On Sat, Sep 10, 2011 at 12:29 PM, Michael Banzon  wrote:

> The sign up page tells you how to obtain the MD5 fingerprint:
>
> http://code.google.com/android/maps-api-signup.html
>
> Use "keytool"...
>
>
> On Sat, Sep 10, 2011 at 8:52 AM, Mohit Agarwal 
> wrote:
> > Hello
> > This is the first time i m developing an app...
> > I need to know from where to get my api key..
> > i went on to the site getting an api key, it asks me MD5
> > fingerprint(wat's This??)
> > how to get MD5 fingerprint...
> >
> > pls 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
> >
>
>
>
> --
> Michael Banzon
> http://michaelbanzon.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] one AsyncTask at a time

2011-09-10 Thread bob
So, I have a bunch of buttons and each one launches an AsyncTask.

So, should I keep a variable like this:

AsyncTask currentTask=null;

Then should I do

if (currentTask != null)  currentTask.cancel();

before I launch the new task?

I only want one task running at a time.  Right now, if someone monkeys
with the buttons, they get a bunch of tasks running simultaneously
with weird UI results.

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

2011-09-10 Thread Christopher Van Kirk
Check that the pointer returned to you when  you allocate memory is 
non-null. If it's null, you're out of memory. If you're even getting 
close to the memory limit, though, you're doing something very wrong.


On 9/10/2011 3:20 PM, bob wrote:

How do I tell how much RAM my MetroPCS LG Optimus uses?

I keep getting OutOfMemory exceptions.  Also, what is the most user-
friendly way to handle OutOfMemory exceptions?  Right now, the app
crashes.



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

2011-09-10 Thread Michael Banzon
Do you know what causes the OutOfMemoryException?

My general advise would be to try and avoid that...


On Sat, Sep 10, 2011 at 9:20 AM, bob  wrote:
> How do I tell how much RAM my MetroPCS LG Optimus uses?
>
> I keep getting OutOfMemory exceptions.  Also, what is the most user-
> friendly way to handle OutOfMemory exceptions?  Right now, the app
> crashes.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Michael Banzon
http://michaelbanzon.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: Problems with deactivating the title bar

2011-09-10 Thread skink


On Sep 9, 4:50 pm, Felix Schröter  wrote:
> Hi everyone,
> I´m 15 years old (in a few weeks 16) and I´m very new to Android and Java
> and at the moment I just copy and past, but I want to learn the language
> Java complete but later.
> So my Problem:
> I didn´t deavticate the title bar in the manifest, because I have an
> ProgessBar to show how long it tooks to load the Page (webview).
> Know I want to deactivate the title bar after it loaded 100%. I found "
> requestWindowFeature(Window.FEATURE_NO_TITLE);" as an option, but when I use
> it the app crashes when 100% is loaded. So here my whole code:
>
> package de.iapptipps;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.view.KeyEvent;
> import android.view.Window;
> import android.webkit.WebChromeClient;
> import android.webkit.WebView;
> import android.webkit.WebViewClient;
> import android.widget.Toast;
>
> public class IAppTippsActivity extends Activity
> {
>     private WebView webview;
>     @Override
>     public void onCreate(Bundle savedInstanceState)
>     {
>     getWindow().requestFeature(Window.FEATURE_PROGRESS);
>         setContentView(R.layout.main);
>
>      super.onCreate(savedInstanceState);
>      webview = new WebView(this);
>         setContentView(webview);
>         webview.getSettings().setJavaScriptEnabled(true);
>
>         final Activity activity = this;
>         {
>          webview.setWebChromeClient(new WebChromeClient()
>          {
>          public void onProgressChanged(WebView view, int progress)
>          {
>          activity.setTitle(" Lädt...");
>             activity.setProgress(progress * 100);
>             if(progress == 100)
>             requestWindowFeature(Window.FEATURE_NO_TITLE);
>          }
>          });
>         }
>
>         webview.setWebViewClient(new WebViewClient()
>         {
>          public void onReceivedError(WebView view, int errorCode,
>          String description, String failingUrl)
>          {
>          Toast.makeText(activity,description,
>          Toast.LENGTH_SHORT).show();
>          }
>         });
>         webview.loadUrl("http://iapptipps.de";);
>         }
>     @Override
>         public boolean onKeyDown(int keyCode, KeyEvent event)
>         {
>        if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack())
>        {
>        webview.goBack();
>        return true;
>        }
>        return super.onKeyDown(keyCode, event);
>         }
>
> }
>
> And here my Manifest:
>
> 
> http://schemas.android.com/apk/res/android";
>       package="de.iapptipps"
>       android:installLocation="auto" android:versionCode="4"
> android:versionName="1.0.3">
>     
>     
>
>      android:icon="@drawable/icon1">
>          android:label="@string/app_name"
>      android:theme="@android:style/Theme">
>         
>             
>             
>         
>         
>     
> 
>
> And the main.xml:
>
> 
>
> http://schemas.android.com/apk/res/android";
>               android:orientation="vertical"
>               android:layout_width="fill_parent"
>               android:layout_height="fill_parent"
>
>                   android:layout_width="fill_parent"
>              android:layout_height="fill_parent"
>            />
> 
>
> Know I postet my whole app.
> I hope you can help me. I tested the app an 2.3.3, 2.1 and 3.2 on my virtual
> machines all crashing.
> Thank you!

Maybe this will help:

http://stackoverflow.com/questions/4250149/requestfeature-must-be-called-before-adding-content

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] OutOfMemory exceptions

2011-09-10 Thread bob
How do I tell how much RAM my MetroPCS LG Optimus uses?

I keep getting OutOfMemory exceptions.  Also, what is the most user-
friendly way to handle OutOfMemory exceptions?  Right now, the app
crashes.

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