[android-developers] Re: global application object or current activity...

2009-09-03 Thread Dianne Hackborn
There is nothing the framework provides -- there is no the global
application (you can have multiple applications running in one process), nor
concept of a current activity (especially when you mix tabs into the
picture).

Given that you know more about what is really going to happen (and not
happen) in your process, though, you can fairly easily make your own static
and set it as appropriate for retrieval by other code.

On Wed, Sep 2, 2009 at 9:38 PM, sdphil phil.pellouch...@gmail.com wrote:


 i've asked this before, and wonderful dianne has answered, but i'm not
 satisfied with the answer :) -- dang he's stubborn!

 i want to know within a method / code, is there a way to get at the
 global application object or current activity without having an
 activity / context / whatever first.

 for example:

 public static Object getApp() {
// insert code here to get a handle to an android.app.Application
 object.
 }

 it just seems there *has* to be a way...

 tia.
 



-- 
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: ListView and onItemSelected

2009-09-03 Thread chrisoz

Thanks danny,

what I am trying to achieve here is to change the background color of
the selected list item (list items have a white background colour).
Like you I am able to call onItemClick (or rather, onListItemClick),
but not onItemSelected. Now, it is not possible to see which list item
is selected.

Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread xeeku

One of my ADC2 submissions under Tools is called *Xeeku Search*. It's
an universal search portal for both context and location based
searches. The unique feature is that it presents search result in
native format. For example, photos are presented with a nice gallery
while locations are marked as map pins. It's really excels on the GUI
and streamlined interface which meat to rival iPhone's user experience
from the ground up.

As for iPhone, I was one of the people paid $600 for the first
generation and still using it. Among many things I liked, one thing
bug me to death is there is only one button and the back button is
all over the places from app to app. I believe the single button
design to be more gimmick than substance, which gave me the very
motivation and ideas of our current GUI design. It takes the full
advantages of Android's physical buttons.

I know it's a tall order (rival iPhone's user experience) but check it
out and see yourself.

It's on Android Market now and it's free.


On Sep 1, 7:41 am, Lout lout.r...@googlemail.com wrote:
 While you developers relax... would you mind sharing what apps to
 expect through this challenge.. and anything else you wish to share
 about ADC2 submissions... well anything including the fact: 'thank
 God, no more sleep less nights'!

 Am collecting information about the challenge (ADC2) for a news
 article as am with cnet (and AP). Pitch your app if you have already
 published or would soon publish on the market too.

 Your app name and description, web link if any, experience with
 ADC2, ... anything would be useful for our article(s).

 And do you feel that there would have been more submissions than in
 ADC1?
 Is the competition going to be tougher or less profound as you were
 allowed to put up apps not published before 1st Aug only?

 Do you think that all apps that didn't try for ADC1 should have had a
 chance?

 Congratulations on your submissions while you wait for the next
 phase.
 Thanks,
 Lout Reilly
 ps: Moderators we request you to let this through so that you too get
 some feedback.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Inserting large volumes of data into SQLite - speed issues

2009-09-03 Thread skink



On Sep 3, 2:03 am, mjc147 westmead...@yahoo.co.uk wrote:
 @skink - the gzip compression would only be useful for when
 downloading the data, wouldn't it? After installation/first-time-
 initialisation, wouldn't all the data be best stored uncompressed?

well, if both key-value fields need to be searchable as you said, you
are right: compression here is not a good option

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



[android-developers] Re: how to post something thing on Facebook profile?

2009-09-03 Thread Y2U

actually i was looking for some sample code if some one on android has
done it. facebook connect is the api for android to connect to
facebook. but this official api does not provide the functionality to
post onto the profile yet. so i was interested in some code using REST
API of facebook.


On Sep 2, 11:49 pm, Chris Stratton cs07...@gmail.com wrote:
 I think that's really a facebook API or facebook application
 development question not an android one, for which you want to consult
 facebook's application developer, API, etc documentation.

 In other words:

 1) figure out the generic algorithm for interacting with facebook's
 servers on behalf of one of its users to accomplish your goal

 2) Implement that using programming methods consistent with The
 Android Way

 On Sep 2, 1:02 am, Y2U usman@gmail.com wrote:

  Hi guys,

  Im developing an application related to daily horoscopes. I have to
  add a functionality that allows user to post his/her horoscope on his/
  her facebook profile. as far as i know we have to get some permissions
  from the user to post things to their profiles. but i dont know how to
  do that from android.

  any help would be highly appreciated.

  thanks in advance.

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



[android-developers] Problem in getting Lattitude and Longitude

2009-09-03 Thread ragavendran s
if i run the code to get latitude and longitude in android 1.5 version i wil
get the output clearly...
but at the same time if i run the same cod e in google Api 1.5  it doesnt
displays anthng...

i htnk problem in getting latitude and longitude in DDMS..
Can any one tell me pls..

With Regards,
Raghav.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] can webkit to handle page redirect problem

2009-09-03 Thread tstanly

hi all,


I use webkit to implement a small-scale web browser,
but some page have redirect problem,
for example,
use webkit link to http://xxx..com will redirect to http://oo.ooo.oo.com
so whe webkit will load twice,


is there possiable 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] Re: Circular Gallery

2009-09-03 Thread tstanly

hi Jasmine,

can you share how to do slide shows effect on gallery?
circulr showing just like you say,

because I'm find for this topic...

thanks
On 9月3日, 上午11時57分, Jasmine techi.j...@gmail.com wrote:
 Hello Everyone,

 I have just now started working on Android,,,
 Can anyone tell me how to make gallery widget circular?

 And my app takes over 70% of CPU usage can anyone suggest something.
 My application just displays images, slide shows a bit of music etc...
 thats all.
 Its gives highest CPU usage on a Activity Launch!! And says My app is
 not responding with Force Close and Wait.

 -
 Thanks in advance.

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

2009-09-03 Thread OiuNt

Hi everyone,
in my application, i want merge serveral images dynamically
accroding to the user's selection, and the merged image will be
scrolled and zoomed.
i extends View to OverlayImageView, which has the properties
background Bitmap, layers Bitmap and Matrix. in the onDraw event, i
draw the background Bitmap and layers bitmap sequently by the method
canvas.canvas.drawBitmap(image, imgMatrix, null).
however, if all the bitmaps are stored in memery, it leads to the
Out Of Memory problem. so, i have to read the image in the onDraw
event by the method BitmapFactory.decodeResource, but it's slow to
response user's operation, for example, the scroll and zoom the image
will leads to the onDraw event.
so, does anyone have some good idears ? thanks!!


OiuNt


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

2009-09-03 Thread Kerr

Dear All,
I tested the VPN function involved in Domut for several days, but
iseemed not to work. Could the android officer tell us if the VPN
could work correctly, or special setting should be made.

My test envirentment is as folllowing.
Host PC: Unbuntu 8.xx
VMWare: run Window Server 2003, Window XP
Android Emulator: run on Host PC,
The VPN protocal I used : PPTP

After all setting, I could connected to the VPN(on server2003) from
windows XP, but couldn't connect from emulator.

On the emulator VPN settting, I used
1, Add PPTP VPN.
2, Server: use direct ip address, for example 192.168.50.131
3, DNS: left none
4, I tried to modify the system/ect/hosts, and add xxx.com to
192.168.50.131, and in the VPN Server editbox, use xxx.com, it didn't
work also.

When I opened the Eclipse Logcat, I see the error as following:

INFO/mtpd(757): Creating PPPoX socket
INFO/mtpd(757): Socket() Address family not supported by protocol
###note this

It seems that PPPoX socket is not compatible with VPN server protocal,
is that true?
So, How could work with VPN correctly?

Regards!

Kerr






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



[android-developers] Re: How to merge images?

2009-09-03 Thread OiuNt

so my solution is to merge the images into one image at the beginning
and store this image in the memory. when the onDraw is called, the
canvas can only draw this merged image.

however, i can't find out how to merge images.



On Sep 3, 3:00 pm, OiuNt xoi...@gmail.com wrote:
 Hi everyone,
     in my application, i want merge serveral images dynamically
 accroding to the user's selection, and the merged image will be
 scrolled and zoomed.
     i extends View to OverlayImageView, which has the properties
 background Bitmap, layers Bitmap and Matrix. in the onDraw event, i
 draw the background Bitmap and layers bitmap sequently by the method
 canvas.canvas.drawBitmap(image, imgMatrix, null).
     however, if all the bitmaps are stored in memery, it leads to the
 Out Of Memory problem. so, i have to read the image in the onDraw
 event by the method BitmapFactory.decodeResource, but it's slow to
 response user's operation, for example, the scroll and zoom the image
 will leads to the onDraw event.
     so, does anyone have some good idears ? thanks!!

     OiuNt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread Dmitry.Skiba

Hi!

My submissions are:
* Taps Of Fire game http://code.google.com/p/tapsoffire (filled under
Entertainment)
* Skiba PDF Reader http://www.anddev.org/skiba_pdf_reader-t6122.html
(Productivity/Tools)


Dmitry

On 2 сен, 18:27, Chris Hager metaka...@gmail.com wrote:
 I gave it a shot with MyMarket [1][2], a customizable overlay for the
 Android market, where users can bookmark, recommend, remove and filter
 as well as preview apps and games.

 I was thinking about the ADC2 since spring, waiting for a good enough
 idea to come up (and if at all). Four weeks ago my flatmate and I were
 talking about the Android market, and how boring it usually is to
 browse the apps and games listings (mainly because the popularity
 listings doesn't change a lot, and the by date listings are spammed by
 low-quality apps). We figured it would be a real improvement if users
 could simply remove items they don't want to see in the list anymore.

 We started working on the project and released the first version on 8.
 of August, followed by a ton of user feedback and great ideas which we
 had never thought about in first place. The next weeks have been a
 constant cycle of iterations, considering each and every feedback we
 received (we don't know what's best -- our users do!). Because of all
 those supporters we were able to integrate many new and anticipated
 features such as recommendations, my downloads with updates, quick
 filtering, etc. and have fixed a wide range of bugs which were
 detected in the first weeks.

 The last days we worked towards version 1.0, which we got finished a
 day before the ADC2 submission deadline. We released it on the Android
 market again and asked many users which sent us feedback previously
 for a quick test. We were able to fix 2 important bugs, and by now we
 are quite confident that MyMarket works as expected. We never could
 have come this far without all the help from our users -- credits go
 to them for thinking of many of the implemented ideas in first place!

 The last hours before the deadline we luckily had enough time to add
 one more (great) feature: displaying the number of user-votes in the
 recommendations. As most developers at this point we have been quite
 tired (no sleepless nights though) and hope not to have introduced no
 new bugs :P. I think our project works quite well -- we haven't
 received any feedback about new problems since we pushed the same
 version to the normal Android market.

 The ADC2 really pushed us to try to deliver a high-quality
 application, which works with all oddities (eg. screen rotations on
 the G1, etc.). We also asked the designers at glyfx to enhance our 2d
 icon to a 3d version, according to the (not really trivial) Android
 Icon Design Guidelines (great company btw.).

 It was a fun thought knowing that hundreds (if not thousands) of other
 teams were simultaneously working on their ADC-projects during the
 last days. Good luck to all the teams which submitted an entry!

 - Chris

 PS: I'm seriously looking forward to an announcement of Google, and
 hope they publish a list of all submissions. I find it a bit sad that
 the google-dev blog is not mentioning that the deadline is over, nor
 that the ADC2 site was updated (still says submit your apps today).
 Google could easily generate a bit more emotions and buzz in the whole
 Android community.

 [1]http://mymarket.cc
 [2]http://www.4feets.com/2009/09/mymarket-v10-submitted-to-the-adc2
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] horizontal center a linear layout....

2009-09-03 Thread sdphil

i am trying to create some text like this:

+===+
||
|  Name: Fred |
||
+===+

and I want the combination of Name:  and Fred to be horizontally
centered.  The Fred TextView can change:

LinearLayout android:orientation=horizontal
  android:layout_width=fill_parent
  android:layout_height=wrap_content
  android:gravity=center_horizontal

LinearLayout android:orientation=horizontal
  android:layout_width=fill_parent
  android:layout_height=wrap_content

TextView android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:text=Name: 
  android:paddingRight=4px/

TextView android:id=@+id/Name
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:text=Fred/

/LinearLayout

/LinearLayout

But it doesn't center - what am I missing?

tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Log in to google account without browser?

2009-09-03 Thread Per Sandström

Hi,

Im currently trying to combine android and google apps engine for a
real neat application, not unlike http://3banana.com/. However I want
to enable the user to login to his google account without opening the
browser. I have made some attempts to just simulate the http-posts
done, but to no avail. Are there any nice way of doing this google
account login in android code?

For example, to make my own loginscreen, and then send user/pass to
the google apps server and get an aknowledgement if the login
information was correct.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Itemized overlay and Hellomapview

2009-09-03 Thread sweet

hello everybody !!!
I make the tutorial Hellomapview (http://developer.android.com/intl/fr/
guide/tutorials/views/hello-mapview.html) if anyone have made this
tuto i would like he explain to me the step 4 in the last part :

4. All that's left is for us to add this OverlayItem to our collection
in the HelloItemizedOverlay, and add this to the List of Overlay
objects retrieved from the MapView:

itemizedoverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedoverlay);

I've well add this OverlayItem to our collection in the
HelloItemizedOverlay but i don't understand how add this to the List
of Overlay objects retrieved from the MapView if someone can help me ?
(I share my code if you see an other mistake)

classe map java :

import java.util.List;

import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.LinearLayout;
import android.widget.ZoomControls;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;


public class Map extends MapActivity {
ListOverlay mapOverlays;
Drawable drawable;
NewItemizedOverlay itemizedOverlay;
LinearLayout linearLayout;
MapView mapView;
ZoomControls mZoom;


@Override
public void onCreate(Bundle savedInstanceState) {

GeoPoint point = new GeoPoint(1924,-9912);
OverlayItem overlayitem = new OverlayItem(point, , );
itemizedOverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedOverlay);
mapOverlays = mapView.getOverlays();
drawable = this.getResources().getDrawable
(R.drawable.androidmarker);
itemizedOverlay = new NewItemizedOverlay(drawable);

super.onCreate(savedInstanceState);
setContentView(R.layout.map);
linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setSatellite(true);
}
protected boolean isRouteDisplayed() {
return false;
}

class NewItemizedOverlay java:

import java.util.ArrayList;
import android.graphics.drawable.Drawable;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

@SuppressWarnings(unchecked)
public class NewItemizedOverlay extends ItemizedOverlay {

private ArrayListOverlayItem mOverlays = new ArrayListOverlayItem
();

public NewItemizedOverlay(Drawable defaultMarker) {
super(boundCenterBottom(defaultMarker));
// TODO Auto-generated constructor stub
}
public void addOverlay(OverlayItem overlay) {
mOverlays.add(overlay);
populate();
}

@Override
protected OverlayItem createItem(int i) {
  return mOverlays.get(i);
}


@Override
public int size() {
return mOverlays.size();
}

}

xml fil of map:

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
com.google.android.maps.MapView
android:id=@+id/mapview
android:layout_width=fill_parent
android:layout_height=fill_parent
android:clickable=true
android:apiKey=0GWRUwsy0_POHxdWofVfhZeFLwtgkcn7ouMfwcg/
LinearLayout
android:id=@+id/zoomview
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignBottom=@id/mapview
android:layout_centerHorizontal=true/
/LinearLayout


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

2009-09-03 Thread sweet
 have you try with relative layouts ?

On 3 sep, 09:21, sdphil phil.pellouch...@gmail.com wrote:
 i am trying to create some text like this:

 +===+
 |                                                |
 |              Name: Fred                 |
 |                                                |
 +===+

 and I want the combination of Name:  and Fred to be horizontally
 centered.  The Fred TextView can change:

         LinearLayout android:orientation=horizontal
                       android:layout_width=fill_parent
                       android:layout_height=wrap_content
                       android:gravity=center_horizontal

                 LinearLayout android:orientation=horizontal
                               android:layout_width=fill_parent
                               android:layout_height=wrap_content

                         TextView android:layout_width=wrap_content
                                   android:layout_height=wrap_content
                                   android:text=Name: 
                                   android:paddingRight=4px/

                         TextView android:id=@+id/Name
                                   android:layout_width=wrap_content
                                   android:layout_height=wrap_content
                                   android:text=Fred/

                 /LinearLayout

         /LinearLayout

 But it doesn't center - what am I missing?

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

2009-09-03 Thread Keean Schupke

The inner LinearLayout has its width set to fill_parent so you are
trying to center something that is full width.
Try:

LinearLayout android:orientation=horizontal
  android:layout_width=fill_parent
  android:layout_height=wrap_content
  android:gravity=center_horizontal
LinearLayout android:orientation=horizontal
  android:layout_width=wrap_content
  android:layout_height=wrap_content
TextView android:layout_width=wrap_content
 
android:layout_height=wrap_content
  android:text=Name: 
  android:paddingRight=4px/
TextView android:id=@+id/Name
  android:layout_width=wrap_content
 
android:layout_height=wrap_content
  android:text=Fred/
/LinearLayout
/LinearLayout

Keean.

On Sep 3, 8:21 am, sdphil phil.pellouch...@gmail.com wrote:
 i am trying to create some text like this:

 +===+
 |                                                |
 |              Name: Fred                 |
 |                                                |
 +===+

 and I want the combination of Name:  and Fred to be horizontally
 centered.  The Fred TextView can change:

         LinearLayout android:orientation=horizontal
                       android:layout_width=fill_parent
                       android:layout_height=wrap_content
                       android:gravity=center_horizontal

                 LinearLayout android:orientation=horizontal
                               android:layout_width=fill_parent
                               android:layout_height=wrap_content

                         TextView android:layout_width=wrap_content
                                   android:layout_height=wrap_content
                                   android:text=Name: 
                                   android:paddingRight=4px/

                         TextView android:id=@+id/Name
                                   android:layout_width=wrap_content
                                   android:layout_height=wrap_content
                                   android:text=Fred/

                 /LinearLayout

         /LinearLayout

 But it doesn't center - what am I missing?

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

2009-09-03 Thread Ne0

Dianne,

If there is a more appropriate way of doing this please advise.

My activity, starts, stops and binds to a service. When the activity
is focused, it receives text from the service it is bound to. When
ever the user navigates away from the activity all the currently
received text is saved in onSaveInstanceState() so it can be displayed
once again when focus returns. Though if the back button is used, it
does not get called ( is this correct? ). The user must never be able
to stop activity running without selecting stop from the activity
menu, which in turn stops the service and calls finish().

Liam

On Sep 2, 5:53 pm, Dianne Hackborn hack...@android.com wrote:
 On Wed, Sep 2, 2009 at 2:19 AM, Ne0 liamjamesalf...@googlemail.com wrote:
  Yes that is what i want to achieve and i know it is acting in a non-
  standard way. Please correct me if you think i am going about this in
  the wrong way, but my understanding is that using the back button
  destroys the focused activity and hence does not hit
  onSaveInstanceState(...). The users of this application will be
  expecting it to return to its saved instance state the next time they
  start the activity, unless they use the apps menu to stop the app
  running.

 No they won't expect this, because that is not how android works.  And there
 is certainly not an apps menu menu for them to stop apps.

 Please don't try to make your application behave in a way you think it
 should from some other environment.  It should behave consistently with the
 android UI model, wherever appropriate.

 --
 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: SoundPool bug

2009-09-03 Thread Illidane

Thanks for help, but it didn't help. From run-to-run I can hear two
sounds or only one ( sometimes no sounds ). I think that they don't
load correctly and than don't play.

On 3 Вер, 07:05, Dmitry.Skiba dmitry.sk...@gmail.com wrote:
 Hm. I think that getStreamVolume() and values expected by play() are
 unrelated. getStreamVolume() returns integer value in range
 [0,getMaxStreamVolume], while SoundPool.play expects float value in
 range [0,1). You should try passing 0.99f to play(), so the resulting
 volume of sound will be 0.99f*AudioManager.getStreamVolume().

 A note about 0.99f - my last experience with SoundPool was that it
 doesn't like 1.0s, it just mutes on that volume, while on 0.99f it
 plays loud.

 Dmitry

 On 3 сен, 01:18, Illidane illid...@gmail.com wrote:



  Hi all!
  Here is my code:
      public static final int SOUND_CLICK = 1;
      public static final int SOUND_DEATH = 2;
      public static SoundPool soundPool;
      public static HashMapInteger, Integer soundPoolMap;
      ...
      soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100);
      soundPoolMap = new HashMapInteger, Integer();
      soundPoolMap.put(SOUND_CLICK, soundPool.load(Context, R.raw.click,
  1));
      soundPoolMap.put(SOUND_DEATH, soundPool.load(Context, R.raw.death,
  1));
      ...
      public static void playSound(int sound)
      {
          AudioManager mgr = (AudioManager)Context.getSystemService
  (Context.AUDIO_SERVICE);
          int streamVolume = mgr.getStreamVolume
  (AudioManager.STREAM_MUSIC);
          soundPool.play(soundPoolMap.get(sound), streamVolume,
  streamVolume, 1, 0, 1f);
      }

  After loading this sounds I'm waiting few seconds and than start
  playing them. Usually all is fine, but sometimes one of this sounds
  ( even both ) just disappear.
  What's the problem with it?
  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 the views are refreshed with new language selection?

2009-09-03 Thread GPU

Hi ,

   How the view are getting refreshed when user change the language?

How to get the language changed event from application?Any receiver is
available






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



[android-developers] Re: listview search

2009-09-03 Thread manigault

Thanks for the reply. How can i implement the search scrollbar that
shows the first letter of the item in the listview.

On Sep 2, 9:57 pm, Dianne Hackborn hack...@android.com wrote:
 Contacts has three ways to search:

 - By jumping through letters with the thumb.
 - By typing lettings on the keyboard to filter.
 - By pressing the search key to invoke the search UI and show the filter
 results there.

 These are all standard parts of the platform, and ideally would be
 implemented by any list view with a significant amount of data.





 On Wed, Sep 2, 2009 at 1:55 AM, sweet brou...@gmail.com wrote:

  I don't think that contact listview is better because it's juste a
  search about one letter but i know tuto of autocomplet search. Check
  that it may interess you
  (and if you want i can see your code)

  the tuto:

 http://android-france.fr/2009/04/15/developpez-une-application-pour-a...

  On 2 sep, 10:24, manigault manig...@gmail.com wrote:
   I have a listview with cursor adapter and i want to be able to search
   in the list view. I implemented my own search : i implement
   TextWatcher interface and when the text is changed i make a new query
   to the db to obtain a new cursor and than refresh the listview content
   it works but it is too slow and its not the android way :). There is
   also another way to implement Filtarable in the adapter for the
   listview on than setTextFilterEnabled(true) but i think the
   performance will be the same. So the question is what is the best way
   to implement search for a listview and can i use the default search
   ( in contacts listview for example with the scrollbar that shows the
   letter)
   Thanks in advance.

 --
 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: SoundPool bug

2009-09-03 Thread Illidane

Thanks, but it didn't help. From run-to-run I can hear two
sounds or only one ( sometimes no sounds ). I think that they don't
load correctly and than don't play.

On 3 Вер, 07:05, Dmitry.Skiba dmitry.sk...@gmail.com wrote:
 Hm. I think that getStreamVolume() and values expected by play() are
 unrelated. getStreamVolume() returns integer value in range
 [0,getMaxStreamVolume], while SoundPool.play expects float value in
 range [0,1). You should try passing 0.99f to play(), so the resulting
 volume of sound will be 0.99f*AudioManager.getStreamVolume().

 A note about 0.99f - my last experience with SoundPool was that it
 doesn't like 1.0s, it just mutes on that volume, while on 0.99f it
 plays loud.

 Dmitry

 On 3 сен, 01:18, Illidane illid...@gmail.com wrote:



  Hi all!
  Here is my code:
      public static final int SOUND_CLICK = 1;
      public static final int SOUND_DEATH = 2;
      public static SoundPool soundPool;
      public static HashMapInteger, Integer soundPoolMap;
      ...
      soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100);
      soundPoolMap = new HashMapInteger, Integer();
      soundPoolMap.put(SOUND_CLICK, soundPool.load(Context, R.raw.click,
  1));
      soundPoolMap.put(SOUND_DEATH, soundPool.load(Context, R.raw.death,
  1));
      ...
      public static void playSound(int sound)
      {
          AudioManager mgr = (AudioManager)Context.getSystemService
  (Context.AUDIO_SERVICE);
          int streamVolume = mgr.getStreamVolume
  (AudioManager.STREAM_MUSIC);
          soundPool.play(soundPoolMap.get(sound), streamVolume,
  streamVolume, 1, 0, 1f);
      }

  After loading this sounds I'm waiting few seconds and than start
  playing them. Usually all is fine, but sometimes one of this sounds
  ( even both ) just disappear.
  What's the problem with it?
  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: XML-RPC

2009-09-03 Thread Wouter

yes with these tools i can see the data packages.. but thats not the
solution to my problem i think?

I want to parse the data in java..

On 3 sep, 00:38, skink psk...@gmail.com wrote:
 On Sep 3, 12:15 am, Wouter wouterg...@gmail.com wrote:

  I don't know.  I use the android-xmlrpc client (http://code.google.com/
  p/android-xmlrpc/) and I only see the response like in few posts
  above..

  Is there another way to get the data?

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

2009-09-03 Thread Jean Baptiste Perriot

Too bad... :/

So how do you think flydroid did :
http://www.flydroid.com/fly/

Do you think they recode a full system like I tried ?

On 2 sep, 20:01, Dianne Hackborn hack...@android.com wrote:
 Sorry, there is currently no way to.

 Please be very careful about fiddling with the keyguard state -- it is
 incredibly easy to get this wrong and open significant security holes in the
 system.

 On Wed, Sep 2, 2009 at 9:26 AM, Jean Baptiste Perriot
 jb.perr...@gmail.comwrote:



  Hello,
   Is there any way to customize the keyguard with an application ?
   I'm trying to make a small app that enables me to add content to the
  keyguard and I'm looking for a way to make it with the framework.
  The only way I found is to disable the keyguard, using a receiver
  listening for a screen-off  and to show a custom view at the screen-on
  with another receiver... Therefore I have to recode all the default
  locking mechanism...
  Is there another way ?

  Regards

 --
 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: XML-RPC

2009-09-03 Thread skink



On Sep 3, 10:36 am, Wouter wouterg...@gmail.com wrote:
 yes with these tools i can see the data packages.. but thats not the
 solution to my problem i think?

 I want to parse the data in java..

 On 3 sep, 00:38, skink psk...@gmail.com wrote:



  On Sep 3, 12:15 am, Wouter wouterg...@gmail.com wrote:

   I don't know.  I use the android-xmlrpc client (http://code.google.com/
   p/android-xmlrpc/) and I only see the response like in few posts
   above..

   Is there another way to get the data?

  ethereal/wireshark



seeing raw data would help in deserialzation parsed response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Bad girls

2009-09-03 Thread Abeto Dorado

This is  an adult personals, adult dating and swingers community
offering
full uncensored sex personals, erotic videos, chat and much more.
Find the hottest local sex, swingers ads and f...

http://getiton.surfthisweb.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
-~--~~~~--~~--~--~---



[android-developers] drawing image in full screen on different device

2009-09-03 Thread Honest

Hello,

My application required to draw image on full screen.  now the phone
screen size will be different. So will i have to make different image
for each phone or i can use just one image and it can display on full
screen in any device.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to design a light and a full version of android app.

2009-09-03 Thread Anton Pirker

Hello Androids!


I have done a small app for the ADC2 and now i want to make a free light 
version for the Android market and one full version that will cost some 
cents.

My question now to all who have done something similar: How have you 
designed your application(s)?
I have thought about a few solutions to this problem:

1.) Duplicate the code in two different android projects
Not a very good idea, duplicate code is always bad.

2.) Create some sort of library to use in two different projects.
With this i could share the business logic of my app, but not the 
activities (at least this is what i think)
And using the activities from one project in another project would be great.

3.) Include all needed code (business logic, activities, ...) from one 
project (the full version) in my light version.
This way i would achieve some sort of new view to the code basis. This 
would be the best solution i think, but i do not know how to achieve this.

So to everybody who has done a full and light version of one and the 
same app: How have you done this?

In advance: Thanks for sharing!
Anton


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread TomTasche

I submitted SayMyName. It reads the name of the caller aloud, so you
don´t have to look at your phone´s display.

It´s very useful if you can´t see your phone at the moment, but want
to know who´s calling.
Also perfect for using your phone eyes-free (e.g. for blind people).

Website:
http://code.google.com/p/roadtoadc/

I think I will add a video later!


The official market-descrition:

--
Want to know who´s calling? This app will tell you!

The app reads the name saved in your adressbook and tells you who´s
calling


Please send me your ideas and feedback :)

**You will be prompted to install TTS**
--

The description of the ADC-Version (called SayMyName ADC) is
different, but i can´t see it because of the deadline ;)


I code on Android for 3 months and I like it very much :)
Hopefully there will be an ADC3 next year!

App-History:
The first versions (  2.0 ) were very rough and bad. I got a lot of
bad comments and votings for that. It was because of a bad number-
identification and no checking for installed TTS (Text-to-Speech-
Library is needed to use this app).


Unfortunately there is a bug. If another app uses TTS, SayMyName will
not work until the whole application gets restarted (reboot phone or
kill my app using a task-manager).

If my app is good enough to reach the second round, i will fix this
bug and add new features, like the option to use your own voice,
instead of the robo-voice.


I don´t think i win a price at ADC2, but i hope i get a lot of
feedback and new ideas.


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



[android-developers] Can I leave some info after my app is uninstalled?

2009-09-03 Thread 楊健

Hey everybody!
Is there any method to leave some info after my app is uninstalled?For
example:file,database,setting etc.

Best 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] Re: Google Android Challenge II bugix..!

2009-09-03 Thread sommeralex

Yeah, it would be difficult to enforce, BUT


1.
If the lock provider has no permission, but the network and gps
provider has, the application should run and just dismiss any
addTestProvider INSTEAD of crashing the WHOLE application.

2.
As riz said, updates should be allowed!

3.
This experience has also a good point for me and my team: we wont
invest our whole energy in google anymore. I will definitely now
target iPhone and NOKIA with more expectations as I had before.
Nothing is more frustrating as taking part in a challenge and being
ignored due to a dubious error, therefore an error which is in my
opinion disputatious.

4.
If the story of google is true, and they first went to YAHOO with
their idea, they should have learned also from this experience. YAHOO
didnt give GOOGLE a chance, so they had to stand on their own legs.
Which was good for them. And now, they do same with others: noone gets
a second chance. And I think this will be also good for our project
airwriting. Maybe, its destiny.





On 3 Sep., 05:05, Dan Sherman impact...@gmail.com wrote:
 Right, but that would be very difficult to enforce, as I'm sure a lot of
 other people would love to make bug fixes to their app over the next week
 :)

 - Dan



 On Wed, Sep 2, 2009 at 10:55 PM, riz rizcs...@gmail.com wrote:

  but there should be at least bug fixing or version upgrade option
  available because we are not changing the ORIGINAL IDEA SUBMITTED .

  On Sep 3, 7:39 am, Eric Wong (hdmp4.com) ericwon...@gmail.com
  wrote:
   Good luck getting google to help you on this.
   I don't think they would do anything to help you ;)

   Remember the no revision rule after deadline for ADC2?

   Eric

   On Sep 3, 12:55 am, sommeralex alexander.som...@gmail.com wrote:

google, please answer!!

On 2 Sep., 02:15, sommeralex alexander.som...@gmail.com wrote:

 Hello Google!

 I cant find a proper email to contact you, therefore, i write you
 here.. I have submitted an Application for the google android
 challenge but did a big mistake when I was re-send the application. I
 removed the Allow Android Mock Location Permission but forgot to
 remove the testProvider in my Application. Now, i just wanted to
  start
 my application again and was wondering why it didnt work.

 Because of an Permission Exception..

 I hope, that there is a way to still take part in this challenge.. I
 know, that there are rules and that it would be un-managable if every
 developer would come with bugs..

 hm..

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



[android-developers] Re: Log in to google account without browser?

2009-09-03 Thread Neil

On Sep 3, 8:23 am, Per Sandström pg.sandst...@gmail.com wrote:
 Hi,

 Im currently trying to combine android and google apps engine for a
 real neat application, not unlikehttp://3banana.com/. However I want
 to enable the user to login to his google account without opening the
 browser. I have made some attempts to just simulate the http-posts
 done, but to no avail. Are there any nice way of doing this google
 account login in android code?

 For example, to make my own loginscreen, and then send user/pass to
 the google apps server and get an aknowledgement if the login
 information was correct.

Take a look at http://code.google.com/apis/accounts/

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

2009-09-03 Thread Nigel

I'm creating a custom component.  The child components are not acting
as expected in regard to my custom components re-acting with its
siblings.

On investigations to solve this I came across View.addFocusables and
View.addTouchables.  These may help me, but I'm not really sure how
they're intended to be used.  Can anyone provide a better description,
or example, of how these are intended to be used?  A dig around on
Google revealed nothing :-(...

Any explanation - or links to pages I couldn't find - much
appreciated.

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



[android-developers] Re: How the views are refreshed with new language selection?

2009-09-03 Thread Mark Murphy

How the view are getting refreshed when user change the language?

I would guess that your activity is destroyed and recreated by default,
just like when the user changes screen orientation.

If that is not happening, Android might be calling
onConfigurationChange(), though that is only supposed to happen when you
have android:configChanges=locale in your manifest.

However, I have not experimented with this scenario, so my guesses may be
incorrect.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Tabs and intents

2009-09-03 Thread jouke

Nobody has this strange behaviour ??? I'll try to upgrade to the r3
sdk 1.5 ...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Any advantage to NOT posting ADC2 entry in marketplace now?

2009-09-03 Thread Ramani Arunachalam

I believe the judging app will provide an unbiased judging environment
by not displaying ratings/comments publicly for the ADC2 submissions
(otherwise, it's not fair). Whereas if you submit to Android Market,
all the feedback is open (which could include some negative comments
too). They may not even try your app for judging if they remember
seeing a low rating in the Market. This is what is holding me from
submitting it to the Market. Atleast, wait and see the judging app. If
it is no different from the Market app, then no big deal.

On Sep 3, 1:07 am, dadical keyes...@gmail.com wrote:
 Now that my submission to ADC2 is complete, I'm wondering if there is
 any advantage/disadvantage to holding off on posting to marketplace
 now.  Things that occur to me:

 1. If I post to market, and people download in the mass quantities
 that I expect them to :), will they be less inclined to spend time
 reviewing theappin the ADC2 context?

 2. What happens to people that download from marketplace and then also
 get the sameapp(with different name) from ADC2?  Myappinvolves a
 background service and notifications.  This could make thejudging
 difficult with notifications that are identical in appearance, but
 being generated from different versions of the sameapp.

 3. Will there be any TECHNICAL relationship between an ADC2 entry and
 a marketplace submission.  My understanding is that I would need to
 change namespace, so I'm guessing no -- they are effectively different
 applications at this point.

 4. Are marketplace results in any way included injudgingcriteria?
 My read of the rules says no, but just wanted to be crystal clear.

 Thoughts or opinions?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread RS

App: Aah - share your world.
Description: A dynamic panoramic view right on map. A streetview
substitute for places inaccessible by road or not shot by google.
(User generated content).
Site: www.tammiz.com (not ready yet)

Unfortunately we landed in an mess after integration as some of our
team members are in a different continent using just an emulator.
While the camera worked with emulator (+webcam), it fails on hardware :
(
Hope to submit a corrected version tested thoroughly on real hardware
through market. Hope all our efforts aren't thrown out.
We should probably not have waited for the submission site to show up
before integrating.
But we anyway had to add as many features as possible before
submission given the learning curve and short time since announcement
for fresh new ideas from starters.
Those who get a chance to review, please do consider the version on
the market... or update to it so that rest of the components work well
with our new library.

Thanks,
RS and team.

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

2009-09-03 Thread Muniraju

Hi,

I have three activities A, B and C.  A is the main activity launched
from MAIN LAUNCHER.

All the activities have 'android:finishOnTaskLaunch=true' in the
manifest file.

Now A lunches B, B launches C. My Application maintains some static
info at this stage, This is global for application and it is my
requirement. At this time user presses HOME key.  My app will be sent
to background, home screen will be displayed.

Now if the user LONG presses the HOME and launches my App, It will
returns to the activity 'C', the static info remains same.

If the user launches it from main menu, it will resume the main
activity A others would have been finished.  At this stage I need to
reset my static info. If the user presses BACK key I need not clear
this state. This time onResume of A is getting called, but not
onCreate. So, I am not able differentiate onResume of BACK Press
from B and that of launch from main menu.

Please help me to clear this state out during task re-launch in the
above case by identifying Main Menu launch from HOME.

Thanks,
With Regards,
Muniraju




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

2009-09-03 Thread Deepak

Can someone help me in finding this file.

SettingsTosActivity @@ com.google.android.googleapps

Please help me to find this file. I need this to see how this function
is implemented. Its bit urgent please help...

Thanks in advance


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



[android-developers] Re: How to add an icon in the List view?

2009-09-03 Thread Vishal.Android
Thanks Greg, that was very helpful.

On Sep 2, 8:54 pm, greg sep...@eduneer.com wrote:
 Have you reviewed List14 in the API demos?

 On Sep 2, 11:47 am, Vishal Gaonkar vishal.andr...@gmail.com wrote:

  I am trying to add an icon in the list view.
  Below is my code snippet and realted xml, without the icon(i.e. just
  list view).

  Code:
  final View addUser = factory.inflate(R.layout.addusers, null);
                                  mEditText = (EditText)addUser.findViewById
  (R.id.EditText_UserName);

                                  builder = new AlertDialog.Builder(this);
                                  builder.setView(addUser);
                                  
  builder.setTitle(R.string.dialog_addusers_title);
                                  builder.setIcon(R.drawable.adduser);
                                  
  builder.setPositiveButton(R.string.button_ok,
                                                  new 
  DialogInterface.OnClickListener() {
                                                  public void 
  onClick(DialogInterface dialog, int id) {
                                                          mStrings.add(0, 
  mEditText.getText().toString());
                                                          
  mEditText.setText();
                                                          
  lap.notifyDataSetChanged();

                                          }
                                  });
                                  
  builder.setNegativeButton(R.string.button_cancel,null);
                                  alertDialog = builder.create();
                                  dialog = alertDialog;

                                  myListView = 
  (ListView)findViewById(R.id.ListView_UserList);

                                  lap = new ArrayAdapterString(this, 
  R.layout.userlist, mStrings);

  Original userlist.xml

  ?xml version=1.0 encoding=utf-8?
  TextView xmlns:android=http://schemas.android.com/apk/res/android;
                                          android:layout_width=fill_parent
                                          android:layout_height=wrap_content
                                          android:layout_marginTop=7dp
                                          android:singleLine=true/

  Then I tried to add the image view widget to add my icon in each list.
  Modified userlist.xml

  ?xml version=1.0 encoding=utf-8?
  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
      android:orientation=horizontal
      android:layout_width=fill_parent
      android:layout_height=fill_parent

                  ImageView 
  xmlns:android=http://schemas.android.com/apk/res/
  android
                                          android:id=@+id/ImageView_UserIcon
                                          android:layout_width=48dp
                                          android:layout_height=48dp
                                          
  android:layout_alignParentLeft=true
                                          android:layout_marginRight=7dp
                                          android:layout_marginTop=7dp
                                          android:scaleType=fitXY
                                          android:src=@drawable/carol/
                  TextView    android:id=@+id/TextView_UserName
                                          android:layout_width=fill_parent
                                          android:layout_height=wrap_content
                                          android:layout_marginTop=7dp
                                          android:singleLine=true/

  /LinearLayout

  But I am not successful. It is crashing. Any suggestion on how to add
  icons in the list view?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Why I can not play the ringtone in the real device?

2009-09-03 Thread feeling3_4

Hi, all
  in the emulator 1.5, my app can get and play the contacts ringtone.
but after the app installed in the real G2, the app can not play the
contacts ringtone, and it does not throw any error. in the G2, I have
already the contacts ringtone.

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



[android-developers] Re: Why I can not play the ringtone in the real device?

2009-09-03 Thread Chris Stratton

On Sep 3, 9:02 am, feeling3_4 lanwen.ban...@gmail.com wrote:
 Hi, all
   in the emulator 1.5, my app can get and play the contacts ringtone.
 but after the app installed in the real G2, the app can not play the
 contacts ringtone, and it does not throw any error. in the G2, I have
 already the contacts ringtone.

   Does anybody encounter this before? thanks in advance!!

My guess would be a permissions issue, either in the android framework
sense or in the linux filesystem sense.

Instrument your code with log messages checking the validity of each
assumption that if untrue could make it fail.

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

2009-09-03 Thread ragavendran s
On Thu, Sep 3, 2009 at 1:06 PM, sweet brou...@gmail.com wrote:


 hello everybody !!!
 I make the tutorial Hellomapview (http://developer.android.com/intl/fr/
 guide/tutorials/views/hello-mapview.htmlhttp://developer.android.com/intl/fr/%0Aguide/tutorials/views/hello-mapview.html)
 if anyone have made this
 tuto i would like he explain to me the step 4 in the last part :

 4. All that's left is for us to add this OverlayItem to our collection
 in the HelloItemizedOverlay, and add this to the List of Overlay
 objects retrieved from the MapView:

 itemizedoverlay.addOverlay(overlayitem);
 mapOverlays.add(itemizedoverlay);

 I've well add this OverlayItem to our collection in the
 HelloItemizedOverlay but i don't understand how add this to the List
 of Overlay objects retrieved from the MapView if someone can help me ?
 (I share my code if you see an other mistake)

 classe map java :

 import java.util.List;

 import android.content.Intent;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.widget.LinearLayout;
 import android.widget.ZoomControls;

 import com.google.android.maps.GeoPoint;
 import com.google.android.maps.MapActivity;
 import com.google.android.maps.MapView;
 import com.google.android.maps.Overlay;
 import com.google.android.maps.OverlayItem;


 public class Map extends MapActivity {
ListOverlay mapOverlays;
Drawable drawable;
NewItemizedOverlay itemizedOverlay;
LinearLayout linearLayout;
MapView mapView;
ZoomControls mZoom;


@Override
public void onCreate(Bundle savedInstanceState) {

GeoPoint point = new GeoPoint(1924,-9912);
OverlayItem overlayitem = new OverlayItem(point, , );
itemizedOverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedOverlay);
mapOverlays = mapView.getOverlays();
drawable = this.getResources().getDrawable
 (R.drawable.androidmarker);
itemizedOverlay = new NewItemizedOverlay(drawable);

super.onCreate(savedInstanceState);
setContentView(R.layout.map);
linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setSatellite(true);
}
protected boolean isRouteDisplayed() {
return false;
}

 class NewItemizedOverlay java:

 import java.util.ArrayList;
 import android.graphics.drawable.Drawable;
 import com.google.android.maps.ItemizedOverlay;
 import com.google.android.maps.OverlayItem;

 @SuppressWarnings(unchecked)
 public class NewItemizedOverlay extends ItemizedOverlay {

private ArrayListOverlayItem mOverlays = new
 ArrayListOverlayItem
 ();

public NewItemizedOverlay(Drawable defaultMarker) {
super(boundCenterBottom(defaultMarker));
// TODO Auto-generated constructor stub
}
public void addOverlay(OverlayItem overlay) {
mOverlays.add(overlay);
populate();
}

@Override
protected OverlayItem createItem(int i) {
  return mOverlays.get(i);
}


@Override
public int size() {
return mOverlays.size();
}

 }

 xml fil of map:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
com.google.android.maps.MapView
android:id=@+id/mapview
android:layout_width=fill_parent
android:layout_height=fill_parent
android:clickable=true
android:apiKey=0GWRUwsy0_POHxdWofVfhZeFLwtgkcn7ouMfwcg/
LinearLayout
android:id=@+id/zoomview
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignBottom=@id/mapview
android:layout_centerHorizontal=true/
 /LinearLayout


 Thanks
 Sweet
 



Hello Sweet u try this code .it  worksi got this code from same u
defined in the url..but i changed for  my ownu look this code it will
help uand one more thing dont forget to add ur marker image in
res/drawable

All the Best

package samp.sam11;



import java.io.IOException;
import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;


import android.view.View;
import android.view.View.OnClickListener;

import android.app.AlertDialog;
import android.app.Dialog;
import android.graphics.drawable.Drawable;
import android.location.Address;
import 

[android-developers] Re: How to design a light and a full version of android app.

2009-09-03 Thread Chris Stratton

I would recommend one shared code base, and some means of compiling it
in two different versions.  This will be important because you only
want to fix bugs once...

Not sure if eclipse or ant can handle this (probably somehow) but
there's always resort to recursive cp, find, and sed...   The latter
may be particularly useful if you want to do a global rename so that
it's technically possible to have full and light versions installed on
the same phone without conflict (being able to upgrade from light to
full and preserve user data might point in the other direction, at
least if the market will let you have to different apps with the same
package names)

On Sep 3, 5:34 am, Anton Pirker an...@ignaz.at wrote:
 Hello Androids!

 I have done a small app for the ADC2 and now i want to make a free light
 version for the Android market and one full version that will cost some
 cents.

 My question now to all who have done something similar: How have you
 designed your application(s)?
 I have thought about a few solutions to this problem:

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



[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread Phred

I sadly only found out about the ADC2 about 1 week before it closed
and I had no Android Dev Phone nor did I have a shred of knowledge
about how to code Android other than knowing Java.

I come from PC/Windows Mobile and I have lots of experience there
especially with low-level optimzation of code in ARM assembler. I'm
also fluent with 3D math and algorithms.

That said I've now got my Android SDK and a G1.  Time to start
playing... this phone needs a serious 3D top-down shooter   :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can I leave some info after my app is uninstalled?

2009-09-03 Thread Chris Stratton

On Sep 3, 5:36 am, 楊健 y...@cycomtech.co.jp wrote:
 Hey everybody!
 Is there any method to leave some info after my app is uninstalled?For
 example:file,database,setting etc.

I would think something written to the sdcard with unrestrictive
permissions would stick around... you should probably make the file/
folder name obvious enough that the user can figure out who it
belonged to and remove it if they don't want it kept.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: files, local files, storage...

2009-09-03 Thread Chris Stratton

On Sep 2, 9:50 pm, Mark Murphy mmur...@commonsware.com wrote:
  so is that directory protected from other apps

 Yes. By default, all files there will be private to your application.

Assuming that there are no unanticipated programs running as root...
which historically is not a good assumption at all.

If it's on the device, someone who really wants to is going to be able
to read it.

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



[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread DKIT

I have submittet 4 apps for ADC 2. Hoping to get some publicity for my
small company (DKIT Android / dkdroid.com) - I do not think I will win
anything.

My apps were all ready during August, one of them were even finished
before August, but I waited until August 1st to release it in the
Market (Stick And Joy)

My apps are:
Name: Stick And Joy
Description: Take pictures with the camera, create actors/stick
figures, change their colors, poses and features, and send your
creation as MMS, Email attachment or to Picasa. Uploading to global
picasa album StickAndJoy.com is also available.
By: DKIT Android
Feedback: Integration with Google Picasa / Google Login was a little
tricky at first, but works wonderfully when you first understand the
concepts fully.

Name: Remote Controlled LED Sign
Description: Android screen emulates LED Sign. Change text/scroll
speed/color etc. by sending SMS to the phone.
By: DKIT Android
Feedback: Quick and simple application, evolution of my Led Scroller /
Led Scroller 2 apps. Garbage collection is an issue, there's a lot
going on in the background, so scrolling is not always smooth - but as
I have no control over garbage collection or background processes
(except keeping object creation at a minimum) scrolling will be jerky
sometimes.

Name: Splat!: Bugs II
Description: Casual game, where you can splat bugs with your finger.
Feedback: Evolution of the games Splat!: Bugs and Touch!: 4Kids. Same
goes here, garbage collection creates problems, especially problems
with large bitmaps that create out of memory errors/force closes.

Name: SMS Templates
Description: Small text editor for SMS/Email that expands keywords to
sentences/expressions. Example: /LOL - Laughing Out Loud
Feedback: I noticed too late that catching hardware keyboard keys is
not the same as catching software keyboard keys. Frustrating, as I
submitted the app before I noticed this fact. :-) Only thing I could
do was to change the description to reflect this fact. My own mistake,
so I blame noone. :-)

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

2009-09-03 Thread Wouter

Hmm how can i see the raw data with wireshark?

On 3 sep, 11:03, skink psk...@gmail.com wrote:
 On Sep 3, 10:36 am, Wouter wouterg...@gmail.com wrote:



  yes with these tools i can see the data packages.. but thats not the
  solution to my problem i think?

  I want to parse the data in java..

  On 3 sep, 00:38, skink psk...@gmail.com wrote:

   On Sep 3, 12:15 am, Wouter wouterg...@gmail.com wrote:

I don't know.  I use the android-xmlrpc client (http://code.google.com/
p/android-xmlrpc/) and I only see the response like in few posts
above..

Is there another way to get the data?

   ethereal/wireshark

 seeing raw data would help in deserialzation parsed response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread Mark L. Chang

On Sep 1, 10:41 am, Lout lout.r...@googlemail.com wrote:
 Your app name and description, web link if any, experience with
 ADC2, ... anything would be useful for our article(s).

TotTimer:
Help keep track of child-related things, such as feedings, diapers,
medication, wakings, etc. Perfect for newborns when really, you are
too blitzed to do anything.

http://tottimer.com/

ADC2 feedback:
The process was seamless and easy. I'd say a lot of the problems with
developing for the ADC are the same for regular Android/mobile
development: testing! Getting devices in the hands of people that can
give you valuable feedback is necessary for a successful product. Hard
to do when not everyone has an Android device, but maybe that will get
better soon! :)

I have no idea if there will be more or less participation than ADC1.
I do feel that the level of applications will be higher as people have
had time to play with the SDK and develop applications. Additionally,
there are professional dev firms out there submitting this time with
lots of Android experience. Should make it a little tougher for the
freelance and student developer.

Just my two cents.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Intercepting SQLite's file reads / writes, so we can encrypt the storage

2009-09-03 Thread Chris Stratton

I believe that sqlite is not a fundamentally a java application, but
one running in the embedded linux with some android java wrappers
around it.  As a result, inserting encryption into its file operations
would probably have to be handled with a linux kernel module (or at
best a userspace filesystem driver), which is not something you can do
on a retail phone as root permission is requried.

You might look and see how big sqlite acutally is... perhaps its small
enough that you could build your own custom version with encryption
and ship that with your application using your own jni or sockets
wrapper.

On Sep 2, 3:18 pm, JavaNut i...@chiralsoftware.net wrote:

 We have a need to encrypt the data stored within SQLite.  The obvious
 approach would be to encrypt individual records before storing them in
 the table, but that will melt down.  For example, if we want to search
 for a string...

 I know that SQLite stores all the data in a single flat file.  I
 assume that it accesses that file by MemoryMappedFile or something
 like that.  My idea is to create a sub-class of MemoryMappedFile that
 does block encryption / decryption on write / read.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread skink

App: Bookworm
Description: Bookworm is a general purpose dictionary program. It is a
good compromise between fast data lookup (sqlite database used) and
reasonable storage demands (books are stored in gzip compressed
chunks).
Apk: http://andappstore.com/AndroidApplications/apps/734

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



[android-developers] Re: XML-RPC

2009-09-03 Thread skink



On Sep 3, 3:38 pm, Wouter wouterg...@gmail.com wrote:
 Hmm how can i see the raw data with wireshark?


just post xml you got from a server

 On 3 sep, 11:03, skink psk...@gmail.com wrote:



  On Sep 3, 10:36 am, Wouter wouterg...@gmail.com wrote:

   yes with these tools i can see the data packages.. but thats not the
   solution to my problem i think?

   I want to parse the data in java..

   On 3 sep, 00:38, skink psk...@gmail.com wrote:

On Sep 3, 12:15 am, Wouter wouterg...@gmail.com wrote:

 I don't know.  I use the android-xmlrpc client 
 (http://code.google.com/
 p/android-xmlrpc/) and I only see the response like in few posts
 above..

 Is there another way to get the data?

ethereal/wireshark

  seeing raw data would help in deserialzation parsed response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Returning files through a Cursor

2009-09-03 Thread David Given

I would like my app to start an email app such as GMail with an attached 
file.

For various technical reasons we can't use a file: URL for this --- we 
have to pull the file out of our ContentProvider. So, I need some way to 
make a content: URL behave as if it were a file.

We've got it *nearly* working; I can see GMail call query() on my 
ContentProvider, followed shortly by GMail crashing because I'm not 
providing the right fields in the cursor.

The thing is --- what's GMail expecting to see? I can't find any 
documentation on this. I have found ContentProvider#getAssetFile(), 
which appears to be related, but it doesn't seem to being called. What I 
get is:

E/CursorWindow(  848): Bad request for field slot 0,1. numRows = 1, 
numColumns = 1

(What I'd really like to do is to be able to pass GMail some sort of 
high-level stream object so that I can generate data on the fly, but I 
suspect it's not possible.)

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown. --- Carl Sagan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread ernestw

Well not 3D but I did submit a 2D top-down shooter for ADC2.

Application: FRG
Category: Games - Arcade/Action
Description: Overhead 2D shooter similar to Ikari Warriors and Heavy
Barrel - use the trackball and touchscreen to find and destroy all
enemies.  4 playable robots, 6 weapons, 12 levels, and 10 different
kinds of enemies.  Achievements and 3 difficulty levels to keep the
game interesting and replayable.  Also includes a retro soundtrack
reminiscent of the 8-bit Nintendo days by Maniacs of Noise.
Website: http://www.woogames.com (will have more Friday)

App development thoughts:

Creating an action game, I of course had the requisite performance
worries - I've done OpenGL before but this is my first exposure to
OpenGL ES.  Laziness acquired from doing OpenGL on monstrous PCs
definitely got in the way of making FRG performant from the start.  I
also do miss GL_QUAD!  A more interesting problem was that FRG uses
the touchscreen to aim and fire weapons.  This sounds really cool in
theory but in reality your finger is blocking almost half the screen
at any given moment in the game - in a fast action game that could
mean not seeing enemies and their bullets until it's too late.  I
think I addressed it by including an accelerometer-based camera (field
of view extends in the direction of up on your phone) plus the
camera shifting in the direction you are shooting while your finger
touches the screen.

I also have done a lot of J2ME development - I have to say I enjoy
doing Android development much more - a modern API and sensible
permissions/signing mechanism are much appreciated!  Anybody who has
had to certify J2ME applications across multiple phones will know what
I'm talking about!

  Ernest Woo
  Woo Games

On Sep 3, 9:25 am, Phred phr...@gmail.com wrote:
 I sadly only found out about the ADC2 about 1 week before it closed
 and I had no Android Dev Phone nor did I have a shred of knowledge
 about how to code Android other than knowing Java.

 I come from PC/Windows Mobile and I have lots of experience there
 especially with low-level optimzation of code in ARM assembler. I'm
 also fluent with 3D math and algorithms.

 That said I've now got my Android SDK and a G1.  Time to start
 playing... this phone needs a serious 3D top-down shooter   :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread Streets Of Boston

Looks nice!
Two problems i noticed when quickly browsing your app:

Start it.
Type in 'pizza' and hit the search button.
The toast say Searching Search for null ... strange text.

Then search using flickr or picasa or twitter. All work quite well! :)

Then i did a local search:
I get a force close message and Xeeku is restarted. Not so good...


On Sep 3, 2:05 am, xeeku jzhang88...@gmail.com wrote:
 One of my ADC2 submissions under Tools is called *Xeeku Search*. It's
 an universal search portal for both context and location based
 searches. The unique feature is that it presents search result in
 native format. For example, photos are presented with a nice gallery
 while locations are marked as map pins. It's really excels on the GUI
 and streamlined interface which meat to rival iPhone's user experience
 from the ground up.

 As for iPhone, I was one of the people paid $600 for the first
 generation and still using it. Among many things I liked, one thing
 bug me to death is there is only one button and the back button is
 all over the places from app to app. I believe the single button
 design to be more gimmick than substance, which gave me the very
 motivation and ideas of our current GUI design. It takes the full
 advantages of Android's physical buttons.

 I know it's a tall order (rival iPhone's user experience) but check it
 out and see yourself.

 It's on Android Market now and it's free.

 On Sep 1, 7:41 am, Lout lout.r...@googlemail.com wrote:



  While you developers relax... would you mind sharing what apps to
  expect through this challenge.. and anything else you wish to share
  about ADC2 submissions... well anything including the fact: 'thank
  God, no more sleep less nights'!

  Am collecting information about the challenge (ADC2) for a news
  article as am with cnet (and AP). Pitch your app if you have already
  published or would soon publish on the market too.

  Your app name and description, web link if any, experience with
  ADC2, ... anything would be useful for our article(s).

  And do you feel that there would have been more submissions than in
  ADC1?
  Is the competition going to be tougher or less profound as you were
  allowed to put up apps not published before 1st Aug only?

  Do you think that all apps that didn't try for ADC1 should have had a
  chance?

  Congratulations on your submissions while you wait for the next
  phase.
  Thanks,
  Lout Reilly
  ps: Moderators we request you to let this through so that you too get
  some feedback.- Hide quoted text -

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



[android-developers] Re: Returning files through a Cursor

2009-09-03 Thread Chris Stratton

On Sep 3, 10:13 am, David Given d...@cowlark.com wrote:

 We've got it *nearly* working; I can see GMail call query() on my
 ContentProvider, followed shortly by GMail crashing because I'm not
 providing the right fields in the cursor.

 The thing is --- what's GMail expecting to see? I can't find any
 documentation on this.

I wonder if its expectations are close enough to those of the sources-
provided non-gmail Email application that you could debug it against
that and then switch back to gmail?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: stack overflow exception on certain sequence of UNICODE characters, I DONT HAVE TOO MANY LAYERS!

2009-09-03 Thread kevikev2020

Thanks ROMAIN, but I need to clarify the problem:  What I am trying to
say is there is a HACKER on my chat app who is able to send out a
certain sequence of characters (it's like 2 unicode characters, but
I'm not sure which ones), and it causes all these layers to explode
out and causes the stack overflow.

I have personally witnessed him do it.  For example, there will be
like 10 ppl in the chat room all normally chatting away and my app is
working perfectly fine.  Then, this hacker says to the room, OK
EVERYONE I AM GOING TO CAUSE FORCE CLOSE.. WATCH HAHHAHA.  Then, all
of a sudden, the screen goes blank and FORCE CLOSES.  I have a limit
on the # of characters you can post to the room, so it's NOT like he's
posting a huge text string that Android can't handle.

The core of my chat app consists of a ListView using your efficient
adapter concept.  So, what I am trying to say is your TextView can be
hacked by certain sequence of unicode characters and it causes too
many layers to explode out and causes a stack overflow.  There is some
hole in the TextView, Romain.  In fact I was on again this morning and
this hacker, goes by the name of KING_BOU did it again.  And everyone
in the room gets upset at him and he loves attention and laughs.  Like
he feels some sort of personal power or gratification.  I have his
deviceid so we can track him down... smh @ his hax

OH, ONE LAST IMPORTANT NOTE: IF I CONVERT ALL POSTS FROM UNICODE TO
ASCII, THIS PROBLEM NEVER HAPPENS!!  BUT MY USERS LOVE THEIR SYMBOLS
SO I CANNOT TAKE THAT AWAY FROM THEM.  IM SO UPSET ABOUT ALL THIS.
PLEASE HELP IF YOU CAN.  HAS SOMETHING TO DO WITH TextView draw with
certain UNICODES.  THANK YOU!!!



On Sep 2, 3:18 pm, Romain Guy romain...@google.com wrote:
 Yes, you have too many layers. You should check in HiearchyViewer.



 On Wed, Sep 2, 2009 at 2:18 PM, kevikev2020kkaw...@gmail.com wrote:

  Hi, I DO NOT HAVE TOO MANY LAYERS, THIS STACK OVERFLOW EXCEPTION ONLY
  OCCURS WHEN A CERTAIN UNICODE CHARACTER SEQUENCE COME TO THE
  LISTVIEW.  THIS BUG IS KILLING ME BECAUSE I CANNOT PUT A TRY/CATCH
  AROUND IT ANYWHERE IN MY CODE:

  I DO NOT KNOW WHAT THAT SEQUENCE IS, BUT I DO KNOW ITS A CERTAIN
  SMILEY FACE + ANOTHER CHARACTER THAT CAUSES IT, I AM CERTAIN IT'S NOT
  BECAUSE I HAVE TOO MANY VIEWS.  IF SOMEBODY KNOWS THE WORK-AROUND, OR
  ANY WAY IT CAN BE TRAPPED, PLEASE LET ME KNOW THANK YOU!

  09-02 21:04:27.101: ERROR/AndroidRuntime(916): Uncaught handler:
  thread main exiting due to uncaught exception
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):
  java.lang.StackOverflowError
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  java.lang.String.getChars(String.java:992)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.text.TextUtils.getChars(TextUtils.java:63)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.text.Layout.drawText(Layout.java:1352)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.text.Layout.draw(Layout.java:339)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.widget.TextView.onDraw(TextView.java:3921)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.View.draw(View.java:5838)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1486)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.widget.AbsListView.dispatchDraw(AbsListView.java:1319)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.widget.ListView.dispatchDraw(ListView.java:2820)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.View.draw(View.java:5944)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  

[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread Jens Finkhaeuser

Hey all!

My submission is PackRat. It's a media collection manager... I collect
a lot of books, CDs, you name it, and hardly remember what exactly I
have and don't have. Writing that app scratched a fairly persistent
itch for me. You can find out more about it on http://packrat.unwesen.de/

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

2009-09-03 Thread scheme

I had checked my app. again and I found that the onCreate function
sometimes take more than 5 sec. to complete.
After modify the onCreate function, the problem is gone.

Thanks.

On 9월3일, 오전2시55분, Dianne Hackborn hack...@android.com wrote:
 What is your app doing in the debugger?  That message is saying that the
 window manager gave up waiting for the app to draw all of its windows before
 unfreezing the screen in the new orientation, so for some reason you aren't
 getting your windows/surfaces drawn.





 On Wed, Sep 2, 2009 at 8:35 AM, scheme sch...@gmail.com wrote:

  I had written landscape app. which use surface view and camera.
  It works fine mostly.

  However, The weird thing is that the app sometimes (once a 5~6 times)
  freezes when I started it.
  The DDMS spits out following log.

  09-02 10:58:29.191: WARN/WindowManager(1132): App freeze timeout
  expired.
  09-02 10:58:29.201: WARN/WindowManager(1132): Force clearing freeze:
  AppWindowToken{43b4ea00 token=HistoryRecord{4386bcc0 {com.home.camera/
  com.home.camera.Camera}}}
  09-02 10:58:29.251: WARN/SurfaceFlinger(1132): timeout expired
  mFreezeDisplay=1, mFreezeCount=0

  The following lines are added in the manifest.xml

  android:configChanges=orientation|keyboardHidden
  android:screenOrientation=landscape

  I have struggled but have no progress.

  Any Ideas?
  Thnks in advance.

 --
 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-03 Thread Maps.Huge.Info (Maps API Guru)

Our entry is

Name: What Zip?
Category: Productivity/Tools
By: John Coryat, USNaviguide LLC

Description:
This application carefully fixes your location to determine your USPS
Zip Code (US Only).

Displays the results as a shaded outline of the Zip Code along with
your location and closest street on a map.

Website:

http://www.usnaviguide.com/zip.htm

The app is a companion to this website. We have about 250,000 monthly
visitors to the site that are mostly business professionals interested
in territory management, real estate and other things. The app is on
the market and has had about 1200 downloads, pretty amazing
considering the small number of Android devices.

ADC2 impressions:

I received one of the Google ION phones at Google IO back in May. I
had been working on iPhone apps but switched to Android to develop an
entry for the contest. It took me from May 27th to August 5th to get
this one ready and I had about 3 solid weeks of testing the app before
submitting it. The members of this forum and especially Mark Murphy
helped immensely. I believe the contest was designed with developers
like me in mind. I hadn't considered working with Android before and
when Google handed me one of those beautiful ION's, I couldn't help
but dive into the system.

I have no illusions that this app will do anything but entertain a few
judges, it's not earth shattering or polished like the winners in
ADC1, but for those that want to know what zip code they're in, our
app is the absolute best tool ever created. The only alternative would
be to knock on someone's door and ask them what their zip code is.
I've done this to test the app and have had some very odd responses,
mostly they won't answer!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: XML-RPC

2009-09-03 Thread Wouter

I dont see it at wireshark.. and in android i only get the response
object back and not the whole xml..

On 3 sep, 15:51, skink psk...@gmail.com wrote:
 On Sep 3, 3:38 pm, Wouter wouterg...@gmail.com wrote:

  Hmm how can i see the raw data with wireshark?

 just post xml you got from a server

  On 3 sep, 11:03, skink psk...@gmail.com wrote:

   On Sep 3, 10:36 am, Wouter wouterg...@gmail.com wrote:

yes with these tools i can see the data packages.. but thats not the
solution to my problem i think?

I want to parse the data in java..

On 3 sep, 00:38, skink psk...@gmail.com wrote:

 On Sep 3, 12:15 am, Wouter wouterg...@gmail.com wrote:

  I don't know.  I use the android-xmlrpc client 
  (http://code.google.com/
  p/android-xmlrpc/) and I only see the response like in few posts
  above..

  Is there another way to get the data?

 ethereal/wireshark

   seeing raw data would help in deserialzation parsed response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Itemized overlay

2009-09-03 Thread sweet

I don't understand your correction andrehbleitao...
In the tuto i don'tunderstand the step 4 in the last part. I think i
should understand this and make what it said for my application work
well isn't it ?

On 2 sep, 10:43, sweet brou...@gmail.com wrote:
 Hello ragavendran s and 于洋 thank for your answers.
 My marker image is well in the res/drawable, my geopoint is Mexico gps
 coordonates (like the tuto) and the library of maps was already put in
 my Manifest.
 I've done what you says ragavendran s in my ItemizedOverlay class
 (which i rename to NewItemizedOverlay):

 import java.util.ArrayList;

 import android.graphics.drawable.Drawable;

 import com.google.android.maps.ItemizedOverlay;
 import com.google.android.maps.OverlayItem;

 @SuppressWarnings(unchecked)
 public class NewItemizedOverlay extends ItemizedOverlay {

 private ArrayListOverlayItem mOverlays = new ArrayListOverlayItem
 ();

 public NewItemizedOverlay(Drawable defaultMarker) {
 super(boundCenterBottom(defaultMarker));
 // TODO Auto-generated constructor stub
 }
 public void addOverlay(OverlayItem overlay) {
 mOverlays.add(overlay);
 populate();
 }

 @Override
 protected OverlayItem createItem(int i) {
   return mOverlays.get(i);
 }

 @Override
 public int size() {
 return mOverlays.size();
 }

 }

 But i've always an error. I think the mistake is in the fourth step of
 the tuto (http://developer.android.com/intl/fr/guide/tutorials/views/
 hello-mapview.html) in the last part:

 4. All that's left is for us to add this OverlayItem to our collection
 in the HelloItemizedOverlay, and add this to the List of Overlay
 objects retrieved from the MapView:

 itemizedoverlay.addOverlay(overlayitem);
 mapOverlays.add(itemizedoverlay);

 i can't add this to the List of Overlay objects retrieved from the
 MapView. How i can do that ?

 ThanksSweet

 On 2 sep, 10:08, 于洋 yuyang3...@gmail.com wrote:

  2009/9/2sweetjunkybr...@gmail.com

   I've a problem with ItemizedOverlay in a mapView.
   I had folow the tuto HelloMapView in the android developpers website
   and i can't display the itemized overlay in the bottom of the tuto.
   I show you my code:

   mapview java:

   import java.util.List;

   import android.content.Intent;
   import android.graphics.drawable.Drawable;
   import android.os.Bundle;
   import android.view.Menu;
   import android.view.MenuInflater;
   import android.view.MenuItem;
   import android.widget.LinearLayout;
   import android.widget.ZoomControls;

   import com.google.android.maps.GeoPoint;
   import com.google.android.maps.MapActivity;
   import com.google.android.maps.MapView;
   import com.google.android.maps.Overlay;
   import com.google.android.maps.OverlayItem;

   public class Map extends MapActivity {
  ListOverlay mapOverlays;
  Drawable drawable;
  ItemizedOverlay itemizedOverlay;
  LinearLayout linearLayout;
  MapView mapView;
  ZoomControls mZoom;

  @Override
  public void onCreate(Bundle savedInstanceState) {

  GeoPoint point = new GeoPoint(1924,-9912);
  OverlayItem overlayitem = new OverlayItem(point, , );
  itemizedOverlay.addOverlay(overlayitem);
  mapOverlays.add(itemizedOverlay);
  mapOverlays = mapView.getOverlays();
  drawable = this.getResources().getDrawable
   (R.drawable.androidmarker);
  itemizedOverlay = new ItemizedOverlay(drawable);

  super.onCreate(savedInstanceState);
  setContentView(R.layout.map);
  linearLayout = (LinearLayout) findViewById(R.id.zoomview);
  mapView = (MapView) findViewById(R.id.mapview);
  mapView.setBuiltInZoomControls(true);
  mapView.setSatellite(true);
  }
  protected boolean isRouteDisplayed() {
  return false;
  }
   }

   ItemizedOverlay Java:

   import android.graphics.drawable.Drawable;
   import java.util.ArrayList;

   import com.google.android.maps.OverlayItem;

   public class ItemizedOverlay extends
   com.google.android.maps.ItemizedOverlay {

  private ArrayListOverlayItem mOverlays = new
   ArrayListOverlayItem
   ();

  public ItemizedOverlay(Drawable defaultMarker) {
  super(boundCenterBottom(defaultMarker));

  }

  @Override
  protected OverlayItem createItem(int i) {
return mOverlays.get(i);
  }

  @Override
  public int size() {
  return mOverlays.size();
  }
  public void addOverlay(OverlayItem overlay) {
  mOverlays.add(overlay);
  populate();
  }

   }

   map XML:

   ?xml version=1.0 encoding=utf-8?
   LinearLayout 

[android-developers] Re: stack overflow exception on certain sequence of UNICODE characters, I DONT HAVE TOO MANY LAYERS!

2009-09-03 Thread Romain Guy

TextView cannot be hacked. The problem is that you have too many
layers of ViewGroups in your UI. By using specific characters you are
causing TextView to take another code path, usually not taken, that
happens to go right over the edge of the stack size.

Use fewer views, that's all.

On Thu, Sep 3, 2009 at 7:44 AM, kevikev2020kkaw...@gmail.com wrote:

 Thanks ROMAIN, but I need to clarify the problem:  What I am trying to
 say is there is a HACKER on my chat app who is able to send out a
 certain sequence of characters (it's like 2 unicode characters, but
 I'm not sure which ones), and it causes all these layers to explode
 out and causes the stack overflow.

 I have personally witnessed him do it.  For example, there will be
 like 10 ppl in the chat room all normally chatting away and my app is
 working perfectly fine.  Then, this hacker says to the room, OK
 EVERYONE I AM GOING TO CAUSE FORCE CLOSE.. WATCH HAHHAHA.  Then, all
 of a sudden, the screen goes blank and FORCE CLOSES.  I have a limit
 on the # of characters you can post to the room, so it's NOT like he's
 posting a huge text string that Android can't handle.

 The core of my chat app consists of a ListView using your efficient
 adapter concept.  So, what I am trying to say is your TextView can be
 hacked by certain sequence of unicode characters and it causes too
 many layers to explode out and causes a stack overflow.  There is some
 hole in the TextView, Romain.  In fact I was on again this morning and
 this hacker, goes by the name of KING_BOU did it again.  And everyone
 in the room gets upset at him and he loves attention and laughs.  Like
 he feels some sort of personal power or gratification.  I have his
 deviceid so we can track him down... smh @ his hax

 OH, ONE LAST IMPORTANT NOTE: IF I CONVERT ALL POSTS FROM UNICODE TO
 ASCII, THIS PROBLEM NEVER HAPPENS!!  BUT MY USERS LOVE THEIR SYMBOLS
 SO I CANNOT TAKE THAT AWAY FROM THEM.  IM SO UPSET ABOUT ALL THIS.
 PLEASE HELP IF YOU CAN.  HAS SOMETHING TO DO WITH TextView draw with
 certain UNICODES.  THANK YOU!!!



 On Sep 2, 3:18 pm, Romain Guy romain...@google.com wrote:
 Yes, you have too many layers. You should check in HiearchyViewer.



 On Wed, Sep 2, 2009 at 2:18 PM, kevikev2020kkaw...@gmail.com wrote:

  Hi, I DO NOT HAVE TOO MANY LAYERS, THIS STACK OVERFLOW EXCEPTION ONLY
  OCCURS WHEN A CERTAIN UNICODE CHARACTER SEQUENCE COME TO THE
  LISTVIEW.  THIS BUG IS KILLING ME BECAUSE I CANNOT PUT A TRY/CATCH
  AROUND IT ANYWHERE IN MY CODE:

  I DO NOT KNOW WHAT THAT SEQUENCE IS, BUT I DO KNOW ITS A CERTAIN
  SMILEY FACE + ANOTHER CHARACTER THAT CAUSES IT, I AM CERTAIN IT'S NOT
  BECAUSE I HAVE TOO MANY VIEWS.  IF SOMEBODY KNOWS THE WORK-AROUND, OR
  ANY WAY IT CAN BE TRAPPED, PLEASE LET ME KNOW THANK YOU!

  09-02 21:04:27.101: ERROR/AndroidRuntime(916): Uncaught handler:
  thread main exiting due to uncaught exception
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):
  java.lang.StackOverflowError
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  java.lang.String.getChars(String.java:992)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.text.TextUtils.getChars(TextUtils.java:63)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.text.Layout.drawText(Layout.java:1352)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.text.Layout.draw(Layout.java:339)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.widget.TextView.onDraw(TextView.java:3921)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.View.draw(View.java:5838)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1486)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.drawChild(ViewGroup.java:1484)
  09-02 21:04:27.200: ERROR/AndroidRuntime(916):     at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
  09-02 21:04:27.200: 

[android-developers] Re: XML-RPC

2009-09-03 Thread skink



On Sep 3, 10:36 am, Wouter wouterg...@gmail.com wrote:
 yes with these tools i can see the data packages..

so what are packages you can see with these tools?

it should be http xml response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Time to first screen, boot-up time and app-start time?

2009-09-03 Thread Dianne Hackborn
Of course it is possible...  the question is by how much, and with how much
work.  Those questions are difficult to answer though without actually
digging into the code and starting to look at what it is doing and what can
be improved.  The numbers I gave should serve as a good guide for where to
start looking first for the most bang for the buck.

On Wed, Aug 26, 2009 at 12:25 PM, mstu...@googlemail.com 
mstu...@googlemail.com wrote:


 Hi All,

 thanks for all the comments...

 I am just wondering whether it is generally possible to speed up start
 time?

 For instance, is it possible to apply some of the recent generic-linux
 fast booting improvements to Android? If so, only the Kernel boot time
 could be shortened...

 But what abt the other time-consuming components such as the PMS and
 AMS... I don't see any options to optimize them...

 mat

 On Aug 26, 8:23 am, Dan Bornstein danf...@android.com wrote:
  On Tue, Aug 25, 2009 at 5:02 PM, Casper Bang casper.b...@gmail.com
 wrote:
   People who have digged into Dalvik aren't
   overly impressed when compared to similar technologies:
  http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html
 
  Please read the comments on that article, which contained some good
  discussion, and please be aware that the original author is pushing a
  particular agenda. (Not that I don't have my own biases too, but I
  think I am reasonablyup-front about them.)
 
  -dan
 



-- 
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] Touch event problem

2009-09-03 Thread Rahul

Hi All

I want to create one  Application in that i want to drag the many
component like TableRow,Button,Layout i used absoultLayout is a
parent Layout but i unable to drag all component only i able to drag
ImageButton and i am using TouchListener for that. i dont undestand
what is the problem.plz help 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
-~--~~~~--~~--~--~---



[android-developers] Re: files, local files, storage...

2009-09-03 Thread Dianne Hackborn
Programs or users?  Yes users will generally be able to root their phone,
and I wouldn't assume they can't.  If you want to protected your data from
the phone's user, you are in for a world of hurt.  If you just want to
protect it from other apps, filesystem permissions for the vast majority of
people should be fine -- they give you the same amount of protection as two
different non-super-users logging into a Linux machine would have from each
other.  (Which should be complete protection, and anything that allows them
to get around that is a major hole that needs to be fixed.)

On Thu, Sep 3, 2009 at 6:29 AM, Chris Stratton cs07...@gmail.com wrote:


 On Sep 2, 9:50 pm, Mark Murphy mmur...@commonsware.com wrote:
   so is that directory protected from other apps
 
  Yes. By default, all files there will be private to your application.

 Assuming that there are no unanticipated programs running as root...
 which historically is not a good assumption at all.

 If it's on the device, someone who really wants to is going to be able
 to read it.

 



-- 
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: Task launch event - finishOnTaskLaunch Problem

2009-09-03 Thread Dianne Hackborn
onResume() tells you that the activity is now in the foreground, so you can
rely on it to tell you where the user is currently at.

On Thu, Sep 3, 2009 at 4:47 AM, Muniraju munir...@gmail.com wrote:


 Hi,

 I have three activities A, B and C.  A is the main activity launched
 from MAIN LAUNCHER.

 All the activities have 'android:finishOnTaskLaunch=true' in the
 manifest file.

 Now A lunches B, B launches C. My Application maintains some static
 info at this stage, This is global for application and it is my
 requirement. At this time user presses HOME key.  My app will be sent
 to background, home screen will be displayed.

 Now if the user LONG presses the HOME and launches my App, It will
 returns to the activity 'C', the static info remains same.

 If the user launches it from main menu, it will resume the main
 activity A others would have been finished.  At this stage I need to
 reset my static info. If the user presses BACK key I need not clear
 this state. This time onResume of A is getting called, but not
 onCreate. So, I am not able differentiate onResume of BACK Press
 from B and that of launch from main menu.

 Please help me to clear this state out during task re-launch in the
 above case by identifying Main Menu launch from HOME.

 Thanks,
 With Regards,
 Muniraju




 



-- 
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: drawing image in full screen on different device

2009-09-03 Thread Nightwolf

Image view with layout_width and layout_height set to fill_parent
should help.

On Sep 3, 1:14 pm, Honest honestsucc...@gmail.com wrote:
 Hello,

 My application required to draw image on full screen.  now the phone
 screen size will be different. So will i have to make different image
 for each phone or i can use just one image and it can display on full
 screen in any device.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: KeyGuard customization

2009-09-03 Thread Dianne Hackborn
I think they did some pretty grody hacks, and I am pretty positive they
didn't customize the keyguard, but just completely turned it off and show
their own thing.  (I also don't know much about it, so this is all
speculation, but I would be deeply concerned about it introducing holes
where people can get by the lock screen by doing the right trick, or
situations where their lock screen is not being hidden when it should.  The
user interaction between the lock screen and the rest of the system is
incredibly complicated, and always a thorn in our side during development to
get completely right.  That is one of the reasons we haven't yet provided a
way for people to replace it.)

On Thu, Sep 3, 2009 at 1:58 AM, Jean Baptiste Perriot
jb.perr...@gmail.comwrote:


 Too bad... :/

 So how do you think flydroid did :
 http://www.flydroid.com/fly/

 Do you think they recode a full system like I tried ?

 On 2 sep, 20:01, Dianne Hackborn hack...@android.com wrote:
  Sorry, there is currently no way to.
 
  Please be very careful about fiddling with the keyguard state -- it is
  incredibly easy to get this wrong and open significant security holes in
 the
  system.
 
  On Wed, Sep 2, 2009 at 9:26 AM, Jean Baptiste Perriot
  jb.perr...@gmail.comwrote:
 
 
 
   Hello,
Is there any way to customize the keyguard with an application ?
I'm trying to make a small app that enables me to add content to the
   keyguard and I'm looking for a way to make it with the framework.
   The only way I found is to disable the keyguard, using a receiver
   listening for a screen-off  and to show a custom view at the screen-on
   with another receiver... Therefore I have to recode all the default
   locking mechanism...
   Is there another way ?
 
   Regards
 
  --
  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...@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: XML-RPC

2009-09-03 Thread Wouter

OK finally got it, thanks for your help!

This is the xml response for film.retrieveDetails

?xml version=1.0 encoding=ISO-8859-1?
methodResponse
params
param
valuestruct
membernameurl/name
valuestringhttp://www.moviemeter.nl/film/500//string/value
/member
membernamethumbnail/name
valuestringhttp://www.moviemeter.nl/images/covers/thumbs/
0/500.jpg/string/value
/member
membernametitle/name
valuestringLord of the Rings: The Fellowship of the Ring, The/
string/value
/member
membernamealternative_titles/name
valuearray
data
/data
/array/value
/member
membernameyear/name
valuestring2001/string/value
/member
membernameimdb/name
valuestring0120737/string/value
/member
membernameplot/name
valuestringEen eeuwenoude ring, die jaren zoek is geweest, wordt
gevonden en komt bij toeval terecht bij de kleine Hobbit Frodo. Als de
tovenaar Gandalf erachter komt dat deze ring eigenlijk de Ene Ring is
waar de slechte Sauron naar op zoek is, gaat Frodo samen met Gandalf,
een Dwerg, een Elf, twee Mensen en drie andere Hobbits op een groots
avontuur om deze te vernietigen./string/value
/member
membernamemini_series/name
valuestring0/string/value
/member
membernameduration/name
valuestring178/string/value
/member
membernamedurations/name
valuearray
data
valuestruct
membernameduration/name
valuestring178/string/value
/member
membernamedescription/name
valuestring/string/value
/member
/struct/value
valuestruct
membernameduration/name
valuestring208/string/value
/member
membernamedescription/name
valuestringextended edition/string/value
/member
/struct/value
/data
/array/value
/member
membernameactors/name
valuearray
data
valuestruct
membernamename/name
valuestringElijah Wood/string/value
/member
membernamevoice/name
valuestring0/string/value
/member
/struct/value
valuestruct
membernamename/name
valuestringIan McKellen/string/value
/member
membernamevoice/name
valuestring0/string/value
/member
/struct/value
valuestruct
membernamename/name
valuestringViggo Mortensen/string/value
/member
membernamevoice/name
valuestring0/string/value
/member
/struct/value
/data
/array/value
/member
membernameactors_text/name
valuestringmet Elijah Wood, Ian McKellen en Viggo Mortensen/
string/value
/member
membernamedirectors/name
valuearray
data
valuestruct
membernameid/name
valuestring10176/string/value
/member
membernamename/name
valuestringPeter Jackson/string/value
/member
/struct/value
/data
/array/value
/member
membernamedirectors_text/name
valuestringgeregisseerd door Peter Jackson/string/value
/member
membernamecountries/name
valuearray
data
valuestruct
membernameiso_3166_1/name
valuestringNZL/string/value
/member
membernamename/name
valuestringNieuw-Zeeland/string/value
/member
/struct/value
valuestruct
membernameiso_3166_1/name
valuestringUSA/string/value
/member
membernamename/name
valuestringVerenigde Staten/string/value
/member
/struct/value
/data
/array/value
/member
membernamecountries_text/name
valuestringNieuw-Zeeland / Verenigde Staten/string/value
/member
membernamegenres/name
valuearray
data
valuestringAvontuur/string/value
valuestringFantasy/string/value
/data
/array/value
/member
membernamegenres_text/name
valuestringAvontuur / Fantasy/string/value
/member
membernamedates_cinema/name
valuearray
data
valuestruct
membernamedate/name
valuestring2001-12-20/string/value
/member
/struct/value
/data
/array/value
/member
membernamedates_video/name
valuearray
data
valuestruct
membernamedate/name
valuestring2002-07-16/string/value
/member
/struct/value
/data
/array/value
/member
membernameaverage/name
valuestring4.19/string/value
/member
membernamevotes_count/name
valuestring6532/string/value
/member
membernamefilmId/name
valueint500/int/value
/member
/struct/value
/param
/params
/methodResponse

On Sep 3, 5:40 pm, skink psk...@gmail.com wrote:
 On Sep 3, 10:36 am, Wouter wouterg...@gmail.com wrote:

  yes with these tools i can see the data packages..

 so what are packages you can see with these tools?

 it should be http xml response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Changing a Back button press to Home button press

2009-09-03 Thread Dianne Hackborn
We've already been having this discussion in another thread.  If you want to
retain some state in your activity -- even across the user pressing back to
finish your activity and then later launching it again -- then just save
that state, in whatever way you want, in onPause().

If you want to let the user have some background thing of your app going on
while the user is not in its UI, you can have in your UI a facility for them
to explicitly start and stop the background work.  That is not the same as
them quitting your app.

On Thu, Sep 3, 2009 at 1:09 AM, Ne0 liamjamesalf...@googlemail.com wrote:


 Dianne,

 If there is a more appropriate way of doing this please advise.

 My activity, starts, stops and binds to a service. When the activity
 is focused, it receives text from the service it is bound to. When
 ever the user navigates away from the activity all the currently
 received text is saved in onSaveInstanceState() so it can be displayed
 once again when focus returns. Though if the back button is used, it
 does not get called ( is this correct? ). The user must never be able
 to stop activity running without selecting stop from the activity
 menu, which in turn stops the service and calls finish().

 Liam

 On Sep 2, 5:53 pm, Dianne Hackborn hack...@android.com wrote:
  On Wed, Sep 2, 2009 at 2:19 AM, Ne0 liamjamesalf...@googlemail.com
 wrote:
   Yes that is what i want to achieve and i know it is acting in a non-
   standard way. Please correct me if you think i am going about this in
   the wrong way, but my understanding is that using the back button
   destroys the focused activity and hence does not hit
   onSaveInstanceState(...). The users of this application will be
   expecting it to return to its saved instance state the next time they
   start the activity, unless they use the apps menu to stop the app
   running.
 
  No they won't expect this, because that is not how android works.  And
 there
  is certainly not an apps menu menu for them to stop apps.
 
  Please don't try to make your application behave in a way you think it
  should from some other environment.  It should behave consistently with
 the
  android UI model, wherever appropriate.
 
  --
  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...@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: Returning files through a Cursor

2009-09-03 Thread Balwinder Kaur (T-Mobile USA)

Did you try putExtra(Intent.EXTRA_STREAM, uri) ?

// the following code snippet will attach a file from a content
resolver and send it via email/mms.

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType(...);
sendIntent.putExtra(Intent.EXTRA_STREAM, uri); // attachment
sendIntent.putExtra(Intent.EXTRA_SUBJECT, getResources().getText
(R.string.subject));
startActivityForResult(Intent.createChooser(sendIntent, getResources
().getText(R.string.app_name)), ACTIVITY_SEND);


Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Sep 3, 7:41 am, Chris Stratton cs07...@gmail.com wrote:
 On Sep 3, 10:13 am, David Given d...@cowlark.com wrote:

  We've got it *nearly* working; I can see GMail call query() on my
  ContentProvider, followed shortly by GMail crashing because I'm not
  providing the right fields in the cursor.

  The thing is --- what's GMail expecting to see? I can't find any
  documentation on this.

 I wonder if its expectations are close enough to those of the sources-
 provided non-gmail Email application that you could debug it against
 that and then switch back to gmail?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can I leave some info after my app is uninstalled?

2009-09-03 Thread Yusuf Saib (T-Mobile USA)

Other places to leave data are in shared databases or on web servers.
But it's usually impolite to leave data behind on the phone after
uninstall.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.




On Sep 3, 6:26 am, Chris Stratton cs07...@gmail.com wrote:
 On Sep 3, 5:36 am, 楊健 y...@cycomtech.co.jp wrote:

  Hey everybody!
  Is there any method to leave some info after my app is uninstalled?For
  example:file,database,setting etc.

 I would think something written to the sdcard with unrestrictive
 permissions would stick around... you should probably make the file/
 folder name obvious enough that the user can figure out who it
 belonged to and remove it if they don't want it kept.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can I leave some info after my app is uninstalled?

2009-09-03 Thread Roman ( T-Mobile USA)

I could think of to write a service which keeps track of application
you are uninstalling. When you are in progress of uninstalling an
application your new service would be called and keeps track of the
uninstalled app using the DB.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 3, 2:36 am, 楊健 y...@cycomtech.co.jp wrote:
 Hey everybody!
 Is there any method to leave some info after my app is uninstalled?For
 example:file,database,setting etc.

 Best 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] Re: Returning files through a Cursor

2009-09-03 Thread Marco Nelissen

On Thu, Sep 3, 2009 at 7:13 AM, David Givend...@cowlark.com wrote:

 I would like my app to start an email app such as GMail with an attached
 file.

 For various technical reasons we can't use a file: URL for this --- we
 have to pull the file out of our ContentProvider. So, I need some way to
 make a content: URL behave as if it were a file.

You can implement openFile() in your content provider to return a
FileDescriptor for that content Uri. This is what pretty much every
content provider does for things like this.

 We've got it *nearly* working; I can see GMail call query() on my
 ContentProvider, followed shortly by GMail crashing because I'm not
 providing the right fields in the cursor.

A Cursor is not a file, so not sure what you're trying to do here.

 The thing is --- what's GMail expecting to see? I can't find any
 documentation on this. I have found ContentProvider#getAssetFile(),
 which appears to be related, but it doesn't seem to being called. What I
 get is:

 E/CursorWindow(  848): Bad request for field slot 0,1. numRows = 1,
 numColumns = 1

Something is trying to get the 2nd column from a Cursor that has only 1 column.

 (What I'd really like to do is to be able to pass GMail some sort of
 high-level stream object so that I can generate data on the fly, but I
 suspect it's not possible.)

 --
 ┌─── dg@cowlark.com ─ http://www.cowlark.com ─
 │
 │ They laughed at Newton. They laughed at Einstein. Of course, they
 │ also laughed at Bozo the Clown. --- Carl Sagan

 


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

2009-09-03 Thread Wouter

09-03 18:10:20.642: DEBUG/log1(746): [Ljava.lang.Object;@43598a88
09-03 18:10:20.642: DEBUG/log2(746): class [Ljava.lang.Object;

And now is the question how can i get the data in that Object? :)

On 3 sep, 18:06, skink psk...@gmail.com wrote:
 Wouter wrote:
  OK finally got it, thanks for your help!
 membernamedates_video/name
  valuearray
  data
  valuestruct
  membernamedate/name
  valuestring2002-07-16/string/value
  /member
  /struct/value
  /data
  /array/value
  /member

 what does:

 Log.d(log1, response.get(dates_video));
 Log.d(log2, response.get(dates_video).getClass());

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

2009-09-03 Thread skink



Wouter wrote:
 OK finally got it, thanks for your help!
membernamedates_video/name
 valuearray
 data
 valuestruct
 membernamedate/name
 valuestring2002-07-16/string/value
 /member
 /struct/value
 /data
 /array/value
 /member


what does:

Log.d(log1, response.get(dates_video));
Log.d(log2, response.get(dates_video).getClass());

print?

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

2009-09-03 Thread Marco Nelissen

See 
http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)
for an explanation of why onSaveInstanceState is not called in your
use case.
You should save your state somewhere else, like in onPause()



On Thu, Sep 3, 2009 at 1:09 AM, Ne0liamjamesalf...@googlemail.com wrote:

 Dianne,

 If there is a more appropriate way of doing this please advise.

 My activity, starts, stops and binds to a service. When the activity
 is focused, it receives text from the service it is bound to. When
 ever the user navigates away from the activity all the currently
 received text is saved in onSaveInstanceState() so it can be displayed
 once again when focus returns. Though if the back button is used, it
 does not get called ( is this correct? ). The user must never be able
 to stop activity running without selecting stop from the activity
 menu, which in turn stops the service and calls finish().

 Liam

 On Sep 2, 5:53 pm, Dianne Hackborn hack...@android.com wrote:
 On Wed, Sep 2, 2009 at 2:19 AM, Ne0 liamjamesalf...@googlemail.com wrote:
  Yes that is what i want to achieve and i know it is acting in a non-
  standard way. Please correct me if you think i am going about this in
  the wrong way, but my understanding is that using the back button
  destroys the focused activity and hence does not hit
  onSaveInstanceState(...). The users of this application will be
  expecting it to return to its saved instance state the next time they
  start the activity, unless they use the apps menu to stop the app
  running.

 No they won't expect this, because that is not how android works.  And there
 is certainly not an apps menu menu for them to stop apps.

 Please don't try to make your application behave in a way you think it
 should from some other environment.  It should behave consistently with the
 android UI model, wherever appropriate.

 --
 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] can anyone get the layout tab to work in eclipse for layout xml files?

2009-09-03 Thread sdphil

I am using eclipse 3.5 with the ADT plugin.

when I view layout xml files, i get two tabs in the view - the source
code view and a graphical view.

the graphical view almost never works for any of my layouts.  it
usually shows NullPointerException: null at the top and nothing
else.

when it does work, it often does not match what i get in the simulator
or device.

it seems like this thing simply is not ready for prime time; although
the idea is very cool.  has anyone else had much success with it?

tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: A way to get all apps and their activities?

2009-09-03 Thread bra...@gmail.com

I for one need it. i am trying to get a list of all applications and
derivations (such as camcorder) While I can use

 Intent mainIntent = new Intent(Intent.ACTION_MAIN, 
null);
 mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);

 Intent pickIntent = new 
Intent(Intent.ACTION_PICK_ACTIVITY);
 pickIntent.putExtra(Intent.EXTRA_INTENT, mainIntent);
 startActivityForResult(pickIntent, RESULT_APP);

That doesnt allow me to manipulate the way people can select the app,
such as multiple selection etc. It would be great if you could point
me at another way to accomplish that in code.

On Sep 2, 5:11 pm, Dianne Hackborn hack...@android.com wrote:
 It was something we wanted to do before 1.0, but didn't have time and
 nothing needed it so it got bumped.  I can't @hide it from the next SDK if
 that makes you feel better.

 On Wed, Sep 2, 2009 at 2:02 PM, bra...@gmail.com peacoc...@gmail.comwrote:





  No offense - but how is that a solution and why bother having stuff in
  the API that isnt implemented. Its things like this that make me ready
  to jump the android ship to maemo 5

  On Aug 14, 8:01 pm, Dianne Hackborn hack...@android.com wrote:
   Yeah GET_INTENT_FILTERS hasn't been implemented.  The only way to do this
  is
   to parse the manifest yourself.  On a computer, you can use aapt dump
   xmltree path-to-apk AndroidManifest.xml to look at the manifest of an
   existing .apk.

   On Fri, Aug 14, 2009 at 4:51 PM, EboMike ebom...@gmail.com wrote:

Could you elaborate on how exactly to do this? GET_INTENT_FILTERS
doesn't really seem to do anything.

The closest thing I got was to get the PackageInfo, query through its
ActivityInfo objects, and then create an Intent out of each one
(Intent intent = new Intent(); intent.setClassName(pi.packageName,
activityInfo.name); ) and then call queryIntentActivities() on that,
but none of that gives me the actual intent filter information.

-Mike

On Jul 31, 9:31 am, Marco Nelissen marc...@android.com wrote:
 The package manager has APIs to do this.

 On Fri, Jul 31, 2009 at 8:52 AM, EboMike ebom...@gmail.com wrote:

  Is there a way to get a list of all apps and their activities and
  intent filters? Basically, I'd like to know what another app is
  listening to so I can provide an Intent that matches. (I suppose
  that this will require an ADP, which is fine).

  I tried grabbing the AndroidManifest.xml from an .apk file in
  /data/
  app, but that didn't seem to work - I ran jar -xf on the apk, but
  the
  xml wasn't plain ASCII.

  -Mike

   --
   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...@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: Can I leave some info after my app is uninstalled?

2009-09-03 Thread Maps.Huge.Info (Maps API Guru)

On a slightly different topic but related...

It would be great if there was a method called when the app is
uninstalled. My apps connect with a web server and knowing when a user
uninstalls the app would allow cleanup of information the user left
behind. As it sits, I don't know if a user uninstalled the app or
simply isn't using it for a while.

Also, it would be nice to have the feedback the user inputs when the
app is uninstalled. I see no way of accessing that information. Is it
available somewhere?

-John Coryat

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



[android-developers] Re: Location/GPS and SqlLite help needed

2009-09-03 Thread BarbieDahl

Thanks for all of the people who have responded to my request.  I have
gotten good feedback and so I will not need any additional help on
this issue.

Thanks,
sr98bj

On Sep 1, 8:51 am, BarbieDahl sr9...@gmail.com wrote:
 I havetwoapplications that I'm trying tofinishand I need somehelp.  I'm 
 looking fortwogood android developers who canhelpmefinishmy applications or 
 who have Intents or Activities that will
 enable my applications to use Location based awareness and import/
 query a large amount of data into SqlLite.  I am swamped withtwo
 other projects and I needhelpgetting these applications finished.  I
 have capital to pay thesetwodevelopers, so if anyone is interested,
 please let me know.  This is a work from home opportunity.

 Please contact me if you are interested with your rates.

 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: horizontal center a linear layout....

2009-09-03 Thread sdphil
perfect!  that fixed it, thanks!

On Sep 3, 12:52 am, Keean Schupke keean.schu...@googlemail.com
wrote:
 The inner LinearLayout has its width set to fill_parent so you are
 trying to center something that is full width.
 Try:

         LinearLayout android:orientation=horizontal
                       android:layout_width=fill_parent
                       android:layout_height=wrap_content
                       android:gravity=center_horizontal
                 LinearLayout android:orientation=horizontal
                               android:layout_width=wrap_content
                               android:layout_height=wrap_content
                         TextView android:layout_width=wrap_content

 android:layout_height=wrap_content
                                   android:text=Name: 
                                   android:paddingRight=4px/
                         TextView android:id=@+id/Name
                                   android:layout_width=wrap_content

 android:layout_height=wrap_content
                                   android:text=Fred/
                 /LinearLayout
         /LinearLayout

 Keean.

 On Sep 3, 8:21 am,sdphilphil.pellouch...@gmail.com wrote:

  i am trying to create some text like this:

  +===+
  |                                                |
  |              Name: Fred                 |
  |                                                |
  +===+

  and I want the combination of Name:  and Fred to be horizontally
  centered.  The Fred TextView can change:

          LinearLayout android:orientation=horizontal
                        android:layout_width=fill_parent
                        android:layout_height=wrap_content
                        android:gravity=center_horizontal

                  LinearLayout android:orientation=horizontal
                                android:layout_width=fill_parent
                                android:layout_height=wrap_content

                          TextView android:layout_width=wrap_content
                                    android:layout_height=wrap_content
                                    android:text=Name: 
                                    android:paddingRight=4px/

                          TextView android:id=@+id/Name
                                    android:layout_width=wrap_content
                                    android:layout_height=wrap_content
                                    android:text=Fred/

                  /LinearLayout

          /LinearLayout

  But it doesn't center - what am I missing?

  tia.


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



[android-developers] Re: problems building android dev environment?

2009-09-03 Thread David Meyer
Hey Fred,

First, thanks for the response.

1. You set Java Home to the actual folder instead of the sym link,
 GOOD!

 2. You get errors when attempting a build

 Yes


 Let see my questions:

 1. Is JAVA_HOME set to the jvm or the inner jre folder?


This is what I have:[...@android:~/r2]7% echo $JAVA_HOME
/usr/lib/jvm/java-1.5.0-sun
[...@android:~/r2]8%




 Can you post the first part of your error log?


Sure:


!SESSION 2009-09-03 09:36:05.787
---
eclipse.buildId=I20090611-1540
java.version=1.5.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product
org.eclipse.epp.package.java.product

!ENTRY org.eclipse.jdt.core 4 4 2009-09-03 09:39:44.025
!MESSAGE Invalid ZIP archive:
dalvik/libcore/luni/src/test/resources/tests/api/java/net/InvalidJar.jar [in
r2]
!STACK 1
org.eclipse.core.runtime.CoreException: I/O exception
at
org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2425)
at
org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:152)
at
org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:78)
at
org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:252)
at
org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:225)
at
org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:290)
at
org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2241)
at
org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2251)
at
org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1279)
at
org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1186)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.acceptResult(AbstractImageBuilder.java:167)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:504)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:328)
at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at
org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at
org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.util.zip.ZipException: invalid END header (bad central
directory offset)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:203)
at java.util.zip.ZipFile.init(ZipFile.java:234)
at
org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2419)
... 29 more
!SUBENTRY 1 org.eclipse.jdt.core 4 -1 2009-09-03 09:39:44.028
!MESSAGE I/O exception
!STACK 0
java.util.zip.ZipException: invalid END header (bad central directory
offset)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:203)
at java.util.zip.ZipFile.init(ZipFile.java:234)
at
org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2419)
at
org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:152)
at
org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:78)
at
org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:252)
at
org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:225)
at

[android-developers] Re: XML-RPC

2009-09-03 Thread skink


directors is also [Object that is Object array, so:

Object[] directors = (Object[]) response.get(directors);

for (int i=0; idirectors.length; i++) {
Log.d(log, directors[i]);
}

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

2009-09-03 Thread Wouter

09-03 18:28:44.821: DEBUG/log(783): {date=2002-07-16}
yeah we got the data :D

when i try with directors i get this:

09-03 18:30:04.582: DEBUG/log(821): {name=Peter Jackson, id=10176}

and my Director.java class is like this:

public class Director {


public String id;
public String name;

public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

and I want to save the data from the response (film.retrieveDetails)
in FilmDetail.java

public class FilmDetail {

public String url;
public String thumbnail;
public String title;
public Title[] alternative_titles;
public String year;
public String imdb;
public String plot;
public String duration;
public Duration[] durations;
public Actor[] actors;
public String actors_text;
public Director[] directors;
public String directors_text;
public Country[] countries;
public String countries_text;
public String[] genres;
public String genres_text;
public Date[] dates_cinema;
public Date[] dates_video;
public String average;
public String votes_count;
public int filmId;

So how can i save the data from directors (or other data) like this :
Director[] directors in FilmDetail.java?
I know how to do it for example String plot but how to do it for these
arrays?

Thank you!

Wouter

On 3 sep, 18:26, skink psk...@gmail.com wrote:
 what does:

 Object[] array = (Object[]) response.get(dates_video);
 Log.d(log, array[0]);

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

2009-09-03 Thread skink


what does:

Object[] array = (Object[]) response.get(dates_video);
Log.d(log, array[0]);

print?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: can anyone get the layout tab to work in eclipse for layout xml files?

2009-09-03 Thread sdphil

and are there any tools out there that does a good job of this?  i
would love to off-load some of the xml layout stuff to a non-
programmer but not require them to install all the devtools.

On Sep 3, 9:24 am, sdphil phil.pellouch...@gmail.com wrote:
 I am using eclipse 3.5 with the ADT plugin.

 when I view layout xml files, i get two tabs in the view - the source
 code view and a graphical view.

 the graphical view almost never works for any of my layouts.  it
 usually shows NullPointerException: null at the top and nothing
 else.

 when it does work, it often does not match what i get in the simulator
 or device.

 it seems like this thing simply is not ready for prime time; although
 the idea is very cool.  has anyone else had much success with it?

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

2009-09-03 Thread Keiji Ariyama

Hi,

I'm trying to get IntentFilter informations from ActivityInfo object.
But I haven't succeeded it.

I found below article. The article is written at last year.
http://groups.google.co.jp/group/android-developers/browse_thread/thread/4502827143ea9b20?pli=1

Is this not supported yet?

-- 
Keiji,
ml_andr...@c-lis.co.jp

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

2009-09-03 Thread Wouter

Ok..

So my response is: 09-03 18:53:48.192: DEBUG/directors(859):
{name=Peter Jackson, id=10176}

but how can i get name and id out of this response and save it in the
Directors class?

On 3 sep, 18:51, skink psk...@gmail.com wrote:
 directors is also [Object that is Object array, so:

 Object[] directors = (Object[]) response.get(directors);

 for (int i=0; idirectors.length; i++) {
     Log.d(log, directors[i]);

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

2009-09-03 Thread Wouter

Ok..

So my response is: 09-03 18:53:48.192: DEBUG/directors(859):
{name=Peter Jackson, id=10176}

but how can i get name and id out of this response and save it in the
Directors class?

On 3 sep, 18:51, skink psk...@gmail.com wrote:
 directors is also [Object that is Object array, so:

 Object[] directors = (Object[]) response.get(directors);

 for (int i=0; idirectors.length; i++) {
     Log.d(log, directors[i]);

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

2009-09-03 Thread David Given

Chris Stratton wrote:
[...]
 I wonder if its expectations are close enough to those of the sources-
 provided non-gmail Email application that you could debug it against
 that and then switch back to gmail?

Yes, of course I can...

For reference, what GMail (and Email) want is a cursor conforming to 
OpenableColumns, containing the name and size of the file (if known). 
Once the app has read those it'll try to open the file via 
ContentResolver#openInputStream().

So that bit's all working fine. However, I can't find a way of passing a 
stream through a ParcelFileDescriptor. I really don't want to have to 
write my file out to disk because figuring out when to clear up the 
temporary file becomes nasty. What I'd really like is a pipe, so that I 
can create the data as the email app asks for it --- but it doesn't 
appear to be possible to create a ParcelFileDescriptor from a pipe, or a 
unix socket, etc. Is there any way to do this?

I may have to resort to creating a unix socket in my application sandbox 
and lying to GMail about it being a file.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown. --- Carl Sagan

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

2009-09-03 Thread skink

Object[] directors = (Object[]) response.get(directors);

for (int i=0; idirectors.length; i++) {
Map m = (Map) directors[i];
Log.d(log, map.get(name));
Log.d(log, map.get(id));
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: XML-RPC

2009-09-03 Thread Wouter

Thank you,

but i have this in my filmDetail :

public void setDirectors(Director[] directors) {
this.directors = directors;
}

so i want to do filmDetail.setDirectors(directors);

and directors is then an array of Director (Director[])..

How can i do that? Thank you so much for helping me!

On 3 sep, 19:06, skink psk...@gmail.com wrote:
 Object[] directors = (Object[]) response.get(directors);

 for (int i=0; idirectors.length; i++) {
     Map m = (Map) directors[i];
     Log.d(log, map.get(name));
     Log.d(log, map.get(id));

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



[android-developers] Re: problems building android dev environment?

2009-09-03 Thread Fred Grott(shareme)

Dave you have set your JAVA_HOME to the symlink folder not
goood..change to actual JDK version folder..

for exampe mine is:/usr/lib/jvm/java-1.5.0-sun-1.5.0.18/jre

You will set that in your /etc/profile file.

That should clear up the error..
While Eclipse yes is picking up the correct JRE your Andorid tools
appears to be picking up the symlink you pointed to in JAVA_HOME I
think some potions of Android tolos still have problems with symlinks
in the JAVA_HOME settings

When I first started months ago I found I had to swtich JAVA_HOME to a
non  symlink reference..

Hopefully, that clears up the error..erepost if it does not..

Fred Grott
http://mobilebytes.wordpress.com






On Sep 3, 11:46 am, David Meyer dmm...@gmail.com wrote:
 Hey Fred,

 First, thanks for the response.

 1. You set Java Home to the actual folder instead of the sym link,

  GOOD!

  2. You get errors when attempting a build

  Yes
  Let see my questions:

  1. Is JAVA_HOME set to the jvm or the inner jre folder?

 This is what I have:[...@android:~/r2]7% echo $JAVA_HOME
 /usr/lib/jvm/java-1.5.0-sun
 [...@android:~/r2]8%



  Can you post the first part of your error log?

 Sure:

 !SESSION 2009-09-03 09:36:05.787
 ---
 eclipse.buildId=I20090611-1540
 java.version=1.5.0_18
 java.vendor=Sun Microsystems Inc.
 BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
 Framework arguments:  -product org.eclipse.epp.package.java.product
 Command-line arguments:  -os linux -ws gtk -arch x86 -product
 org.eclipse.epp.package.java.product

 !ENTRY org.eclipse.jdt.core 4 4 2009-09-03 09:39:44.025
 !MESSAGE Invalid ZIP archive:
 dalvik/libcore/luni/src/test/resources/tests/api/java/net/InvalidJar.jar [in
 r2]
 !STACK 1
 org.eclipse.core.runtime.CoreException: I/O exception
     at
 org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2425)
     at
 org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:152)
     at
 org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:78)
     at
 org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:252)
     at
 org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:225)
     at
 org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:290)
     at
 org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2241)
     at
 org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2251)
     at
 org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1279)
     at
 org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1186)
     at
 org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.acceptResult(AbstractImageBuilder.java:167)
     at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:504)
     at
 org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
     at
 org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
     at
 org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:328)
     at
 org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
     at
 org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
     at
 org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
     at
 org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
     at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
     at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
     at
 org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
     at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
     at
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
     at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
     at
 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
     at
 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
 Caused by: java.util.zip.ZipException: invalid END header (bad central
 directory offset)
     at java.util.zip.ZipFile.open(Native Method)
     at java.util.zip.ZipFile.init(ZipFile.java:203)
     at java.util.zip.ZipFile.init(ZipFile.java:234)
     at
 org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2419)
     ... 29 more
 !SUBENTRY 1 org.eclipse.jdt.core 4 -1 2009-09-03 09:39:44.028
 !MESSAGE I/O 

[android-developers] Re: XML-RPC

2009-09-03 Thread skink

Object[] directors = (Object[]) response.get(directors);

Director[] darray = new Director[directors.length];

for (int i=0; idirectors.length; i++) {
   darray[i] = new Director();
   Map map = (Map) directors[i];
   ...
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: can anyone get the layout tab to work in eclipse for layout xml files?

2009-09-03 Thread Yusuf Saib (T-Mobile USA)

The layout tab works for me sometimes. And then sometimes it doesn't.
Restarting Eclipse helps, sometimes.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Sep 3, 9:29 am, sdphil phil.pellouch...@gmail.com wrote:
 and are there any tools out there that does a good job of this?  i
 would love to off-load some of the xml layout stuff to a non-
 programmer but not require them to install all the devtools.

 On Sep 3, 9:24 am, sdphil phil.pellouch...@gmail.com wrote:



  I am using eclipse 3.5 with the ADT plugin.

  when I view layout xml files, i get two tabs in the view - the source
  code view and a graphical view.

  the graphical view almost never works for any of my layouts.  it
  usually shows NullPointerException: null at the top and nothing
  else.

  when it does work, it often does not match what i get in the simulator
  or device.

  it seems like this thing simply is not ready for prime time; although
  the idea is very cool.  has anyone else had much success with it?

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

2009-09-03 Thread John Cross
please take me off of your email list, 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
-~--~~~~--~~--~--~---



  1   2   >