[android-developers] Re: How can I import any widgets under com.android.internal.widget into my app?

2009-04-05 Thread shaddu

Hi Dianne,

As we are copying the code and resources from platform into our
application, those will get compiled into our application apk. When we
install this apk, will it not create any problems related to duplicate
definition of packages/classes?

For exaple : If I copy apache http stack into my app and build apk out
of it. Then when I try to install it on emulator or phone will it
succeed as there are duplicate occurences of http stack in my apk and
on platform.

BR,
Shaddu

On Mar 18, 7:43 am, Dianne Hackborn  wrote:
> You need to copy the code (and resources you want) out of the platform and
> in to your app, and make any changes necessary to get it to build against
> the SDK.  Sorry there isn't an easier answer.
>
>
>
> On Tue, Mar 17, 2009 at 7:36 PM, mongd  wrote:
>
> > Hi, I'm trying to use some widgets under com.android.internal.widget
> > from my app.
> > I found some basic apps like Settings use those widgets, so I think
> > there is a way to import those widget into my app, but I can't find.
>
> > I'm using Eclipse under Windows XP, meaning that I have sdk only.
> > To do the import thing, do I need a linux environment? I mean whole
> > source code?
>
> > If I have the source code, how can I do that?
>
> > One more question:
> > There are several activities in basic apps, such as ConfirmLockPatterm
> > in settings. I want to use that activity from my app. I mean start
> > that activity from my app. Can I do that?
> > Since that activity doesn't have any intent filter, I guess I have to
> > explicitly specify the name in Intent, but since I can't import any of
> > those activities, it just doesn't work.
>
> > help me~~!!
>
> --
> 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.  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] Video streaming

2009-04-05 Thread Nithin

Hi to all...

Videoview can support quick time player


Thank You
NITHIN N V
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Windows Cupcake SDKs compilation

2009-04-05 Thread Al Sutton
Dave,
 
Thanks for the tips, the only thing I can't do is uninstall everything else
that relies on cygwin (I need some apps for the projects which pay my
mortgage, etc..), and it would appear from searching the web that's
something that cygwin doesn't handle well :(.
 
Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.



 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of David Turner
Sent: 05 April 2009 19:42
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Windows Cupcake SDKs compilation




On Sun, Apr 5, 2009 at 6:36 PM, Al Sutton  wrote:



I tried the instructions from the git repo for building windows and they
don't work.

To start  with cygwin bases everything off /cygwin rather than / so even
trying to run repo gets;

/bin/sh: bad interpreter: No such file or directory



Normally, cygwin also mounts / as a short-cut to your cygwin installation so
you
should be able to run /bin/sh directly. Note that I said "normally", because
there are
unfortunately quite a few ways to get a Cygwin install on a Windows PC, each
one
of them which its own can of worms.

I suggest starting from scratch with the "usual" way, i.e.:

- uninstall *anything* vaguely related to Cygwin on your machine
- go to http://www.cygwin.com and download the "setup.exe" program
- run setup.exe and ensure that:

   = You install on a NTFS partition
   = All directories in the installation path fit the 8.3 DOS convention
(right)
   = Choose "Unix line ending" when asked by the installation dialog
   = Don't try to much with the default mount paths (i.e. it's possible to
get rid of the /cygdrive/ stuff with some tweaking, but this makes
some tools miserable).

In addition, I really recommend the following:

install python and wget by default, then later install "cyg-apt" from
http://www.lilypond.org/~janneke/software/cyg-apt
this tool will allow you to download and install additionnal packages from
the command-line without using the brain-dead setup.exe GUI
(NOTE: you may need to update the script to use a better mirror than the
default. Look at the lines that read "mirror = ")

use puttycyg as the terminal (http://code.google.com/p/puttycyg/), or even
Terminator (http://software.jessies.org/terminator/) as they are far better
than the default Windows console or rxvt.

If you need MSys, do not install it in the same location that Cygwin if
possible, this really messes things sometimes.

Hope this helps




And if you hack around that by altering repo to point to /cygwin/bin/sh you
get;

Getting repo ...
  from git://android.git.kernel.org/tools/repo.git
warning: templates not found /usr/share/git-core/templates/
remote: Counting objects: 386, done.
remote: Compressing objects: 100% (234/234), done.
git: 'index-pack' is not a git-command. See 'git --help'.
fatal: write error (Broken pipe)
fatal: index-pack failed

:(

Al.


---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 05 April 2009 14:12
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake SDKs available for download


-I'd like to point out that this isn't an official SDK, with e.g. no
guarantee that applications developed with it will work on future versions
of Android. Should anyone have questions about using it, please use the
android-discuss group as android-developers is for questions about the
official SDKs, and be sure to mention which specific version of Al's SDK
you're using.

-Al, you might be looking for this:
http://android.git.kernel.org/?p=platform/development.git;a=blob;f=docs/howt
 
o_build_SDK.txt;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6ef1df35
34dee5b1d09ab72d129d3697c7#l92

-How about distributing it with BitTorrent? This seems like a perfect use
case.

JBQ

On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
>
> I've compiled up the Linux & Mac OS X Intel SDKs from the public git
> repository and have put them up for download (If anyone can get
> instructions on building a Windows SDK I will

[android-developers] Re: Cupcake SDKs available for download

2009-04-05 Thread Al Sutton

Thanks for the clarification JBQ. The worry part for me was;

".. it's possible for someone to legally download source code from the
Android Open-Source Project, compile it, redistribute the compiled result,
and even support it with their own resources. As long as there's enough
separation between those projects and the official SDK that is used to
develop applications for devices that bear the Android logo..." 

Which I read as builds from the Android Open-Source project being divergent
from what's used to develop the Google originated SDK.

I've no intention of creating a fork, and if a Google originated SDK came
out I would happily update the page to point people to it, but at the moment
the best us non-Googlers have for testing cupcake is a build from the open
repository.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 05 April 2009 18:11
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake SDKs available for download


That's not what I wrote (or at least not what I meant to write). The fact
that the open-source side of Android (which is fundamentally "the" true
Android platform as it's the central one) is called "Android Open-Source
Project" with the official Android logo should be a good hint that it's not
an offshoot.

What I meant is that it's beneficial for the Android community as a whole if
the Android name and logos are only used in a set of situations that are
consistent with one another, especially when it comes to compatibility.
Fragmentation won't help, neither would additional user confusion beyond
what we already have.

So, for the sake of clarity, let's try to keep some separation between the
official SDKs that Google releases and supports on this discussion group,
and other development tools that anyone can create and distribute out of the
Android Open Source Project source code as long as they stay within the
allowed limits for IP licensing.

BTW, I'm very much looking forward to the start of the next Android
development cycle, since for the first time in the history of Android such a
cycle will start with the source code being openly available.
Things won't quite be perfect the first time around, we'll learn from the
issues that we are going to face, and we'll all work better together for
subsequent development cycles.

JBQ

On Sun, Apr 5, 2009 at 9:28 AM, Al Sutton  wrote:
>
> JBQ,
> I may be reading what you've written in a different way to you've 
> intended, but it reads very much like you guys see Google produced 
> Android stuff from the internal Google repository as "Android", and 
> anything else (including the public repository) is being an offshoot
project.
>
> Al.
>
>
>
> -Original Message-
> From: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] On Behalf Of 
> Jean-Baptiste Queru
> Sent: 05 April 2009 17:08
> To: android-developers@googlegroups.com
> Subject: [android-developers] Re: Cupcake SDKs available for download
>
>
> [inline]
>
> On Sun, Apr 5, 2009 at 8:45 AM, Al Sutton  wrote:
>>
>> Hi JBQ,
>>
>> - Who decides what is an official SDK of an open project :)?
>
> The owners of the discussion group where "official" SDKs are supported 
> :)
>
> Within the limits of the various licenses (which are generally very 
> permissive), it's possible for someone to legally download source code 
> from the Android Open-Source Project, compile it, redistribute the 
> compiled result, and even support it with their own resources. As long 
> as there's enough separation between those projects and the official 
> SDK that is used to develop applications for devices that bear the 
> Android logo, there shouldn't be any major issue. That being said, 
> it's probably not entirely beneficial for the Android community as a 
> whole if app developers are presented with a multitude of slightly 
> different and incompatible development environment, but I do 
> understand the motivation behind what you're doing.
>
>> - There is no guarantee of future compatibility on any SDK (see my 
>> issue with buttons posted a couple of days ago).
>
> Yeah, compatibility isn't always as good as we'd like it to be, 
> especially as it's not always clearly documented what behaviors can 
> potentially vary and therefore can't be strongly relied on by 
> applications (especially when there's currently no way to make those 
> vary on the SDK), but with unofficial development environments built 
> from branches in intermediate 

[android-developers] Re: Custom View Subclass - How do I properly specify xmlns in my layout.xml file?

2009-04-05 Thread Mark Rosenberg

Must be tired ... forgot to refresh or something ... xmlns:app="http://
schemas.android.com/apk/res/com.foo.bar" does the trick.

On Apr 5, 10:23 pm, Mark Rosenberg 
wrote:
> I am following the LabelView.java and associated custom_view_1.xml
> layout files to guide me, but I am perplexed by the xmlns:app
> specification. My custom view is in the com.foo.bar package. What do I
> specify as the xmlns:app value to properly bind my XML layout
> declarations to the attribute set my custom view constructor
> processes?
>
> I've tried xmlns:app="com.foo.bar", xmlns:app="http://
> schemas.android.com/apk/res/com.foo.bar", xmlns:app="http://
> schemas.android.com/com.foo.bar" to no avail.
>
> Its not clear to me why the api example uses an http: scheme in the
> first place. Shouldn't the package name be adequately unique?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: [TextView] What are that XML Attributes in JAVA ?

2009-04-05 Thread Dianne Hackborn
You need to create a LayoutParams the corresponds to the actual class of the
parent, such as FrameLayout.LayoutParams.

On Sun, Apr 5, 2009 at 10:30 PM, Desu Vinod Kumar wrote:

> May We can use like this
>
> TextView tv = new TextView(this);
>
> tv.setLayoutParams(new
> ViewGroup.layoutParams(LayoutParamas.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
>
> try this
> in java
> i think..
>
> On Sat, Apr 4, 2009 at 1:25 PM, DaRolla wrote:
>
>>
>> Hi,
>>
>> I need to programm this XML in JAVA. Some I figured out, some not. Can
>> you help me on the missing ones?
>>
>>
>> >  android:layout_height="wrap_content"
>>  android:text="Bladidadi"
>>  android:layout_gravity="center_vertical"
>>  android:textColor="#ff" />
>>
>>
>> TextView tv = new TextView(this);
>>
>> //android:layout_width="150px"
>> tv.setWidth(150);
>>
>> //android:layout_height="wrap_content"
>> ???
>>
>> //android:text="Bladidadi"
>> tv.setText("Bladidadi");
>>
>> //android:layout_gravity="center_vertical"
>> tv.setGravity(Gravity.CENTER_VERTICAL);
>>
>> //android:textColor="#ff"
>> tv.setTextColor(Color.rgb(0xff, 0xff,0xff));// tv.setTextColor
>> (0xff) doesn't work somehow
>>
>>
>> Greetings,
>> DaRolla
>>
>>
>
>
> --
> Regards
> ---
> Desu Vinod Kumar
> vinny.s...@gmail.com
> 09916009493
>
> >
>


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

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

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



[android-developers] Re: [TextView] What are that XML Attributes in JAVA ?

2009-04-05 Thread Desu Vinod Kumar
May We can use like this

TextView tv = new TextView(this);

tv.setLayoutParams(new
ViewGroup.layoutParams(LayoutParamas.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));

try this
in java
i think..

On Sat, Apr 4, 2009 at 1:25 PM, DaRolla wrote:

>
> Hi,
>
> I need to programm this XML in JAVA. Some I figured out, some not. Can
> you help me on the missing ones?
>
>
>   android:layout_height="wrap_content"
>  android:text="Bladidadi"
>  android:layout_gravity="center_vertical"
>  android:textColor="#ff" />
>
>
> TextView tv = new TextView(this);
>
> //android:layout_width="150px"
> tv.setWidth(150);
>
> //android:layout_height="wrap_content"
> ???
>
> //android:text="Bladidadi"
> tv.setText("Bladidadi");
>
> //android:layout_gravity="center_vertical"
> tv.setGravity(Gravity.CENTER_VERTICAL);
>
> //android:textColor="#ff"
> tv.setTextColor(Color.rgb(0xff, 0xff,0xff));// tv.setTextColor
> (0xff) doesn't work somehow
>
>
> Greetings,
> DaRolla
> >
>


-- 
Regards
---
Desu Vinod Kumar
vinny.s...@gmail.com
09916009493

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Custom View Subclass - How do I properly specify xmlns in my layout.xml file?

2009-04-05 Thread Mark Rosenberg

I am following the LabelView.java and associated custom_view_1.xml
layout files to guide me, but I am perplexed by the xmlns:app
specification. My custom view is in the com.foo.bar package. What do I
specify as the xmlns:app value to properly bind my XML layout
declarations to the attribute set my custom view constructor
processes?

I've tried xmlns:app="com.foo.bar", xmlns:app="http://
schemas.android.com/apk/res/com.foo.bar", xmlns:app="http://
schemas.android.com/com.foo.bar" to no avail.

Its not clear to me why the api example uses an http: scheme in the
first place. Shouldn't the package name be adequately unique?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView with theme doesn't show focused text field values

2009-04-05 Thread for android
Use this

webView.loadDataWithBaseURL("http://m.myspace.com";, null,
   "text/html", "utf-8", null);





On Sun, Apr 5, 2009 at 12:12 AM, Rmac  wrote:

>
> I have encountered a problem with focused text fields in a WebView not
> showing entered text values.  As long as a WebView text field has
> focus it will not show text or even the blinking cursor.  You can
> select and highlight the text or unfocus the field to see it, but when
> it gains focus it will not show the text... as if the foreground color
> of the text is white.
>
> The simplest code to demonstrate this is below.  With the setTheme
> using a Light background, try typing values into the Email text field
> to notice that the text is not visible when the field is focused.
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.webkit.WebView;
>
> public class AndTest extends Activity {
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>
>setTheme(android.R.style.Theme_Light_NoTitleBar); // <--
> causes focused text fields not to show entered text
>
>WebView webContent = new WebView(this);
>webContent.loadUrl("http://m.myspace.com";);
>
>setContentView(webContent);
>}
> }
>
>
> If the setTheme is set for a Light theme, the text in focused fields
> cannot be seen.  I also have this happening in my program without the
> theme if there are multiple Views within Views that have background
> colors, but the above code replicates the problem.
>
> Any suggestions or help is greatly appreciated.
>
> >
>

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



[android-developers] Re: How the use same instances when launching application twice ?

2009-04-05 Thread Dianne Hackborn
Ah!  Yes I think the IDE uses a different Intent than home does to launch
your activity, so you will see this behavior there.  (Basically when you
launch again from home, this is a different intent than the intent for the
first A, so you are displaying something different than that one, and thus a
new instance for the new intent is launched.

On Sun, Apr 5, 2009 at 9:21 PM, Sarnoth  wrote:

>
> I posted with this same problem before and then it just seemed to
> "disappear" so I replied to my own post with a "never mind, it works
> now" and no real resolution. Well, as I've continued to develop I've
> run in to it again and figured out what is going on. There is a
> problem with the development environment that causes this. When an app
> is run through the IDE either on a real device hooked up to the USB
> port or on the emulator it will exhibit this behavior as follows:
> 1. Hit run in IDE
> 2. App launches with activity A
> 3. Navigate to activity B
> 4. Press the home button
> 5. Click the app icon to return to the app
> 6. App appears with activity A on top
> 7. Press back and activity B is revealed, back again returns to
> activity A, and a third back returns to the home screen
>
> This problem is present for every combination manifest and activity
> launch options that I have tried.
> The problem is avoided by exiting the app after hitting run in the
> IDE:
> 1. Hit run in the IDE to load the new version of the app but DO NOT
> use it when it runs
> 2. Hit back to exit the app and return to the home screen
> 3. Launch the app from the icon, activities will work properly now
> 4. Navigate from A to B
> 5. Hit home
> 6. Click the app icon, you are turned to B as expected
>
> On Apr 4, 9:58 pm, Dianne Hackborn  wrote:
> > As I've said, what you are saying you want is the normal behavior.
> >
> > To everyone, you must give -detailed- information about exactly what you
> are
> > doing for there to be any hope of someone being able to help you.  In
> > particular, provide:
> >
> > (1) Your complete AndroidManifest.xml
> > (2) The exact code you are using to build your Intent objects that you
> are
> > using to start your activities.
> > (3) Likewise exactly how you are constructing any PendingIntent being
> used
> > with notifications etc.
> > (4) The exact sequence of activities you are seeing started, and what you
> > instead expect to have started; supplying the "Starting activity" logs as
> > you do the steps can also help a lot.
> > (5) It also would tremendously help to supply the output of "adb shell
> > dumpsys activity" immediately before you are going to get in to the
> problem
> > state, along with the code you are executing to get in to the problem
> state,
> > and also the "Starting activity" log statement at the point where the
> > problematic activity launch happens.
> >
> >
> >
> > On Fri, Apr 3, 2009 at 11:05 PM, Lovell  wrote:
> >
> > > I think I have the same question, but I'm going to try to explain it a
> > > little better:
> >
> > > My app has 4 activities on the stack A->B->C->D (top)
> >
> > > If you press home and re-enter the application, another instance of A
> > > is started, so the stack is A->B->C->D->A (top). I know this because
> > > when I press BACK, A is popped off and I now see D (instead of going
> > > to the Home screen).
> >
> > > What I want is that when the user re-enters the app, they re-enter on
> > > the same activity they were in before (D). How do you do that?
> >
> > > On Mar 20, 12:05 pm, Dianne Hackborn  wrote:
> > > > Um, what you are requesting is the normal behavior.  When you tap on
> an
> > > > app's icon in home, it brings the current task of that app to the
> > > foreground
> > > > if it is already running.
> >
> > > > And services are singletons so you can only every get a single
> instance
> > > of a
> > > > service running.
> >
> > > > On Tue, Mar 17, 2009 at 2:26 AM, Derek  wrote:
> >
> > > > > Hi,
> >
> > > > > Is it possible to re-use all the instances of Activities and
> Services
> > > > > when an application is launched twice. For instance:
> > > > > 1/ I start my application APP1. Some activities are launched and a
> > > > > service is started.
> > > > > 2/ I click "Home" device button
> > > > > 3/ I can see the icon the launch again my application APP1
> > > > > 4/ I click on it and the APP1 is launched twice
> >
> > > > > I would like to re-use the existing the instances of Activities and
> > > > > Services from the first launch.
> > > > > I guess it is related to "SingleTop" or "SingleTask" but it doesn't
> > > > > seem to work.
> >
> > > > > Any suggestion ?
> >
> > > > --
> > > > 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.  All such questions should be posted on
> public
> > > > forums, where I and others can see and answer them.
> >
> > --
> > Dianne Hackborn
> > Android framework engi

[android-developers] Video streaming

2009-04-05 Thread Nithin

Hi to all

Can anyone tell me how video streaming can done.

Thank You
NIthin N V
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 the use same instances when launching application twice ?

2009-04-05 Thread Sarnoth

I posted with this same problem before and then it just seemed to
"disappear" so I replied to my own post with a "never mind, it works
now" and no real resolution. Well, as I've continued to develop I've
run in to it again and figured out what is going on. There is a
problem with the development environment that causes this. When an app
is run through the IDE either on a real device hooked up to the USB
port or on the emulator it will exhibit this behavior as follows:
1. Hit run in IDE
2. App launches with activity A
3. Navigate to activity B
4. Press the home button
5. Click the app icon to return to the app
6. App appears with activity A on top
7. Press back and activity B is revealed, back again returns to
activity A, and a third back returns to the home screen

This problem is present for every combination manifest and activity
launch options that I have tried.
The problem is avoided by exiting the app after hitting run in the
IDE:
1. Hit run in the IDE to load the new version of the app but DO NOT
use it when it runs
2. Hit back to exit the app and return to the home screen
3. Launch the app from the icon, activities will work properly now
4. Navigate from A to B
5. Hit home
6. Click the app icon, you are turned to B as expected

On Apr 4, 9:58 pm, Dianne Hackborn  wrote:
> As I've said, what you are saying you want is the normal behavior.
>
> To everyone, you must give -detailed- information about exactly what you are
> doing for there to be any hope of someone being able to help you.  In
> particular, provide:
>
> (1) Your complete AndroidManifest.xml
> (2) The exact code you are using to build your Intent objects that you are
> using to start your activities.
> (3) Likewise exactly how you are constructing any PendingIntent being used
> with notifications etc.
> (4) The exact sequence of activities you are seeing started, and what you
> instead expect to have started; supplying the "Starting activity" logs as
> you do the steps can also help a lot.
> (5) It also would tremendously help to supply the output of "adb shell
> dumpsys activity" immediately before you are going to get in to the problem
> state, along with the code you are executing to get in to the problem state,
> and also the "Starting activity" log statement at the point where the
> problematic activity launch happens.
>
>
>
> On Fri, Apr 3, 2009 at 11:05 PM, Lovell  wrote:
>
> > I think I have the same question, but I'm going to try to explain it a
> > little better:
>
> > My app has 4 activities on the stack A->B->C->D (top)
>
> > If you press home and re-enter the application, another instance of A
> > is started, so the stack is A->B->C->D->A (top). I know this because
> > when I press BACK, A is popped off and I now see D (instead of going
> > to the Home screen).
>
> > What I want is that when the user re-enters the app, they re-enter on
> > the same activity they were in before (D). How do you do that?
>
> > On Mar 20, 12:05 pm, Dianne Hackborn  wrote:
> > > Um, what you are requesting is the normal behavior.  When you tap on an
> > > app's icon in home, it brings the current task of that app to the
> > foreground
> > > if it is already running.
>
> > > And services are singletons so you can only every get a single instance
> > of a
> > > service running.
>
> > > On Tue, Mar 17, 2009 at 2:26 AM, Derek  wrote:
>
> > > > Hi,
>
> > > > Is it possible to re-use all the instances of Activities and Services
> > > > when an application is launched twice. For instance:
> > > > 1/ I start my application APP1. Some activities are launched and a
> > > > service is started.
> > > > 2/ I click "Home" device button
> > > > 3/ I can see the icon the launch again my application APP1
> > > > 4/ I click on it and the APP1 is launched twice
>
> > > > I would like to re-use the existing the instances of Activities and
> > > > Services from the first launch.
> > > > I guess it is related to "SingleTop" or "SingleTask" but it doesn't
> > > > seem to work.
>
> > > > Any suggestion ?
>
> > > --
> > > 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.  All such questions should be posted on public
> > > forums, where I and others can see and answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group

[android-developers] Re: Retrieving street info as in Google maps application

2009-04-05 Thread Pratap

can somebody from google provide a official statement on the issue
mentioned above??

On Apr 3, 11:11 am, Pratap  wrote:
> anyone with any idea on the above issue?
>
> On Mar 31, 9:35 am, Pratap  wrote:
>
> > Hi
> > I am developing a simple maps application that displays map instreet
> > mode.
> > I want to displaystreetname and a snapshot when a particularstreet
> > is selected.
> > Is it possible to get thestreetsnapshot as is displayed by the
> > native maps application usingandroidAPIs.
>
> > Also on native maps app when we select thestreeta 3D view of thestreetis 
> > shown.
> > How can I add this 3Dstreetview to my app.
>
> > Kindly provide your suggestions.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: JUnit on the emulator without instrumentation

2009-04-05 Thread Andrew Stadler

It's actually quite useful and doable to write "pure" unit tests
within the InstrumentationTestRunner framework.

For a working example, please take a look at ApiDemos, in the tests/
directory, and look for classes that extend the "TestCase" class.

Benefits of doing it this way:

1.  Although you can restrict yourself to pure JUnit style tests if
you want, you can also write a mix of tests, ranging from purely unit
(extending TestCase and AndroidTestCase) to almost totally functional
(e.g. extending ActivityInstrumentationTestCase) and group them
together as a test suite.

2.  Although it doesn't work in the published SDK, quite soon you will
in fact be able to run these tests directly from Eclipse.  In other
words, because this is the supported mechanism, you'll benefit from
upcoming improvements & tools.

Hope this helps.

--Andy



On Fri, Mar 27, 2009 at 10:15 PM, gudujarlson  wrote:
>
> I discovered that at least some of JUnit exists on the emulator. In
> particular TestCase and Assert exist. However, TestRunner does not
> appear to exist. I find it odd that only parts of JUnit are present.
>
> >
>

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

2009-04-05 Thread Marco Nelissen

That's not going to work on Android.


On Sun, Apr 5, 2009 at 5:16 PM, MyLinuxSupport  wrote:
>
> You should be able to fork the audio in Linux and write a c program to
> do the analysis, then write your results to android...  The challenge
> you will have is getting your c program installed on the locked down
> phones...  Since you are only doing analysis you should be able to
> fork the audio path and pipe it to your application.  I'm also
> interested in this area...
>
> Food for thought below...
>
> From: 
> http://www.commandlinefu.com/commands/view/907/unencrypted-voicechat#comment
>
> $ On PC1:  nc -l -p  > /dev/dsp   On PC2:  cat /dev/dsp | nc
>  
>
>
>
>
> On Apr 6, 4:55 am, MrSnowflake  wrote:
>> The only way I see this possible is by having the MediaRecorder record
>> some sound for a very short time, have it stop and save the file, and
>> immediately start recording again. Then analyse the previous shot
>> sample. You have to do it this way, because you don't have direct
>> access to the sound stream from the mic.
>>
>> On 5 apr, 22:34, John Doe  wrote:
>>
>> > Hi everyone.
>> > I am trying to develop a program which detects noise level of
>> > outside.Is it loud or silent? How loud?
>>
>> > Where should I start? Is there any example ? Any comment will be
>> > greatly appreciated...
> >
>

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



[android-developers] Re: For launching a camera from appl which action requires?

2009-04-05 Thread Ivan Soto
Actually I may need the same. I to start the the camera app and get the
latest added picture.
Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Mon, Feb 2, 2009 at 11:29 PM, jj  wrote:

>
> Hello James
>
> Thanks for replying me,
> Actually I want Uri of this image(Currently captured from camera)
>
> So that I can send this image by using :
>
> Uri uri = ContentUris.withAppendedId(Media.EXTERNAL_CONTENT_URI, 2);
>Intent i = new Intent();
>i.setAction(Intent.ACTION_SEND);
>i.setType("image/jpeg");
>i.putExtra(Intent.EXTRA_SUBJECT, "image5");
>i.putExtra(Intent.EXTRA_STREAM, uri);
>i = Intent.createChooser(i, "Send");
>startActivity(i);
>
> So how should I get this current images Uri
> (When save the picture on camera appl it goes into
> Media.EXTERNAL_CONTENT_URI
> I just want Uri for this current Image )
> Thank you
> >
>

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



[android-developers] Taking a picture Intent?

2009-04-05 Thread Ivan Soto
Hi, I have an Activity for my application to take pictures and store them
with a content provider.

The problem is that obviously I would like the picture to auto rotate
depending if I have my phone in landscape or not and I would like to use the
autofocus feature. So I'm wondering if I could just call a Camera app intent
and get the URI of the picture taken.

is that possible? I remind reading that it will only give me a small size
picture.

Thanks!

Ivan Soto Fernandez
Web Developer
http://ivansotof.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] how to build ApiDemo with Eclipse

2009-04-05 Thread sunwrt

Any guy knows how to build ApiDemo in Android SDK with eclipse

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



[android-developers] Re: Cupcake SDKs available for download

2009-04-05 Thread Jean-Baptiste Queru

This is definitely new in cupcake - it's part of the work that has
been done by the tools team to allow a single SDK to work with
multiple target configurations, and the visible effect is that
launching the emulator outside of either the source tree or a
fully-configured SDK distribution might actually be tricky.

(sadly, I don't know what exact parameters need to be passed to make it work).

JBQ

On Sun, Apr 5, 2009 at 6:24 PM, Mark Murphy  wrote:
>
> Ivan Soto wrote:
>> I've no idea how to run the emulator on Mac. Any advice?
>>
>> /Double-O:~ ivan$
>> /Users/ivan/Downloads/android-sdk_eng.al_mac-x86/tools/emulator ; exit;/
>> /emulator: ERROR: You did not provide the name of an Android Virtual
>> Device/
>> /with the '-avd ' option. Read -help-avd for more information./
>>
>> /If you *really* want to *NOT* run an AVD, consider using '-data
>> '/
>> /to specify a data partition image file (I hope you know what you're
>> doing)./
>
> Hmmm...that might be new. Just running emulator worked for me a few
> weeks ago with 1.1r1, when I had to use OS X when delivering some training.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android App Developer Training: http://commonsware.com/training.html
>
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 adb push to sdcard report "Read-only file system" for the emulator of the latest android source code

2009-04-05 Thread max

Hi Guys,

This is a question that raised before, but I can't find answer for my
case.

I get the latest android source code, compile, and then set $PATH
including the "android_src/out/host/linux-x86/bin/"

mksdcard 100M card.img
emulator -sdcard card.img

Then in another xterm window, I use

adb push song.mp3 /sdcard

but it reports "failed to copy 'song.mp3' to '/sdcard/song.mp3': Read-
only file system"

I do the same operations many times before, always successfully, but
why it fails for the latest source code,

I do some debugging into the source code, but no answer for this
moment yet.

Can anyone give me some light on this?

Max
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get the first frame of a video file ?

2009-04-05 Thread Wei

Hi Dave,

Are you meaning I can not use this class in my own application?
But in MediaPlayerPerformance.java(framework folder), it can import
MediaMetadataRetriever.
Is any lib I need to load or ?
Please give me some hint

- wei



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

2009-04-05 Thread Kevin Phillips

I have posted a mirror for the files that is registration free over at
http://www.prosoftco.net/android/

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

2009-04-05 Thread xspotlivin

Actually, this does not work when I ran the code on the emulator. It
worked in a separate testing program I have. Back to step 1.

On Apr 5, 8:08 pm, xspotlivin  wrote:
> I solved it. I was trying to do way to much work. Simple solution:
>
> Java:
> Node adherenceIntervals = reportXML.getFirstChild().getFirstChild();
> Element adherenceIntervalsElement = (Element) adherenceIntervals;
>
> NodeList medicationNodes =
> adherenceIntervalsElement.getElementsByTagName("Medication");
> int medicationLength = medicationNodes.getLength();
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cupcake SDKs available for download

2009-04-05 Thread Mark Murphy

Ivan Soto wrote:
> I've no idea how to run the emulator on Mac. Any advice?
> 
> /Double-O:~ ivan$
> /Users/ivan/Downloads/android-sdk_eng.al_mac-x86/tools/emulator ; exit;/
> /emulator: ERROR: You did not provide the name of an Android Virtual
> Device/
> /with the '-avd ' option. Read -help-avd for more information./
> 
> /If you *really* want to *NOT* run an AVD, consider using '-data
> '/
> /to specify a data partition image file (I hope you know what you're
> doing)./

Hmmm...that might be new. Just running emulator worked for me a few
weeks ago with 1.1r1, when I had to use OS X when delivering some training.

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

Android App Developer Training: http://commonsware.com/training.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
-~--~~~~--~~--~--~---



[android-developers] Re: Cupcake SDKs available for download

2009-04-05 Thread Ivan Soto
I've no idea how to run the emulator on Mac. Any advice?

*Double-O:~ ivan$
> /Users/ivan/Downloads/android-sdk_eng.al_mac-x86/tools/emulator ; exit;*
> *emulator: ERROR: You did not provide the name of an Android Virtual
> Device*
> *with the '-avd ' option. Read -help-avd for more information.*
>
> *If you *really* want to *NOT* run an AVD, consider using '-data '*
> *to specify a data partition image file (I hope you know what you're
> doing).*
>





Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Sun, Apr 5, 2009 at 3:10 PM, Stoyan Damov  wrote:

>
> The ONLY change to this entire thread should be the subject, which should
> read
>
> "UNOFFICIAL Cupcake SDKs available for download"
>
> That said, no good goes unpunished.
>
> Cheers
>
> On Sun, Apr 5, 2009 at 10:42 AM, Al Sutton  wrote:
> >
> > I've compiled up the Linux & Mac OS X Intel SDKs from the public git
> > repository and have put them up for download (If anyone can get
> instructions
> > on building a Windows SDK I will do what I can to create a Windows SDK as
> > well).
> >
> > *PLEASE NOTE* In order to ensure that I don't end up with a massive
> > bandwidth bill you will need to log into AndAppStore to download the
> SDKs,
> > and, if things get silly, download limits may be introduced.
> >
> > You are, of course, free to pass on the SDK to as many people as you want
> > after you've downloaded, but please do not pass around links to direct
> > downloads without logins at AndAppStore because I'd like to continue to
> > update them but if a bandwidth cost issue comes up then I won't.
> >
> > Anyway, once you've logged into AndAppStore the link to the Cupcake SDKs
> is
> > in the Developers Area menu on the right of the page.
> >
> >
> > Al.
> >
> > ---
> >
> > * Written an Android App? - List it at http://andappstore.com/ *
> >
> > ==
> > Funky Android Limited is registered in England & Wales with the
> > company number  6741909. The registered head office is Kemp House,
> > 152-160 City Road, London,  EC1V 2NX, UK.
> >
> > The views expressed in this email are those of the author and not
> > necessarily those of Funky Android Limited, it's associates, or it's
> > subsidiaries.
> >
> >
> >
> > >
> >
>
> >
>

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

2009-04-05 Thread Noam

?

On Apr 1, 6:50 pm, Noam  wrote:
> Is my code worth anything?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Detecting Noise!

2009-04-05 Thread MyLinuxSupport

You should be able to fork the audio in Linux and write a c program to
do the analysis, then write your results to android...  The challenge
you will have is getting your c program installed on the locked down
phones...  Since you are only doing analysis you should be able to
fork the audio path and pipe it to your application.  I'm also
interested in this area...

Food for thought below...

From: 
http://www.commandlinefu.com/commands/view/907/unencrypted-voicechat#comment

$ On PC1:  nc -l -p  > /dev/dsp   On PC2:  cat /dev/dsp | nc
 




On Apr 6, 4:55 am, MrSnowflake  wrote:
> The only way I see this possible is by having the MediaRecorder record
> some sound for a very short time, have it stop and save the file, and
> immediately start recording again. Then analyse the previous shot
> sample. You have to do it this way, because you don't have direct
> access to the sound stream from the mic.
>
> On 5 apr, 22:34, John Doe  wrote:
>
> > Hi everyone.
> > I am trying to develop a program which detects noise level of
> > outside.Is it loud or silent? How loud?
>
> > Where should I start? Is there any example ? Any comment will be
> > greatly appreciated...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: javax.xml.transform

2009-04-05 Thread xspotlivin

I solved it. I was trying to do way to much work. Simple solution:

Java:
Node adherenceIntervals = reportXML.getFirstChild().getFirstChild();
Element adherenceIntervalsElement = (Element) adherenceIntervals;

NodeList medicationNodes =
adherenceIntervalsElement.getElementsByTagName("Medication");
int medicationLength = medicationNodes.getLength();
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: javax.xml.transform

2009-04-05 Thread xspotlivin

I'm using xml, and after creating a document out of it, I'd like to
create a new document out of some particular node (with all its
children). Below "XML" is the larger document, and I want to make a
new document from the node "intervals". This is how I did it with the
transform package:

Node intervals = XML.getFirstChild().getFirstChild();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer xf = tf.newTransformer();
DOMResult dr = new DOMResult();
xf.transform(new DOMSource(adherenceIntervals), dr);
Document adherenceIntervalsDoc = (Document) dr.getNode();

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

2009-04-05 Thread xspotlivin

I'm trying to create a button in a custom view that I've created. I'm
looping through an XML document and drawing certain things. I want to
be able to also create buttons to go in certain locations depending on
the xml data. I'd like to do it in the view because I want to be able
to call invalidate() on my view to redraw things and replace the
buttons when new xml data is available.

The problem is that I put my code in the view class, the activity
crashes because the button is "null". Here is a subset of my code:

Java:
 @Override
 protected void onDraw(Canvas canvas) {

  // Clock-size rectangle to draw compliance windows
  RectF clockRect = new RectF(86, 6, 394, 314);

  // Create a node list containing each reminder
  NodeList reminderNodes = this.clockXML.getElementsByTagName
("AdherenceInterval");
  int reminderLength = reminderNodes.getLength();

  Button checkbox = (Button) findViewById(R.id.checkbox);
checkbox.setLayoutParams(new AbsoluteLayout.LayoutParams
(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0, 0));
checkbox.setOnClickListener(new Button.OnClickListener() {
  public void onClick(View v) {
   Context context = v.getContext();
   Intent i = new Intent(context,
ReportMedications.class);
   context.startActivity(i);
  }
});



I know this code works for creating buttons because I can put it in my
activity class and it works just fine. Any suggestions? I thought
about relocating the button in the activity, but I can't figure out
how to do this when new data is 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: Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES

2009-04-05 Thread Mark Murphy

geoff.stromberg wrote:
> Well, this APK installation error
> (INSTALL_PARSE_FAILED_NO_CERTIFICATES) is caused by a change to my
> source (I didn't verify well enough that I had restored to a known
> good working source tree).
> 
> The error is apparently triggered by changing the name of one of my
> layout XML files. With one name it works fine, with another everything
> compiles and builds an APK fine, but that APK fails to install (with
> an error message indicating a color resource that has nothing to do
> with the layout file whose name changed).

This is somewhat reminiscent of what Mr. Damov referred to colorfully as
a "TERRIBLE BUG" a few weeks ago. In his case, it would not compile
(aapt crashed), but it too was due to a subtle difference in his
resources (in his case, whitespace in a layout, IIRC).

If there is any way you can post an issue to http://b.android.com with a
ZIPped-up project that can reproduce this problem, it would really help
in terms of getting it fixed. If you can't (e.g., the project you are
working on isn't intended to be open source), c'est la vie...

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

_The Busy Coder's Guide to 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: javax.xml.transform

2009-04-05 Thread Mark Murphy

xspotlivin wrote:
> Ok. Well do you have any ideas or advice on how I can solve this
> problem?

You haven't stated a problem we can really help you solve.

You asked:

"Are you not allowed to use this package on Android?"

As Mr. Guy indicated, you are correct. The package is not shipped with
Android, and adding platform classes like this is not recommended.
Hence, you cannot use this package on Android at this time.

If you can tell us what you are trying to do -- at more of a design
level than "trying to use this javax.xml.transform" -- we might be able
to give you some suggestions for how to achieve your goals without the
use of the missing package.

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

_The Busy Coder's Guide to 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: Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES

2009-04-05 Thread geoff.stromberg

Well, this APK installation error
(INSTALL_PARSE_FAILED_NO_CERTIFICATES) is caused by a change to my
source (I didn't verify well enough that I had restored to a known
good working source tree).

The error is apparently triggered by changing the name of one of my
layout XML files. With one name it works fine, with another everything
compiles and builds an APK fine, but that APK fails to install (with
an error message indicating a color resource that has nothing to do
with the layout file whose name changed).


On Apr 3, 2:22 pm, "geoff.stromberg" 
wrote:
> I've been working with my Eclipse/ADT Android project for weeks now,
> and all of a sudden, for no reason that I can determine, I have
> started getting this error whenever I try to run my app:
>
> Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES
>
> The only further clue found in logcat is this:
>
> 04-03 14:07:40.116: ERROR/PackageParser(51): Package
> com.mypackage.myapp has no certificates at entry res/color/
> text_light_gray.xml; ignoring!
>
> I found the same error in the issue database:
>
> http://code.google.com/p/android/issues/detail?id=830
>
> But, what I haven't found is a workaround. Here's what I have tried so
> far:
>
> emulator -wipe-data
> rm -rf ~/.android
> installing using adb (same error code)
> rebooting my dev machine
> restoring my source code to a known good state (from source control)
> deleting my eclipse project and rebuilding it with known good source
>
> The only thing left I can think of is re-installing ADT, and then re-
> installing Eclipse. Anybody know another workaround before I resort to
> 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
-~--~~~~--~~--~--~---



[android-developers] Re: javax.xml.transform

2009-04-05 Thread xspotlivin

Ok. Well do you have any ideas or advice on how I can solve this
problem?

On Apr 5, 5:27 pm, Romain Guy  wrote:
> Android does not provide the javax.xml.transform package.
>
>
>
> On Sun, Apr 5, 2009 at 2:23 PM, xspotlivin  wrote:
>
> > I need to use the transform package (transformer, transformfactory,
> > etc.) so that I can convert an xml node to a new document. However,
> > when I try to import the package, it says that it cannot be resolved.
> > Are you not allowed to use this package on Android?
>
> > Below is the code subset of how I want to transform:
>
> > import javax.xml.transform.Transformer;
> > import javax.xml.transform.*;
> > import javax.xml.transform.dom.DOMResult;
> > import javax.xml.transform.dom.DOMSource;
>
> > Node adherenceIntervals = reportXML.getFirstChild().getFirstChild();
> > TransformerFactory tf = TransformerFactory.newInstance();
> > Transformer xf = tf.newTransformer();
> > DOMResult dr = new DOMResult();
> > xf.transform(new DOMSource(adherenceIntervals), dr);
> > Document adherenceIntervalsDoc = (Document) dr.getNode();
>
> > NodeList medicationNodes = adherenceIntervalsDoc.getElementsByTagName
> > ("Medication");
> > int medicationLength = medicationNodes.getLength();
>
> > Any thoughts?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  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] UberColorPicker Demo

2009-04-05 Thread Keith Wiley

I have created what I believe is a relatively useful color picker,
derived and massively extended from the ColorPickDialog example in the
API Demos.  If anyone would like to try it out, it is available on the
Market at Applications/Tools/UberColorPicker Demo".  It didn't put it
in the Demo section because it isn't a demo in the sense of being a
free teaser of a nonfree product, if you see my meaning.

If you like it, you can download the source from
http://keithwiley.com/Downloads/AndroidUberColorPickerDemo.zip.  Feel
free to drop it -- ready-to-go and unmodified -- into your own apps (I
use it for setting text color preferences in Shead Spreet)...or to
hack, extend, and change it however you see fit.

Enjoy!

Cheers!

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



[android-developers] Re: opening a file within a service

2009-04-05 Thread Dianne Hackborn
That should work fine.  That function does very little -- just builds a File
with the proper path.

You might want to attach the debugger and see the stack crawl when you are
stuck.

On Sun, Apr 5, 2009 at 2:37 PM, Richard Schilling <
richard.rootwirel...@gmail.com> wrote:

>
> I'm getting some weird behavior when I try to open a file within a
> service:
>
> 
>
> public class MyService extends Service{
>
> public void onCreate(){
>super.onCreate();
>
>File myFile = getFileStreamPath("myfile.dat");
>
>if (myFile.exists()){
>Log.i("MyService", "myfile.dat exists");
>}
>
> }
>
> 
>
> Whenever getFileStreamPath is called, the service just freezes and
> does nothing.  It's like the call to getFileStremPath is being blocked
> by something.
>
> Can someone give an example of how to properly obtain a File object
> reference in a service using getFileStreamPath()?
>
> Thanks.
>
> Richard
>
> >
>


-- 
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] UberColorPicker Demo

2009-04-05 Thread Keith Wiley

I have created what I believe is a relatively useful color picker,
derived and massively extended from the ColorPickDialog example in the
API Demos.  If anyone would like to try it out, it is available on the
Market at Applications/Tools/UberColorPicker Demo".  It didn't put it
in the Demo section because it isn't a demo in the sense of being a
free teaser of a nonfree product, if you see my meaning.

If you like it, you can download the source from
http://keithwiley.com/Downloads/AndroidUberColorPickerDemo.zip.  Feel
free to drop it -- ready-to-go and unmodified -- into your own apps (I
use it for setting text color preferences in Shead Spreet)...or to
hack, extend, and change it however you see fit.

Enjoy!

Cheers!

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



[android-developers] Re: send a image file on sdcard with email not messaging or other options

2009-04-05 Thread Gaurav Agarwal
I will like to restrict the user to Email only, user can choose which one.

On Mon, Apr 6, 2009 at 3:00 AM, Andrew Stadler  wrote:

>
> We can work out ways to deal with this question, but I would ask
> first:  How restrictive are you trying to be?
>
> For example the user might have a Gmail account set up, and both
> platform Email and K9 installed & configured.
>
> Are you sure you want to restrict them to Email only?
>
> The user experience design for the intent resolver is to allow the
> user to control behaviors like this, so it's worth thinking through
> the desired use cases before adding restrictions.
>
> --Andy
>
>
> On Sun, Apr 5, 2009 at 10:10 AM, Gaurav  wrote:
> >
> > I need to send an image file on my sdcard using email in my
> > application. Note that I don't want user to get option to use
> > messaging or other ways to send the file. My current code, as shown
> > below, gives option of both email and messaging whereas I want the
> > user to get only emailing option. How do I do this?
> >
> > Intent intent = new Intent(Intent.ACTION_SEND);
> > intent.addCategory(Intent.CATEGORY_DEFAULT);
> > intent.setType("image/*");
> > intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/sdcard/mydir/
> > myimage.jpg"));
> > startActivity(intent);
> >
> > Gaurav
> > Software Developer
> > http://SilkenMermaid.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] opening a file within a service

2009-04-05 Thread Richard Schilling

I'm getting some weird behavior when I try to open a file within a
service:



public class MyService extends Service{

public void onCreate(){
super.onCreate();

File myFile = getFileStreamPath("myfile.dat");

if (myFile.exists()){
Log.i("MyService", "myfile.dat exists");
}

}



Whenever getFileStreamPath is called, the service just freezes and
does nothing.  It's like the call to getFileStremPath is being blocked
by something.

Can someone give an example of how to properly obtain a File object
reference in a service using getFileStreamPath()?

Thanks.

Richard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: send a image file on sdcard with email not messaging or other options

2009-04-05 Thread Andrew Stadler

We can work out ways to deal with this question, but I would ask
first:  How restrictive are you trying to be?

For example the user might have a Gmail account set up, and both
platform Email and K9 installed & configured.

Are you sure you want to restrict them to Email only?

The user experience design for the intent resolver is to allow the
user to control behaviors like this, so it's worth thinking through
the desired use cases before adding restrictions.

--Andy


On Sun, Apr 5, 2009 at 10:10 AM, Gaurav  wrote:
>
> I need to send an image file on my sdcard using email in my
> application. Note that I don't want user to get option to use
> messaging or other ways to send the file. My current code, as shown
> below, gives option of both email and messaging whereas I want the
> user to get only emailing option. How do I do this?
>
> Intent intent = new Intent(Intent.ACTION_SEND);
> intent.addCategory(Intent.CATEGORY_DEFAULT);
> intent.setType("image/*");
> intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/sdcard/mydir/
> myimage.jpg"));
> startActivity(intent);
>
> Gaurav
> Software Developer
> http://SilkenMermaid.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: javax.xml.transform

2009-04-05 Thread Romain Guy

Android does not provide the javax.xml.transform package.

On Sun, Apr 5, 2009 at 2:23 PM, xspotlivin  wrote:
>
> I need to use the transform package (transformer, transformfactory,
> etc.) so that I can convert an xml node to a new document. However,
> when I try to import the package, it says that it cannot be resolved.
> Are you not allowed to use this package on Android?
>
> Below is the code subset of how I want to transform:
>
> import javax.xml.transform.Transformer;
> import javax.xml.transform.*;
> import javax.xml.transform.dom.DOMResult;
> import javax.xml.transform.dom.DOMSource;
>
> Node adherenceIntervals = reportXML.getFirstChild().getFirstChild();
> TransformerFactory tf = TransformerFactory.newInstance();
> Transformer xf = tf.newTransformer();
> DOMResult dr = new DOMResult();
> xf.transform(new DOMSource(adherenceIntervals), dr);
> Document adherenceIntervalsDoc = (Document) dr.getNode();
>
> NodeList medicationNodes = adherenceIntervalsDoc.getElementsByTagName
> ("Medication");
> int medicationLength = medicationNodes.getLength();
>
> Any thoughts?
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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] javax.xml.transform

2009-04-05 Thread xspotlivin

I need to use the transform package (transformer, transformfactory,
etc.) so that I can convert an xml node to a new document. However,
when I try to import the package, it says that it cannot be resolved.
Are you not allowed to use this package on Android?

Below is the code subset of how I want to transform:

import javax.xml.transform.Transformer;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;

Node adherenceIntervals = reportXML.getFirstChild().getFirstChild();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer xf = tf.newTransformer();
DOMResult dr = new DOMResult();
xf.transform(new DOMSource(adherenceIntervals), dr);
Document adherenceIntervalsDoc = (Document) dr.getNode();

NodeList medicationNodes = adherenceIntervalsDoc.getElementsByTagName
("Medication");
int medicationLength = medicationNodes.getLength();

Any thoughts?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cupcake SDKs available for download

2009-04-05 Thread Stoyan Damov

The ONLY change to this entire thread should be the subject, which should read

"UNOFFICIAL Cupcake SDKs available for download"

That said, no good goes unpunished.

Cheers

On Sun, Apr 5, 2009 at 10:42 AM, Al Sutton  wrote:
>
> I've compiled up the Linux & Mac OS X Intel SDKs from the public git
> repository and have put them up for download (If anyone can get instructions
> on building a Windows SDK I will do what I can to create a Windows SDK as
> well).
>
> *PLEASE NOTE* In order to ensure that I don't end up with a massive
> bandwidth bill you will need to log into AndAppStore to download the SDKs,
> and, if things get silly, download limits may be introduced.
>
> You are, of course, free to pass on the SDK to as many people as you want
> after you've downloaded, but please do not pass around links to direct
> downloads without logins at AndAppStore because I'd like to continue to
> update them but if a bandwidth cost issue comes up then I won't.
>
> Anyway, once you've logged into AndAppStore the link to the Cupcake SDKs is
> in the Developers Area menu on the right of the page.
>
>
> Al.
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
>
> >
>

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

2009-04-05 Thread Mark Murphy

Gaurav wrote:
> How does PicSay move/resize/rotate an image on top of another image.
> Can someone please share some sample code/ideas on how to do this.

I have not used PicSay, but what you are describing sounds like the
animation framework.

http://developer.android.com/reference/android/view/animation/package-summary.html

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

Android App Developer Training: http://commonsware.com/training.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
-~--~~~~--~~--~--~---



[android-developers] Re: [TextView] What are that XML Attributes in JAVA ?

2009-04-05 Thread Mark Murphy

Marco Schmitz wrote:
>> //android:layout_width="150px"
>> tv.setWidth(150);

That will not reliably work AFAIK. See below.

>> //android:layout_height="wrap_content"
>> ???

All of the layout_ attributes are messages to the widget's *container*,
not to the widget itself.

To adjust those layout_ attributes at runtime, you need to:

1. Instantiate an appropriate ViewGroup.LayoutParams subclass (e.g.,
LinearLayout.LayoutParams).

2. Configure the LayoutParams from step #1.

3. Call setLayoutParams() on the widget.

>> //android:textColor="#ff"
>> tv.setTextColor(Color.rgb(0xff, 0xff,0xff));// tv.setTextColor
>> (0xff) doesn't work somehow

Colors in Android in Java are in AARRGGBB format, where the AA refers to
the alpha channel. So 0x is solid red, and 0x80FF is a 50-50
mix of red and whatever the background color is.

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

Android App Developer Training: http://commonsware.com/training.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
-~--~~~~--~~--~--~---



[android-developers] moving pictures like PicSay

2009-04-05 Thread Gaurav

How does PicSay move/resize/rotate an image on top of another image.
Can someone please share some sample code/ideas on how to do 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] Re: Detecting Noise!

2009-04-05 Thread MrSnowflake

The only way I see this possible is by having the MediaRecorder record
some sound for a very short time, have it stop and save the file, and
immediately start recording again. Then analyse the previous shot
sample. You have to do it this way, because you don't have direct
access to the sound stream from the mic.

On 5 apr, 22:34, John Doe  wrote:
> Hi everyone.
> I am trying to develop a program which detects noise level of
> outside.Is it loud or silent? How loud?
>
> Where should I start? Is there any example ? Any comment will be
> greatly appreciated...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: [TextView] What are that XML Attributes in JAVA ?

2009-04-05 Thread Marco Schmitz

is there noone who want to help me on this?

the most setter methods are documentated, but on this I get really nuts:
android:layout_height="wrap_content"

thanks
darolla

2009/4/4 DaRolla :
>
> Hi,
>
> I need to programm this XML in JAVA. Some I figured out, some not. Can
> you help me on the missing ones?
>
>
>   android:layout_height="wrap_content"
>  android:text="Bladidadi"
>  android:layout_gravity="center_vertical"
>  android:textColor="#ff" />
>
>
> TextView tv = new TextView(this);
>
> //android:layout_width="150px"
> tv.setWidth(150);
>
> //android:layout_height="wrap_content"
> ???
>
> //android:text="Bladidadi"
> tv.setText("Bladidadi");
>
> //android:layout_gravity="center_vertical"
> tv.setGravity(Gravity.CENTER_VERTICAL);
>
> //android:textColor="#ff"
> tv.setTextColor(Color.rgb(0xff, 0xff,0xff));    // tv.setTextColor
> (0xff) doesn't work somehow
>
>
> Greetings,
> DaRolla
> >
>

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

2009-04-05 Thread Mark Murphy

AlexNguyen wrote:
> I am working with dialog, I have a question about dialog:
> 1. How can we set color for dialog message?
> 2. How can we modify size, font character in title or message in
> dialog?

I am assuming you are referring to AlertDialog.

One approach is to use setView() and supply your own custom-configured
contents.

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

_The Busy Coder's Guide to 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] Dialog

2009-04-05 Thread AlexNguyen

I am working with dialog, I have a question about dialog:
1. How can we set color for dialog message?
2. How can we modify size, font character in title or message in
dialog?

Thanks,

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



[android-developers] Detecting Noise!

2009-04-05 Thread John Doe

Hi everyone.
I am trying to develop a program which detects noise level of
outside.Is it loud or silent? How loud?

Where should I start? Is there any example ? Any comment will be
greatly appreciated...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] OpenGL: Difference on Emulator versus actual G1 phone for method glDrawTexiOES

2009-04-05 Thread Streets Of Boston

Hi,

I have a problem drawing a background for my OpenGL app on the
emulator. It all works well on an actual G1, but i'm worried that if
the emulator has a problem, other android phones may have the same
problem.

On an actual G1 the background is drawn on the background. All other
drawing is drawn in front of it.
On the emulator, the background is always drawn on the foreground,
obsuring any other drawing.

Here are two screenshots, where i have my background only occupying
half of the screen:
>From emulator
http://www.streetsofboston.com/photos/505952628_oatDP-O.png

>From phone
http://www.streetsofboston.com/photos/505952626_Cb9Mc-O.png

Here are some code snippets:
Clearing screen before drawing anything else:
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

Drawing the actual background:
  gl.glBindTexture(GL10.GL_TEXTURE_2D, mBackgroundTextureID);
  ((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
  GL11Ext.GL_TEXTURE_CROP_RECT_OES, smBackgroundCrop,0);
  ((GL11Ext)gl).glDrawTexiOES(0, 0, 1, (int)mViewWidth, (int)
mViewHeight);
(the background is drawn where Z=1, the far-plane).

Enable depth-test and setting the func to equal or less than equal:
  gl.glEnable(GL10.GL_DEPTH_TEST);
  gl.glDepthFunc(GL10.GL_LEQUAL);
(using the default depth-func will not draw the background on the
phone)

Surface type:
  mHolder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
(changing the surface type won't fix it for the emulator)


My question is:
Is there a bug in the emulator or may there be a real problem with my
code?

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: Windows Cupcake SDKs compilation

2009-04-05 Thread David Turner
On Sun, Apr 5, 2009 at 6:36 PM, Al Sutton  wrote:

>
> I tried the instructions from the git repo for building windows and they
> don't work.
>
> To start  with cygwin bases everything off /cygwin rather than / so even
> trying to run repo gets;
>
> /bin/sh: bad interpreter: No such file or directory
>

Normally, cygwin also mounts / as a short-cut to your cygwin installation so
you
should be able to run /bin/sh directly. Note that I said "normally", because
there are
unfortunately quite a few ways to get a Cygwin install on a Windows PC, each
one
of them which its own can of worms.

I suggest starting from scratch with the "usual" way, i.e.:

- uninstall *anything* vaguely related to Cygwin on your machine
- go to http://www.cygwin.com and download the "setup.exe" program
- run setup.exe and ensure that:

   = You install on a NTFS partition
   = All directories in the installation path fit the 8.3 DOS convention
(right)
   = Choose "Unix line ending" when asked by the installation dialog
   = Don't try to much with the default mount paths (i.e. it's possible to
get rid of the /cygdrive/ stuff with some tweaking, but this makes
some tools miserable).

In addition, I really recommend the following:

install python and wget by default, then later install "cyg-apt" from
http://www.lilypond.org/~janneke/software/cyg-apt
this tool will allow you to download and install additionnal packages from
the command-line without using the brain-dead setup.exe GUI
(NOTE: you may need to update the script to use a better mirror than the
default. Look at the lines that read "mirror = ")

use puttycyg as the terminal (http://code.google.com/p/puttycyg/), or even
Terminator (http://software.jessies.org/terminator/) as they are far better
than the default Windows console or rxvt.

If you need MSys, do not install it in the same location that Cygwin if
possible, this really messes things sometimes.

Hope this helps


> And if you hack around that by altering repo to point to /cygwin/bin/sh you
> get;
>
> Getting repo ...
>   from git://android.git.kernel.org/tools/repo.git
> warning: templates not found /usr/share/git-core/templates/
> remote: Counting objects: 386, done.
> remote: Compressing objects: 100% (234/234), done.
> git: 'index-pack' is not a git-command. See 'git --help'.
> fatal: write error (Broken pipe)
> fatal: index-pack failed
>
> :(
>
> Al.
>
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
> -Original Message-
> From: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
> Queru
> Sent: 05 April 2009 14:12
> To: android-developers@googlegroups.com
> Subject: [android-developers] Re: Cupcake SDKs available for download
>
>
> -I'd like to point out that this isn't an official SDK, with e.g. no
> guarantee that applications developed with it will work on future versions
> of Android. Should anyone have questions about using it, please use the
> android-discuss group as android-developers is for questions about the
> official SDKs, and be sure to mention which specific version of Al's SDK
> you're using.
>
> -Al, you might be looking for this:
>
> http://android.git.kernel.org/?p=platform/development.git;a=blob;f=docs/howt
> o_build_SDK.txt
> ;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6ef1df35
> 34dee5b1d09ab72d129d3697c7#l92
>
> -How about distributing it with BitTorrent? This seems like a perfect use
> case.
>
> JBQ
>
> On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
> >
> > I've compiled up the Linux & Mac OS X Intel SDKs from the public git
> > repository and have put them up for download (If anyone can get
> > instructions on building a Windows SDK I will do what I can to create
> > a Windows SDK as well).
> >
> > *PLEASE NOTE* In order to ensure that I don't end up with a massive
> > bandwidth bill you will need to log into AndAppStore to download the
> > SDKs, and, if things get silly, download limits may be introduced.
> >
> > You are, of course, free to pass on the SDK to as many people as you
> > want after you've downloaded, but please do not pass around links to
> > direct downloads without logins at AndAppStore because I'd like to
> > continue to update them but if a bandwidth cost issue comes up then I
> won't.
> >
> > Anyway, once you've logged into AndAppStore the link to the Cupcake
> > SDKs is in the Developers Area menu on the right of the page.
> >
> >
> > Al.
> >
> > ---
> >
> > * Written an Android App? - List it at http://andappstore.com/ *
> >

[android-developers] Re: Exception locking surface - lockCanvas() returns a null?

2009-04-05 Thread ellipsoidmob...@googlemail.com

Might also be worth checking that you aren't drawing into the surface
from a different thread, and that you aren't drawing before the
surfaceCreated() callback
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] send a image file on sdcard with email not messaging or other options

2009-04-05 Thread Gaurav

I need to send an image file on my sdcard using email in my
application. Note that I don't want user to get option to use
messaging or other ways to send the file. My current code, as shown
below, gives option of both email and messaging whereas I want the
user to get only emailing option. How do I do this?

Intent intent = new Intent(Intent.ACTION_SEND);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/sdcard/mydir/
myimage.jpg"));
startActivity(intent);

Gaurav
Software Developer
http://SilkenMermaid.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: Cupcake SDKs available for download

2009-04-05 Thread Jean-Baptiste Queru

That's not what I wrote (or at least not what I meant to write). The
fact that the open-source side of Android (which is fundamentally
"the" true Android platform as it's the central one) is called
"Android Open-Source Project" with the official Android logo should be
a good hint that it's not an offshoot.

What I meant is that it's beneficial for the Android community as a
whole if the Android name and logos are only used in a set of
situations that are consistent with one another, especially when it
comes to compatibility. Fragmentation won't help, neither would
additional user confusion beyond what we already have.

So, for the sake of clarity, let's try to keep some separation between
the official SDKs that Google releases and supports on this discussion
group, and other development tools that anyone can create and
distribute out of the Android Open Source Project source code as long
as they stay within the allowed limits for IP licensing.

BTW, I'm very much looking forward to the start of the next Android
development cycle, since for the first time in the history of Android
such a cycle will start with the source code being openly available.
Things won't quite be perfect the first time around, we'll learn from
the issues that we are going to face, and we'll all work better
together for subsequent development cycles.

JBQ

On Sun, Apr 5, 2009 at 9:28 AM, Al Sutton  wrote:
>
> JBQ,
> I may be reading what you've written in a different way to you've intended,
> but it reads very much like you guys see Google produced Android stuff from
> the internal Google repository as "Android", and anything else (including
> the public repository) is being an offshoot project.
>
> Al.
>
>
>
> -Original Message-
> From: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
> Queru
> Sent: 05 April 2009 17:08
> To: android-developers@googlegroups.com
> Subject: [android-developers] Re: Cupcake SDKs available for download
>
>
> [inline]
>
> On Sun, Apr 5, 2009 at 8:45 AM, Al Sutton  wrote:
>>
>> Hi JBQ,
>>
>> - Who decides what is an official SDK of an open project :)?
>
> The owners of the discussion group where "official" SDKs are supported :)
>
> Within the limits of the various licenses (which are generally very
> permissive), it's possible for someone to legally download source code from
> the Android Open-Source Project, compile it, redistribute the compiled
> result, and even support it with their own resources. As long as there's
> enough separation between those projects and the official SDK that is used
> to develop applications for devices that bear the Android logo, there
> shouldn't be any major issue. That being said, it's probably not entirely
> beneficial for the Android community as a whole if app developers are
> presented with a multitude of slightly different and incompatible
> development environment, but I do understand the motivation behind what
> you're doing.
>
>> - There is no guarantee of future compatibility on any SDK (see my
>> issue with buttons posted a couple of days ago).
>
> Yeah, compatibility isn't always as good as we'd like it to be, especially
> as it's not always clearly documented what behaviors can potentially vary
> and therefore can't be strongly relied on by applications (especially when
> there's currently no way to make those vary on the SDK), but with unofficial
> development environments built from branches in intermediate states there's
> a much more explicit risk of e.g. APIs that disappear entirely or behaviors
> being suddenly protected by permissions, i.e. of applications that grossly
> fail to compile or load.
>
> There's definitely a relevant use case around being able to "preview"
> existing apps on newer "in-development" versions of the platform, without
> necessarily exposing any new platform APIs, so that compatibility issues can
> be spotted earlier. Technical limitations have made this impractical with
> the existing SDK infrastructure, but that issue has been on our minds for a
> while.
>
>> - Thanks for the window SDK pointer, I'm installing cygwin now.
>>
>> - If someone wants to setup a bit torrent tracker then I'll like to
>> the torrent file, but I don't want to run a tracker and seeds on my
> servers.
>>
>> Al.
>>
>>
>> ---
>>
>> * Written an Android App? - List it at http://andappstore.com/ *
>>
>> ==
>> Funky Android Limited is registered in England & Wales with the
>> company number  6741909. The registered head office is Kemp House,
>> 152-160 City Road, London,  EC1V 2NX, UK.
>>
>> The views expressed in this email are those of the author and not
>> necessarily those of Funky Android Limited, it's associates, or it's
>> subsidiaries.
>>
>>
>> -Original Message-
>> From: android-developers@googlegroups.com
>> [mailto:android-develop...@googlegroups.com] On Behalf Of
>> Jean-Baptiste Queru
>> Sent: 05 April 2009 14:12
>> To: android-developers@googlegroups.com
>> Subject:

[android-developers] Re: Cupcake SDKs available for download

2009-04-05 Thread Mark Murphy

Al Sutton wrote:
> I may be reading what you've written in a different way to you've intended,
> but it reads very much like you guys see Google produced Android stuff from
> the internal Google repository as "Android", and anything else (including
> the public repository) is being an offshoot project.

It doesn't have to be an internal Google repository.

Let's suppose the source code in question was Mozilla Firefox. You
decide to grab HEAD off the Firefox repositories, build it, and declare
that you, Al Sutton, are distributing Firefox 4.0.

The Mozilla Foundation might be somewhat irked by such a declaration.

If you had a similar role in Mozilla-land as you do in Android-dom, the
lead developers on Firefox might be quick to point out that you are not
distributing Firefox 4.0, but rather your own build of your own snapshot
of in-progress code. While your browser may resemble what will
eventually be Firefox 4.0, Firefox 4.0 is not yet ready, and anyone
relying on your release may run into compatibility issues with the
official Firefox 4.0 release.

So long as you are within the bounds of the open source license and
relevant trademark uses, there is nothing to prevent you from trying to
convince people that yours is the One True Firefox 4.0. Or you can
position it as your own preview edition. And this is not to say that
your preview edition would be a bad thing (e.g., AJAX toolkit folk
wanting to get cracking on known Firefox 4.0 changes), just that it's
not official.

My interpretation of JBQ's comments [JBQ: please forgive me if I've
missed your intent] are that he wants to make sure people realize that
you are not distributing ,
but rather your own build of your own snapshot of in-progress code.
While your SDK may resemble ,  is not
yet ready, and anyone relying on your release may run into compatibility
issues with the official  release.

So long as you are within the bounds of the open source license and
relevant trademark uses, there is nothing to prevent you from trying to
convince people that yours is the One True Android  SDK. Or you can
position it as your own preview edition. And this is not to say that
your preview edition would be a bad thing (e.g., Android developers
wanting to test against soft keyboards), just that it's not official.

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

Android App Developer Books: http://commonsware.com/books.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
-~--~~~~--~~--~--~---



[android-developers] Re: Windows Cupcake SDKs compilation

2009-04-05 Thread Al Sutton

I tried the instructions from the git repo for building windows and they
don't work.

To start  with cygwin bases everything off /cygwin rather than / so even
trying to run repo gets;

/bin/sh: bad interpreter: No such file or directory

And if you hack around that by altering repo to point to /cygwin/bin/sh you
get;

Getting repo ...
   from git://android.git.kernel.org/tools/repo.git
warning: templates not found /usr/share/git-core/templates/
remote: Counting objects: 386, done.
remote: Compressing objects: 100% (234/234), done.
git: 'index-pack' is not a git-command. See 'git --help'.
fatal: write error (Broken pipe)
fatal: index-pack failed

:(

Al. 


---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 05 April 2009 14:12
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake SDKs available for download


-I'd like to point out that this isn't an official SDK, with e.g. no
guarantee that applications developed with it will work on future versions
of Android. Should anyone have questions about using it, please use the
android-discuss group as android-developers is for questions about the
official SDKs, and be sure to mention which specific version of Al's SDK
you're using.

-Al, you might be looking for this:
http://android.git.kernel.org/?p=platform/development.git;a=blob;f=docs/howt
o_build_SDK.txt;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6ef1df35
34dee5b1d09ab72d129d3697c7#l92

-How about distributing it with BitTorrent? This seems like a perfect use
case.

JBQ

On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
>
> I've compiled up the Linux & Mac OS X Intel SDKs from the public git 
> repository and have put them up for download (If anyone can get 
> instructions on building a Windows SDK I will do what I can to create 
> a Windows SDK as well).
>
> *PLEASE NOTE* In order to ensure that I don't end up with a massive 
> bandwidth bill you will need to log into AndAppStore to download the 
> SDKs, and, if things get silly, download limits may be introduced.
>
> You are, of course, free to pass on the SDK to as many people as you 
> want after you've downloaded, but please do not pass around links to 
> direct downloads without logins at AndAppStore because I'd like to 
> continue to update them but if a bandwidth cost issue comes up then I
won't.
>
> Anyway, once you've logged into AndAppStore the link to the Cupcake 
> SDKs is in the Developers Area menu on the right of the page.
>
>
> Al.
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the 
> company number  6741909. The registered head office is Kemp House, 
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not 
> necessarily those of Funky Android Limited, it's associates, or it's 
> subsidiaries.
>
>
>
> >
>



--
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private will
likely get ignored or forwarded to a public forum with no further warning.




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

2009-04-05 Thread Peli

Here is the solution:
You have to move your cursor from position "-1" to "0" using
moveToFirst():

android.database.Cursor cursor = activity.getContentResolver().query(
intent.getData(), null, null, null, null);
cursor.moveToFirst();
int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
String fname = cursor.getString(idx);

Peli
www.openintents.org

On 1 Apr., 16:03, Bobbie  wrote:
> Here's my debug errors:
>
> 04-01 10:01:33.318: ERROR/AndroidRuntime(30289): Uncaught handler:
> thread main exiting due to uncaught exception
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):
> java.lang.RuntimeException: Failure delivering result ResultInfo
> {who=null, request=1, result=-1, data=Intent { data=content://media/
> external/images/media/2 }} to activity {com.app.name/
> com.app.name.activity}:
> android.database.CursorIndexOutOfBoundsException: Index -1 requested,
> with a size of 1
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.ActivityThread.deliverResults(ActivityThread.java:2840)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.ActivityThread.handleSendResult(ActivityThread.java:2882)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.ActivityThread.access$2300(ActivityThread.java:112)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1609)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.os.Handler.dispatchMessage(Handler.java:88)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.os.Looper.loop(Looper.java:123)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.ActivityThread.main(ActivityThread.java:3739)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> java.lang.reflect.Method.invoke(Method.java:515)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:739)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> dalvik.system.NativeStart.main(Native Method)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289): Caused by:
> android.database.CursorIndexOutOfBoundsException: Index -1 requested,
> with a size of 1
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.database.AbstractCursor.checkPosition(AbstractCursor.java:559)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.database.AbstractWindowedCursor.checkPosition
> (AbstractWindowedCursor.java:172)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.database.AbstractWindowedCursor.getString
> (AbstractWindowedCursor.java:41)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.database.CursorWrapper.getString(CursorWrapper.java:138)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> com.indigital.IM911.IM911.onActivityResult(IM911.java:516)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.Activity.dispatchActivityResult(Activity.java:3415)
> 04-01 10:01:33.418: ERROR/AndroidRuntime(30289):     at
> android.app.ActivityThread.deliverResults(ActivityThread.java:2836)
>
> On Apr 1, 9:52 am, Bobbie  wrote:
>
> > Any other ideas Boston?  Eclipse won't even let me compile that code
> > without putting it in debug mode, so there is something different in
> > that code.  Could you take another look?  Thanks!
>
> > On Mar 31, 5:57 pm, Bobbie  wrote:
>
> > > No, I have nothing in onPause().  I guess I'll just have to keep
> > > playing with it.
>
> > > Bobbie
>
> > > On Mar 31, 4:05 pm, Streets Of Boston  wrote:
>
> > > > Do you have code in your 'onPause()' method of your activity.
> > > > If so, it looks like this code is blocking (never returning).
>
> > > > On Mar 31, 11:39 am, Bobbie  wrote:
>
> > > > > When I choose theimage, this is what Igetin the debug log:
>
> > > > > 03-31 11:34:36.055: INFO/ActivityManager(55): Displayed activity
> > > > > com.android.camera/.ImageGallery2: 2455 ms
> > > > > 03-31 11:34:39.525: VERBOSE/ImageGallery2(11143): /
> > > > > ImageBlockManager.onPause
> > > > > 03-31 11:34:49.519: WARN/ActivityManager(55): Launch timeout has
> > > > > expired, giving up wake lock!
>
> > > > > On Mar 31, 10:24 am, Streets Of Boston 
> > > > > wrote:
>
> > > > > > Did you debug it?
> > > > > > Did yougeta null-pointer-exception?
>
> > > > > > (The code i gave you may have some issues: I just typed it in, 
> > > > > > without
> > > > > > using any IDE such as Eclipse. But it should give you a general idea
> > > > > > of what to do)
>
> > > > > > On Mar 30, 10:16 pm, Bobbie  wrote:
>
> > > > > > > I must have a bad phone or something...  Now the program force 
> > > > > > > closes
> > > > > >

[android-developers] Re: Cupcake SDKs available for download

2009-04-05 Thread Al Sutton

JBQ,
I may be reading what you've written in a different way to you've intended,
but it reads very much like you guys see Google produced Android stuff from
the internal Google repository as "Android", and anything else (including
the public repository) is being an offshoot project.

Al.



-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 05 April 2009 17:08
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake SDKs available for download


[inline]

On Sun, Apr 5, 2009 at 8:45 AM, Al Sutton  wrote:
>
> Hi JBQ,
>
> - Who decides what is an official SDK of an open project :)?

The owners of the discussion group where "official" SDKs are supported :)

Within the limits of the various licenses (which are generally very
permissive), it's possible for someone to legally download source code from
the Android Open-Source Project, compile it, redistribute the compiled
result, and even support it with their own resources. As long as there's
enough separation between those projects and the official SDK that is used
to develop applications for devices that bear the Android logo, there
shouldn't be any major issue. That being said, it's probably not entirely
beneficial for the Android community as a whole if app developers are
presented with a multitude of slightly different and incompatible
development environment, but I do understand the motivation behind what
you're doing.

> - There is no guarantee of future compatibility on any SDK (see my 
> issue with buttons posted a couple of days ago).

Yeah, compatibility isn't always as good as we'd like it to be, especially
as it's not always clearly documented what behaviors can potentially vary
and therefore can't be strongly relied on by applications (especially when
there's currently no way to make those vary on the SDK), but with unofficial
development environments built from branches in intermediate states there's
a much more explicit risk of e.g. APIs that disappear entirely or behaviors
being suddenly protected by permissions, i.e. of applications that grossly
fail to compile or load.

There's definitely a relevant use case around being able to "preview"
existing apps on newer "in-development" versions of the platform, without
necessarily exposing any new platform APIs, so that compatibility issues can
be spotted earlier. Technical limitations have made this impractical with
the existing SDK infrastructure, but that issue has been on our minds for a
while.

> - Thanks for the window SDK pointer, I'm installing cygwin now.
>
> - If someone wants to setup a bit torrent tracker then I'll like to 
> the torrent file, but I don't want to run a tracker and seeds on my
servers.
>
> Al.
>
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the 
> company number  6741909. The registered head office is Kemp House, 
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not 
> necessarily those of Funky Android Limited, it's associates, or it's 
> subsidiaries.
>
>
> -Original Message-
> From: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] On Behalf Of 
> Jean-Baptiste Queru
> Sent: 05 April 2009 14:12
> To: android-developers@googlegroups.com
> Subject: [android-developers] Re: Cupcake SDKs available for download
>
>
> -I'd like to point out that this isn't an official SDK, with e.g. no 
> guarantee that applications developed with it will work on future 
> versions of Android. Should anyone have questions about using it, 
> please use the android-discuss group as android-developers is for 
> questions about the official SDKs, and be sure to mention which 
> specific version of Al's SDK you're using.
>
> -Al, you might be looking for this:
> http://android.git.kernel.org/?p=platform/development.git;a=blob;f=doc
> s/howt
> o_build_SDK.txt;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6e
> f1df35
> 34dee5b1d09ab72d129d3697c7#l92
>
> -How about distributing it with BitTorrent? This seems like a perfect 
> use case.
>
> JBQ
>
> On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
>>
>> I've compiled up the Linux & Mac OS X Intel SDKs from the public git 
>> repository and have put them up for download (If anyone can get 
>> instructions on building a Windows SDK I will do what I can to create 
>> a Windows SDK as well).
>>
>> *PLEASE NOTE* In order to ensure that I don't end up with a massive 
>> bandwidth bill you will need to log into AndAppStore to download the 
>> SDKs, and, if things get silly, download limits may be introduced.
>>
>> You are, of course, free to pass on the SDK to as many people as you 
>> want after you've downloaded, but please do not pass around links to 
>> direct downloads without logins at AndAppStore because I'd like to 

[android-developers] Re: How to retrieve data from two tables via the ContentProvider way?

2009-04-05 Thread Mark Murphy

Shawn_Chiu wrote:
> How to retrieve data from two tables via the ContentProvider way?
> I.E. the database of Calendar application, include many tables
> including Events and Deleted, and some others.
> I want to retrive records in Events table, whose _sync_id field is
> also in Deleted table.
> Usually, we write a SQL sentence like:
> select (all fields in Events)
> from Events as e, Deleted as d
> where e._sync_id = d._sync_id
> or select *
> from Events as e
> where e._sync_id in select _sync_id from Deleted
> etc.
> But, how can I accomplish it in the ContentProvider way? 

Use CursorJoiner (if it fits your use case) or CursorWrapper (if
CursorJoiner is not quite flexible enough).

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

Android App Developer Books: http://commonsware.com/books.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
-~--~~~~--~~--~--~---



[android-developers] How to retrieve data from two tables via the ContentProvider way?

2009-04-05 Thread Shawn_Chiu

Hi, all
How to retrieve data from two tables via the ContentProvider way?
I.E. the database of Calendar application, include many tables
including Events and Deleted, and some others.
I want to retrive records in Events table, whose _sync_id field is
also in Deleted table.
Usually, we write a SQL sentence like:
select (all fields in Events)
from Events as e, Deleted as d
where e._sync_id = d._sync_id
or select *
from Events as e
where e._sync_id in select _sync_id from Deleted
etc.
But, how can I accomplish it in the ContentProvider way? I saw
ContentProvider.query take a Uri as the first parameter, but pity that
I don't know how to build one that could fulfil my purpose.
Hope you could help me a hand, thank you:-)

BR
Shawn Chiu
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cupcake SDKs available for download

2009-04-05 Thread Jean-Baptiste Queru

[inline]

On Sun, Apr 5, 2009 at 8:45 AM, Al Sutton  wrote:
>
> Hi JBQ,
>
> - Who decides what is an official SDK of an open project :)?

The owners of the discussion group where "official" SDKs are supported :)

Within the limits of the various licenses (which are generally very
permissive), it's possible for someone to legally download source code
from the Android Open-Source Project, compile it, redistribute the
compiled result, and even support it with their own resources. As long
as there's enough separation between those projects and the official
SDK that is used to develop applications for devices that bear the
Android logo, there shouldn't be any major issue. That being said,
it's probably not entirely beneficial for the Android community as a
whole if app developers are presented with a multitude of slightly
different and incompatible development environment, but I do
understand the motivation behind what you're doing.

> - There is no guarantee of future compatibility on any SDK (see my issue
> with buttons posted a couple of days ago).

Yeah, compatibility isn't always as good as we'd like it to be,
especially as it's not always clearly documented what behaviors can
potentially vary and therefore can't be strongly relied on by
applications (especially when there's currently no way to make those
vary on the SDK), but with unofficial development environments built
from branches in intermediate states there's a much more explicit risk
of e.g. APIs that disappear entirely or behaviors being suddenly
protected by permissions, i.e. of applications that grossly fail to
compile or load.

There's definitely a relevant use case around being able to "preview"
existing apps on newer "in-development" versions of the platform,
without necessarily exposing any new platform APIs, so that
compatibility issues can be spotted earlier. Technical limitations
have made this impractical with the existing SDK infrastructure, but
that issue has been on our minds for a while.

> - Thanks for the window SDK pointer, I'm installing cygwin now.
>
> - If someone wants to setup a bit torrent tracker then I'll like to the
> torrent file, but I don't want to run a tracker and seeds on my servers.
>
> Al.
>
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
> -Original Message-
> From: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
> Queru
> Sent: 05 April 2009 14:12
> To: android-developers@googlegroups.com
> Subject: [android-developers] Re: Cupcake SDKs available for download
>
>
> -I'd like to point out that this isn't an official SDK, with e.g. no
> guarantee that applications developed with it will work on future versions
> of Android. Should anyone have questions about using it, please use the
> android-discuss group as android-developers is for questions about the
> official SDKs, and be sure to mention which specific version of Al's SDK
> you're using.
>
> -Al, you might be looking for this:
> http://android.git.kernel.org/?p=platform/development.git;a=blob;f=docs/howt
> o_build_SDK.txt;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6ef1df35
> 34dee5b1d09ab72d129d3697c7#l92
>
> -How about distributing it with BitTorrent? This seems like a perfect use
> case.
>
> JBQ
>
> On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
>>
>> I've compiled up the Linux & Mac OS X Intel SDKs from the public git
>> repository and have put them up for download (If anyone can get
>> instructions on building a Windows SDK I will do what I can to create
>> a Windows SDK as well).
>>
>> *PLEASE NOTE* In order to ensure that I don't end up with a massive
>> bandwidth bill you will need to log into AndAppStore to download the
>> SDKs, and, if things get silly, download limits may be introduced.
>>
>> You are, of course, free to pass on the SDK to as many people as you
>> want after you've downloaded, but please do not pass around links to
>> direct downloads without logins at AndAppStore because I'd like to
>> continue to update them but if a bandwidth cost issue comes up then I
> won't.
>>
>> Anyway, once you've logged into AndAppStore the link to the Cupcake
>> SDKs is in the Developers Area menu on the right of the page.
>>
>>
>> Al.
>>
>> ---
>>
>> * Written an Android App? - List it at http://andappstore.com/ *
>>
>> ==
>> Funky Android Limited is registered in England & Wales with the
>> company number  6741909. The registered head office is Kemp House,
>> 152-160 City Road, London,  EC1V 2NX, UK.
>>
>> The views expressed in this email are those of the author and not
>> necessarily those o

[android-developers] Re: Dialer App Source Code

2009-04-05 Thread bw

The web interface to view android source code is here:

http://android.git.kernel.org/

>From there you can get to the phone app:

http://android.git.kernel.org/?p=platform/packages/apps/Phone.git;a=tree



-Ben



On Apr 3, 9:05 pm, TJ104  wrote:
> Hello,
> First of all, Thank you to Google for Android! It isn't perfect, but
> it has A LOT of promise!
> I was looking to write an app that would utilize the keypad in
> Google's dialer app. I've looked around and I haven't been able to
> stumble on to the code for the keypad. I don't know if I'm using the
> correct search terms or if what I'm asking for is just completely
> unrealistic. If one of you could help me with this that would be
> awesome.
> I was hoping to write a texting app that utilized the 10 key that the
> dialer uses. I have very little experience with Android, but I have a
> fair amount of experience with Java. As I understand it, Android
> displays things in a variety of containers, I am not sure how the
> dialer app is set up. I'm not to good with the UI side of things, so I
> wanted to Frankenstein my app by altering the dialer app's keyboard a
> bit and completely changing the functionality of the buttons.
> This app would be intended for short reply's to text messages, and
> (more importantly) allowing my wife to text with a familiar
> interface.
> I found a forum online that taught me what I needed to know about how
> to send and receive SMS messages with Android, now I just need to code
> my text prediction side of things and deal with the UI (and related
> aspects).
> ANY help would be greatly appreciated!
>
> Thank You,
> TJ
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Dialer App Source Code

2009-04-05 Thread bw

Actually, the dialer is here:

http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=tree



On Apr 5, 11:52 am, bw  wrote:
> The web interface to view android source code is here:
>
> http://android.git.kernel.org/
>
> From there you can get to the phone app:
>
> http://android.git.kernel.org/?p=platform/packages/apps/Phone.git;a=tree
>
> -Ben
>
> On Apr 3, 9:05 pm, TJ104  wrote:
>
>
>
> > Hello,
> > First of all, Thank you to Google for Android! It isn't perfect, but
> > it has A LOT of promise!
> > I was looking to write an app that would utilize the keypad in
> > Google's dialer app. I've looked around and I haven't been able to
> > stumble on to the code for the keypad. I don't know if I'm using the
> > correct search terms or if what I'm asking for is just completely
> > unrealistic. If one of you could help me with this that would be
> > awesome.
> > I was hoping to write a texting app that utilized the 10 key that the
> > dialer uses. I have very little experience with Android, but I have a
> > fair amount of experience with Java. As I understand it, Android
> > displays things in a variety of containers, I am not sure how the
> > dialer app is set up. I'm not to good with the UI side of things, so I
> > wanted to Frankenstein my app by altering the dialer app's keyboard a
> > bit and completely changing the functionality of the buttons.
> > This app would be intended for short reply's to text messages, and
> > (more importantly) allowing my wife to text with a familiar
> > interface.
> > I found a forum online that taught me what I needed to know about how
> > to send and receive SMS messages with Android, now I just need to code
> > my text prediction side of things and deal with the UI (and related
> > aspects).
> > ANY help would be greatly appreciated!
>
> > Thank You,
> > TJ
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cupcake SDKs available for download

2009-04-05 Thread Al Sutton

Hi JBQ,

- Who decides what is an official SDK of an open project :)?

- There is no guarantee of future compatibility on any SDK (see my issue
with buttons posted a couple of days ago).

- Thanks for the window SDK pointer, I'm installing cygwin now.

- If someone wants to setup a bit torrent tracker then I'll like to the
torrent file, but I don't want to run a tracker and seeds on my servers.

Al.


---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 05 April 2009 14:12
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake SDKs available for download


-I'd like to point out that this isn't an official SDK, with e.g. no
guarantee that applications developed with it will work on future versions
of Android. Should anyone have questions about using it, please use the
android-discuss group as android-developers is for questions about the
official SDKs, and be sure to mention which specific version of Al's SDK
you're using.

-Al, you might be looking for this:
http://android.git.kernel.org/?p=platform/development.git;a=blob;f=docs/howt
o_build_SDK.txt;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6ef1df35
34dee5b1d09ab72d129d3697c7#l92

-How about distributing it with BitTorrent? This seems like a perfect use
case.

JBQ

On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
>
> I've compiled up the Linux & Mac OS X Intel SDKs from the public git 
> repository and have put them up for download (If anyone can get 
> instructions on building a Windows SDK I will do what I can to create 
> a Windows SDK as well).
>
> *PLEASE NOTE* In order to ensure that I don't end up with a massive 
> bandwidth bill you will need to log into AndAppStore to download the 
> SDKs, and, if things get silly, download limits may be introduced.
>
> You are, of course, free to pass on the SDK to as many people as you 
> want after you've downloaded, but please do not pass around links to 
> direct downloads without logins at AndAppStore because I'd like to 
> continue to update them but if a bandwidth cost issue comes up then I
won't.
>
> Anyway, once you've logged into AndAppStore the link to the Cupcake 
> SDKs is in the Developers Area menu on the right of the page.
>
>
> Al.
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the 
> company number  6741909. The registered head office is Kemp House, 
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not 
> necessarily those of Funky Android Limited, it's associates, or it's 
> subsidiaries.
>
>
>
> >
>



--
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private will
likely get ignored or forwarded to a public forum with no further warning.




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

2009-04-05 Thread Jean-Baptiste Queru

-I'd like to point out that this isn't an official SDK, with e.g. no
guarantee that applications developed with it will work on future
versions of Android. Should anyone have questions about using it,
please use the android-discuss group as android-developers is for
questions about the official SDKs, and be sure to mention which
specific version of Al's SDK you're using.

-Al, you might be looking for this:
http://android.git.kernel.org/?p=platform/development.git;a=blob;f=docs/howto_build_SDK.txt;h=4b6507d4a0bf0dfaed5e1660b858caf641e8eccd;hb=b3fb2a6ef1df3534dee5b1d09ab72d129d3697c7#l92

-How about distributing it with BitTorrent? This seems like a perfect use case.

JBQ

On Sun, Apr 5, 2009 at 12:42 AM, Al Sutton  wrote:
>
> I've compiled up the Linux & Mac OS X Intel SDKs from the public git
> repository and have put them up for download (If anyone can get instructions
> on building a Windows SDK I will do what I can to create a Windows SDK as
> well).
>
> *PLEASE NOTE* In order to ensure that I don't end up with a massive
> bandwidth bill you will need to log into AndAppStore to download the SDKs,
> and, if things get silly, download limits may be introduced.
>
> You are, of course, free to pass on the SDK to as many people as you want
> after you've downloaded, but please do not pass around links to direct
> downloads without logins at AndAppStore because I'd like to continue to
> update them but if a bandwidth cost issue comes up then I won't.
>
> Anyway, once you've logged into AndAppStore the link to the Cupcake SDKs is
> in the Developers Area menu on the right of the page.
>
>
> Al.
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
>
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] file uri doesn't work for Messaging

2009-04-05 Thread Gaurav

I have an image on my sdcard and I want to send this via email or
message. Here is my code:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/sdcard/mydir/
myimage.jpg"));
startActivity(intent);

This works fine for email but gives an exception when I choose
Messaging. Can someone please suggest the problem and a workaround.

Here is the exception:

Caused by: java.lang.IllegalArgumentException: Query on file:/sdcard/
mydir/myimage.jpg returns null result.
 at com.android.mms.ui.UriImage.(UriImage.java:65)
 at com.android.mms.model.ImageModel.initModelFromUri
(ImageModel.java:75)
 at com.android.mms.model.ImageModel.(ImageModel.java:57)
 at com.android.mms.ui.AttachmentEditor.changeImage
(AttachmentEditor.java:323)
 at com.android.mms.ui.ComposeMessageActivity.addImage
(ComposeMessageActivity.java:2269)
 at com.android.mms.ui.ComposeMessageActivity.handleSendIntent
(ComposeMessageActivity.java:2314)
 at com.android.mms.ui.ComposeMessageActivity.onCreate
(ComposeMessageActivity.java:1531)
 at android.app.Instrumentation.callActivityOnCreate
(Instrumentation.java:1122)
 at android.app.ActivityThread.performLaunchActivity
(ActivityThread.java:2104)
 ... 11 more



Gaurav
Software Developer
http://SilkenMermaid.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: How to use TextAppearence in Code without styleable?

2009-04-05 Thread Tseng

1. Well you can simply copy & paste the styles you need from the
android SDK and insert it in your own XML files (they can be found in
the SDK1.0/tools/lib/res/default/values/styles.xml file). They way you
can still use the same styles as before, but you don't have to access
them from the Framework but have them stored in your apps APK which
makes you independed of the frameworks styles)

2. That being said, #2 should be quite solved too. However, to still
try to find an anwser (if you want to keep it this way): Did you tried
obtainTypedArray?

[public TypedArray obtainTypedArray (int id)]
http://developer.android.com/reference/android/content/res/Resources.html#obtainTypedArray(int)

On Apr 3, 8:54 am, Iroid  wrote:
> Hello All,
> I am trying to migrate from SDK 1.0 to SDK 1.1
> for this i have to remove all the references of R.Styleable.  from my
> code.
> While working on this - I am facing two problems:
> Problem 1:
> I have created one attrs.xml and declaring attributes there which
> intern referring to android attributes. as mentioned in below sample:
>  
>         
>  
> But I do not know how to do it for arrays like TextAppearence which
> contains array of attributes :(
> Problem 2:
> I have to use these resources in different application through:
> appContext = context.createPackageContext("package_name",
>                         Context.CONTEXT_IGNORE_SECURITY);
> appContext.getResources().
> this is again a problem as class Resources does not provide any
> method
> to retrieve array by passing the name.
>
> I am new to Android UI, please help as not able to proceed.
>
> 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
-~--~~~~--~~--~--~---



[android-developers] Re: How to detect PDP context activation/deactivation and out of coverage scenarios?

2009-04-05 Thread ashutoshkagra...@gmail.com

Is this still not available? Can somebody comment on this?

http://source.android.com/roadmap

Regards,
Ashutosh



On Feb 13, 1:38 am, Regina Mitsue Azuma  wrote:
> I'm developing an application that makes an intensive use of data
> connection in GPRS network. I'm currently using DatagramSocket and I
> have some questions with regarding to PDP context activation and
> network failures.
> In summary, I would like to know how to detect programmatically some
> scenarios and in which cases the datagram sockets become invalid and
> need to be recreated.
>
> 1 - Is it necessary to explicitly activate the PDP context? If not,
> what triggers this activation? How can we detect it programmatically?
> 2 - Once the PDP context is activated, it means the device has an IP
> address. If the network is not always-on, the PDP context will be
> deactivated after a period of data connection idleness. How is it
> possible to detect it?
> 3 - In case the device moves to a place without GPRS coverage, is the
> PDP context deactivated immediately? Is there a notification?
> 4 - In case the device moves to another area and a new IP is assigned
> to it, which notification can be captured?
> 5 - If device goes temporarily (a few seconds)  to an out of coverage
> area and it comes back to a coverage area, is it possible to detect
> those events?
> 6 - Is is possible to configure a list of APN's in an Android device?
> Can the application choose the APN to be used?
>
> Since I don't have a hardware, I tried to use the NetworkStatus class
> and DDMS to simulate data connection down/up events in the Android
> Emulator, but I couldn't get any clue. The sockets work (send/receive
> datagrams with success) even when I change the data connection status
> to unregistered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cupcake SDKs available for download

2009-04-05 Thread Pd

You could always use bittorrent if bandwidth is an issue plus we all 
wouldn't need yet another username and password if you put the file(s) 
on a public tracker  ;-)

Pd.

Al Sutton wrote:
> I've compiled up the Linux & Mac OS X Intel SDKs from the public git
> repository and have put them up for download (If anyone can get instructions
> on building a Windows SDK I will do what I can to create a Windows SDK as
> well).
>
> *PLEASE NOTE* In order to ensure that I don't end up with a massive
> bandwidth bill you will need to log into AndAppStore to download the SDKs,
> and, if things get silly, download limits may be introduced.
>
> You are, of course, free to pass on the SDK to as many people as you want
> after you've downloaded, but please do not pass around links to direct
> downloads without logins at AndAppStore because I'd like to continue to
> update them but if a bandwidth cost issue comes up then I won't.
>
> Anyway, once you've logged into AndAppStore the link to the Cupcake SDKs is
> in the Developers Area menu on the right of the page.
>
>
> Al.
>
> ---
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the 
> company number  6741909. The registered head office is Kemp House, 
> 152-160 City Road, London,  EC1V 2NX, UK. 
>
> The views expressed in this email are those of the author and not 
> necessarily those of Funky Android Limited, it's associates, or it's 
> subsidiaries. 
>
>
>
> >
>
>   

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

2009-04-05 Thread Al Sutton

I've compiled up the Linux & Mac OS X Intel SDKs from the public git
repository and have put them up for download (If anyone can get instructions
on building a Windows SDK I will do what I can to create a Windows SDK as
well).

*PLEASE NOTE* In order to ensure that I don't end up with a massive
bandwidth bill you will need to log into AndAppStore to download the SDKs,
and, if things get silly, download limits may be introduced.

You are, of course, free to pass on the SDK to as many people as you want
after you've downloaded, but please do not pass around links to direct
downloads without logins at AndAppStore because I'd like to continue to
update them but if a bandwidth cost issue comes up then I won't.

Anyway, once you've logged into AndAppStore the link to the Cupcake SDKs is
in the Developers Area menu on the right of the page.


Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 



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