Re: [android-developers] How to go to Home screen..?

2010-12-23 Thread swaroop chandak
Simple dude..
just call intent for this homescreen class..
like..

Intent homeScreen= *new* Intent(*this*,HomeScreen.*class*);

startActivity(homeScreen);



Swaroop


On Fri, Dec 24, 2010 at 1:21 PM, Abhilash baddam <
abhilash.androiddevelo...@gmail.com> wrote:

> Hi friends,
>
>When the user clicks on a button, I want to navigate the
> screen into Home Screen. How can we achieve this.
>
>
>
>
>
> Regards,
> Abhilash
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] How to go to Home screen..?

2010-12-23 Thread Abhilash baddam
Hi friends,

   When the user clicks on a button, I want to navigate the
screen into Home Screen. How can we achieve this.





Regards,
Abhilash

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

Re: [android-developers] Re: Web Server

2010-12-23 Thread Mark Murphy
On Thu, Dec 23, 2010 at 9:50 PM, perumal316  wrote:
> But I want to host Apache Tomcat where I will also be having the Java
> Servlets. Is there any way to do this in Android?

Probably not. Android mostly runs on low-power devices.

> I tried the i-Jetty
> but under configurations there is no option to include my java
> servlets.
>
> Any idea how to resolve this issue?

Talk to the i-Jetty people. Or use NanoHTTPD and embed your
server-side logic in their app code. Or try any one of the dozen or so
open source Java HTTP servers in existence. Or implement your solution
some other way that does not involve HTTP and servlets.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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: Error inflating class linearlayout

2010-12-23 Thread Bob Kerns
No, that is perfectly legal. They're on separate elements. You can
declare the same namespace as many times as you want, with the same
prefix, or different prefixes. You can even declare it with different
prefixes on the same element (perhaps using one prefix for the
element, and another on attributes, or on children).

On Dec 22, 10:37 pm, ellison ye  wrote:
> On Thu, Dec 23, 2010 at 2:22 PM, pramod.deore wrote:

> > what is wrong here? Thanks
>
>    two xmlins  "xmlns:android="http://schemas.android.com/apk/res/";

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


Re: [android-developers] Detect Intent Broadcast Receivers

2010-12-23 Thread Dianne Hackborn
PackageManager.queryBroadcastReceivers() returns all receivers declared in
application manifests matching a given Intent.  Note however that this will
not include receivers registered with Context.registerReceiver(); there is
currently no way to get information about those.

On Thu, Dec 23, 2010 at 5:04 PM, Tao  wrote:

> Hi,
>
> A similar question has been asked before (with no answers as far as I
> can tell), but I thought I'd try my luck: Does anyone know whether
> there is a way to know whether there is anyone (anything) out there
> listening for a specific type of Intent being broadcast?
>
> There are numerous applications out there that listen for specified
> intents, and do something when these intents are broadcast. For
> example, "Last.fm Scrobbler" applications. I would like to be able to
> tell, from a perferences screen, whether a given intent has a
> registered Receiver or not.
>
> This way, if a user chooses a scrobbler application and I detect that
> that scrobbler application does not appear to be registered/listening
> (or rather, there are no Receivers registered for that type of
> Intent), then I display an error/explanation message to the user,
> telling them that application is not installed or is disabled.
>
> The closest I've come to this from looking at the Android dev docs is
> "sendOrderedBroadcast". If the intended receivers of the broadcast can
> be guaranteed to cooperate by doing something predefined to the
> payload, then my broadcast receiver at the end should be able to
> detect the successful receipt vs lack of Receiver... This relies on a
> specific implementation on the part of the expected receivers,
> however, so it's not a very general solution.
>
> Any ideas?
>
> Thanks!
> Tao
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Widget

2010-12-23 Thread Dianne Hackborn
Specifically you'll want to use android:taskAffinity, perhaps
android:taskAffinity="" so that your configuration activity does not have an
affinity for your main application task.

On Thu, Dec 23, 2010 at 7:21 PM, TreKing  wrote:

> On Wed, Dec 22, 2010 at 5:29 AM, James do Carmo wrote:
>
>> What am I doing wrong?
>>
>
> Nothing. This is the default, expected behavior.
>
>
>>  Any ideas?
>>
>
> Try this:
> http://developer.android.com/guide/topics/manifest/activity-element.html#aff
>
>
> Or
> some combination of the right launch mode flags.
>
>
> -
>  TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] How to start a new process on bootup complete

2010-12-23 Thread Dianne Hackborn
Please direct non-SDK questions to android-porting or android-platform,
thanks.  And search through those groups before posting; there are already
some previous discussions there on this topic.

On Thu, Dec 23, 2010 at 9:09 PM, Raghavendra Singh
wrote:

> I am adding a new service using ServiceManager.addService("", new
> X()); and this service i want to start in a new process for that i
> am doing Process.start("com.lge.ims.rcsweb.XProcess",
> "xprocess", uid ,uid, gids, debugFlags, null);
>
> This Process i want to start on bootup complete, since i can do
> registerReceiver for Intent.ACTION_BOOT_COMPLETED  but at which place
> i should do this.
>
> My complete package reside in framework and i dont want to use any
> application to trigger my process.
>
>
> Thanks in advance
>
> Raghu
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Conversion to Dalvik format failed with error 1

2010-12-23 Thread sumanth
Ok! I got it to work finally! (phew)

It turned out that the problem lay with my JRE. Android needs only
Oracle's JRE and my eclipse was pointing to IBM JRE.

I installed the JDK and pointed eclipse to the JRE in oracle's java
folder and the error was gone.

Hope this helps someone else in future.

-Sumanth

On Dec 17, 1:23 pm, sumanth  wrote:
> Hi Dimitris,
>
> I changed the build output to verbose. My eye didn't catch anything
> unusual in the logs:
>
> [2010-12-17 13:47:45 - HelloAndroid] Refreshing resource folders.
> [2010-12-17 13:47:45 - HelloAndroid] Starting incremental Pre
> Compiler: Checking resource changes.
> [2010-12-17 13:47:45 - HelloAndroid] Nothing to pre compile!
> [2010-12-17 13:47:45 - HelloAndroid] Starting incremental Package
> build: Checking resource changes.
> [2010-12-17 13:47:45 - HelloAndroid] C:\softwares\sdk_android\platform-
> tools\aapt.exe package -f -v --debug-mode -M C:\softwares\androkspace
> \HelloAndroid\AndroidManifest.xml -S C:\softwares\androkspace
> \HelloAndroid\res -A C:\softwares\androkspace\HelloAndroid\assets -I C:
> \softwares\sdk_android\platforms\android-9\android.jar -F C:\softwares
> \androkspace\HelloAndroid\bin\resources.ap_
> [2010-12-17 13:47:45 - HelloAndroid] Found 0 custom asset files in C:
> \softwares\androkspace\HelloAndroid\assets
> [2010-12-17 13:47:45 - HelloAndroid] Locale/Vendor pairs:
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]
> [2010-12-17 13:47:45 - HelloAndroid] Files:
> [2010-12-17 13:47:45 - HelloAndroid]   drawable-hdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\drawable-hdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]   drawable-ldpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\drawable-ldpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]   drawable-mdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\drawable-mdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]   layout\main.xml
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\layout\main.xml
> [2010-12-17 13:47:45 - HelloAndroid]   values\strings.xml
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\values\strings.xml
> [2010-12-17 13:47:45 - HelloAndroid]   AndroidManifest.xml
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\AndroidManifest.xml
> [2010-12-17 13:47:45 - HelloAndroid] Including resources from package:
> C:\softwares\sdk_android\platforms\android-9\android.jar
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for drawable
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for layout
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for anim
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for xml
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for raw
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for color
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for menu
> [2010-12-17 13:47:45 - HelloAndroid]     (processed image C:\softwares
> \androkspace\HelloAndroid\res\drawable-hdpi\icon.png: 95% size of
> source)
> [2010-12-17 13:47:45 - HelloAndroid]     (processed image C:\softwares
> \androkspace\HelloAndroid\res\drawable-ldpi\icon.png: 89% size of
> source)
> [2010-12-17 13:47:45 - HelloAndroid]     (processed image C:\softwares
> \androkspace\HelloAndroid\res\drawable-mdpi\icon.png: 85% size of
> source)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id icon from
> drawable-hdpi\icon.png #generated)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id icon from
> drawable-hdpi\icon.png #generated)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id icon from
> drawable-hdpi\icon.png #generated)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id main from C:
> \softwares\androkspace\HelloAndroid\res\layout\main.xml)
> [2010-12-17 13:47:45 - HelloAndroid] Opening 'C:\softwares\androkspace
> \HelloAndroid\bin\resources.ap_'
> [2010-12-17 13:47:45 - HelloAndroid] Writing all files...
> [2010-12-17 13:47:45 - HelloAndroid]       'res/layout/
> main.xml' (compressed 57%)
> [2010-12-17 13:47:45 - HelloAndroid]
> 'AndroidManifest.xml' (compressed 61%)
> [2010-12-17 13:47:45 - HelloAndroid]       'resources.arsc' (not
> compressed)
> [2010-12-17 13:47:45 - HelloAndroid]       'res/drawable-hdpi/
> icon.png' (not compressed)
> [2010-12-17 13:47:45 - HelloAndroid]       'res/drawable-ldpi/
> icon.png' (not compressed)
> [2010-12-17 13:47:45 - HelloAndroid]       'res/drawable-mdpi/
> icon.png' (not compressed)
> [2010-12-17 13:47:45 - HelloAndroid] Generated 6 files
> [2010-12-17 13:47:45 - HelloAndroid] Included 0

Re: [android-developers] Re: supporting only resolutions >= 320x480

2010-12-23 Thread Dianne Hackborn
On Thu, Dec 23, 2010 at 7:16 PM, Utumno  wrote:

> As you can see , I don't dig this 'density' Android weirdness too
> much :)
>

This isn't Android weirdness, it's reality.  It's not like this is different
for other platforms -- consider the iPhone's HVGA vs "retina" displays.
 Same screen size, big difference in resolution.

This is just a fundamental aspect of mobile devices that developers coming
from PCs never think about, but need to get.  With PCs, generally screens
get bigger as the resolution increases in the density stays about the same.
 With mobile phones, the screen resolution and density has been quickly
increasing for the same approximate screen sizes.

This is a really good thing -- the PC world has wanted to move to higher
density screens for a long time, but it is very difficult because the
desktop platforms haven't had much support for different densities, and then
as the platforms started to take that into account you are still stuck with
tons of apps that don't work well when the density increases.

Don't make your app one of those on Android; our users' expectations here
are significantly higher than they have been on the desktop.

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

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

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

[android-developers] How to use ndk to compile templ ate classes?

2010-12-23 Thread 袁堂夫
As you know that template classes are implemented in the   ".h"
header files, and the ndk is not build the ".h" files.

When the ndk link the obj files, it will failed that the template
classes are not implemented.

Who can help me fix this? Thank you very much, please~

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


[android-developers] Re: supporting only resolutions >= 320x480

2010-12-23 Thread Zsolt Vasvari
Just coming from an end user -- I think I wouldn't be too happy not to
be able to play your game to its full pontential just because of the
resolution of my screen -- we are talking resolution here, not screen
size.  A 4" 480x800 device should display the same graphics (at a
lower resolution) than the same 4" with 240x400 resolution.

On Dec 24, 11:16 am, Utumno  wrote:
> As you can see , I don't dig this 'density' Android weirdness too
> much :)
>
> No, as i said before: the bigger resolution, the better levels.
> 1280x600 ? Bring it on, baby! I've tested, the levels look and feel
> great. I've tested 640x360, 480x854, what have you, all works great,
> as long as it is >=320x480.  501x501? Very well!
>
> I know I could detect at runtime if I have <320x480 and downscale the
> graphics, but according 
> tohttp://developer.android.com/resources/dashboard/screens.html,
> the screen sizes that I don't support ( small screen + normal screen
> with ldpi ) consist of 2.3+0.4% = 2.7% of all devices that contact the
> Market, so quite frankly, I have simply decided not to bother.
>
> So right now it looks like my best bet is to rule out the 240x320 guys
> with 'smallScreens=false' and simply do not bother with 240x400 and
> 240x432  ( are there any devices with such weird resolutions in the
> field anyway? There must be some as the link above gives 0.4%, but I
> could not find any )
>
> L.
>
> On Dec 24, 10:46 am, Dianne Hackborn  wrote:
>
>
>
> > That just isn't how it works.  A 240x400 ldpi screen should be treated as
> > the *exact* *same* space as a 320x533 screen which should be treated as the
> > *exact* *same* space as a 480x800 screen.
>
> > The only difference is density, which means less or more graphical detail.
> >  Not UI/level complexity
>
> > You shouldn't be making your level complexity more complicated due to
> > changes in density.  Taking an extreme -- from ldpi to xhdpi -- this would
> > result in a UI so tiny (but with a ton of stuff on it) at xhdpi that it is
> > impossible to use or possibly even see.
>
> > This is the reason why we split things between density and screen size.
> >  They are fundamentally different things, and you need to take both into
> > account.  As I said, the platform already has various facilities to scale
> > graphics for you, but if you need to it is pretty easy to do yourself -- if
> > you are using OpenGL you could probably just do it at runtime; otherwise,
> > it's just a matter of generating a new bitmap with the scaled image and
> > throwing away the original.
>
> > On Thu, Dec 23, 2010 at 6:37 PM, Utumno  wrote:
>
> > > Because I don't scale my graphics , and I don't let the system do it
> > > either :)
>
> > > My reason: actually I could make the UI work in 240x400 and 240x432,
> > > the problem is with game area.
> > > The app is a game where infinitely many levels are created pseudo-
> > > randomly. The bigger resolution, the more complicated and generally
> > > speaking better levels get created. At 320x480, the game is playable,
> > > at 480x800 , it is excellent and I DONT want to upscale the graphics
> > > because that would simplify the levels back to more or less 320x480
> > > level, thus making the game worse.
>
> > > On 240x320, I still could make the game work by downscaling the
> > > graphics, but how do I do it? Then I would have to
>
> > > - downscale on 240x320, 240x400 and 240x432
> > > - do *not* resize on >=320x480
>
> > > If I can do the above, then excellent, my game would work everywhere.
> > > If not, I have to somehow rule out all the resolutions smaller than
> > > 320x480.
>
> > > L.
>
> > > On Dec 24, 10:23 am, Dianne Hackborn  wrote:
> > > > Why would it not work on 240x400?  That is just a density change; if you
> > > > don't scale your graphics, the platform can do it for you.
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] Re: How to select a Contact Group, so not to create an "Invisible Contact" ?

2010-12-23 Thread Dmitri Plotnikov
If it is a Google contact, you need to find the system group called My
Contacts and add a group membership to the raw contact.  Of course this is
cumbersome, so in the future this will happen automatically, but for now you
need to do this in your code.

Cheers,
Dmitri
 On Dec 21, 2010 11:47 AM, "Christopher"  wrote:
> Is there a reason I can't get an answer to this question anywhere? Am
> I missing something basic, or is there no good answer?
>
> On Dec 20, 9:55 am, Christopher  wrote:
>> I am running the Contact Manager sample app from the Android SDK. When
>> I add a contact to my Gmail account, it gets added as an 'invisible
>> contact'. I am assuming this is because I am not telling the contact
>> which 'group' within the account it should be assigned to. I have been
>> looking around for a few days and have come up empty handed.
>>
>> What I really want to do is add the contact to the Contact Account
>> that I select and have the contact associated with a Contact Group
>> within the selected Gmail Account, so the contact's info will be
>> displayed in the user's contacts.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] About "?" in a URI

2010-12-23 Thread Dmitri Plotnikov
Hi Wenjie,

Looks like a bug.  I did not catch this because the contacts app and
provider run in the same process. I have just filed a bug report and will
research asap.  Of course, until it's fixed this API cannot be used. Thanks
for reporting.

Cheers,
Dmitri
On Dec 23, 2010 7:04 PM, "Wenjie"  wrote:
> Dear Dudes,
> I've got an URI when I debugged the Contacts application. When the
> application queries the contacts, it uses a URI like "content://
> com.android.contacts/contacts?address_book_index_extras=true".
> And if I query with this URI from an application based on SDK. It will
> throw an exception like this,
> "java.lang.UnsupportedOperationException: Only CrossProcessCursor
> cursors are supported across process for now". But if the URI is
> "content://com.android.contacts/contacts", it works well.
> Can anyone show me what does the "?" mean here? And what's the
> difference between the two queries by each URI?
> Thanks very much!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] call c++ function with jni and android ndk

2010-12-23 Thread 袁堂夫
add some codes,like this:
--
static JNINativeMethod FileBrowseMethods[] = {
{"OpenStream", "(Ljava/lang/String;)V",
(void*)Java_yuan_tang_fu_FileBrowse_OpenStream },
};

static const char *FileBrowseClassName = "yuan/tang/fu/FileBrowse";

static int registerNativeMethods(JNIEnv* env, const char* className,
 
JNINativeMethod* gMethods, int numMethods)
{
jclass clazz;
//fprintf(stderr, "RegisterNatives start for '%s'", className);

__android_log_print(ANDROID_LOG_ERROR,"registerNativeMethods","RegisterNatives
start for '%s'", className);
clazz = env->FindClass(className);
if (clazz == NULL) {
//fprintf(stderr, "Native registration unable to find 
class '%s'",
className);

__android_log_print(ANDROID_LOG_ERROR,"registerNativeMethods",
"Native registration unable to find class '%s'", className);
return JNI_FALSE;
}
if (env->RegisterNatives(clazz, gMethods, numMethods)<0) {
//fprintf(stderr, "RegisterNatives failed for '%s'", 
className);

__android_log_print(ANDROID_LOG_ERROR,"registerNativeMethods",
"RegisterNatives failed for '%s'", className);
return JNI_FALSE;
}
return JNI_TRUE;
}
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, FileBrowseClassName,
   
FileBrowseMethods, sizeof(FileBrowseMethods) /
sizeof(FileBrowseMethods[0]))) {
// return JNI_FALSE;
}


return JNI_TRUE;
}
typedef union {
JNIEnv* env;
void* venv;
} UnionJNIEnvToVoid;
jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
UnionJNIEnvToVoid uenv;
uenv.venv = NULL;
jint result = -1;
JNIEnv* env = NULL;
//printf("JNI_OnLoad");
__android_log_print(ANDROID_LOG_ERROR,"JNI_OnLoad", 
"JNI_OnLoad...");
if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_4) != JNI_OK) {
//fprintf(stderr, "GetEnv failed");
__android_log_print(ANDROID_LOG_ERROR,"JNI_OnLoad", 
"GetEnv failed");
goto bail;
}
env = uenv.env;
if (registerNatives(env) != JNI_TRUE) {
//fprintf(stderr, "GetEnv failed");
__android_log_print(ANDROID_LOG_ERROR,"JNI_OnLoad",
"registerNatives failed");
goto bail;
}
result = JNI_VERSION_1_4;
bail:
return result;
}


2010/12/22 TobyKaos :
> Hello, I first run samples found in androind ndk and I create my own
> in C. I successfully print a hello world with c function.
>
> but now I want to call c++ function. Then I change file extensions
> to .cpp and remake with ndk-build. Ok that seems to work fine. I
> refresh my eclispe project. Ok eclispe seems to find my hello world
> function in new .so lib made in c++.
>
> Then I launched debug and application failed because it does not find c
> ++ function. My function is the same but I modify jni function in it
> to match c++ jni.
>
> My TestSTL.java
>
> package com.project.teststl;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class TestSTL extends Activity {
>    /** Called when the activity is first created. */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        //setContentView(R.layout.main);
>
>        TextView  tv = new TextView(this);
>        tv.setText( stringFromJNI() );
>        setContentView(tv);
>    }
>
>    native public static String stringFromJNI();
>
>    static {
>                //System.loadLibrary("stlport_shared");
>            System.loadLibrary("teststl");
>        }
>
> }
>
> *
> my test.cpp file
>
> #include 
> #include 
>
> #include 
> #include 
>
> /* Call to initialize the graphics state */
> JNIEXPORT jstring JNICALL
> Java_com_project_teststl_TestSTL_stringFromJNI(  JNIEnv* env, jobject
> obj  )
> {
>        jstring s = (env)->NewStringUTF( "Hello from JNI !");
>
>        return s;
>
> }
>
>
>
> I repeat, in C all is ok (I just modify NewStringUTF for C or C++
> because are not the same definition).
>
> Please help me.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send 

[android-developers] Re: android bluetooth

2010-12-23 Thread Jags
Thanks a ton IV, I am happy as long as I get some relevant
solution :) .

1. Beep, means I did not mean default handset beep. I meant in my
custom application i play a sound. if my hedset is paired when i am
playing the sound in my custom application using Mediaplayer class,
will it be heard in my headset ?

2. will i be able to capture volume up/down key press in the headset
in my application ? if yes how ?

regards

On Dec 24, 5:53 am, Indicator Veritatis  wrote:
> Yes, that is right. You did not get your point across properly. You
> are doing better in this post, though, despite the disappointing typo
> of '[oint' for 'point'.
>
> But if you do know that the beep is "at headsets[sic] control", why
> you even asking where it is? That makes no sense.
>
> The truth of the matter is that the Bluetooth spec does not mandate
> the beep. The implementer may chose to do it in the headset software,
> as it is the only choice that makes sense: otherwise the user gets no
> audio feedback to know that pairing just happened. The only feedback
> that the Android application gets is that now the headset is listed in
> the list of bound devices returned by getBondedDevices().
>
> That is, you can sense when the headset was paired by polling
> getBondedDevices(), but you cannot cause the beep, nor can you sense
> when the headset does its own beep. You can only rely on what the
> headset manufacturer chose to implement in their own Bluetooth code.
>
> On Dec 22, 9:52 pm,Jags wrote:
>
> > thanks IV,
>
> > I guess i could not put my [oint across properly. Beep is at headsets
> > control, i know. Now when the headset is paired, and my custom
> > application plays a beep, does it automatically beep in the headset or
> > in the handset ? if it automatically beeps in the headset, good, if
> > not what can i do in my custom app to make the beep heard in the
> > headset ?
>
> > more to that i also need to capture some keypress volume up and down
> > from the headset in my application
> > will I be able to do that in my application ? how ? documentation is
> > not clear on this !
>
> > thanks and regards
> > Jagat
>
> > On Dec 17, 10:57 am, Indicator Veritatis  wrote:
>
> > > I don't know why this thread is getting spam, but I can offer a guess
> > > why you are not getting answers. Your questions seems to strongly
> > > imply you have not studied the basics of how to do Bluetooth (whether
> > > on Android or not). Specifically, the beep you are interested in
> > > controlling is under the headset's control: it is NOT controllable
> > > from Android. Nor should it be, so don't wait for it to be added in a
> > > future version.
>
> > > On Dec 16, 1:21 am,Jags wrote:
>
> > > > is this message a spam ? Nobody is able to see my message or what ?
> > > > dont get answers, only get spams posted in the forum !
>
> > > > On Dec 16, 11:03 am, "hanika"  wrote:
>
> > > > > hi
>
> > > > > Thanks & Regards,
> > > > > cid:image002@01CA2AEF.10F60770
> > > > > Vijay Patel
> > > > > Test Engineer
> > > > > Elitecore Technologies Ltd.
> > > > > 904, Silicon tower, off C.G Road, Ahmedabad-380 006 Gujarat (INDIA),
> > > > > Tel: +91-79-66065606 | HYPERLINK
> > > > > "mailto:vijay.pa...@elitecore.com"vijay.pa...@elitecore.com
> > > > > HYPERLINK "http://www.cyberoam.com"www.cyberoam.com
> > > > > P    Please do not print this email unless it is absolutely necessary.
> > > > > Spread environmental awareness.
>
> > > > >  image001.jpg
> > > > > 2KViewDownload
>
>

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

2010-12-23 Thread Raghavendra Singh
I am adding a new service using ServiceManager.addService("", new
X()); and this service i want to start in a new process for that i
am doing Process.start("com.lge.ims.rcsweb.XProcess",
"xprocess", uid ,uid, gids, debugFlags, null);

This Process i want to start on bootup complete, since i can do
registerReceiver for Intent.ACTION_BOOT_COMPLETED  but at which place
i should do this.

My complete package reside in framework and i dont want to use any
application to trigger my process.


Thanks in advance

Raghu

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] GK:How to set the FOCUS to my activity or listview

2010-12-23 Thread Ganesh Kumar R.
Hi all.,

Am facing one problem on my application.

After i selected the contact it will show contact details.There i need
by default my listview should be focued.

Tried with requestFocus(). it failed. How can i achieve this ??

Many tnx in advance..,


br.,
Ganesh R.

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


Re: [android-developers] Application feasibility

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 10:29 AM, emafuma  wrote:

> Hi, I'm investigating if I can make an app that runs in background but is
> able to interact with others by "enriching" texts adding
> relevant information.
>

That's not feasible, sorry.

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

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

Re: [android-developers] How to update one of views(setText, setImage) in item already added on ListView

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 11:02 PM, Mingchung  wrote:

> My question is, an item has been already added to a ListView, can I still
> update the UI?
>

Yes - you'll want to create a custom Adapter that overrides the getView()
method and update the view there.

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

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

Re: [android-developers] android messaging application layout

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 8:02 AM, Kapil Lokhande wrote:

> please tell me how can i do that.


Don't use a Table.
Don't use Wrap_Content height for listview.
Use a Weight on the RelativeLayout.

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

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

Re: [android-developers] How to store images at runtime and then access it in a WebView throw a IMG tag ?

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 7:07 AM, Guillaume Lung  wrote:

> - How to store images at runtime and then access it in a WebView throw a
> IMG tag ?
>

This might help:
http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Samples/WebViewDemo

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

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

[android-developers] Notice: Holiday Post Moderation

2010-12-23 Thread Trevor Johns
Hey everyone,
Just a heads up that with the holiday season in full swing, most of Google's
engineering team will be on vacation. This includes those who
have volunteered their time to moderate this group.

I'll still be checking in on things, as will some of my colleagues, but
please don't be suprised if it takes a little longer than usual to get your
posts approved.

(And for those of you who don't know: Moderation normally only applies to
users who have never posted before. If you've been around for a while, your
posts will continue to flow without delay.)

Thanks for your understanding, and happy holidays!

-- 
Trevor Johns
Developer Advocate, Android
http://developer.android.com

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

Re: [android-developers] Button Onclick Events-Page Navigation

2010-12-23 Thread TreKing
On Thu, Dec 23, 2010 at 9:15 PM, Ramesh M  wrote:

> Can any one give me the sample code for above scenario


The likelihood of anyone here not only having the code to solve your exact
scenario (which you did not clearly explain) but also being willing to just
give you said code is very near zero.

You would be better served by posting the stack trace of the error and the
snippet of code for where it occurs.

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

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

Re: [android-developers] Widget

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 5:29 AM, James do Carmo  wrote:

> What am I doing wrong?
>

Nothing. This is the default, expected behavior.


>  Any ideas?
>

Try this:
http://developer.android.com/guide/topics/manifest/activity-element.html#aff

Or
some combination of the right launch mode flags.

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

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

Re: [android-developers] Split screen om android

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 6:14 AM, irulz  wrote:

> I will really appreciate any input on this. Is thr anything I am missing ?
>

Try the porting or platform groups for questions regarding modifying the
source.

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

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

[android-developers] Re: supporting only resolutions >= 320x480

2010-12-23 Thread Utumno
As you can see , I don't dig this 'density' Android weirdness too
much :)

No, as i said before: the bigger resolution, the better levels.
1280x600 ? Bring it on, baby! I've tested, the levels look and feel
great. I've tested 640x360, 480x854, what have you, all works great,
as long as it is >=320x480.  501x501? Very well!

I know I could detect at runtime if I have <320x480 and downscale the
graphics, but according to 
http://developer.android.com/resources/dashboard/screens.html,
the screen sizes that I don't support ( small screen + normal screen
with ldpi ) consist of 2.3+0.4% = 2.7% of all devices that contact the
Market, so quite frankly, I have simply decided not to bother.

So right now it looks like my best bet is to rule out the 240x320 guys
with 'smallScreens=false' and simply do not bother with 240x400 and
240x432  ( are there any devices with such weird resolutions in the
field anyway? There must be some as the link above gives 0.4%, but I
could not find any )

L.

On Dec 24, 10:46 am, Dianne Hackborn  wrote:
> That just isn't how it works.  A 240x400 ldpi screen should be treated as
> the *exact* *same* space as a 320x533 screen which should be treated as the
> *exact* *same* space as a 480x800 screen.
>
> The only difference is density, which means less or more graphical detail.
>  Not UI/level complexity
>
> You shouldn't be making your level complexity more complicated due to
> changes in density.  Taking an extreme -- from ldpi to xhdpi -- this would
> result in a UI so tiny (but with a ton of stuff on it) at xhdpi that it is
> impossible to use or possibly even see.
>
> This is the reason why we split things between density and screen size.
>  They are fundamentally different things, and you need to take both into
> account.  As I said, the platform already has various facilities to scale
> graphics for you, but if you need to it is pretty easy to do yourself -- if
> you are using OpenGL you could probably just do it at runtime; otherwise,
> it's just a matter of generating a new bitmap with the scaled image and
> throwing away the original.
>
>
>
> On Thu, Dec 23, 2010 at 6:37 PM, Utumno  wrote:
>
> > Because I don't scale my graphics , and I don't let the system do it
> > either :)
>
> > My reason: actually I could make the UI work in 240x400 and 240x432,
> > the problem is with game area.
> > The app is a game where infinitely many levels are created pseudo-
> > randomly. The bigger resolution, the more complicated and generally
> > speaking better levels get created. At 320x480, the game is playable,
> > at 480x800 , it is excellent and I DONT want to upscale the graphics
> > because that would simplify the levels back to more or less 320x480
> > level, thus making the game worse.
>
> > On 240x320, I still could make the game work by downscaling the
> > graphics, but how do I do it? Then I would have to
>
> > - downscale on 240x320, 240x400 and 240x432
> > - do *not* resize on >=320x480
>
> > If I can do the above, then excellent, my game would work everywhere.
> > If not, I have to somehow rule out all the resolutions smaller than
> > 320x480.
>
> > L.
>
> > On Dec 24, 10:23 am, Dianne Hackborn  wrote:
> > > Why would it not work on 240x400?  That is just a density change; if you
> > > don't scale your graphics, the platform can do it for you.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Button Onclick Events-Page Navigation

2010-12-23 Thread Ramesh M
Hi, Everyone,
  I have designed 3pages using 3xml files in layouts folder
android,each having 2 buttons previous page and next page..i was
loaded  first page using set content view , From here, through Button
onclick i have moved to second page.. till that  every thing was fine,
if try to go previous page or next page my application gets crashes,
forced to close...

Can any one give me the sample code for above scenario , Thanks in
Advance!!

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


Re: [android-developers] Beginner type question on scope

2010-12-23 Thread TreKing
On Wed, Dec 22, 2010 at 4:15 PM, Eric  wrote:

> My question is this.  The variable score seems to be out of scope in the
> onclick function.
>

It is - very much so.


> In fact, it will not compile and gives me an error
>

That would be expected.


> but the instructor ran it no problem...and it seemed to me that we had the
> same code.
>
> Any Thoughts?
>

It seems to me you did not have the same code, in that case.

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

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

[android-developers] no service while using emulator

2010-12-23 Thread ellison ye
hi guys:
I seems that configure is error in my emulator ,"NO Service" will
display in screen while first start it ,Can anyone help me to solve this
problem ,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] How to get precise call state?

2010-12-23 Thread Alex Khmara
Hello.

I'm trying to write an organizer, and one of it's tasks is to account
phone calls and to manage reminders of planned calls. So I need to
determine if call was really succeeded and how long it was - for
example, if called side was busy, it must remind later to call second
time.
In public API I found only
android.telephony.TelephonyManager.getCallState - but is seems that it
is unable to supply me with statuses DIALING, ANSWERED and BUSY. Is
there any way to get precise status of current call?

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


[android-developers] How to detect when bluetooth is turned on by user?

2010-12-23 Thread martien huijsmans
Hi,

I have a implemented a Android service which start a Bluetooth server.
This is based on the example "Connecting as a server" as found on
http://developer.android.com/guide/topics/wireless/bluetooth.html.

How can I detect if Bluetooth if is turned on by the user?
Is there a notification in Adroid that my service can subscribe to?
In my current implementation I periodically poll the BluetoothAdapter
as shown below
itsBTAdapter.isEnabled().

Regards Martien

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] EditText in Header of ListView loses focus after first character is entered

2010-12-23 Thread Justin Glaeser
Hello,

I have inflated a relativeLayout with a EditText inside and I am using
it as a filter for the list in the list header.

mListView.addHeaderView(searchBar, null, true);


Selecting the EditText causes the input to gain focus and the soft
keyboard to show itself; however, after entering in the first letter
the list is filtered, and the EditText focus is gone.  Typing other
characters has no effect on the input and I must reselect the input in
order to type the next letter.  Any suggestions on how the EditText
can keep the focus and received additional keys presses from the
keyboard?  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] The ulltimate Android development experience

2010-12-23 Thread Kallex
Dear fellow Android Developers,

We have discovered an industry breakthrough on software development,
that can make mobile development as simple as technically aware mobile
device user (yes, user, not a developer) can make full enterprise
scale application.

Note, despite being in alpha, this technology is reality.
Unfortunately though the toolset requires Visual Studio 2008+ right
now, but with the involvement from Google, this is trivial to change.
Also we have not yet published any reference abstractions, so it
requires in-project level abstractions currently. However once getting
used of the abstractions, their ROI is almost immediate even at
project level.

Currently all the Visual Studio using Android developers can start
abstracting and generating .java code from their abstractions. So fire
away if you have Visual Studio at your disposal.


The documentation is available here:

http://abstraction.codeplex.com/documentation


We are looking both for community participation as well as focus
interest on the larger industry player such as Google, Microsoft and
Nokia.

So if you love your Android over the other platforms, help us raise
the interest level so that Google executives get involved. If we do
not get their attention, the chances are that the focused case slips
on the other major vendors.

The full business case is available at:

http://citrusdevspot.spaces.live.com



Merry Christmas for all the fellow Androidians!

Kalle Launiala, CTO of Citrus Solutions Oy

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

2010-12-23 Thread Batkhuu Regsuren
I have the following code:

public void doSerialize() throws XmlPullParserException,
IllegalArgumentException, IllegalStateException, IOException   {
StringWriter writer = new StringWriter();
XmlSerializer serializer =
XmlPullParserFactory.newInstance().newSerializer();
serializer.setOutput(writer);
serializer.startDocument(null, null);
serializer.startTag(null, "START");
for (int i = 0; i < 20; i++) {
serializer.attribute(null, "ATTR" + i, "VAL " + i);
}
serializer.startTag(null, "DATA");
for (int i = 0; i < 500; i++) {
serializer.attribute(null, "attr" + i, "value " + i);
}

serializer.endTag(null, "DATA");
serializer.endTag(null, "START");
serializer.endDocument();

String xml = writer.toString(); // value: until 493rd attribute
int n = xml.length();  // value: 10125
}

The problem is that the serializer fails to serialize/write
everything. What could be possible reason? Any pointer would be
greatly appreciated.

Thank you in advance.

Rex

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


[android-developers] Detect Intent Broadcast Receivers

2010-12-23 Thread Tao
Hi,

A similar question has been asked before (with no answers as far as I
can tell), but I thought I'd try my luck: Does anyone know whether
there is a way to know whether there is anyone (anything) out there
listening for a specific type of Intent being broadcast?

There are numerous applications out there that listen for specified
intents, and do something when these intents are broadcast. For
example, "Last.fm Scrobbler" applications. I would like to be able to
tell, from a perferences screen, whether a given intent has a
registered Receiver or not.

This way, if a user chooses a scrobbler application and I detect that
that scrobbler application does not appear to be registered/listening
(or rather, there are no Receivers registered for that type of
Intent), then I display an error/explanation message to the user,
telling them that application is not installed or is disabled.

The closest I've come to this from looking at the Android dev docs is
"sendOrderedBroadcast". If the intended receivers of the broadcast can
be guaranteed to cooperate by doing something predefined to the
payload, then my broadcast receiver at the end should be able to
detect the successful receipt vs lack of Receiver... This relies on a
specific implementation on the part of the expected receivers,
however, so it's not a very general solution.

Any ideas?

Thanks!
Tao

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

2010-12-23 Thread TobyKaos
Hello, I tried to communicate between C++ and Java with JNI.

I manage to execute test like HelloJNI in android-ndk.

I want my c++ native code call java function but when I debug my app I
have this JNI warning:
 "cant' call Lcom/project/teststl/TestSTL; .test on instance of Ljava/
lang/Class; "

my package is "com.project.teststl"
my java class is TestSTL and extends from Activity. in onCreate
function I call a native function write in c++ and all is ok.
In this native function I Find my class and GetMethodId without error.
But method CallVoidMethod crash. Why? must I create a thread and
getEnv?

Part of my native code:

jclass caller;


JNIEXPORT void JNICALL
Java_com_project_teststl_TestSTL_setCaller(JNIEnv* env, jobject obj)
{
if (env->ExceptionOccurred())
{
env->ExceptionDescribe();
__android_log_print(ANDROID_LOG_INFO, "test", "env null");
return ;
}
jclass localclass;// = (jclass)(env->GetObjectClass(obj));

localclass = env->FindClass("com/project/teststl/TestSTL");
if (localclass == 0)
{
__android_log_print(ANDROID_LOG_INFO, "test", "classe not 
found");

return ;
}

/* Create a global reference */
caller = (jclass*)(env->NewGlobalRef(localclass));

   // use of global reference
 jmethodID mid = (env)->GetMethodID( caller, "test", "()V");
  if (mid == 0) {
return;
  }

  /* The local reference is no longer useful */
(env)->DeleteLocalRef( localclass);

 // Here I have tried also with obj parameter

  env->CallVoidMethod( caller, mid);

}

any idea?

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


[android-developers] Database Remote Access

2010-12-23 Thread kennedyximenes
Hi,

I am developing an Android App and I need to connect to read and
retrieve data from a remote database.

On the one side I have a SQL Server Database and on the other side I
have my Android application. I would like a tutorial or a practical
example describing all processes and how to do that.

Thank you for any help.

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


[android-developers] c2DM error when third-party server sends data to push

2010-12-23 Thread nagaraj
I am trying to push data from my server hosting a webservice but I get
the following error:



411 Length Required






Google  
 
Error
 

Length Required
POST requests require a Content-length header.







Here is the java code that posts message to google c2dm which inturn
will send a push notification to the device:


 private void postData(String auth, String id, String data) {
  DefaultHttpClient client = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(
"https://android.apis.google.com/c2dm/send";);
  List formparams = new ArrayList();
  formparams.add(new BasicNameValuePair("registration_id", id));
  formparams.add(new BasicNameValuePair("data.payload", data));
  formparams.add(new BasicNameValuePair("collapse_key", "something"));
  //formparams.add(new BasicNameValuePair("Content-length",
""+data.length()));

  if (null != id) {
   formparams.add(new BasicNameValuePair("id", id));
  }
  UrlEncodedFormEntity entity = null;
  try {
   entity = new UrlEncodedFormEntity(formparams, "UTF-8");
  } catch (UnsupportedEncodingException e1) {
   // TODO Auto-generated catch block
   e1.printStackTrace();
  }
  httppost.setEntity(entity);
  Header header = new BasicHeader("Authorization: GoogleLogin auth=",
auth);
  Header header2 = new BasicHeader("Content-length=",
""+data.length());
  httppost.addHeader(header);
  httppost.addHeader(header2);
  httppost.getParams().setParameter("Content-length:",
""+data.length());
  HttpContext localContext = new BasicHttpContext();
  HttpResponse response = null;
  try {
   response = client.execute(httppost, localContext);
   HttpEntity entity2 = response.getEntity();

   System.out.println("");
   System.out.println(response.getStatusLine());
   Header[] headers = response.getAllHeaders();
   for (int i = 0; i < headers.length; i++) {
System.out.println(headers[i]);
   }
   System.out.println("");

   if (response.getEntity() != null) {
System.out.println(EntityUtils.toString(response.getEntity()));
   }

  } catch (Exception e) {
   System.err.println(e);
  } finally {
  }
 }

Note:
1.  I successfully got the registration id from the client (device)
2.  I successfully get the "Auth" from an earlier post on the server
side

Any help will be greatly appreciated

Thank you
-Nagaraj

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

2010-12-23 Thread 袁堂夫
As you know that template classes are implemented in the   ".h"
header files, and the ndk is not build the ".h" files.

When the ndk link the obj files, it will failed that the template
classes are not implemented.

Who can help me fix this? Thank you very much, please~

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


[android-developers] [Native stack trace] How to analyze native stack trace when application crashes ?

2010-12-23 Thread Sly_bzh
I wonder how to debug when an application crash and that a native
stack trace is reported in the logcat.

Hereby some questions that could be useful for other developpers =)

Q1 ; how do you analyze the native stack trace that is reported in the
Logcat when application crashes ?

Q2 : Do you know tools that perfectly works for this ?

Q3 : How do you debug this kind of situation ?

Thanks in advance for your answers.


P.S. hereby an example of the stack trace I wanna to debug :

12-23 11:14:50.224: INFO/DEBUG(48): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
12-23 11:14:50.224: INFO/DEBUG(48): Build fingerprint: 'android-
devphone1/dream_devphone/dream/trout:1.6/DRC83/14721:userdebug/
adp,test-keys'
12-23 11:14:50.224: INFO/DEBUG(48): pid: 3437, tid: 3437  >>>
com.example.myapplication <<<
12-23 11:14:50.224: INFO/DEBUG(48): signal 11 (SIGSEGV), fault addr
98054b41
12-23 11:14:50.224: INFO/DEBUG(48):  r0   r1 032c  r2
98054b21  r3 460da230
12-23 11:14:50.224: INFO/DEBUG(48):  r4 0003  r5 4000c238  r6
460e3000  r7 ad084aa8
12-23 11:14:50.224: INFO/DEBUG(48):  r8 ad083e1c  r9 a9d223d9  10
4000c238  fp ad083e1c
12-23 11:14:50.224: INFO/DEBUG(48):  ip 4000c1e8  sp be9ae620  lr
0003  pc ad01622c  cpsr 6010
12-23 11:14:50.384: INFO/DEBUG(48):  #00  pc 0001622c  /system/
lib/libdvm.so
12-23 11:14:50.384: INFO/DEBUG(48):  #01  pc 00016cb4  /system/
lib/libdvm.so
12-23 11:14:50.394: INFO/DEBUG(48):  #02  pc 000153e4  /system/
lib/libdvm.so
12-23 11:14:50.394: INFO/DEBUG(48):  #03  pc 000483f4  /system/
lib/libdvm.so
12-23 11:14:50.394: INFO/DEBUG(48):  #04  pc 000591b2  /system/
lib/libdvm.so
12-23 11:14:50.394: INFO/DEBUG(48):  #05  pc 00013198  /system/
lib/libdvm.so
12-23 11:14:50.404: INFO/DEBUG(48):  #06  pc 00017be4  /system/
lib/libdvm.so
12-23 11:14:50.404: INFO/DEBUG(48):  #07  pc 0001762c  /system/
lib/libdvm.so
12-23 11:14:50.404: INFO/DEBUG(48):  #08  pc 000529a8  /system/
lib/libdvm.so
12-23 11:14:50.414: INFO/DEBUG(48):  #09  pc 00059eda  /system/
lib/libdvm.so
12-23 11:14:50.414: INFO/DEBUG(48):  #10  pc 00013198  /system/
lib/libdvm.so
12-23 11:14:50.414: INFO/DEBUG(48):  #11  pc 00017be4  /system/
lib/libdvm.so
12-23 11:14:50.424: INFO/DEBUG(48):  #12  pc 0001762c  /system/
lib/libdvm.so
12-23 11:14:50.424: INFO/DEBUG(48):  #13  pc 0005282c  /system/
lib/libdvm.so
12-23 11:14:50.424: INFO/DEBUG(48):  #14  pc 0003f790  /system/
lib/libdvm.so
12-23 11:14:50.434: INFO/DEBUG(48):  #15  pc 0002bdfc  /system/
lib/libandroid_runtime.so
12-23 11:14:50.434: INFO/DEBUG(48):  #16  pc 0002c8fe  /system/
lib/libandroid_runtime.so
12-23 11:14:50.434: INFO/DEBUG(48):  #17  pc 8bf2  /system/
bin/app_process
12-23 11:14:50.434: INFO/DEBUG(48):  #18  pc bd60  /system/
lib/libc.so
12-23 11:14:50.444: INFO/DEBUG(48):  #19  pc b000163c  /system/
bin/linker
12-23 11:14:50.444: INFO/DEBUG(48): stack:
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5e0  43738000  /dev/
ashmem/mspace/dalvik-heap/2 (deleted)
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5e4  43737fff
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5e8  45ea4000  /dev/
ashmem/dalvik-heap-markstack (deleted)
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5ec  0002
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5f0  be9ae5f8  [stack]
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5f4  ad014930  /system/
lib/libdvm.so
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5f8  0002
12-23 11:14:50.444: INFO/DEBUG(48): be9ae5fc  0001
12-23 11:14:50.444: INFO/DEBUG(48): be9ae600  
12-23 11:14:50.454: INFO/DEBUG(48): be9ae604  00065e60  [heap]
12-23 11:14:50.454: INFO/DEBUG(48): be9ae608  
12-23 11:14:50.454: INFO/DEBUG(48): be9ae60c  ad038729  /system/
lib/libdvm.so
12-23 11:14:50.454: INFO/DEBUG(48): be9ae610  033c
12-23 11:14:50.454: INFO/DEBUG(48): be9ae614  be9ae610  [stack]
12-23 11:14:50.454: INFO/DEBUG(48): be9ae618  df002777
12-23 11:14:50.454: INFO/DEBUG(48): be9ae61c  e3a070ad
12-23 11:14:50.454: INFO/DEBUG(48): #00 be9ae620  032c
12-23 11:14:50.454: INFO/DEBUG(48): be9ae624  98054b21
12-23 11:14:50.454: INFO/DEBUG(48): be9ae628  4000c238  /dev/
ashmem/mspace/dalvik-heap/zygote/0 (deleted)
12-23 11:14:50.454: INFO/DEBUG(48): be9ae62c  4000c1e8  /dev/
ashmem/mspace/dalvik-heap/zygote/0 (deleted)
12-23 11:14:50.454: INFO/DEBUG(48): be9ae630  4000c238  /dev/
ashmem/mspace/dalvik-heap/zygote/0 (deleted)
12-23 11:14:50.464: INFO/DEBUG(48): be9ae634  460e3000
12-23 11:14:50.464: INFO/DEBUG(48): be9ae638  ad084aa8  /system/
lib/libdvm.so
12-23 11:14:50.464: INFO/DEBUG(48): be9ae63c  ad083e1c  /system/
lib/libdvm.so
12-23 11:14:50.464: INFO/DEBUG(48): be9ae640  032c
12-23 11:14:50.464: INFO/DEBUG(48): be9ae644  2710
12-23 11:14:50.464: INFO/DEBUG(48): be9ae64

[android-developers] TCP Socket and Client within the Emulator

2010-12-23 Thread CodeJunkie
I am trying to create a TCP Socketserver in the emulator and also
create a client that will connect to it within the emulator. Should
this still need Forwarding rules to be set. Please advise.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Anyone know where I can buy NFC tags?

2010-12-23 Thread davidcinmidwest
I purchased the "Tikitag" kit last year, which is now known as
touchatag referenced by Brill in this discussion.  The kit came with a
USB reader and 10 tags.  The tags are read-only.  Today the Nexus S
arrived and I'm happy to report that it reads the touchatags
successfully.  Passing the tag on the right side of the phone while
looking at the display produced:  "New tag collected" and a hyperlink
to a touchatag web site that displays Tag no. 0x...  Using the
touchatab dashboard, tags can be associated with a touchatag
application.  The Java JSR 257: Contactless Communication API has
details about the Java implementation of the NFC data exchange.  I
found some helpful code in 2009 on the Nokia web sites for the 6131
emulator, plan to look for that again as I test the Google
implementation.  Full Speed Ahead with Android 2.3 and the Nexus S!

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


[android-developers] Application feasibility

2010-12-23 Thread emafuma
Hi, I'm investigating if I can make an app that runs in background but
is able to interact with others by "enriching" texts adding relevant
information.
For Instance, interact with an existent twitter app colouring words
considered to be relevant.
Thanks in advacen for any help

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


[android-developers] Re: Proguard problem after 2.3 update

2010-12-23 Thread David C. Sousa
Same problem, same message. If I knew I would have all this trouble, I
wouldn't have updated the android SDK. Even the docs are somewhat
outdated, wrong file names now (no big deal here, but it all adds up).

On 22 dez, 11:30, licorna  wrote:
> I've tried different setting with no success:
>
>  - I've set PROGUARD_HOME AND proguard.dir (in local.properties) to:
> a) proguard included with SDK, b) proguard 4.5 --stable-- c) proguard
> 4.6 --beta-- both HOME and /lib directories
>  - I'm using ant 1.8.1 (ant -version)
>
> After changing proguard.dir to /lib I'm getting another
> error: Expecting class path separator ':' before '{' in argument
> number 1
>
> I've lost almost an entire day trying to make this work!
>
> Thanks!
>
> On Dec 21, 7:15 pm, "Fred Grott(Android 
> Expert,http://mobilebytes.wordpress.com)"
>
>
>
>
>
>
>
>  wrote:
> > set PROGUARD_HOME to point to the proguard in your android sdk install..
>
> > I also had to do a manual ant 1.81 install on Ubuntu 10.04.1 Ubuntu 11 will
> > have ant 1.8 but Eclipse 3.7 will not have ant 1.81. until the end of the
> > beta process...ie May 2011..
>
> > I use a plugin called wickedshell to run ant 1.8.1 from shell in eclipse..

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] SensorService has a bug related to Integer array conversion from C to JAVA

2010-12-23 Thread JosephKim


Hello,

I got a special concern about sensor service and sensor manager of
Android.
Recently I am trying to implement the sensor hal, and I found
susficious code
inside of android_open().


static jobject
android_open(JNIEnv *env, jclass clazz)
{


if (handle->numFds > 0) {
jobjectArray fdArray = env->NewObjectArray(handle->numFds,
gParcelFileDescriptorOffsets.mClass, NULL);

for (int i = 0; i < handle->numFds; i++) {
~~
}
// bundle.putParcelableArray("fds", fdArray);
env->CallVoidMethod(bundle,
gBundleOffsets.mPutParcelableArray,
env->NewStringUTF("fds"), fdArray);
}


if (handle->numInts > 0) {
jintArray intArray = env->NewIntArray(handle->numInts);

//@@@ WHY index is handle->numInts??? @@@
env->SetIntArrayRegion(intArray, 0, handle->numInts, &handle-
>data[handle->numInts]);

// bundle.putIntArray("ints", intArray);
env->CallVoidMethod(bundle, gBundleOffsets.mPutIntArray,
env->NewStringUTF("ints"), intArray);
}

// delete the file handle, but don't close any file descriptors
native_handle_delete(handle);
return bundle;
}

In this function, we want to copy fds array and then copy int arrays.
But in case of integer array, you need to focus on the start point of
data array.



You write code like

handle->data[handle->numInts]

I think It should be

   handle->data[handle->numFds]);


You might have mistake of starting point of data array to copy Integer
data.



Pls check it.
Let me know that it is correct or not

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

2010-12-23 Thread Siva
Hi Friends,

I need to play a radio station in my application and that file format
is ".pls".

I tried by using VideoView and MediaPlayer and i cannot able to play
that station. I am getting "prepared failed" error.

Can you please explain how to play that .pls files in our android
application.

I thought Android SDK having some view or class to handle that. But,
unfortunately it does not have.. :-( :-(..

I have searched for all and still got any solution for this.

Any help or suggestion will be very much appreciated and helpful for
me

Thanks.

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


Re: [android-developers] Speed up showing Activity with ListView

2010-12-23 Thread Kapil Lokhande
Hi Johannes,

i think when your list data is in process fetch from server, you can create
your listview or other widgets on activity.only you have make sure after
thread which one fetching data from server will send message to your ui
thread about completion dat fetching. and then on resume you can call your
listview adapter notifydatasetchanged. and while your data fetching thread
is in progress you can show progress dialog.as far as i concerned this
solution will atleast show your list acivity loaded after progess dialog is
dissapear

--
Thanks & Regards,
Kapil Lokhande | Dexter Advisory Pvt. Ltd.  | Android
Developer
[image: dexterlogo.jpg]


On Thu, Dec 23, 2010 at 2:44 PM, Johannes De Smedt <
johannes.desm...@gmail.com> wrote:

> I have an application that loads a list of items with thumbnails from
> a server, and shows those items in a ListView.
>
> The laoding of the data is done before the ListViewActivity is started
> and while that is being done, a ProgressDialog is shown. When the
> loading of the data is done, I start an activity with a ListView that
> displays the items. The thumbnails are downloaded in a seperate thread
> when they are needed in the getView method of ListView.
>
> This is my problem: When the loading of the data is done, I call
> startActivity with an Intent to start the ListActivity and in that
> intent I put the data.
> My problem is that this takes a few seconds sometimes. How can I speed
> this up?
>
> Below is the sequence + where it goes wrong:
>
> The items are downloaded with an AsyncTask that shows a
> ProgressDialog.
> The progressDialog is dissmissed, and startactivity is called.
>
> Intent in = new Intent(CategoryListScreen.this,
> VideoListScreen.class);
> in.putParcelableArrayListExtra("items", items);
> startActivity(in);
>
> The listAdapter is created in the onCreate method of my
> VideoListScreen
> getView is called a few times...
> The VideoListScreen is displayed (a few seconds after the
> progressDialog has been dissmissed)
>
> Also the Logcat output from the ActivityManager indicates it takes a
> few seconds for my activity to start:
> E.g:
> 10:13:22.254 - ActivityManager - Starting activity: VideoListScreen
> 10:13:25.424 - ActivityManager - Displayed activity: VideoListScreen:
> 3166 ms
>
> How can I make that the activity is displayed faster?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Connect Android Emulator to Local Network

2010-12-23 Thread Ramesh K
Hi Guys,

I am new to android development. Please help me to connect Android
Emulator to Local Network.

I want to read and write files in network and connect sql server in
local network.

Thanks

Regars
Ramesh K

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


Re: [android-developers] MMS messages

2010-12-23 Thread Kapil Lokhande
see this
http://developer.android.com/reference/android/Manifest.permission.html#RECEIVE_MMS

On Thu, Dec 23, 2010 at 11:05 AM, Yves Liu  wrote:

> I left a break point in my code, and it never triggered for SMS_receive. I
> even put MMS_receive, and it didn't work. Any suggestions?
>
>
>
> On Tue, Dec 21, 2010 at 5:49 PM, xiaoxiong weng wrote:
>
>> I believe it's the same as SMS_receive but you parse the data as
>> setType("image/png");
>> I might be wrong :S
>>
>> On Mon, Dec 20, 2010 at 5:55 PM, Yves Liu  wrote:
>>
>>> Anyone knows?
>>>
>>>
>>> On Sat, Dec 18, 2010 at 3:10 PM, yves...@gmail.com wrote:
>>>
 Hi I use android.provider.Telephony.SMS_RECEIVED to listen to new SMS
 message received. But what should I use to listen to MMS message
 received?

 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
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> littleb...@littlebearz.com
>> +1-647-771-2551 SMS Call 24/7
>>
>> > This message and any attached documents contain information from the
>> > LittleBearZ that may be confidential and/or
>> > privileged. If you are not the intended recipient, you may not read,
>>
>>
>>
>> > copy, distribute, or use this information. If you have received this
>> > transmission in error, please notify the sender immediately by reply
>> > e-mail and then delete this message.
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] today spl exiting college girls nude and kiss videos

2010-12-23 Thread non stop shot
http://dattinggirls.hpage.us/linklist_74886.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] increase your system to speed...................

2010-12-23 Thread ANDRIYA
http://123maza.com/28/come123/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: CountDownTimer doen't work during device in deep sleep?

2010-12-23 Thread emymrin
Consider using AlarmManager.

On 23 дек, 01:54, optimusgeek  wrote:
> I use CountDownTimer for counting 24hours with 1minute interval.
> but It seems that the onTick() not called when device in deep sleep.
> When I check the millisUntilFinished value after activating device,
> The value was not match first but after few seconds, It show correct
> value.
> I think, when device in deep sleep, handle message from CountDownTimer
> delayed, and if device activated, the last message of CountDownTimer
> sent.
> and after that the millisUntilFinished value is updated.
>
> Any solution for it? I have to use the CountDownTimer, because I need
> to get the millisUntilFinished value in every 1 minute.

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


Re: [android-developers] Error inflating class linearlayout

2010-12-23 Thread ellison ye
On Thu, Dec 23, 2010 at 2:22 PM, pramod.deore wrote:

> I have one xml file which through error as Error inflating class
> linearlayout. Here I want to display one button and below that I want
> a list of checkboxes and items (string).
> My xml file is
>
> 
> http://schemas.android.com/apk/res/
> android"
>android:orientation="horizontal"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent">
>   http://schemas.android.com/apk/res/
> android" android:id="@+id/buttonlayout2"
> android:orientation="horizontal" android:layout_height="wrap_content"
> android:gravity="right" android:layout_width="fill_parent"
> android:layout_gravity="right|center_vertical">
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:text="Save"
> android:textSize="15sp" android:layout_marginLeft="10px"
> android:layout_marginRight="10px" android:layout_marginBottom="2px"
> android:layout_marginTop="2px" android:height="15dp"
> android:width="70dp">
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:text="Clear"
> android:textSize="15sp" android:layout_marginLeft="10px"
> android:layout_marginRight="10px" android:layout_marginBottom="2px"
> android:layout_marginTop="2px" android:height="15dp"
> android:width="70dp">
>
>
>
>   android:id="@+id/switches"
>android:layout_height="wrap_content"
>android:text=""
>android:layout_width="wrap_content">
>
>android:orientation="vertical"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent">
>android:orientation="horizontal"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content">
>
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:textColor="#00ccff"
>
>/>
>
>
>
> 
>
> Log cat output is
>
> 12-23 11:36:50.858: ERROR/AndroidRuntime(699): Uncaught handler:
> thread main exiting due to uncaught exception
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699):
> android.view.InflateException: Binary XML file line #6: Error
> inflating class linearlayout
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.ResourceCursorAdapter.newView(ResourceCursorAdapter.java:
> 79)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.SimpleCursorAdapter.newView(SimpleCursorAdapter.java:
> 96)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.CursorAdapter.getView(CursorAdapter.java:182)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.AbsListView.obtainView(AbsListView.java:1274)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.ListView.makeAndAddView(ListView.java:1668)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.ListView.fillDown(ListView.java:637)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.ListView.fillFromTop(ListView.java:694)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.ListView.layoutChildren(ListView.java:1521)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.AbsListView.onLayout(AbsListView.java:1113)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.View.layout(View.java:6830)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.FrameLayout.onLayout(FrameLayout.java:333)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.View.layout(View.java:6830)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.LinearLayout.onLayout(LinearLayout.java:918)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.View.layout(View.java:6830)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.widget.FrameLayout.onLayout(FrameLayout.java:333)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.View.layout(View.java:6830)
> 12-23 11:36:51.096: ERROR/AndroidRuntime(699): at
> android.view.ViewRoot.performT

[android-developers] Image doesn't appear from sqlite

2010-12-23 Thread Amiral
Hi all.

I would like to save an image from Internet to database, I've tried to
convert images into bytearray and store them in a database.

Here my code:

this is to created table:
myDB.execSQL("CREATE TABLE IF NOT EXISTS News (Title VARCHAR(20),
imageUrl BLOB, publishDate TIMESTAMP, expiredDate TIMESTAMP);");


and this is my Method to Insert table:

public void insertlistNews(String city,byte[] newsImageUrl, String
publishDate, String expiredDate){
try {
 myDB.execSQL("INSERT INTO News
(title,imageUrl,publishDate,expiredDate)"
+ " VALUES ('" + city + "','" + imageUrl + "','" + publishDate+
"','" + expiredDate"');");
Log.i("Android", "Table created");
} catch (Exception e) {
Log.i("Android", "No Table created" + e.getMessage());
}
//for check bytearray in database
Log.i("Android", "Image saved in database: "+ urlFrontImage);
}


The last my method for getNews from db:

public ArrayList getAllNews() {
 ArrayList news = new ArrayList();
 Cursor c = myDB.rawQuery("SELECT
title,imageUrl,publishDate,expiredDate
FROM News WHERE publishedDate <= DATETIME() and expiredDate >=
DATETIME() ORDER BY publishedDate DESC;", null);
 if (c != null) {
  c.moveToFirst();
  int count = 0;
  while (c.moveToNext()) {
   if (count == 0)
  c.moveToFirst();
   String title = c.getString(0);
   byte[] image = c.getBlob(1);
   String publishDate = c.getString(2);
   String expiredDate = c.getString(3);

   NewsItem nl = new NewsItem(title, image, publishDate, expiredDate);

   Log.i("Android", "Image get from db: "+image);
   news.add(nl);
   count++;
  }
 }
return news;
}


when I run it the newsimage not appear and the Log like this:

12-22 00:11:49.362: INFO/Android(307): Image saved in database:
[...@437cbdb8
12-22 00:11:51.052: INFO/Android(307): Image saved in database:
[...@437db710
12-22 00:11:51.862: INFO/Android(307): Image saved in database:
[...@437c1338

12-22 00:12:07.962: INFO/Android(307): Image get from db: [...@4382d370
12-22 00:12:07.982: INFO/Android(307): Image get from db db:
[...@4382d9c0
12-22 00:12:07.992: INFO/Android(307): Image get from db: [...@4382e0e0

why results can vary between insert and getNews?


--
Best Regards

=
Amiral

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

2010-12-23 Thread wwww
I prefer to use libgdx  ,it's a good job if  it  has more document and
tutorial

On 12月23日, 上午7时49分, Mario Zechner  wrote:
> Full disclosure: i'm the developer of libgdx.
>
> I think both have it's merits. Andengine will get you up and running
> faster than libgdx but is less flexible and slower in terms of
> rendering speed. It has a couple of nice features though that libgdx
> doesn't have (and vice versa).
>
> Libgdx is not a game engine like Andengine but more like a framework.
> We also have a fully functional 2D scene graph which is a tad bit more
> powerful than Andengine's layer concept. The downside is that you'll
> have to code custom nodes yourself. As a scene graph is most often
> overkill we also let you go a little bit more low level. Look into
> SpriteBatch and SpriteCache. And if you want to go fullblown OpenGL ES
> that's possible as well, nothing will interfer with your code :)
>
> Apart from that i'd say that you shouldn't overlook the cross-platform
> feature. If you don't want to deploy your game on the desktop that is
> totally fine. However, you can benefit from the extremely fast
> development times as you can code/run/debug on the desktop for 99% of
> the time instead of having to wait for the slow installation of every
> new apk you produce. Think of it as a lighting fast replacement for
> the slow emulator.
>
> We also have full javadocs, full 2D and 3D example games and are
> currently also creating wiki articles to help users out.
>
> Again, Andengine is really cool so i won't tell you to ignore it. It
> has a lot of stuff going for it. It uses our box2d wrapper and vector
> classes as well (among other things), so the physics are nearly
> identical. I just added a new feature today that was missing so far:
> box2d raycasting. I don't know when Nicolas will synch with upstream.
> That shouldn't keep you from using Andengine though.
>
> Evaluate both, they both have a pretty minimal setup cost and should
> be straight forward to get into.
>
> Ciao,
> Mario
> (http://www.badlogicgames.com)
>
> On 22 Dez., 05:34, Pedro Duque  wrote:
>
>
>
>
>
>
>
> > I'm starting a new Android project and I need an opinion. The project needs 
> > a 2d physics engine and OpenGL.
>
> > I looked into libgdx and andengine and both seem to fit although I don't 
> > think I'll need the cross platform features from libgdx.
>
> > Which one is more suitable? Advantages/disadvantages? Opinions?
>
> > Thank you,
> > Pedro Duque

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


[android-developers] About "?" in a URI

2010-12-23 Thread Wenjie
Dear Dudes,
I've got an URI when I debugged the Contacts application. When the
application queries the contacts, it uses a URI like "content://
com.android.contacts/contacts?address_book_index_extras=true".
And if I query with this URI from an application based on SDK. It will
throw an exception like this,
"java.lang.UnsupportedOperationException: Only CrossProcessCursor
cursors are supported across process for now". But if the URI is
"content://com.android.contacts/contacts", it works well.
Can anyone show me what does the "?" mean here? And what's the
difference between the two queries by each URI?
Thanks very much!

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

2010-12-23 Thread Eric
I am jumping into android dev.  I am a web developer(.net) .  I
watched a pretty good video on android dev, but have a question I
cannot figure out.  Below is my code:


package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;



public class HelloAndroid extends Activity implements OnClickListener
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{

Button Btn1, Btn2, Btn3;
TextView Txt1;
int score =15;
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//Start the Events

Btn1 = (Button)findViewById(R.id.Btn_1);
Btn2 = (Button)findViewById(R.id.Btn_2);
Btn3 = (Button)findViewById(R.id.Btn_3);
Txt1 = (TextView)findViewById(R.id.Txt1);
//Initialize the text box

Txt1.setText(String.valueOf(score));

//Button Listeners

Btn1.setOnClickListener(this);
Btn2.setOnClickListener(this);
Btn3.setOnClickListener(this);



 }

@Override
public void onClick(View src) {
// TODO Auto-generated method stub

switch(src.getId())
   {
   case R.id.Btn_1:

  score++
   break;
   case  R.id.Btn_2:
   break;
   case  R.id.Btn_3:
   break;
 }
   }
}

My question is this.  The variable score seems to be out of scope in
the onclick function.  In fact, it will not compile and gives me an
error, but the instructor ran it no problem...and it seemed to me that
we had the same code.

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] How to update one of views(setText, setImage) in item already added on ListView

2010-12-23 Thread Mingchung
Hi, all

* I have a ListView that using my layout document, to simplest, it
goes  like this ...


  
  
  


* then I populate the items to the ListView...
ListView lv = (ListView)findViewById(R.id.mylv);
ArrayAdapter aa = new ArrayAdapter(this,
R.layout.itemraw, R.id.tv_1, m_MyStringArray);
lv.setAdapter(aa);

* OK, the item is really populated like I think. Now I'd like to do
setText() to one of the TextView of one of ListView item...
LinearLayout ll = (LinearLayout)aa.getView(0, null, null);
TextView tv = (TextView)ll.findViewById(R.id.tv_3);
tv.setText("HAHAHAHAHA");

* Just like the program code, i set 3rd TextView with text "HAHAHAHA"
of first item, but nothing happened.

* My question is, an item has been already added to a ListView, can I
still update the UI?

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

2010-12-23 Thread James Wang
We noticed Samsung has released one addon for Nexus S but it is only
240 hdpi.

There is no way to test xhdpi with emulator?

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


[android-developers] Re: Cannot define a float as a resource?

2010-12-23 Thread Zsolt Vasvari
Great,  the setLayout call what I was looking for.

Thank you.


On Dec 24, 10:22 am, Dianne Hackborn  wrote:
> It definitely works; after all, this is how activities are full-screen.
>
> If nothing else, you can just set the theme of your dialog to @style/Theme
> which will make it look and behave the same as a full-screen activity. ;)
>
> Be sure that you are setting this on the *window* not on the content view.
>  A WRAP_CHILD in a parent will cause its children to wrap as well; by
> default a dialog as WRAP_CHILD for the width and height of the entire
> window.  You change this with Dialog.getWindow().setLayout().
>
>
>
>
>
> On Thu, Dec 23, 2010 at 6:17 PM, Zsolt Vasvari  wrote:
> > Hi Dianne,
>
> > I have never been able to successfully make MATCH_PARENT work.  It
> > seems to work for making the width (but not the height) of a floating
> > Activity match the screen size, but I was never able to do the same
> > for an AlertDialog.
>
> > Here's an AlertDialog from my app using MATCH_PARENT for the
> > AlertDialog's content view.  No views inside have a specific size set:
> >http://picasaweb.google.com/zvasvari/ScreenWidth#5554064956779202578
>
> > As you can see, it's way too narrow for the screen and, of course,
> > it's even worse in landscape mode.
>
> > Now here's the same dialog if I give it a minWidth of 300dp, nicely
> > filling the screen.  This is on a Nexus One (480x800):
> >http://picasaweb.google.com/zvasvari/ScreenWidth#5554064961041980722
>
> > I've tried many-a-times in vain to make an AlertDialog expend to the
> > screen size, but so far, I've been unsuccessful without giving it a
> > minWidth.
>
> > Zsolt
>
> > On Dec 23, 3:44 pm, Dianne Hackborn  wrote:
> > > This is 500dp in the tall dimension?  The two screens have different
> > aspect
> > > ratios, so the tall/wide dimensions are different.  The scaling factor
> > > between mdpi (160) and hdpi (240) is 1.5.  800 / 1.5 == 533.  480 * 1.5
> > ==
> > > 720.
>
> > > (And of course those aren't the only aspect ratios.  QVGA is even shorter
> > > (that is why it is a small screen), while some devices like droid are
> > taller
> > > at 480 x 852.)
>
> > > If you want to fill the screen, the easiest way to do this is to just
> > make
> > > your window's layout in that dimension be MATCH_PARENT.  If you aren't
> > using
> > > MATCH_PARENT, your layout should be computing the size it needs based on
> > its
> > > content and using that, not trying to impose numbers to match the screen.
>
> > > (There is another level of complexity here when moving to significantly
> > > larger screens.  The phone screens are relatively simple, in that just
> > > allowing the dialog fill the available width if it could at all use it
> > ends
> > > up working well.  On an xlarge screen, though, that looks ridiculous.
> > >  Honeycomb should have some help for this problem...)
>
> > > On Wed, Dec 22, 2010 at 11:33 PM, Zsolt Vasvari 
> > wrote:
> > > > Thanks, Dianne.  I am now just retrieving an int from 0 - 100 and
> > > > divide it by 100 and set it as the weight.  It works fine, but it's
> > > > just extra code and I am lazy person, which is why I asked. :)
>
> > > > On a related question:
>
> > > > I am defining the width of my pop-up window as 500dp, this fits nicely
> > > > into my HDPI screen on my Nexus One (480x800), but the same 500dp on
> > > > an MDPI device (320x480) is wider than the screen and I need to set
> > > > the width to 460dp.  I would have thought using DIP as the unit of
> > > > measure would deal with this.
>
> > > > Thanks,
> > > > Tom
>
> > > > On Dec 23, 9:41 am, Dianne Hackborn  wrote:
> > > > > Oh also you can just do a percentage dimension ("50%") and retrieve
> > it
> > > > with
> > > > > a base value of 1 or 100 as desired.
>
> > > > > On Wed, Dec 22, 2010 at 5:40 PM, Dianne Hackborn <
> > hack...@android.com
> > > > >wrote:
>
> > > > > > You can use them as attributes, but unfortunately right now there
> > is no
> > > > way
> > > > > > to get them as direct resources.
>
> > > > > > Well you can probably do it by being tricky -- use  to define
> > a
> > > > raw
> > > > > > resource, and Resources.getValue() to retrieve its value.
>
> > > > > > (One reason why this doesn't exist is if it made entries in R. for
> > > > float
> > > > > > values it would create code that can't compile since "float" is a
> > > > keyboard.
> > > > > > :p  I solved that with ints by calling them integers, and booleans
> > by
> > > > > > calling them bools, but we never really needed floats so I never
> > tried
> > > > to
> > > > > > come up with something to call them.)
>
> > > > > > On Wed, Dec 22, 2010 at 5:04 PM, Zsolt Vasvari 
> > > > wrote:
>
> > > > > >> Am I missing something or there is no mechanism to define a float
> > > > > >> value as a resource?
>
> > > > > >> I am trying to have a locale dependent weight added to some of my
> > > > > >> buttons.  Right now, as a workaround, I am defining the weight as
> > an
> > > > > >> Integer and then

[android-developers] Re: Anybody seen a slowdown in sales?

2010-12-23 Thread MichaelF
I can confirm that my sales have also dropped by at least 50% in the past 10 
days or so.

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

[android-developers] android messaging application layout

2010-12-23 Thread Kapil Lokhande
i want to create messaging application layout for sending message. i
tried with table layout but as listview items increases edit text and
button dissappears . i have used two table rows with first row holding
listview with wrap content height for messages and second row contains
relative layout for edit text with button.
please tell me how can i do that.

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


[android-developers] Re: Google Nexus S - Please provide as DEV phone, asap :-)

2010-12-23 Thread Nishant
http://en.wikipedia.org/wiki/Near_field_communication
this link might help you

Regards,
Nishant Bhargava

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


[android-developers] Not able to do "repo sync" on Linux system

2010-12-23 Thread Sapan Shah
Hello All,

I am new to Android. I am trying to set up android on Linux system.
When I am trying to do "repo sync" to get android source code, I am
getting following error. I think it tries to get sync from the
following GIT Locations.

130.239017.012  android.git.kernek.org
204.152.191.045  android.git.kernel.org
199.006 001.176  android.git.kernel.org
149.020.020.141  android.git.kernel.org

Error is as follows::

Fetching projects:  34% (49/144)
Initializing project platform/external/libffi ...
fatal: read error: Connection reset by peer
error: Cannot fetch platform/external/libffi

Install PXA Marvell Android patches from /home/ABC/working_base/src
to /home/ABC/working_base/android/..

applying patches on ./bionic ...
../apply_android_patch.sh: line 38: cd: /home/ABC/working_base/
android//./bionic: No such file or directory
Apply Patch /home/ABC/working_base/src/android/android_patches/./
bionic/0001-Increase-the-maximum-linked-so-files-from-96-to-256.patch
/home/ABC/working_base/src/android/android_patches/./bionic/0001-
Increase-the-maximum-linked-so-files-from-96-to-256.patch:29: trailing
whitespace.
#define SO_MAX 256
error: linker/linker.c: No such file or directory

APPLY PATCH FAIL: Task is aborted
Fails on: /home/ABC/working_base/src/android/android_patches/./bionic/
0001-Increase-the-maximum-linked-so-files-from-96-to-256.patch

FAIL: Install is aborted


Let me know what is the problem and its possible solution.

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

2010-12-23 Thread Tiago Nogueira
Guys,

anyone know any program to play by the tribalwars android?


-- 

Tiago Nogueira

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

[android-developers] http://www.geminiinfoway.com/standard-web-design-features.php

2010-12-23 Thread sivasathya1 s
HAI FRIEND!
 LETS U SEE THE DIFFERENT
ANIMATIONS,WALLPAPERS,PHOTOS,NATIVITY,REALPICTURES AND
 NEW VARITY OF PHOTO CONTENT ARE SEE THERE

sh video for website flash video on website building a website in
flash building a website with flash get flash from website put flash
on website flash website intros flash website for photographers open
source flash website flash website game professional flash website put
flash on a website flash website games edit a flash website flash
buttons for website copy flash from website flash website builder edit
flash website flash images for website flash 8 website templates web
designer web designers web designing web design companies web design
company web design development graphic web design web design firms web
design firm web design solutions ecommerce web design affordable web
design web design hosting flash web design free web design good web
design web site design html web design web design freelance top web
design award winning web design seo web design web design and
development web design templates web design job web design jobs web
design tips creative web design web design css web design business web
design web page designs web design price web design prices web design
service web design help web design tools best web design web design
pricing outsource web design custom web design web design and hosting
effective web design web design quote web design career web design
graphics web design template web page designers web design examples
ecommerce web site design web site design company web design tutorial
web design studio web graphic design design web web page designer
cheap web design web design packages how to design web web designs
best web designs low cost web design professional web site design web
design software web design usability web page design design web page
web design services dynamic web design web pages design corporate web
design web design cost great web design web design class web design
developers web design uk internet web design e commerce web design web
design program web design blog interactive web design web design
directory quality web design web design costs best web design company
web design tool web design companys top web designers top web design
companies web design consulting web design navigation learn web design
web application design professional web design web design text web
designe web designed web design layout web design classes web site
design and hosting frontpage web design web site design services web
design course web hosting design affordable web site design web
development design web logo design web site designs web design degree
flash web site design web design tutorials design web sites bad web
design christian web design small business web design web design
background web design awards web design agencies web design
backgrounds web design agency corporate web site design best web site
design business web site design freelance web designer designing web
sites custom web site design web 2.0 design web design online good web
page design web design graphic design best web designer simple web
design graphic and web design best web designers web designing
companies how to web design cheap web site design web site design
software web design 101

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 store images at runtime and then access it in a WebView throw a IMG tag ?

2010-12-23 Thread Guillaume Lung
Hi,

I'm looking to the group message but I can't find any answer to my
question. Maybe it is too basic...

- How to store images at runtime and then access it in a WebView throw
a IMG tag ?

Regards,
Guillaume

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


[android-developers] Drawing text on a Bitmap (rather than Canvas)

2010-12-23 Thread MichaelF
(Cross-posted from StackOverflow:
http://stackoverflow.com/questions/4485587/drawing-text-on-a-bitmap-rather-than-canvas)

Hi,

I am drawing some text on a Canvas, and on a Bitmap, respectively:

protected void onDraw(Canvas canvas) {
canvas.drawText("Canvas text", 10, 10, mPaint);
Canvas singleUseCanvas = new Canvas();
singleUseCanvas.setBitmap(mBitmap);
singleUseCanvas.drawText("Bitmap text", 10, 30, mPaint);
}

In the former case, the text renders as you would expect, while in the
latter, it appears very rough and ugly. This becomes even more
problematic when using e.g.

canvas.drawBitmapMesh(...);

to apply transformations to the bitmap. Am I doing something wrong, or
is the quality simply deteriorated when you pass from Canvas to
Bitmap?

On a side note, the reason why I'm drawing text on a Bitmap is to
obtain a "magnifier" effect on the text in question (like Apple OSX's
dock), since I can then apply arbitrary transformations to it using a
bitmap mesh. Is there another, perhaps better, way to do this?

Best,

Michael

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


[android-developers] Problem connecting to WIFI network

2010-12-23 Thread Soprano
Hello,

I've a Samsung Galaxy Tab, Android Froyo, Vofafone firmware
P1000BUJI5.

I'm connecting to a wireless router which I have no direct access to
(it's in a neighbor building, they just told me the wpa password). The
first day I had no problem to connect to the network, but since then I
was not anymore able to connect. The system holds on the "obtaining IP
address" message, then after a few minutes rescans and again the same
message.

At the same time, I'm able to connect without problems using my laptop
(Ubuntu 10.04) or my mobile phone (Nokia E71).

Looking around on the web it seems this problem happened to many other
users, is it somehow addressed ?

thanks.

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


Re: [android-developers] Re: Does someone have a galaxy tab to test my game?

2010-12-23 Thread Kapil Lokhande
Hello cooke

My friend has got one. i will test it as i get my hands on it.
have a nice day.

--
Thanks & Regards,
Kapil Lokhande | Dexter Advisory Pvt. Ltd.  | Android
Developer
[image: dexterlogo.jpg]


On Wed, Dec 22, 2010 at 7:33 PM, Damien Cooke wrote:

> It worked a treat on mine.  Nice game very smooth
> On 22/12/2010 4:50 PM, "Brill Pappin"  wrote:
> >
> > Just tried it on my gt, no problems at all.
> > Its a Rogers GT (Canada).
> >
> > - Brill
> >
> > On Dec 21, 8:18 pm, ACR  wrote:
> >> Hey Damien,
> >> Thanks for the quick reply. The game is "CandySwipe FREE" on the android
> >> market and the user says they cannot open the game on the device. Thanks
> for
> >> checking this out, it is much appreciated.
> >>
> >> Albert
> >>
> >> On Dec 21, 2010 8:13 PM, "Damien Cooke"  wrote:
> >>
> >> Yes I have one if you want me to test it for you.
> >>
> >> Damien
> >>
> >> On 22/12/2010, at 10:37 AM, acr wrote:
> >>
> >>
> >>
> >>
> >>
> >> > Hi,
> >> > My game has been on the market for a week now with no major issues.
> >> > However
> >> > I got an email from 2 people yesterday saying that they are having
> >> > problems with the game on their Samsung Galaxy Tab
> >> > If someone has a Samsung Galaxy Tab and are willing to test this
> >> > for me, please send me a message. I
> >> > don't want to spam the boards.
> >> > It would be greatly appreciated.
> >> > 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 cr...@googlegroups.com>
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/android-developers?hl=en
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to
> android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
> >> For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Image does't appear from sqlite

2010-12-23 Thread Muhammad Amiral
Hi all.

I would like to save an image from Internet to database, I've tried to
convert images into bytearray and store them in a database.

Here my code:

this is to created table:

> myDB.execSQL("CREATE TABLE IF NOT EXISTS News (Title VARCHAR(20), imageUrl
> BLOB, publishDate TIMESTAMP, expiredDate TIMESTAMP);");



and this is my Method to Insert table:

public void insertlistNews(String city,byte[] newsImageUrl, String
> publishDate, String expiredDate){

try {

 myDB.execSQL("INSERT INTO News (title,imageUrl,publishDate,expiredDate)"

  + " VALUES ('" + city + "','" + imageUrl + "','" + publishDate+ "','" +
> expiredDate"');");

Log.i("Android", "Table created");

} catch (Exception e) {

Log.i("Android", "No Table created" + e.getMessage());

}

//for check bytearray in database

Log.i("Android", "Image saved in database: "+ urlFrontImage);

}



The last my method for getNews from db:

public ArrayList getAllNews() {

 ArrayList news = new ArrayList();

 Cursor c = myDB.rawQuery("SELECT title,imageUrl,publishDate,expiredDate

FROM News WHERE publishedDate <= DATETIME() and expiredDate >= DATETIME()
> ORDER BY publishedDate DESC;", null);

 if (c != null) {

  c.moveToFirst();

  int count = 0;

  while (c.moveToNext()) {

   if (count == 0)

  c.moveToFirst();

   String title = c.getString(0);

   byte[] image = c.getBlob(1);

   String publishDate = c.getString(2);

   String expiredDate = c.getString(3);


>NewsItem nl = new NewsItem(title, image, publishDate, expiredDate);

   Log.i("Android", "Image get from db: "+image);

   news.add(nl);

   count++;

  }

 }

return news;

}



when I run it the newsimage not appear and the Log like this:

12-22 00:11:49.362: INFO/Android(307): Image saved in database: [...@437cbdb8

12-22 00:11:51.052: INFO/Android(307): Image saved in database: [...@437db710

12-22 00:11:51.862: INFO/Android(307): Image saved in database: [...@437c1338


> 12-22 00:12:07.962: INFO/Android(307): Image get from db: [...@4382d370

12-22 00:12:07.982: INFO/Android(307): Image get from db db: [...@4382d9c0

12-22 00:12:07.992: INFO/Android(307): Image get from db: [...@4382e0e0


why results can vary between the insert and getNews?


-- 
Best Regards

=
Amiral

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

2010-12-23 Thread James do Carmo
Hi,

I have a widget that launch the configure activity when I click on it.
This widget its a party of my App, and the activity that it launch its
only accessible on the widget click.

So here is the thing, when my App is running and I click the home
button, and them I click on the widget, the configure screen shows up,
but the App itself too, and I dont want it.

If the app is not opened and I click the widget, it works just fine
and only the configuration activity shows up. What am I doing wrong?
Any ideas?

Regards,


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


[android-developers] Strategy for animating a circle

2010-12-23 Thread Citizenfish
I am getting into development and am looking to create a class that
will draw a circle of radius X which will expand to radius Y and then
start again at X. I am assuming that a canvas is the best object to
use to render this but what is the best strategy to carry out the
animation?

I really want it to be smooth and independent of other screen events.

Ta
Dave

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


[android-developers] At wits end: Windows Vista does recognize Adroid usb driver

2010-12-23 Thread Leo
I am connecting a Huawei Ideos S7 Tablet to my 32 bit Windows vista
machine in order to do "on device" development. As soon as I plug it
into the computers USB port I get the add new hardware dialog box,
which eventually tells me it can't find the driver. At that point I
use the menus to eventually make my way to the "browse your computer
for the driver" option and at that point I point windows to the
location of the usb driver that I downloaded via the Android SDK
manager. Unfortunately windows comes back and says it can't find the
driver in that director.but it's there

Is the Android USB driver generic for any device that uses android, or
are there different drivers for different hardware?

It would seam to me that windows should at least recognize the
extension as a driver and move to the next part of the installation
but not even that happens.

I have tried installing from device manager and i get the same
message.

Extra INFO
I can see the tablets USB drives (two of them for some reason???)
mounted but when I click them I get a "please insert disk into a
removable disk drive letter" message. This might or might not be
normal behavior for this device since there is not a Micro SD card
installed in the slot, though I would have thought that I would have
been at least able to see internal memory.

I have enabled USB debugging on the device. I have tried numerous
solutions found on this forum and others, though none of them address
the specific issue that Windows vista refuses to recognize the android
driver.

The tablet is running Android 2.1-update 1

Does anyone have Any ideas before I throw this tablet back to Korea.
ANY help would be 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] JOin as associte of Karvy

2010-12-23 Thread kum


Karvy Stock Broking inviting you to join hands as our business Associate/ 
partner 

 

Partner and prosper with us

 

Karvy Fortune, alternate sales channel of the Karvy Stock Broking Ltd, Karvy 
is one of the largest broking houses in India, it ranks among top 5 
Depositary Participants in India, with the huge net work of over 500 
branches in 375 locations across India and overseas at Dubai, executes 
150,000+ trades in NSE/BSE, Karvy now expanding Business Associate network 
across all potential places in Pan India. 

 

As Karvy Partner you will get comprehensive financial services and solutions 
to Equities Trading – NSE and BSE

Derivatives Trading

E- Broking / Online Broking

Commodities Trading  

Depository Services

PAN/TIN/ TAN Services

Investments (Mutual Funds, IPOs, Tax Saving, Capital Gains Bonds)

Margin Funding  

IPOs 

Funding Loan against Shares

 

As a sub-broker or Associate/Franchisee you can avail goodwill of Karvy 
Stock Broking as well as u will also inherit the backing of top-class 
financial experts. A team of over 1600 highly qualified and dedicated 
professionals drawn from the best of academic and professionals backgrounds 
are committed to maintaining high levels of client service delivery.  This 
team is continuously engaged in designing the right investment portfolio for 
each customer according to individual needs and budget considerations with a 
comprehensive support system that focuses on trading customer’s portfolios 
and providing valuable inputs, monitoring and managing the portfolio through 
varied technological initiatives.

 

Make these invaluable resources work for your fortune.

 

Become our partner and get prosper 
  
 

http://www.karvy.com/v2/fortune

 

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

2010-12-23 Thread dev777
Hi,

I am running a service that starts a new activity when specific
applications are launched.

For example, when I launch sms application, my service detects it by
checking a top activity package name and starts a new activity.

But the problem is that after starting a new activity, when I finish
that activity and press BACK button from sms application to go back to
Home screen, it does not finish my sms application.

Even though the screen is at home(launcher), when I check top activity
name, sms app is running as the top activity, which means sms app is
not finished after pressing BACK button.

I use Intent.FLAG_ACTIVITY_NEW_TASK intent flag for starting a new
activity and finish() to finish it. Does anyone have an idea why my
BACK button does not finish sms application in this case?

thanks,

777

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


Re: [android-developers]How to get the data from LBS?

2010-12-23 Thread mohammad shankayi
i think you must use google maps API ... it may have this useful info as a
layer...
sincerely
mohammad shankayi


On Wed, Dec 22, 2010 at 05:40, kevens hao  wrote:

>  Like Foursquare, I want to develop an application which can get the
>> location and get the useful info(hotel, restaurant, groggery info and so on)
>> around the location.  So how to get the useful info?
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] call c++ function with jni and android ndk

2010-12-23 Thread TobyKaos
Hello, I first run samples found in androind ndk and I create my own
in C. I successfully print a hello world with c function.

but now I want to call c++ function. Then I change file extensions
to .cpp and remake with ndk-build. Ok that seems to work fine. I
refresh my eclispe project. Ok eclispe seems to find my hello world
function in new .so lib made in c++.

Then I launched debug and application failed because it does not find c
++ function. My function is the same but I modify jni function in it
to match c++ jni.

My TestSTL.java

package com.project.teststl;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

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

TextView  tv = new TextView(this);
tv.setText( stringFromJNI() );
setContentView(tv);
}

native public static String stringFromJNI();

static {
//System.loadLibrary("stlport_shared");
System.loadLibrary("teststl");
}

}

*
my test.cpp file

#include 
#include 

#include 
#include 

/* Call to initialize the graphics state */
JNIEXPORT jstring JNICALL
Java_com_project_teststl_TestSTL_stringFromJNI(  JNIEnv* env, jobject
obj  )
{
jstring s = (env)->NewStringUTF( "Hello from JNI !");

return s;

}



I repeat, in C all is ok (I just modify NewStringUTF for C or C++
because are not the same definition).

Please help me.

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


[android-developers] Using Ant script '.apk' file is not getting created

2010-12-23 Thread Saurabh
Hi,

I have a build.xml file which performs following task.
1. Clean the project. and
2. Build the project.

Using command prompt I am trying to clean and build the project.
I am successfully able to clean the project but while creating the
build file I am getting an error.
The "Bin" folder is getting created but no .apk file.

I have used following code:


















































































And used  command for performing the build
I got following error:

Buildfile: E:\Android Examples\CalculatorApplication\build.xml

build-subprojects:

init:
[mkdir] Created dir: E:\Android Examples\CalculatorApplication\bin

build-project:
 [echo] CalculatorApplication: E:\Android Examples
\CalculatorApplication\build.xml
[javac] Compiling 3 source files to E:\Android Examples
\CalculatorApplication\bin
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\AboutActivity.java:22: package R does not exist
[javac] setContentView(R.layout.about_layout);
[javac] ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\AboutActivity.java:23: package R does not exist
[javac] Button b = (Button)
findViewById(R.id.btnClick2);
[javac]   ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\AboutActivity.java:24: package R does not exist
[javac] TextView tvn = (TextView)
findViewById(R.id.txtVName);
[javac] ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:27: package R does not exist
[javac] setContentView(R.layout.main);
[javac] ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:29: package R does not exist
[javac] leftOperand =
(EditText)findViewById(R.id.leftOperand);
[javac]   ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:30: package R does not exist
[javac] rightOperand =
(EditText)findViewById(R.id.rightOperand);
[javac]^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:31: package R does not exist
[javac] result = (TextView)findViewById(R.id.result);
[javac]  ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:33: package R does not exist
[javac] Button plus = (Button)findViewById(R.id.plus);
[javac] ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:36: package R does not exist
[javac] Button minus = (Button)findViewById(R.id.minus);
[javac]  ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:40: package R does not exist
[javac] Button multiply =
(Button)findViewById(R.id.multiply);
[javac] ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:44: package R does not exist
[javac] Button divide = (Button)findViewById(R.id.divide);
[javac]   ^
[javac] E:\Android Examples\CalculatorApplication\src\org\example
\calculator\CalculatorActivity.java:47: package R does not exist
[javac] Button clear = (Button)findViewById(R.id.clear);
[javac]  ^
[javac] E:\Android Examples\Calcu

[android-developers] Split screen om android

2010-12-23 Thread irulz
Hi Friends

I would like to support split (dual) screen on the android.

Split Screen: Two apps with different resolution can run
simultaneously.
I would like to keep one physical display and two logical
display(surface).

I know its not a trivial change and will really need some effort.
I am trying to get a highlevel picture of the changes required.

In my opinion the main components which will be modified are:

1. Activity manager  -- Changes to support two activities
2. Windows Manager -- Support two activity stack, two windows stack
and two application stack
3. Surface flinger 
4. Driver changes 

Do I need to have any changes in surfaceflinger ?
Any changes in driver? Any changes in OpenGL/EGL ?

I will really appreciate any input on this. Is thr anything I am
missing ?

Also I am looking for a doc on flow diagram from activity manager-
>windowsmanager->surface flinger (call flow diagram) or some good
document. Any pointers? I tried to google but could not find detailed
doc.

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: Retrieving Input Device Capabilities - pre 2.3

2010-12-23 Thread Jyaif
In case you haven't found a solution yet, you can use hasSystemFeature
method from the PackageManager, for instance:
hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)

More documentation can be found here:
http://developer.android.com/reference/android/content/pm/PackageManager.html

On Dec 9, 10:39 pm, Paul  wrote:
> Hi all.  I am working on an app that will be processing touch inputs,
> and was wondering if there is a way to programatically retrieve
> information about the touch input device, specifically the number of
> multi-touches it supports.  Typically this will be about the touch
> screen, but in theory, could be any device that sends inputs.
>
> I see in the now released 2.3, there are classes such as InputDevice
> that seem to give a little more insight into the particular input
> device, but nothing that I can see relating to multi-touch support:
>
> http://developer.android.com/reference/android/view/InputDevice.html
>
> I am assuming that the simple answer would be no, there isn't a way,
> other than listening to MotionEvent and determining while the user is
> interacting with the app if there are multi-touch inputs streaming in,
> but would be nice to know on launch as well.
>
> Thanks for any direction,
>
> Paul

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


Re: [android-developers] Re: Google Nexus S - Please provide as DEV phone, asap :-)

2010-12-23 Thread TreKing
On Thu, Dec 23, 2010 at 8:15 PM, metal mikey  wrote:

> Google's Online Phone Store was GOOD! Bring it back, give it more time,
> don't worry about useless journalists hanging shit on it (e.g. saying its a
> flop)...it was REALLY, REALLY GOOD!
>

The useless journalists were just stating "facts" - which were stated by
Google itself:
http://googleblog.blogspot.com/2010/05/nexus-one-changes-in-availability.html

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

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

[android-developers] Re: Web Server

2010-12-23 Thread perumal316
Hi,

But I want to host Apache Tomcat where I will also be having the Java
Servlets. Is there any way to do this in Android? I tried the i-Jetty
but under configurations there is no option to include my java
servlets.

Any idea how to resolve this issue?

Regards,
Perumal

On Dec 22, 9:52 pm, Mark Murphy  wrote:
> Sure. You need a Java-based Web server (iJetty, NanoHTTPD, etc.), or
> possibly a C-based one you can attach to your app via the NDK. Bear in
> mind that this will really only be useful on a WiFi LAN, since the
> phone will not have a publicly routable Internet address in most (if
> not all) cases.
>
>
>
>
>
> On Wed, Dec 22, 2010 at 8:46 AM, perumal316  wrote:
> > Hi All,
>
> > Is it possible to host a web server within an Android phone itself?
> > Similar to Apache. I want to access the web server from the mobile
> > browser itself.
>
> > Couldn't find any reference online. Is this possible?
>
> > Thanks In Advance,
> > Perumal
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] Re: supporting only resolutions >= 320x480

2010-12-23 Thread Dianne Hackborn
That just isn't how it works.  A 240x400 ldpi screen should be treated as
the *exact* *same* space as a 320x533 screen which should be treated as the
*exact* *same* space as a 480x800 screen.

The only difference is density, which means less or more graphical detail.
 Not UI/level complexity

You shouldn't be making your level complexity more complicated due to
changes in density.  Taking an extreme -- from ldpi to xhdpi -- this would
result in a UI so tiny (but with a ton of stuff on it) at xhdpi that it is
impossible to use or possibly even see.

This is the reason why we split things between density and screen size.
 They are fundamentally different things, and you need to take both into
account.  As I said, the platform already has various facilities to scale
graphics for you, but if you need to it is pretty easy to do yourself -- if
you are using OpenGL you could probably just do it at runtime; otherwise,
it's just a matter of generating a new bitmap with the scaled image and
throwing away the original.

On Thu, Dec 23, 2010 at 6:37 PM, Utumno  wrote:

>
> Because I don't scale my graphics , and I don't let the system do it
> either :)
>
> My reason: actually I could make the UI work in 240x400 and 240x432,
> the problem is with game area.
> The app is a game where infinitely many levels are created pseudo-
> randomly. The bigger resolution, the more complicated and generally
> speaking better levels get created. At 320x480, the game is playable,
> at 480x800 , it is excellent and I DONT want to upscale the graphics
> because that would simplify the levels back to more or less 320x480
> level, thus making the game worse.
>
> On 240x320, I still could make the game work by downscaling the
> graphics, but how do I do it? Then I would have to
>
> - downscale on 240x320, 240x400 and 240x432
> - do *not* resize on >=320x480
>
> If I can do the above, then excellent, my game would work everywhere.
> If not, I have to somehow rule out all the resolutions smaller than
> 320x480.
>
>
> L.
>
> On Dec 24, 10:23 am, Dianne Hackborn  wrote:
> > Why would it not work on 240x400?  That is just a density change; if you
> > don't scale your graphics, the platform can do it for you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: SDK 2.3: Get "Multiple substitutions specified in non-positional format" error

2010-12-23 Thread Bob Kerns
That's rare enough to be noteworthy when it happens. And to be fair, I
have seen a few Mea Culpas expressed on this list.

But I'd be more interested in a commitment to doing something about
it. Unfortunately, it's already too late for many, if not most, of us.

On Dec 16, 9:15 am, effigy  wrote:
> I love that no one on the ADK team has the balls to admit they fucked
> this one up, and us dev's in the process...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: SDK 2.3: Get "Multiple substitutions specified in non-positional format" error

2010-12-23 Thread Bob Kerns
Um, no, on this point. Implicit indexing vs explicit indexing is still
ALWAYS exactly the same order.

When you use implicit ordering, say "%s %s", this is always, ALWAYS,
exactly equivalent to "%1$s $2$s". The latter adds NO INFORMATION
WHATSOEVER, and does not remove any ordering dependency. The order of
the ordinals, and the implicit ordering, are both inextricably tied to
the ordering in the code. Now, if %1$s is an adjective, and %2$s is a
noun, and you translate to Spanish, you would have to reverse the
order, and use "%2$s %1$s", but that translation is ALSO tied to the
specific ordering in the Java code.

Not using indexed substitutions in a library resources is NOT A BUG.

I can't even make a decent case, despite seriously trying, for why you
should even PREFER to write "%1$s %2$s" over "%s %s". The closest I
can come boils down to, "it's educational!".  And that leads me to the
position that THIS SHOULD NOT EVEN BE A WARNING! (And yes, ALL CAPS
means I AM YELLING!)

The real issue here that Ecthelion is raising is that if you are
mistaken about HOW a string is used, and it is not passed to
String.format, and you introduce the explicit ordinals, then you have
INJECTED A NEW BUG, just to shut up the resource compiler.

(And if you use %n, and you shut up the resource compiler, then you
have INJECTED A NEW BUG, because String.format does not support that,
regardless of what the resource compiler may think!)

In short, this change fixes NO bugs, but does cause or even force
developers to inject new ones. I'm glad I thought to test for %1$n,
rather than blindly accede to the resource compiler's demands!

On Dec 9, 5:20 am, Mark Murphy  wrote:
> On Thu, Dec 9, 2010 at 3:50 AM, Ecthelion  wrote:

> If the developer of a library failed to use indexed substitutions, and
> they somehow rely upon the implicit ordering, that is a bug in the
> library, plain and simple. Like any other bug in the library, reusers
> find out about it via testing, plain and simple.

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

2010-12-23 Thread Utumno

Because I don't scale my graphics , and I don't let the system do it
either :)

My reason: actually I could make the UI work in 240x400 and 240x432,
the problem is with game area.
The app is a game where infinitely many levels are created pseudo-
randomly. The bigger resolution, the more complicated and generally
speaking better levels get created. At 320x480, the game is playable,
at 480x800 , it is excellent and I DONT want to upscale the graphics
because that would simplify the levels back to more or less 320x480
level, thus making the game worse.

On 240x320, I still could make the game work by downscaling the
graphics, but how do I do it? Then I would have to

- downscale on 240x320, 240x400 and 240x432
- do *not* resize on >=320x480

If I can do the above, then excellent, my game would work everywhere.
If not, I have to somehow rule out all the resolutions smaller than
320x480.


L.

On Dec 24, 10:23 am, Dianne Hackborn  wrote:
> Why would it not work on 240x400?  That is just a density change; if you
> don't scale your graphics, the platform can do it for you.

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


[android-developers] Re: SDK 2.3: Get "Multiple substitutions specified in non-positional format" error

2010-12-23 Thread Bob Kerns
Sorry for the delayed response; I missed seeing your reply until now.

I wasn't asking about plurals. I was commenting that having them as a
string resource but not integrated with the format system is a FAIL,
when you consider the actual translation workflow and lifecycle,
because using them requires a coding change.

But, on those occasions where you are dealing with one language, or
carefully work out IN ADVANCE how to make it all work out with
multiple languages (i.e. supply plurals for every possible argument
that might need them, as an additional argument, and sorting it all
out with positionals in the format string) -- on those occasions, it's
nice to have. Of course, you could have done the same thing with a
string array, but it captures the intent more nicely.

But it does require the programmer to know a lot about translation,
and to get it all set up right in advance.

On Dec 7, 2:12 pm, Matt Quigley  wrote:
> To all the various responses:
>
> 1. To the guys asking about plurals, have you 
> seenhttp://developer.android.com/guide/topics/resources/string-resource.h...
> ?

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


Re: [android-developers] supporting only resolutions >= 320x480

2010-12-23 Thread Dianne Hackborn
Why would it not work on 240x400?  That is just a density change; if you
don't scale your graphics, the platform can do it for you.

On Thu, Dec 23, 2010 at 6:10 PM, Utumno  wrote:

> Hello Android gurus,
>
> My app only works in phones with screen resolution >= 320x480. More
> precisely: it knows how to render itself correctly on any resolution
> where the longer side is>=480 and the shorter side is >=320, no system
> prescaling is needed, but anything less than 320x480 is simply too
> small to cram my UI in.
>
> What exactly do I put in my manifest to rule out phones with lower
> resolutions?
>
> Now, according to Table 1. from
> http://developer.android.com/guide/practices/screens_support.html,
> I could rule out the 240x320 resolution with
>
> anyDensity=true
> smallScreens=false
> normalScreens=true
> largeScreens=true
> xlargeScreens=true
>
> but that is not going to rule out the '240x400' and '240x432'
> resolutions which apparently are considered 'normal screens' . That
> sucks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: Cannot define a float as a resource?

2010-12-23 Thread Dianne Hackborn
It definitely works; after all, this is how activities are full-screen.

If nothing else, you can just set the theme of your dialog to @style/Theme
which will make it look and behave the same as a full-screen activity. ;)

Be sure that you are setting this on the *window* not on the content view.
 A WRAP_CHILD in a parent will cause its children to wrap as well; by
default a dialog as WRAP_CHILD for the width and height of the entire
window.  You change this with Dialog.getWindow().setLayout().

On Thu, Dec 23, 2010 at 6:17 PM, Zsolt Vasvari  wrote:

> Hi Dianne,
>
> I have never been able to successfully make MATCH_PARENT work.  It
> seems to work for making the width (but not the height) of a floating
> Activity match the screen size, but I was never able to do the same
> for an AlertDialog.
>
> Here's an AlertDialog from my app using MATCH_PARENT for the
> AlertDialog's content view.  No views inside have a specific size set:
> http://picasaweb.google.com/zvasvari/ScreenWidth#5554064956779202578
>
> As you can see, it's way too narrow for the screen and, of course,
> it's even worse in landscape mode.
>
> Now here's the same dialog if I give it a minWidth of 300dp, nicely
> filling the screen.  This is on a Nexus One (480x800):
> http://picasaweb.google.com/zvasvari/ScreenWidth#5554064961041980722
>
> I've tried many-a-times in vain to make an AlertDialog expend to the
> screen size, but so far, I've been unsuccessful without giving it a
> minWidth.
>
> Zsolt
>
>
>
>
>
>
>
>
> On Dec 23, 3:44 pm, Dianne Hackborn  wrote:
> > This is 500dp in the tall dimension?  The two screens have different
> aspect
> > ratios, so the tall/wide dimensions are different.  The scaling factor
> > between mdpi (160) and hdpi (240) is 1.5.  800 / 1.5 == 533.  480 * 1.5
> ==
> > 720.
> >
> > (And of course those aren't the only aspect ratios.  QVGA is even shorter
> > (that is why it is a small screen), while some devices like droid are
> taller
> > at 480 x 852.)
> >
> > If you want to fill the screen, the easiest way to do this is to just
> make
> > your window's layout in that dimension be MATCH_PARENT.  If you aren't
> using
> > MATCH_PARENT, your layout should be computing the size it needs based on
> its
> > content and using that, not trying to impose numbers to match the screen.
> >
> > (There is another level of complexity here when moving to significantly
> > larger screens.  The phone screens are relatively simple, in that just
> > allowing the dialog fill the available width if it could at all use it
> ends
> > up working well.  On an xlarge screen, though, that looks ridiculous.
> >  Honeycomb should have some help for this problem...)
> >
> >
> >
> >
> >
> > On Wed, Dec 22, 2010 at 11:33 PM, Zsolt Vasvari 
> wrote:
> > > Thanks, Dianne.  I am now just retrieving an int from 0 - 100 and
> > > divide it by 100 and set it as the weight.  It works fine, but it's
> > > just extra code and I am lazy person, which is why I asked. :)
> >
> > > On a related question:
> >
> > > I am defining the width of my pop-up window as 500dp, this fits nicely
> > > into my HDPI screen on my Nexus One (480x800), but the same 500dp on
> > > an MDPI device (320x480) is wider than the screen and I need to set
> > > the width to 460dp.  I would have thought using DIP as the unit of
> > > measure would deal with this.
> >
> > > Thanks,
> > > Tom
> >
> > > On Dec 23, 9:41 am, Dianne Hackborn  wrote:
> > > > Oh also you can just do a percentage dimension ("50%") and retrieve
> it
> > > with
> > > > a base value of 1 or 100 as desired.
> >
> > > > On Wed, Dec 22, 2010 at 5:40 PM, Dianne Hackborn <
> hack...@android.com
> > > >wrote:
> >
> > > > > You can use them as attributes, but unfortunately right now there
> is no
> > > way
> > > > > to get them as direct resources.
> >
> > > > > Well you can probably do it by being tricky -- use  to define
> a
> > > raw
> > > > > resource, and Resources.getValue() to retrieve its value.
> >
> > > > > (One reason why this doesn't exist is if it made entries in R. for
> > > float
> > > > > values it would create code that can't compile since "float" is a
> > > keyboard.
> > > > > :p  I solved that with ints by calling them integers, and booleans
> by
> > > > > calling them bools, but we never really needed floats so I never
> tried
> > > to
> > > > > come up with something to call them.)
> >
> > > > > On Wed, Dec 22, 2010 at 5:04 PM, Zsolt Vasvari  >
> > > wrote:
> >
> > > > >> Am I missing something or there is no mechanism to define a float
> > > > >> value as a resource?
> >
> > > > >> I am trying to have a locale dependent weight added to some of my
> > > > >> buttons.  Right now, as a workaround, I am defining the weight as
> an
> > > > >> Integer and then divide and manualy set it.  But why would there
> be
> > > > >> such a seemingly arbitrary decision made as not to allow floats
> but
> > > > >> allow ints?
> >
> > > > >> --
> > > > >> You received this message because you are subscribed to the G

[android-developers] Re: Cannot define a float as a resource?

2010-12-23 Thread Zsolt Vasvari
Hi Dianne,

I have never been able to successfully make MATCH_PARENT work.  It
seems to work for making the width (but not the height) of a floating
Activity match the screen size, but I was never able to do the same
for an AlertDialog.

Here's an AlertDialog from my app using MATCH_PARENT for the
AlertDialog's content view.  No views inside have a specific size set:
http://picasaweb.google.com/zvasvari/ScreenWidth#5554064956779202578

As you can see, it's way too narrow for the screen and, of course,
it's even worse in landscape mode.

Now here's the same dialog if I give it a minWidth of 300dp, nicely
filling the screen.  This is on a Nexus One (480x800):
http://picasaweb.google.com/zvasvari/ScreenWidth#5554064961041980722

I've tried many-a-times in vain to make an AlertDialog expend to the
screen size, but so far, I've been unsuccessful without giving it a
minWidth.

Zsolt








On Dec 23, 3:44 pm, Dianne Hackborn  wrote:
> This is 500dp in the tall dimension?  The two screens have different aspect
> ratios, so the tall/wide dimensions are different.  The scaling factor
> between mdpi (160) and hdpi (240) is 1.5.  800 / 1.5 == 533.  480 * 1.5 ==
> 720.
>
> (And of course those aren't the only aspect ratios.  QVGA is even shorter
> (that is why it is a small screen), while some devices like droid are taller
> at 480 x 852.)
>
> If you want to fill the screen, the easiest way to do this is to just make
> your window's layout in that dimension be MATCH_PARENT.  If you aren't using
> MATCH_PARENT, your layout should be computing the size it needs based on its
> content and using that, not trying to impose numbers to match the screen.
>
> (There is another level of complexity here when moving to significantly
> larger screens.  The phone screens are relatively simple, in that just
> allowing the dialog fill the available width if it could at all use it ends
> up working well.  On an xlarge screen, though, that looks ridiculous.
>  Honeycomb should have some help for this problem...)
>
>
>
>
>
> On Wed, Dec 22, 2010 at 11:33 PM, Zsolt Vasvari  wrote:
> > Thanks, Dianne.  I am now just retrieving an int from 0 - 100 and
> > divide it by 100 and set it as the weight.  It works fine, but it's
> > just extra code and I am lazy person, which is why I asked. :)
>
> > On a related question:
>
> > I am defining the width of my pop-up window as 500dp, this fits nicely
> > into my HDPI screen on my Nexus One (480x800), but the same 500dp on
> > an MDPI device (320x480) is wider than the screen and I need to set
> > the width to 460dp.  I would have thought using DIP as the unit of
> > measure would deal with this.
>
> > Thanks,
> > Tom
>
> > On Dec 23, 9:41 am, Dianne Hackborn  wrote:
> > > Oh also you can just do a percentage dimension ("50%") and retrieve it
> > with
> > > a base value of 1 or 100 as desired.
>
> > > On Wed, Dec 22, 2010 at 5:40 PM, Dianne Hackborn  > >wrote:
>
> > > > You can use them as attributes, but unfortunately right now there is no
> > way
> > > > to get them as direct resources.
>
> > > > Well you can probably do it by being tricky -- use  to define a
> > raw
> > > > resource, and Resources.getValue() to retrieve its value.
>
> > > > (One reason why this doesn't exist is if it made entries in R. for
> > float
> > > > values it would create code that can't compile since "float" is a
> > keyboard.
> > > > :p  I solved that with ints by calling them integers, and booleans by
> > > > calling them bools, but we never really needed floats so I never tried
> > to
> > > > come up with something to call them.)
>
> > > > On Wed, Dec 22, 2010 at 5:04 PM, Zsolt Vasvari 
> > wrote:
>
> > > >> Am I missing something or there is no mechanism to define a float
> > > >> value as a resource?
>
> > > >> I am trying to have a locale dependent weight added to some of my
> > > >> buttons.  Right now, as a workaround, I am defining the weight as an
> > > >> Integer and then divide and manualy set it.  But why would there be
> > > >> such a seemingly arbitrary decision made as not to allow floats but
> > > >> allow ints?
>
> > > >> --
> > > >> You received this message because you are subscribed to the Google
> > > >> Groups "Android Developers" group.
> > > >> To post to this group, send email to
> > android-developers@googlegroups.com
> > > >> To unsubscribe from this group, send email to
> > > >> android-developers+unsubscr...@googlegroups.com
> > 
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > Dianne Hackborn
> > > > Android framework engineer
> > > > hack...@android.com
>
> > > > Note: please don't send private questions to me, as I don't have time
> > to
> > > > provide private support, and so won't reply to such e-mails.  All such
> > > > questions should be posted on public forums, where I and others can see
> > and
> > > > answer them.
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@andro

[android-developers] Re: problem with andrioid Tablet

2010-12-23 Thread metal mikey
P.I.C.N.I.C?

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


[android-developers] Re: Google Nexus S - Please provide as DEV phone, asap :-)

2010-12-23 Thread metal mikey
On Dec 8, 2:17 pm, Dianne Hackborn  wrote:
> You will be able to walk into Best Buy and buy one as soon as it comes out.

Google's Online Phone Store was GOOD! Bring it back, give it more
time, don't worry about useless journalists hanging shit on it (e.g.
saying its a flop)...it was REALLY, REALLY GOOD! Oh, and
mor countries (especially Australia)!

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

2010-12-23 Thread Utumno
Hello Android gurus,

My app only works in phones with screen resolution >= 320x480. More
precisely: it knows how to render itself correctly on any resolution
where the longer side is>=480 and the shorter side is >=320, no system
prescaling is needed, but anything less than 320x480 is simply too
small to cram my UI in.

What exactly do I put in my manifest to rule out phones with lower
resolutions?

Now, according to Table 1. from 
http://developer.android.com/guide/practices/screens_support.html,
I could rule out the 240x320 resolution with

anyDensity=true
smallScreens=false
normalScreens=true
largeScreens=true
xlargeScreens=true

but that is not going to rule out the '240x400' and '240x432'
resolutions which apparently are considered 'normal screens' . That
sucks!

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

2010-12-23 Thread Paul
Thanks Diane, yes I am using a 'slop' threshold for movement as it is
basically impossible to 'not move'.  In terms of comparing the
previous location for each pointer, is looping through the passed
MotionEvent and comparing each pointer location with a previously
stored event (stored in some private field) the 'way' to do this?
Just getting my head around all the ins and outs of handling multi-
touch, and want to ensure I am tackling these things in the best way
(have to essentially store my own location history data due to the
fact that HistoricalX, Y data is related to some previous MotionEvent
rather than the previous location data for a pointer in the current
event, correct?)

Paul

On Dec 23, 7:19 pm, Dianne Hackborn  wrote:
> Generally all pointers move some bit, though maybe small, for each event.
>  The touch screen is a continuous analog input device; there isn't much
> concept of "not changing."  You should just compare the last position vs.
> new position for each pointer against whatever threshold you want to decide
> if it is moving.
>
>
>
> On Thu, Dec 23, 2010 at 3:12 PM, Paul  wrote:
> > Hi all.  I am processing multi-touch MotionEvents and have a need to
> > only process MOVING pointers when an ACTION_MOVE is detected (rather
> > than all pointers).  Currently, I have a loop that goes through each
> > pointer in my ACTION_MOVE case statement and sends it off for
> > processing, but it would be great to just process the pointer(s) that
> > triggered the ACTION_MOVE).
>
> > One solution would be to store the location for each pointer on each
> > ACTION_MOVE, and when a subsequent ACTION_MOVE is triggered, loop
> > through each pointer, get it's position and determine if that has
> > changed at all from the previous movement.  It's a bit clunky, so I
> > wanted to ask here to see if there might be a simpler way to determine
> > which pointer(s) are moving and triggered the ACTION_MOVE in the first
> > place.
>
> > Thanks for any advice,
>
> > Paul
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Market in U.K. not up to date?

2010-12-23 Thread Doug Gordon
According to one of my users in the U.K. (I'm in the U.S.), my app is 
still showing a version that's at least two weeks old in the Android 
Market that he has access to. Is there any particular reason for this? 
It's causing some grief since he could really use the update. I'm also 
surprised that I haven't heard of this from any other users (or maybe 
they're just not aware that an update is available).


Doug Gordon

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 update particular widget instance in reaction to its inside button click

2010-12-23 Thread aleksej
Hello,

I have an application widget which include text and button views. I
create 2 instances of my widget on home screen. I'd like to differ
button clicks depending on particular widget instance it contains and
update appropriate text view only. How could I achieve this behavior?

My steps so far:

1. Created AppWidgetProvider
onUpdate(Context context, AppWidgetManager appWidgetManager, int[]
appWidgetIds) {
  for (int widgetId: appWidgetIds)
startUpdateService(widgetId, "initial text");
}
onReceive(Context ctx, Intent intent) {
  int widgetId =
intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1)
  if (DO_UPDATE_TEXTVIEW.equals(intent.getAction()))
 startUpdateService(widgetId, "refreshed text");
  }
  startUpdateService(int widgetId, String text) {
 Intent intent = new Intent(context, UpdateService.class);
 intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId);
 intent.putExtra(TEXT, text);
 context.startService(intent);
  }
2. Created IntentService
   public void onHandleIntent(Intent intent) {
 int widgetId =
intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
 String text = intent.getStrintExtra(TEXT);
 RemoteViews views = new RemoteViews(this.getPackageName(),
R.layout.widget);

 PendingIntent pIntent = PendingIntent.getBroadcast(this, 0, new
Intent(DO_UPDATE_TEXTVIEW), 0);
views.setOnClickPendingIntent(R.id.button, pIntent);
views.setTextViewText(R.id.text, text);
AppWidgetManager wdgManager = AppWidgetManager.getInstance(this);
wdgManager.updateAppWidget(widgetId, views);
 }

The problem is in onReceive() method, actually. widgetId, that I'm
getting from Intent is not correct (always the same value;) not
appropriate widget id, on which my button click really happen. 
Would appreciate any help. 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] AnimationListener.onAnimationRepeat never gets called

2010-12-23 Thread John Lussmyer
Since I finally have my simple animation repeating (by working around a bug
in Android), I get to run into the next problem.
AnimationListener.onAnimationRepeat() never gets called.
I use a button to start my animation, let it run a while, and press the
button again to stop it.
Since I want to do some things synchronized with the animation, I setup an
animation listener.
It doesn't work.  Here is the main code:

private Animation.AnimationListener mAnimationListener = new
Animation.AnimationListener() {

public void onAnimationStart(Animation animation) {
scnt++;
}

public void onAnimationRepeat(Animation animation) {
rcnt++;
}

public void onAnimationEnd(Animation animation) {
ecnt++;
}
};

private OnClickListener mClickButton = new OnClickListener() {
public void onClick(View v) {
Button button = (Button) findViewById(R.id.Button01);
if (running) { // Currently running, stop it
//button.setText(R.string.Button01);
testShape.clearAnimation();
button.setText("repeat " + scnt + "," + rcnt + "," + ecnt);
} else { // Currently stopped, start it
button.setText(R.string.BtnStop);
testShape.startAnimation(testAnimation);
}
running = !running;
return;
}
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button) findViewById(R.id.Button01);
button.setOnClickListener(mClickButton);
testShape = (TextView) findViewById(R.id.TextView02);
testAnimation = AnimationUtils.loadAnimation(this,
R.anim.bounceanim);
testAnimation.setAnimationListener(mAnimationListener);
testAnimation.setDuration(1000);
return;
}


When the app is run, and the button pressed:
the animation starts running.
I let it run for several cycles and press the button again.
The result is "repeat 1,0,1" - showing that the onAnimationRepeat() was
never called.

Is this a bug, or am I missing something?

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

Re: [android-developers] Bug reporting

2010-12-23 Thread John Lussmyer
Thanks.  All my searches just found more people asking if there was one,
with never an answer.

On Thu, Dec 23, 2010 at 5:04 PM, TreKing  wrote:

> On Thu, Dec 23, 2010 at 7:01 PM, John Lussmyer wrote:
>
>> Is there a way to report a bug with Android?  I can't seem to find one...
>
>
> http://code.google.com/p/android/issues/list
>

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

Re: [android-developers] Bug reporting

2010-12-23 Thread TreKing
On Thu, Dec 23, 2010 at 7:01 PM, John Lussmyer wrote:

> Is there a way to report a bug with Android?  I can't seem to find one...


http://code.google.com/p/android/issues/list

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

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

  1   2   >