[android-developers] Help - how to launch google chat intent

2009-10-21 Thread loty

Can anyone help me with launching google talk intent. I figured out
how to launch email intents with ACTION_SEND but can't figure out how
to launch google talk or if it's even possible. 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] Change widget size at run-time

2009-10-16 Thread loty

Is it possible to change widget size at run-time? I want to provide
users with an option to chose size of the widget from configuration
utility but can't figure out how to do that. The only way to specify
size of the widget seems to be to explicitly do that in
AndroidManifest.xml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 scroll Gallery all the way to the left?

2009-09-17 Thread loty

Can't figure out if it's possible to programatically scroll Gallery to
the left so that first item in the gallery is all the way to the left
and not in the center of a gallery. Must be simple but I just can't
figure it out. Please help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Storing bitmap images for game animation

2009-04-03 Thread loty

Hi,

Just starting a little game project and have a super basic question -
what's the best way to store animation images for a game? I looked at
the alien bloodbath code and they store multiple frames in a single
png file. Is that the preferred way or is there easier/better way to
do it? MP4?

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



[android-developers] Proximity Alert and Battery life

2009-03-04 Thread loty

I wrote a simple app that uses proximity alerts and after installing
it on my G1 found that battery life have been halved at least. It's so
bad that phone needs to be recharged mid-day or it completely dies by
9pm. There is no polling of any kind - just proximity alerts (3 of
them). I tried with GPS turned off (using network triangulation for
coarse GPS location) but battery life is still abysmal.

Is there a general solution to improve battery life with proximity
alerts or the whole GPS thing is a non-starter on G1s?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Proximity Alert and Battery life

2009-03-04 Thread loty

Just to clarify - I'm not interested in monitoring status of my
batteries.
I'm interested in finding a solution so that simple proximity alerts
don't destroy battery life and make my apps unusable to users.

Can you elaborate please how I can use Power Management utility to
reduce power consumption of simple proximity alerts?

On Mar 4, 11:49 am, Javier Segura jav...@gmail.com wrote:
 There is a utility called Power Management that fits your needs

 On Wed, Mar 4, 2009 at 5:33 PM, loty lev.pert...@gmail.com wrote:

  I wrote a simple app that uses proximity alerts and after installing
  it on my G1 found that battery life have been halved at least. It's so
  bad that phone needs to be recharged mid-day or it completely dies by
  9pm. There is no polling of any kind - just proximity alerts (3 of
  them). I tried with GPS turned off (using network triangulation for
  coarse GPS location) but battery life is still abysmal.

  Is there a general solution to improve battery life with proximity
  alerts or the whole GPS thing is a non-starter on G1s?

 --
 Javier
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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't open dex cache error with SDK 1.1

2009-03-04 Thread loty

Recently I switched to SDK 1.1 and it worked for a short time without
any problems. Now I'm getting Can't open dex cache '/data/dalvik-
cache/system ... error and emulator doesn't start at all. Just shows
Android screen of death with blinking cursor. When I repoint Eclipse
back to 1.0 r2 it works fine.

I did adb shell and /data folder is empty

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



[android-developers] Re: Proximity Alert and Battery life

2009-03-04 Thread loty

I played with it for 15 minutes but never run it for a full day. Will
do though.

On Mar 4, 12:26 pm, Mark Murphy mmur...@commonsware.com wrote:
 loty wrote:
  Just to clarify - I'm not interested in monitoring status of my
  batteries.
  I'm interested in finding a solution so that simple proximity alerts
  don't destroy battery life and make my apps unusable to users.

 There are other apps that use proximity alerts -- for example, I would
 assume Locale does. Have you tried these applications to see their
 effects on battery life?

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using LIKE in Android SQLITE

2009-02-17 Thread loty

This works for me
String sFilter = KEY_DATA +  LIKE '% + queryString + %';
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_DATA,
KEY_LAST_MODIFIED}, sFilter, null, null, null, null);

On Feb 16, 6:26 am, hc honch...@gmail.com wrote:
 I want to do a query equivalent to this

 SELECT * FROM search_table WHERE keyword LIKE '%abc%';

 How can I do this? I have tried out different methods using rawQuery
 but I can't do this. Hope someone can hep with this. 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: Resize based on orientation.

2009-02-13 Thread loty

I would also suggest using different layout files for different screen
sizes and orientation. It works very well and much easier to control
than any 'smart' resizing code. Look into API docs for explanation of
resource folder naming conventions.

On Feb 12, 7:26 pm, Timo Bruck timot...@gmail.com wrote:
 Android will automatically re-layout your views based on orientation (and
 screen size, too!), but you need to give it flexibility in setting the view
 sizes to do that.

 I try to avoid using absolute dimensions for anything other than padding or
 when I want a view to be a certain size regardless of screen size (e.g. the
 height of a button).

 I think what you want to do is set the layout_height of your EditText and
 WebViews to 0px, and then add a layout_weight=1 to each of them. This will
 tell Android to divide up any extra screen space between those two views
 equally.

 Alternatively, you could also have two different layout files (one for
 landscape and one for portrait).

 -Timo

 On Thu, Feb 12, 2009 at 3:54 PM, David godsinven...@gmail.com wrote:

  Hello, I need to have my view resize itself based on the orientation.
  After extensive googling (maybe i was using the wrong terms) I could
  find nothing telling me how to detect when the orientation was
  changed. Here is my layout file:

  ?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

         EditText android:id=@+id/htmledit
                 android:layout_width=fill_parent
                 android:layout_height=200px
                 /
         WebView android:id=@+id/htmlview
                 android:layout_width=fill_parent
                 android:layout_height=200px
                 /
  /LinearLayout

  how do I have it automatically resize itself? I want each item (the
  EditText and the WebView) to fill half the screen (not counting the
  title/notification bars). I set the height to absolute and not
  wrap_content because wrap_content defaults to 1 line for EditText and
  nothing for WebView. and fill_parent has the EditText on top of the
  WebView.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Search engine app for Android? It's in Perst 4.0 embedded database

2009-01-27 Thread loty

What's wrong with SQLite?

On Jan 26, 8:11 pm, Ted mcobj...@gmail.com wrote:
 Looking for a way to integrate full-text search and fast, lightweight
 data management with your Android applications?

 The new Perst 4.0 open source, object-oriented embedded database
 system brings native full-text search capability to Android and builds
 on this feature to provide a sample search engine application for
 contact data residing on mobile phones.

 To provide search, the database stores an inverse index of keywords,
 with parsing and stemming of indexed text performed either by user-
 defined code or by Perst's default simple parser and stemmer. The
 feature supports logical operators and calculates relevance of search
 results to a query. The new sample application, ContactsIndex, stores
 and indexes contact information, and could be extended to provide
 search capabilities for PDF, word processing, HTML and other stored
 files. The example applications are included with complete source code
 in the Perst 4.0 for Java distribution.

 Also new in Perst 4.0 for Android: support for non-native objects,
 which expands the scope of the embedded database to benefit a larger
 variety of application types.

 The Perst embedded database system helps developers create small-
 footprint embedded Java applications for Android that are fast,
 reliable, and cost-effective to develop and maintain.

 You can find out more about what's new in Perst 4.0 at:

 http://www.mcobject.com/perst_v4_for_mobile_phones

 and download the open source Perst and Perst Lite software at:

 http://www.mcobject.com/perst_eval

 Details about Perst and Android are athttp://www.mcobject.com/android.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Problem in Viewing table - sdk1.0

2009-01-15 Thread loty

Best way to deal with SQLite that I found is to download and install
Firefox SQLite Addon module. Then use adb pull command to download
your batabase from the emulator to your desktop and view/manipulate it
in Firefox SQLite app. You can put your db back with adb push command.
Saved me a lot of gray hair :)

On Jan 13, 5:07 am, jayesh.thadani jayesh.thad...@gmail.com wrote:
 Hi..
 I am using sdk1.0

 i created database as firstDB  created table in it as firsttable

 my application is working fine, but am not been able to view tables
 name in database.

 i open it with sqlite, it shows database name in it with .databases
 command..

 but when i used .table it does not show tables contained in that
 database..

 Please help me out. i watch previous forum , i think there is problem
 with permission settings..

 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] LinearLayout in gallery widget

2009-01-13 Thread loty

I'm getting a class cast exception when I try to use LinearLayout in
Gallery. Is it a bug? Not yet supported feature? Has anyone got it
working? Looks like it tries to get measurements from LinearLayout and
then barfs out in Gallery somewhere.

01-13 10:47:52.294: ERROR/AndroidRuntime(428): Uncaught handler:
thread main exiting due to uncaught exception
01-13 10:47:52.356: ERROR/AndroidRuntime(428):
java.lang.ClassCastException: android.widget.Gallery$LayoutParams
01-13 10:47:52.356: ERROR/AndroidRuntime(428): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:323)
01-13 10:47:52.356: ERROR/AndroidRuntime(428): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:275)
01-13 10:47:52.356: ERROR/AndroidRuntime(428): at
android.view.View.measure(View.java:6621)

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

2009-01-13 Thread loty

Solved the problem. My linear layout needed this line to behave well
within gallery widget
myLayout.setLayoutParams(new Gallery.LayoutParams(140, 140));

Nothing beats scientific trial and error especially with super scarce
SDK documentation.
A 1 line explanation in Gallery docs would have saved me hours.

On Jan 13, 10:54 am, loty lev.pert...@gmail.com wrote:
 I'm getting a class cast exception when I try to use LinearLayout in
 Gallery. Is it a bug? Not yet supported feature? Has anyone got it
 working? Looks like it tries to get measurements from LinearLayout and
 then barfs out in Gallery somewhere.

 01-13 10:47:52.294: ERROR/AndroidRuntime(428): Uncaught handler:
 thread main exiting due to uncaught exception
 01-13 10:47:52.356: ERROR/AndroidRuntime(428):
 java.lang.ClassCastException: android.widget.Gallery$LayoutParams
 01-13 10:47:52.356: ERROR/AndroidRuntime(428):     at
 android.widget.LinearLayout.measureVertical(LinearLayout.java:323)
 01-13 10:47:52.356: ERROR/AndroidRuntime(428):     at
 android.widget.LinearLayout.onMeasure(LinearLayout.java:275)
 01-13 10:47:52.356: ERROR/AndroidRuntime(428):     at
 android.view.View.measure(View.java:6621)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Validation of the phone number:

2009-01-13 Thread loty

Android has this ability as part of Linkify functionality - basic
pattern matching.
It does a good job of parsing out phone numbers but messes up other
numbers sometimes.
You can always roll your own - it's trivial with regular expression.

On Jan 12, 11:49 pm, Manjunatha M (ಮಂಜುನಾಥ ಎಂ) man...@gmail.com
wrote:
 Hi all,
 I am writing an application, which actually tries to insert a number into
 the contacts.
 Before inserting, I need to check for the validity of the phone number.

 Does android provide any API to pass this value and check if the phone
 number is valid or not?

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

2009-01-12 Thread loty

You surely jest my friend :)
I heard a lot of complains on various OSes but lack of 'smileys for
texting' definitely takes the cake.
All these items while valid have very little to do with Android OS -
if you don't like IM client with no smileys then download and use the
one that has them.

On Jan 8, 3:17 pm, iali802...@googlemail.com
iali802...@googlemail.com wrote:
 I like the Android operating system, I think it will be the choice of
 the averager user very very soon.
 I have a few suggestions that I think should be implemeted, which were
 overlooked, I think; they are as follows:
 *Smileys for texting.
 *Removal of or the option to hide all pictures folder.
 *Option to view picture folders as other than thumbnails.
 *To be able to change from portrait to landscape and vise-versa in
 picture view mode using accelrometer.
 *Better file management so as to be able to move pic or music file
 into other folders withought PC.
 *Be able to access and create playlists from folders created on MS
 directly for music.
 *Not change current playing track every time I want to browse another
 playlist.
 *Every time a playlist is edited it has to be saved to make edition
 permanent but no warning given if you forget and backout.
 *Also every time your saving an edited playlist, you should have a
 default Overight Current button.
 *More options on the camera software. e.g. 10 second timer
 *Software to record video using camera.
 *Be able to move icons from the tab tray as suppose to copying them.
 Leaves too much clutter as it is in tab tray if you have a lot of
 applications, and therfore makes it not a very good experiance when it
 is used.
 *Be able to password protect files and folders.
 *Call log should display the exact time of calling not just a
 calculation of how long ago.
 *I've noticed a dialing pad tab while on a call to some one and thoght
 this good; I can save numbers given to me over the call, but couldn't
 figure out what it did. I want to able to save numbers like while on a
 call to some 1.
 Thank you and I hope u find these suggestion helpful in improving the
 OS.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Slide Views ( like Google Scoreboard app )

2009-01-12 Thread loty

I installed Scoreboard (nice app BTW) and I don't think it's dragging
anything. I think it just uses gestures to initiate view flips with
scroll left/scroll right animations between views. That's what I'm
doing in one of my apps and it looks pretty similar to scoreboard.

On Jan 12, 5:13 pm, Alexey avolo...@gmail.com wrote:
 UI looks like a home workspace. It support ability to flip/drag to the
 next view. So for example willl have NHL games schedule for today. And
 if you move screen side wise you'll see a schedule for tomorrow/
 yesterday ( and it goes on and on ).
 If i take a home screen as an approach i'm kind of getting stuck how i
 reload my current/prev/next view after the flip is finished.

 On Jan 12, 4:00 pm, Mark Murphy mmur...@commonsware.com wrote:

  Alexey wrote:
   Mark do you think that kind of thing can be archived with view
   flipper ?

  Well, I do not haveScoreboardinstalled, so I do not know exactly what
  theScoreboardUI looks like.

  However, ViewFlipper only shows one view at a time, and I am not aware
  that it supports dragging. So, my guess is thatScoreboardis not using
  ViewFlipper for this.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Android Training in Sweden --http://www.sotrium.com/training.php


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

2009-01-12 Thread loty

If you mean how to add context menu to your list - this is how you do
it

in your OnCreate add
registerForContextMenu(getListView());

and then overwrite 2 methods

and then overwrite 2 methods

@Override
public boolean onContextItemSelected(MenuItem item)
{
AdapterContextMenuInfo info = (AdapterContextMenuInfo)
item.getMenuInfo();
Toast.makeText(this, Longpress:  + info.position,
Toast.LENGTH_SHORT).show();
return true;
}

@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo)
{
AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
int selPos = info.position;

menu.add(My Context Menu Item);
}

I think that's it

On Jan 12, 12:35 pm, J. Pablo Fernández pup...@gmail.com wrote:
 Hello,

 Any ideas how to implement long click on the items of a ListActivity
 that is build using a ListAdapter and no layout, just the built in.

 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: Conditional Button in Layout

2009-01-07 Thread loty

Sure just use button.setVisibility(View.GONE) to hide it and

On Jan 5, 7:50 pm, Lance lancemccul...@gmail.com wrote:
 Hi All,

 I'm wondering if there is a way to make a button show based on a
 condition, i.e. if var1 == var2 show button.
 Thanks in advance.

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

2009-01-07 Thread loty

Sorry previous post got away from me :)

use button.setVisibility(View.GONE) to hide it
use button.setVisibility(View.VISIBLE) to show it again

On Jan 7, 12:30 pm, loty lev.pert...@gmail.com wrote:
 Sure just use button.setVisibility(View.GONE) to hide it and

 On Jan 5, 7:50 pm, Lance lancemccul...@gmail.com wrote:

  Hi All,

  I'm wondering if there is a way to make a button show based on a
  condition, i.e. if var1 == var2 show button.
  Thanks in advance.

  -Lance


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

2009-01-07 Thread loty

One easy way to implement it is with ViewFlipper. You can add in and
out animations and create your views on the fly

On Jan 7, 12:52 pm, Al alcapw...@googlemail.com wrote:
 I'd like to know this also. RomainGuy described the Home screen design
 as using Cell Layouts and using Scroller methods to scroll left/right,
 but the UI in Scoreboard seems much more advanced (not limited to 3
 screens, there can potentially be hundreds of screens).

 On Jan 6, 5:33 pm, avolo...@gmail.com avolo...@gmail.com wrote:

  Hi , i'm looking for the best way to implement UI that similar to
  Scoreboard app ( with views sliding ). I wonder if it was implemented
  the same way as the home screen or there is a better way ?


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

2009-01-06 Thread loty

I've seen this one too and gave up.
I guess we'll have to file into Nobody knows nobody cares category

On Jan 6, 4:06 pm, Sundog michael_...@tmail.com wrote:
 We'll settle for a No, you dummies, you're doing it wrong!

 On Jan 6, 8:19 am, Sundog michael_...@tmail.com wrote:

  I posted about exactly this a couple of days ago with no responses.
  Now with your report I'm beginning to think it's a real bug.

  Anyone at Google care to toss in an opinion?

  On Jan 6, 7:25 am, rsung poisonkimc...@gmail.com wrote:

   Anyone??? Is this a known bug?

   On Dec 21 2008, 11:00 pm, PKC poisonkimc...@gmail.com wrote:

I'm trying to make a simple set of animationsrepeat.  Based on
documentation, it appears that below should work but the animation
runs once and does notrepeat.  Any pointers would be appreciated.

Thanks

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        TextView animWindow = (TextView)findViewById(R.id.anim_text);

       AnimationSetrootSet = newAnimationSet(true);
        rootSet.setInterpolator(new AccelerateInterpolator());

        // Create and add first child, a motion animation.
        TranslateAnimation trans1 = new TranslateAnimation(0, 30, 0,
0);
        trans1.setStartOffset(0);
        trans1.setDuration(800);
        trans1.setFillAfter(true);
        rootSet.addAnimation(trans1);

        // Add a final motion animation to the root set.
        TranslateAnimation trans2 = new TranslateAnimation(0, 0, 0,
100);
        trans2.setFillAfter(true);
        trans2.setDuration(800);
        trans2.setStartOffset(800);
        rootSet.addAnimation(trans2);

        rootSet.setRepeatCount(Animation.INFINITE);
        rootSet.setRepeatMode(Animation.RESTART);

        // Start the animation.
        animWindow.startAnimation(rootSet);
    }- Hide quoted text -

   - Show quoted text -- 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: Any updates on paid apps timeline?

2009-01-05 Thread loty

First problem is not a problem really. If app requires a camera then
no one in his own mind will install it on a device with no camera.
Second problem with multiple resolution will be a fact of life as
other Android devices hit the market. Luckily for us Android has an
elegant way of managing that through multiple xml layout folders.

On Jan 4, 6:38 pm, madcoder paperga...@gmail.com wrote:
 It's not so difficult to list requirements for an app - hopefully this
 will be available for the new market.  If your app requires a camera,
 then there should be a way to list that requirement before people
 download and/or pay for the app.

 The hardest part of development (to me) is the screen resolution/
 size.  Changing layouts on a 480 x 320 screen, from Portrait to
 landscape is troublesome enough that many developers may just lock in
 one of the two modes.  Never mind coding for a smaller (or larger
 screen size).

 Using layouts other than absolute layout is a must!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 updates on paid apps timeline?

2009-01-04 Thread loty

Yes, this openness is a double edged sword. There is no way for
developers to anticipate screen resolutions and hardware limitations
of the future Android handsets especially when manufacturers
themselves are very secretive about unreleased items. But lacking some
major hardware changes it's very easy to expand Android apps to
support different screen layouts and input methods.

On Jan 4, 3:06 pm, Sena Gbeckor-Kove s...@imkon.com wrote:
 Very true,

 Its something which has been worrying me for a while now as well. With  
 so many handset manufacturers coming onboard, how do app developers  
 and more importantly, end user, know what will run on a particular  
 device. his would be a great time for some google guys, to say (yeah  
 we've thought about this but we can't tell you ;)

 Otherwise it's up tot the community to come up with something, though  
 I'm not too sure how easily anybody outside the OHA wil be abe to get  
 people to adopt. Is there a reliable mechanism for this kind of thing  
 now? I know you can specify a version of the OS, but I think we need  
 something more abstract, ie I need a a certain feature set (of at  
 least version x).

 Kind of like Maven dependencies for hardware devices?

 S

 On 4 Jan 2009, at 10:53, Al Sutton wrote:



  One of the problems I can see with multiple platforms is app
  incompatibilities.

  With the iPhone app store when you buy an app you know the app will
  work. With more Android devices coming out and the current state of
  Market I'm concerned that users will end up buying apps which either
  don't work on their screen resolution, or simply need features that  
  the
  devices don't have.

  Hopefully the powers that be have thought about this and have plans in
  place already for more than just endorsed devices like the G1.

  Al.

  Sena Gbeckor-Kove wrote:
  True, but I suspect there will be more Android devices than iPhones  
  in
  short order. For a start Samsung sells the most touch screen devices
  (not Apple)  and they're working on multiple handsets. Furthermore,
  NetBooks and other form factors will start showing up late in the  
  year.
  Don't flame me iPhone fanboys (I have one, I have developers writing
  fr it and its a nice platform if you don't mind conforming to the  
  cult
  of Jobs and being hellishly restricted API wise, it'll change). Apple
  is however only a single manufacturer. They make excellent devices
  thogh and have attracted a rabidly loyal fan base of which I am one,
  though less loyal and without the rabies.

  ;)

  S

  On 2 Jan 2009, at 22:13, loty wrote:

  There is only 1 Android phone on the market - G1 and while there is
  only 1 iPhone as well number of G1 users is nowhere near the  
  number of
  iPhone users. Not yet anyway - maybe in a couple of years...
  I think there are more developers desperately trying to get some  
  money
  for their apps than there are current Android users willing to pay  
  for
  them :)

  On Jan 2, 9:50 am, NitroDesk gsuku...@gmail.com wrote:

  @Dianne,
  You are right, i think part of the reason why the demand for the
  ability to release paid apps is high so early on is the fantastic  
  job
  that has been done on the SDK, the platform that was picked for the
  programmability and in general the confidence developers (even at  
  the
  time of release) have on the platform that they will be able to  
  stand
  behind the apps they build. A lot of this is testament to the trust
  that we as developers place on the platform.
  So all this clamoring should be taken as a compliment :-)
  -Nitro

  On Dec 30 2008, 5:29 pm, Justin Collum jcol...@gmail.com wrote:

  I heard somewhere that there was a 90 day moratorium on not-free
  apps. Looks
  like I heard wrong.

  On Tue, Dec 30, 2008 at 2:38 PM, Dianne Hackborn
  hack...@android.comwrote:

  Just to be clear, this is lots of speculation and no facts. :)
  Some facts
  I can share: Android is stable as of 1.0 and we will not be
  breaking
  compatibility, and in particular we will not be breaking
  applications in the
  cupcake branch.

  Comparing Android to iPhone in that way is also a questionable
  endeavor,
  since the way they were released was very different: iPhone
  shipped for
  almost a year with no support for third party apps and then
  released an
  update to add that feature, while Android shipped from the start
  with third
  party app support.  I can't comment on adoption of the G1 vs. the
  original
  iPhone, but clearly at this point there is a smaller number of
  Android
  users, simply because we started from 0 at the point where third
  party
  developers were supported.  This is something developers should
  keep in mind
  and certainly isn't being hidden.

  On Mon, Dec 29, 2008 at 1:10 PM, Sven Boden
  boden.s...@gmail.com wrote:

  I think the answer is guessable (and no I don't work for
  Google)... when
  the android OS settles down more or less. I expect it a little
  while after

[android-developers] AutoCompleteTextView dropdown color

2009-01-04 Thread loty

I have identical AutoCompleteTextView code in 2 different
applications, however one displays dropdown items in nice black text
on white background and the other displays white on white (invisible
unless you highlight the item)

Here is the extract from xml files - I don't do any changes in code
for this control
AutoCompleteTextView
android:id=@+id/data
android:layout_width=180px
android:layout_height=wrap_content/

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



[android-developers] Re: Any updates on paid apps timeline?

2009-01-02 Thread loty

There is only 1 Android phone on the market - G1 and while there is
only 1 iPhone as well number of G1 users is nowhere near the number of
iPhone users. Not yet anyway - maybe in a couple of years...
I think there are more developers desperately trying to get some money
for their apps than there are current Android users willing to pay for
them :)

On Jan 2, 9:50 am, NitroDesk gsuku...@gmail.com wrote:
 @Dianne,
 You are right, i think part of the reason why the demand for the
 ability to release paid apps is high so early on is the fantastic job
 that has been done on the SDK, the platform that was picked for the
 programmability and in general the confidence developers (even at the
 time of release) have on the platform that they will be able to stand
 behind the apps they build. A lot of this is testament to the trust
 that we as developers place on the platform.
 So all this clamoring should be taken as a compliment :-)
 -Nitro

 On Dec 30 2008, 5:29 pm, Justin Collum jcol...@gmail.com wrote:

  I heard somewhere that there was a 90 day moratorium on not-free apps. Looks
  like I heard wrong.

  On Tue, Dec 30, 2008 at 2:38 PM, Dianne Hackborn hack...@android.comwrote:

   Just to be clear, this is lots of speculation and no facts. :)  Some facts
   I can share: Android is stable as of 1.0 and we will not be breaking
   compatibility, and in particular we will not be breaking applications in 
   the
   cupcake branch.

   Comparing Android to iPhone in that way is also a questionable endeavor,
   since the way they were released was very different: iPhone shipped for
   almost a year with no support for third party apps and then released an
   update to add that feature, while Android shipped from the start with 
   third
   party app support.  I can't comment on adoption of the G1 vs. the original
   iPhone, but clearly at this point there is a smaller number of Android
   users, simply because we started from 0 at the point where third party
   developers were supported.  This is something developers should keep in 
   mind
   and certainly isn't being hidden.

   On Mon, Dec 29, 2008 at 1:10 PM, Sven Boden boden.s...@gmail.com wrote:

   I think the answer is guessable (and no I don't work for Google)... when
   the android OS settles down more or less. I expect it a little while 
   after
   the cupcake release. Currently some things are still going to break 
   and if
   they would allow you to buy applications from the market, you would need 
   to
   get a new version of the applications very quickly, ...

   I also don't think android adoption is as quick as the iphone's. In a lot
   of countries you can't even get an T1 in a legal/normal way... Belgium
   e.g. :( . So maybe if applications would come out now as paying 
   applications
   they would disappoint the developers as well qua sales.

   Regards,
   Sven

   2008/12/29 NitroDesk gsuku...@gmail.com

   True, but the most distressing part is the inability to distribute
   paid apps on the market, even with the possibility of charging for
   them offsite.
   I bet this keeps lots of good apps from showing up on the market, and
   worse still, from being developed.
   -Nitro

   On Dec 28, 12:48 pm, Sven Boden boden.s...@gmail.com wrote:
There are already sites out there which allow you to charge for 
android
apps, for the official site I didn't see anything out there yet.

Regards,
Sven

2008/12/28 Redhunt androidgr...@survivorsoft.com

 Has anyone heard any news on when developers will be able to post
   apps
 for a fee ?

 Thanks- Hide quoted text -

- Show quoted text -

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

   Note: please don't send private questions to me, as I don't have time to
   provide private support.  All such questions should be posted on public
   forums, where I and others can see and answer them.- 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: Table implementation

2008-12-29 Thread loty

I don't know about the best way but you can easily implement it with a
ListView holding a horizontal LinearLayout for example.

On Dec 26, 9:48 am, omar.salama omar.salam...@gmail.com wrote:
 Hello all,
 I was asking what is the best way to implement the following UI view:
 A table. Each row contains the following (with the same order):
 An icon on the left - A string beside the icon – A progress Bar
 indicating the % (10%, 90%,…etc) – A string below the progress bar

 Thank you,
 Omar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Usability question: How is user supposed to discover the menu shortcut keys?

2008-12-29 Thread loty

The real question here is do you (or your users) really need more than
6 commands? If you are struggling with the concept so will your users.
Perhaps a little rethink of UI is in order.

On Dec 26, 6:52 pm, j jac...@gmail.com wrote:
 If there are more than 6 commands, there is a More menu item added.
 Once opened, the menu list does show the key shortcuts.  But if I have
 less than 6 commands, the key shortcuts are not displayed.  How is
 user supposed to find out the menu shortcut keys?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Font size for Context menu

2008-12-22 Thread loty

HI,
I added long-press context menu to my app with menu items that are
generated during run-time. Sometimes menu items are too long to be
displayed and Android shows part of it and then puts ellipsis (...)
for the rest.
Is there any way to change font size for menu items? I tried looking
through API but didn't find any hooks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Developing Your Application IDEAS REQUIRED !

2008-12-18 Thread loty

Developer with no imagination?!?
You shame us all.

On Dec 17, 2:16 pm, T-Mobile Whisperer [G1]
nadiafai...@googlemail.com wrote:
 Hi Guys,

 The Mission: To develop an android program for the G1 (and hopefully
 any other android handset which will follow)

 Problem: Does anyone have any ideas what I could make a program about,
 and what its purpose would be, PLEASE only sensible answers.

 P.S. It has to be something essential and would be used on a nearly
 daily basis. WHAT DOES THE G1 REALLY NEED

 Hopefully during the development stage i will be posting all the
 latest news and development issues. When it is complete it WILL be
 available on Android Market for Download.

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

2008-12-18 Thread loty

If you want to make the button disappear do button.setVisibility
(View.GONE); or View.INVISIBLE in your button click handler

On Dec 18, 1:02 am, diya blore diya.bl...@gmail.com wrote:
 Hi ALL.
 i  m facing an issue.. wheni click on button a pop up menu appear.. along
 wit that behind the click button is also visible..
 How to disable it click button..
 Can any one guide me...
 --
 Thank's in adv.
 Diya :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] BaseAdapter getView question

2008-12-18 Thread loty

I have a question about getView method of BaseAdapter that I overwrote
to populate my GridView. All is well when convertView parameter is
null - I create my views for cells and populate them, works and looks
great.
The problem is when my data is updated and notifyDataSetChanged(); is
called somewhere else in my app convertView parameters in getView are
all screwed up.
Here is an example. I created Button view for position 0 and the rest
TextViews. When I get getView calls with convertView not null for
position 0 it's not a Button that I created but a TextView - WTF? For
now I just ignore convertView parameter and always create new views
but clearly either I don't understand something here or it's a bug. I
hope it's me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simple GridView question

2008-12-18 Thread loty

Just to answer my own question in case anyone has the same problem.

getCount has to return total number of cells to display in GridView.
So if you want to have 3x3 grid getCount needs to return 9
position in getView is linear e.g. position 7 means row 3 cell 1
convertView is a total mystery as it seems to return random views in
consecutive calls - I ignore it for now and just create new views
every time.

On Dec 16, 10:01 am, loty lev.pert...@gmail.com wrote:
 Sorry if I'm asking something trivial but I can't figure it out for
 the life of me. Essentially what I want to have is a simple table like
 GUI and I figured GridView is what I need. I wrote a simple GridView
 test app that sets 3 columns and should have few rows of data. Here is
 my test data
                 private Row[] mData = {
                                 new Row(Row1, Data1, 1999),
                                 new Row(Row2, Data2, 2000),
                                 new Row(Row3, Data3, 2001),
                 };
 And this is pretty much how I want this data to be displayed in the
 grid - 3 rows of 3 cells that hold my data. What I can't figure out
 how to do is create views and set values inside individual cells in
 each row.

 Here is my code that should populate GridView
 public class GridDataAdapter extends BaseAdapter {
                 public GridDataAdapter(Context c) {
                     mContext = c;
                 }

                 public int getCount() {
                     return mData.length;
                 }

                 public View getView(int position, View convertView,
 ViewGroup parent) {
                     TextView textView;
                     if (convertView == null) {
                         textView = new TextView(mContext);
                         textView.setLayoutParams(new GridView.LayoutParams(45,
 45));
                     } else {
                         textView = (TextView) convertView;
                     }

                     textView.setText(mData.data1);??? based on
 position??? what is position???

                     return textView;
                 }

 Here is the problem - How do I set values of individual cells in each
 row?
 I know I can create a linear layout with 3 TextViews in my view but
 then I would just be turning gridview into a listview. What should
 getCount return? Number of rows or total number of cells
 (rows*columns)?
 I'm sure I'm missing something obvious here. Please help :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BaseAdapter getView question

2008-12-18 Thread loty

Thanks a lot Mark - excellent explanation.
Still have a question:

getView's first 2 parameters are
--position--The position of the item within the adapter's data set
of the item whose view we want.
--convertView-- The old view to reuse, if possible. Note: You should
check that this view is non-null and of an appropriate type before
using. If it is not possible to convert this view to display the
correct data, this method can create a new view.

So getView knows the position that I need to fill - why not return a
view that I created for that position in the previous call?
Why isn't it a default behavior?



On Dec 18, 11:20 am, Mark Murphy mmur...@commonsware.com wrote:
 loty wrote:
  I can definitely do the same but it seems super strange to me that it
  would return anything other than what I created in the initial call.

 getView() gets called more than once.

  Is there any rhyme or reason for what this function gets in the
  convertView parameter?

 Sure. It's a View that is being recycled. It is one of the ones you
 created earlier. Exactly *which* one of the ones you created earlier is
 unpredictable, since it is based upon user actions, mostly scrolling or
 otherwise traversing the list.

  Very very mysterious explanation - we'll send you a view and it may or
  may not be the right view.

 My guess is that you are thinking of lists containing only a single sort
 of entry.

 There's nothing in the AdapterView API that requires all Views returned
 by the adapter's getView() to all be the exact same type of View.

 There is nothing preventing you from creating an Adapter that returns
 multiple disparate types of views. For example, I have a ListView that
 returns Views for email addresses, phone numbers, mailing addresses, and
 what could best be described as menu choices. Each of those views are
 a bit different in their layout.

 That's part of the reason they added in getViewTypeCount() and
 getItemViewType(int position), to help them be more efficient about the
 recycling process, to increase the odds that the convertView passed into
 getView() is one you *can* recycle.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: BaseAdapter getView question

2008-12-18 Thread loty

I didn't mean to insult anyone - sorry if it came out that way. Just
wanted a clear explanation for what seems to be a weird and
unpredictable behavior.

On Dec 18, 11:57 am, Mark Murphy mmur...@commonsware.com wrote:
 loty wrote:
  Is this some sort of garbage collection at work here? I have a pile of
  garbage views to be recycled and hey you need a view - how about this
  one? No, you are SOL...

  I mean if getView doesn't bother returning me my original view for a
  given location why bother with convertView at all? I guess either a
  better explanation and docs are in order or a new API that makes sense
  to non-smokers.

 If you are going to continue insulting us in the community, it is
 unclear why you expect to get help.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Question about the use of FrameLayout

2008-12-16 Thread loty

Each Activity carries a lot of baggage like state management, etc
which is not always applicable. I started my first Android app like a
good boy from the Notepad example and very soon had a spaghetti of
Activities. It got to the point that I had to click Back button 6 or 7
times to get back to my main screen - clearly an awful design (mostly
mine maybe with some guilt spilling to Android team as well).
I redone my app with just 2 Activities and view flipping and couldn't
be happier.
Activity is NOT a new screen - activity is as the name suggests an
'Activity'. User has to clearly start doing something different for it
to be justifiably new activity. At least this is my view on things.

On Dec 16, 2:14 pm, Romain Guy romain...@google.com wrote:
 Thanks Dianne, I should have been clearer: it is indeed perfectly fine
 to switch between Views, there are good reasons to do so. But
 replacing the Activity model is not a good one.

 One thing is certain, it is wrong to think that it would be an
 optimization. Like I said, it will only slow down your application's
 startup time, use more memory, slow down layout and drawing, etc.

 As for relying on the system to kill other apps, it's not a good
 approach either. You are simply causing a disservice to the user for
 absolutely no good reason.

 Please instead explain why you don't want to use the Activity model so
 we can either explain it better or improve it.



 On Tue, Dec 16, 2008 at 8:02 PM, Dianne Hackborn hack...@android.com wrote:
  There is nothing intrinsically right or wrong with either approach.  It is
  just as wrong to say that you shouldn't use the activity model for your UI,
  as it is to say that you should never switch between multiple views in the
  same activity.

  For the issue Romain is addressing, I would agree that it is generally wrong
  to decide that you don't want to deal with multiple activities even though
  you want your application to have the same behavior as if it did, but just
  don't want to deal with them.  All you'll end up doing is making any
  application that tries to behave consistently with others, but doesn't
  quite.

  Also if you go off into the woods with your own UI management inside of a
  single activity, you are going to lose a lot of the things the framework
  does for you: you will need to do your own state saving and restoring for
  whatever additional stuff you have in your UI so that the user will
  correctly return to it, do your own handling of back, and decide when to
  reset back to the root state and when not.

  So there are certainly situations where it makes sense to switch between
  views in an activity: heck, there is sample code for this such as in the tab
  demos.  A good general rule of thumb is that if the user is navigating to
  what they perceive to be a new screen, it should be expressed as an
  activity, and if they are switching between related views in the same screen
  is can often make sense to do that all in one activity.

  On Tue, Dec 16, 2008 at 9:50 AM, loty lev.pert...@gmail.com wrote:

  I'm actually on the same page with Mark. To me Android's history
  mechanism is more of a hassle than a benefit especially if you use
  view=activity anathema. Personally I found that views inflating is not
  that slow at all. I didn't measure memory footprint of my applications
  but Hey, let Android swap some other application out if my app needs
  more RAM :) At least I won't have to bother with endless activities
  nightmare.
  Perhaps I should look into FrameLayout more closely.

  On Dec 16, 12:14 pm, Romain Guy romain...@google.com wrote:
   Such an approach would be very inefficient for several reasons. First
   of all it requires to inflate many resources that won't be needed
   right away, which will slow down your application startup time. It
   will also increase memory usage. Then you will defeat the history
   mechanism built in Android, thus forcing you to implement the back
   yourself, and everything it entails. It's a lot more work for you, and
   you will probably end up having a user experience that feels like
   other Android apps but not quite.

   What performance issue are you trying to solve?

   On Tue, Dec 16, 2008 at 6:01 PM, Mark mark.nuetzm...@gmail.com wrote:

Would there be an advantage of using multiple Activity classes each
with their own primary layout as opposed to creating multiple layout
views and stacking them into FrameLayout?  One of the things I
currently do in my WM development that has worked very well in terms
of performance is to create multiple layers for a form and then show
or hide the layers based on what the user is doing.  I could see using
the FrameLayout class to stack multiple other layouts that would
provide the same capabilities.  This would allow me to use a single
Activity to wrap what I need rather than creating multiple Activities.

thanks,
Mark

   --
   Romain Guy
   Android framework

[android-developers] Re: ★ A Ma pView API KEY issue.....PLEASE HELP ★

2008-12-16 Thread loty

If you are using Eclipse for development it generates it's own debug
key and you need new Map API key for it.
There is a place to specify a different keystore but last time I tried
it it didn't work.

On Dec 16, 2:26 pm, Nickname yes...@live.com wrote:
 Thanks for information.

 What keystore i need to use to request Map ApiKey for my application
 apk that needs to be installed to the other emulators?

 I don't think i should use my release mode keystore, because it
 would need me to sign my app with the release key and make my app not
 installable even on my own emulator!

 On Dec 15, 11:25 pm, Ah-Hsin tw.ahh...@gmail.com wrote:

  Do you use debug.keystore to request Map api key? if yes, you can not
  install android apk to the other emulators.

  On 12月16日, 下午2時10分, Nickname yes...@live.com wrote:

   Hi,

   I am having a problem on MapView ApiKey during collaboration with my
   colleague who installs my application apk with a MapView activity on
   his emulator.

   The application runs well on my emulator, BUT has BLANK map on his
   emulator.

   What is the possible cause to this problem?

   Besides, a weird thing is: no matter what value I set to my ApiKey,
   for example

   com.google.android.maps.MapView
  android:id=@+id/itemmap
  android:apiKey=WHAT THE B???
...

   I always can get the map correctly displayed.

   However, when the application runs on my colleague's emulator, he
   always got blank map.

   Please help!! Thanks in advance

   PS. We both use SDK 1.0, R1.


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

2008-12-16 Thread loty

Cool - I guess we were arguing on the same side of things. :)
I definitely saw this in API docs somewhere and Diane just repeated it
too that general rule of thumb should be new Activity for new screen
and I just think that as a general rule of thumb you probably don't
want to have new Activity for each new screen. It sounds like one of
these rules that is meant to be broken...

On Dec 16, 3:17 pm, Romain Guy romain...@google.com wrote:
 We never said every screen has to be an Activity (that's why it's
 called Activity and not Screen :)). Calendar is a good example of
 this, when you switch between the Day view to the Week view, you
 remain in the same activity for instance.

 Again, it is perfectly sound to flip views inside one Activity, if it
 makes sense in the user's workflow. Similarly, it is perfectly sound
 to use several Activities, if it makes sense in the user's workflow.

 The Calendar app is again a good example of when not to use
 Activities. The Activity is viewing your agenda, but you can view it
 in different ways (day, week, month, etc.) and those become simply
 states of the activity.



 On Tue, Dec 16, 2008 at 9:04 PM, loty lev.pert...@gmail.com wrote:

  Each Activity carries a lot of baggage like state management, etc
  which is not always applicable. I started my first Android app like a
  good boy from the Notepad example and very soon had a spaghetti of
  Activities. It got to the point that I had to click Back button 6 or 7
  times to get back to my main screen - clearly an awful design (mostly
  mine maybe with some guilt spilling to Android team as well).
  I redone my app with just 2 Activities and view flipping and couldn't
  be happier.
  Activity is NOT a new screen - activity is as the name suggests an
  'Activity'. User has to clearly start doing something different for it
  to be justifiably new activity. At least this is my view on things.

  On Dec 16, 2:14 pm, Romain Guy romain...@google.com wrote:
  Thanks Dianne, I should have been clearer: it is indeed perfectly fine
  to switch between Views, there are good reasons to do so. But
  replacing the Activity model is not a good one.

  One thing is certain, it is wrong to think that it would be an
  optimization. Like I said, it will only slow down your application's
  startup time, use more memory, slow down layout and drawing, etc.

  As for relying on the system to kill other apps, it's not a good
  approach either. You are simply causing a disservice to the user for
  absolutely no good reason.

  Please instead explain why you don't want to use the Activity model so
  we can either explain it better or improve it.

  On Tue, Dec 16, 2008 at 8:02 PM, Dianne Hackborn hack...@android.com 
  wrote:
   There is nothing intrinsically right or wrong with either approach.  It 
   is
   just as wrong to say that you shouldn't use the activity model for your 
   UI,
   as it is to say that you should never switch between multiple views in 
   the
   same activity.

   For the issue Romain is addressing, I would agree that it is generally 
   wrong
   to decide that you don't want to deal with multiple activities even 
   though
   you want your application to have the same behavior as if it did, but 
   just
   don't want to deal with them.  All you'll end up doing is making any
   application that tries to behave consistently with others, but doesn't
   quite.

   Also if you go off into the woods with your own UI management inside of a
   single activity, you are going to lose a lot of the things the framework
   does for you: you will need to do your own state saving and restoring for
   whatever additional stuff you have in your UI so that the user will
   correctly return to it, do your own handling of back, and decide when to
   reset back to the root state and when not.

   So there are certainly situations where it makes sense to switch between
   views in an activity: heck, there is sample code for this such as in the 
   tab
   demos.  A good general rule of thumb is that if the user is navigating to
   what they perceive to be a new screen, it should be expressed as an
   activity, and if they are switching between related views in the same 
   screen
   is can often make sense to do that all in one activity.

   On Tue, Dec 16, 2008 at 9:50 AM, loty lev.pert...@gmail.com wrote:

   I'm actually on the same page with Mark. To me Android's history
   mechanism is more of a hassle than a benefit especially if you use
   view=activity anathema. Personally I found that views inflating is not
   that slow at all. I didn't measure memory footprint of my applications
   but Hey, let Android swap some other application out if my app needs
   more RAM :) At least I won't have to bother with endless activities
   nightmare.
   Perhaps I should look into FrameLayout more closely.

   On Dec 16, 12:14 pm, Romain Guy romain...@google.com wrote:
Such an approach would be very inefficient for several reasons. First

[android-developers] Re: Developing on device(? is it possible)

2008-12-15 Thread loty

There is no fundamental reason why it can't be done. The real question
is not How but Why.
Why would you ever want to develop/debug on an underpowered machine
with minimal memory, tiny screen and keyboard made for thumbing?
If you are looking for something small that you can carry with you
look at small notebooks or even netbooks.

On Dec 12, 2:38 am, mang3lo mang...@gmail.com wrote:
 Hey all! I've been lurking and searching (maybe I wasn't using the
 right key words =P), but hadn't found anyone addressing the issue or
 asking this question.  Is it possible to develop on the device
 itself?  (as in write, compile, and run applications.  Not merely
 putting code in a text file and waiting to get home to try it on your
 computer)

 I would assume the paltry storage space on the G1 limits the viable
 options, (as well as its trouble playing nice with the SD card) but
 nothing ends up correct when I assume. If it is not available now (due
 to what I mentioned earlier) would it be possible in the future when
 the applicable OS upgrades roll around?

 Due to my job and class schedule, I find myself with the proportional
 majority of my  time spent with my G1 phone in my hands, rather than
 in front of a keyboard, and I would become an android code junkie in a
 heartbeat if I can put all that mobile idle time to productive means.

 Thanks in advance!
 -Matt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Developing on device(? is it possible)

2008-12-15 Thread loty

Hey Chris,

How's performance on your Acer? I'm looking for a New Year gift for
myself :)
What do you have XP or Linux?

On Dec 15, 1:39 pm, chris pick chris...@gmail.com wrote:
 I was wondering the same thing, and came to the same conclusion. As far as
 the netbook goes, I went and purchased one so I can carry it around and do
 some coding when I have some free time. They are quite inexpensive, and the
 Acer Aspire One can be used w/ Linux, WinXP or even OSX (OSX86). You can
 find some deals on the netbooks w/ discounts coupons, and I don't want to
 hijack the thread, but I picked one up for less than $300 on ebay w/ 1gb
 memory and 120gb drive.
 Cheers!

 On Mon, Dec 15, 2008 at 10:40 AM, loty lev.pert...@gmail.com wrote:

  There is no fundamental reason why it can't be done. The real question
  is not How but Why.
  Why would you ever want to develop/debug on an underpowered machine
  with minimal memory, tiny screen and keyboard made for thumbing?
  If you are looking for something small that you can carry with you
  look at small notebooks or even netbooks.

  On Dec 12, 2:38 am, mang3lo mang...@gmail.com wrote:
   Hey all! I've been lurking and searching (maybe I wasn't using the
   right key words =P), but hadn't found anyone addressing the issue or
   asking this question.  Is it possible to develop on the device
   itself?  (as in write, compile, and run applications.  Not merely
   putting code in a text file and waiting to get home to try it on your
   computer)

   I would assume the paltry storage space on the G1 limits the viable
   options, (as well as its trouble playing nice with the SD card) but
   nothing ends up correct when I assume. If it is not available now (due
   to what I mentioned earlier) would it be possible in the future when
   the applicable OS upgrades roll around?

   Due to my job and class schedule, I find myself with the proportional
   majority of my  time spent with my G1 phone in my hands, rather than
   in front of a keyboard, and I would become an android code junkie in a
   heartbeat if I can put all that mobile idle time to productive means.

   Thanks in advance!
   -Matt


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

2008-12-09 Thread loty

Awesome info mathias. I really liked this part
The beta version of Android Market does not support notifying your
users when you publish a new version of your application. This
capability will be added soon
I can't wait

On Dec 8, 2:37 pm, mathiastck [EMAIL PROTECTED] wrote:
 Yes you can:

 http://code.google.com/android/devel/sign-publish.html

 The Using Intents to Launch the Market Application on a Device
 section describes the url pattern.  It also works if these urls are
 used on links on pages viewed from and Android phone.  They don't work
 if you just type them directly into the browser, they have to be
 links, to generate the right intent.

 On Dec 7, 9:27 pm, cyntacks [EMAIL PROTECTED] wrote:

  Hi,

  Is it possible to link from a webpage to the Android Market? That
  is, can I place a link on our company website which if clicked from an
  Android mobile device it would automagically open the Android
  Market, bringing the user to that particular app?

  Thanks for the help,

  Kevin


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



[android-developers] Re: http ?? how can i download the file from web??

2008-12-09 Thread loty

Dude - there is a ton of code on the net and in this forum that answer
this question. I know it's easy to post a question and wait for people
to solve the problem for you but common...

I'll let you go with a warning this time - here is the code

String strURL = http://www.mylittlesite.com/android.xml;;
HttpClient client = new DefaultHttpClient();
HttpGet getMethod = new HttpGet(strURL);
try {
HttpResponse response = client.execute(getMethod);
String data = EntityUtils.toString(response.getEntity());
...

You might want to play with setHeader method of the getMethod because
I found that many web server don't like requests coming from weird
browsers like Andriod's

Here is how to fake Firefox on Windows
getMethod.setHeader(User-Agent, Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4);

On Dec 9, 4:28 am, SinFrancis [EMAIL PROTECTED] wrote:
 how can i download the file from web??

  httpClinet ?

 please tell me the API  or give me some demo!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create grey menu icons?

2008-12-08 Thread loty

I'm not sure what you are asking - if you asking about how to improve
your graphic design skills I would suggest reading good books on
Photoshop. But before you start google already created bunch of common
icons that you can use in your applications
http://code.google.com/android/migrating/m5-0.9/changes/android.R.drawable.html#android.R.drawable.ic_delete
look at all resources that start with ic_ like ic_delete,
ic_input_add, etc.




On Dec 5, 3:09 pm, Noonien Soong [EMAIL PROTECTED] wrote:
 Hi,

 does anyone know what's the easiest way to create new menu icons for
 the gray menu that pops up when you press the menu button ? I want to
 create custom icons with the same consistent look.

 I mean the icons that can be found in the SDK and are all named
 ic_menu_*.png.

 Is there some sort of a vector graphics template available ?

 Would be great to get that...

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



[android-developers] Re: Google Dell To Android

2008-12-03 Thread loty

Dude - enough already. Is there a moderator? Please can this dude!!!

On Dec 3, 12:57 am, Xavier Live Tech.S [EMAIL PROTECTED]
wrote:
 Google And Dell Are At The Point Of A Huge Merger. Launching A new
 phone to run on Android OS on a 3G network. A complete android
 interface and stylish phone. Lets all admit that the G1 is not the
 hottest phond to run android. Android Has been said to be the best
 thing to happen to Google. And Google CEO is very happy. Once The Dell/
 Google phondm is released a new version of android will be released!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting information from the Internet

2008-12-02 Thread loty

Yes Xavier,
Please stop posting if you have nothing of substance to say.

On Dec 2, 12:21 pm, Xavier Mathews [EMAIL PROTECTED] wrote:
 YOU NEED TO GO FIND YOU SOME BUSINESS.

 On 12/02/2008, Xavier Mathews [EMAIL PROTECTED] wrote:



  Thats Nice.

  On 12/02/2008, Michael [EMAIL PROTECTED] wrote:

  Heh.  Clearly a troll.

  --
  Xavier A. Mathews
  Student/Browser Specialist/Developer/Web-Master
  Google Group Client Based Tech Support Specialist
  Hazel Crest Illinois
  [EMAIL PROTECTED]@[EMAIL PROTECTED]
  Fear of a name, only increases fear of the thing itself.

 --
 Xavier A. Mathews
 Student/Browser Specialist/Developer/Web-Master
 Google Group Client Based Tech Support Specialist
 Hazel Crest Illinois
 [EMAIL PROTECTED]@[EMAIL PROTECTED]
 Fear of a name, only increases fear of the thing itself.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: com.google.wireless.gdata

2008-12-02 Thread loty

I'm also very much interested in these libraries. Can someone from
Google enlighten us on when if ever these libraries become available
again.

On Dec 1, 11:27 pm, AndroidEngineer [EMAIL PROTECTED] wrote:
 Howcome com.google.wireless.gdata and com.google.android.gdata have
 been removed from the 1.0 r1 library. I see these packages in 0.9 and
 previous versions but not in 1.0. What is the reason behind removing
 the libraries? From what I've seen, they seem to be very useful
 libraries.

 Please give me heads up. I am trying to write an application to access
 google calendar and its events.

 Thanks.

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



[android-developers] Re: Getting information from the Internet

2008-12-01 Thread loty

Look into HttpClient and related classes

Here is very simple code to get a web page
HttpClient client = new DefaultHttpClient();
HttpGet getMethod = new HttpGet
(strURL);
HttpResponse response = client.execute(getMethod);
String res = EntityUtils.toString(response.getEntity());


On Nov 29, 12:30 pm, Juan David Trujillo C.
[EMAIL PROTECTED] wrote:
 Hi guys!

 I am creating a software application for the Android platform that
 requires getting information from the Internet (getting information
 from a specific Web page, at Facebook).  Does anyone know how could
 this be done?  Perhaps some reference code?

 Thanks in advance for all your help!

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



[android-developers] Re: Starting new Activity vs. setContentPane(newView)

2008-12-01 Thread loty

I'm also not sold on the new Activity for each new screen framework.
Unless your new screen is very generic and can be reused by other
applications (I think this is a very very small minority of all
screens) you are better off using setContentView and/or ViewFlippers.
I first went down the road of new activity for new screens as per
Notepad example but very soon i had a spaghetti of activities - had to
press Back button 10 times to leave my application. Surely that's not
a preferred way to write anything. I scrapped new activity approach
for ViewFlippers and setting contents and couldn't be happier.

On Oct 24, 1:58 pm, Kipling Inscore [EMAIL PROTECTED] wrote:
 On 24 Okt., 19:54, Robert K. [EMAIL PROTECTED] wrote:

  Question: Why is it better to start a new activity if you want to
  change screen to a new view (for example to edit some notes on a
  separate text field)?

 I believe that starting a new activity will give you automatic view
 hierarchy on the back button and setContentView() will not.
 Also, if the screen you want to change to is at all generic, you can
 use an implicit intent so that other programs which do the same thing
 may be chosen if the user prefers. For the example you gave, editing a
 note in a separate text field, ACTION_EDIT with a URI for the note
 text would allow the user to drop in a new text editor application and
 use it to edit notes from your application.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can't retrieve page with HttpClient

2008-11-26 Thread loty

Mark, thanks for your reply. I can get other pages without problem but
some static pages from my web site i just can't get to. What is weird
about it is that I can navigate and view those pages in the browser in
emulator or on my G1 but using the same exact URL in HttpClient
doesn't work. I think I'm missing something here.


On Nov 25, 7:23 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 loty wrote:
  Have a weird problem - I'm trying to read a page from my web site but
  for some reason it just can't find it.  I can navigate to my page in a
  browser no problem but if I use the same URL in HttpClient I get the
  404 (File not found) from my host service. Any clues?

  Here is the code I use - seems pretty straightforward

     HttpClient client = new DefaultHttpClient();
          HttpGet getMethod = new HttpGet(strURL);
          try {
             HttpResponse response = client.execute(getMethod);
             Log.d(LOG_TAG, Response Code  + Integer.toString
  (response.getStatusLine().getStatusCode()));
             if(response.getStatusLine().getStatusCode()==404)
             {
                     Log.d(LOG_TAG, WTF - 404);
                     return;
             }

             String res = EntityUtils.toString(response.getEntity());
             Log.d(LOG_TAG, res);

 Can you request other pages, from other services, other than the one
 you're trying? In other words, is your problem unique to your host
 service, or is it a problem for all pages you try requesting?

 Assuming the problem is unique to your host service...

 Is the request of a static page or something generated by some
 server-side process? If the latter, is the process expecting other
 behavior (e.g., session cookie from a successful login) and is failing
 with a 404 instead of a 500 or something?

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can't retrieve page with HttpClient

2008-11-25 Thread loty

Have a weird problem - I'm trying to read a page from my web site but
for some reason it just can't find it.  I can navigate to my page in a
browser no problem but if I use the same URL in HttpClient I get the
404 (File not found) from my host service. Any clues?

Here is the code I use - seems pretty straightforward

HttpClient client = new DefaultHttpClient();
HttpGet getMethod = new HttpGet(strURL);
try {
HttpResponse response = client.execute(getMethod);
Log.d(LOG_TAG, Response Code  + Integer.toString
(response.getStatusLine().getStatusCode()));
if(response.getStatusLine().getStatusCode()==404)
{
Log.d(LOG_TAG, WTF - 404);
return;
}

String res = EntityUtils.toString(response.getEntity());
Log.d(LOG_TAG, res);
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ViewFlipper onFlipListener

2008-11-21 Thread loty

Ok, I guess I misunderstood. Well you can use Timer object to initiate
your flips instead of doing setFlipInterval and startFlipping. This
way you can do whatever you want before and after each flip.

On Nov 21, 7:40 am, Ngewi [EMAIL PROTECTED] wrote:
 Yes, ViewFlipper can flip on its own. When you call setFlipInterval
 (int timeInMs)  and then call startFlipping() the flipper will switch
 the views every timeInMs millisecs.
 I can handle the flips that I trigger manually, but I want to also
 handle them when they are automatic.
 There is the possibility of using a Timer object and scheduling a
 TimerTask to run every timeInMs, but this does not provide accuracy.
 i.e. I do not have a guarantee that the timing is synchronized, so I
 cannot achieve the goal of performing an action just before showing
 the next view.
 I was just wondering if there is a better way to do this.

 Thanks for your response.

 On Nov 20, 7:30 pm,loty[EMAIL PROTECTED] wrote:

  I don't understand it - you tell ViewFlipper to flip views, it doesn't
  flip anything on it's own. So why can't you keep track of your views
  in the event handler that initiates your flips?

  On Nov 20, 4:38 am, Ngewi [EMAIL PROTECTED] wrote:

   Hi everyone,
   I am using the ViewFlipper class with automatic flipping through
   views. Is there a way to get notified or register a listener to be
   called each time just before a new child view is displayed. (i.e with
   automatic flipping ). So far I have not seen any listeners in the
   documentation for this purpose.

   I would also like to use this to check, each time a view is loaded, if
   it is the last and return to the calling activity instead wrapping
   around to start from the beginning of the ViewFlipper child views.

   If someone has any bright ideas please share.

   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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Go from one Screen to another screen

2008-11-20 Thread loty

Personally I find intents and activities very limiting. Not everything
needs to be an activity sometimes new screen is just an alternative
view of the same activity or extends your activity. Look into
ViewFlipper and related classes. You need to decide what new screen
represents


On Oct 28, 5:55 am, Rahul [EMAIL PROTECTED] wrote:
 I am Begginer for the Android and I want to Go from One Screen to
 Another Screen But i dont undestand How it is possible plz give me a
 code for that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ViewFlipper onFlipListener

2008-11-20 Thread loty

I don't understand it - you tell ViewFlipper to flip views, it doesn't
flip anything on it's own. So why can't you keep track of your views
in the event handler that initiates your flips?

On Nov 20, 4:38 am, Ngewi [EMAIL PROTECTED] wrote:
 Hi everyone,
 I am using the ViewFlipper class with automatic flipping through
 views. Is there a way to get notified or register a listener to be
 called each time just before a new child view is displayed. (i.e with
 automatic flipping ). So far I have not seen any listeners in the
 documentation for this purpose.

 I would also like to use this to check, each time a view is loaded, if
 it is the last and return to the calling activity instead wrapping
 around to start from the beginning of the ViewFlipper child views.

 If someone has any bright ideas please share.

 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Linkify addresses

2008-11-20 Thread loty

Does anyone have any idea what MAP_ADDRESSES pattern supposed to
match?
I added Linkify ALL to my EditText and it properly matches all URLs
and phone numbers but does nothing for addresses. Also Linkify thinks
that any number is a phone number which is insane - what were google
dudes smoking and more to the point where can I get the same good
stuff :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: get position of cursor in EditText

2008-11-19 Thread loty

I think you can use getSelectionStart/End functions to get cursor
position.

On Nov 18, 4:18 pm, Alex B [EMAIL PROTECTED] wrote:
 Hi!

 How does one determine the cursor position in an
 android.widget.EditText text view?

 Example:

 User types: quick browm fox.

 User realizes the typo (browm).

 User touches the text view just after the m, thereby positioning the
 cursor there.

 Now the view looks like this: quick browm| fox -- where | is the
 cursor.

 The user should be able to press a virtual backspace button (on the
 screen), and expect to erase the m and then type n.

 Problem:

 I would like to obtain the cursor position with something like
 getCursorPosition(), but cannot find anything resembling such a
 method. Knowing the position, I would be able to convert the EditText
 into android.text.Editable and erase the character.

 Perhaps there is a different way to do this. Any information in this
 regard will be greatly appreciated.

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



[android-developers] How to save EditText styles

2008-11-18 Thread loty

I have an EditText where users can set text to bold, italic, etc but I
can't figure out how to save that text with style in db. I use getText
but that only returns text and no style info.
Any help is appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Check for new version of applications

2008-11-13 Thread loty

Just found some info on how to interface with Market directly and
decided to pass it along

http://www.google.com/support/forum/p/Android+Market/thread?tid=5c8501d73226fad8hl=en

Apparently you can run queries against the market to get your
application URL from market directly.
Hope this helps

On Nov 11, 1:50 pm, G [EMAIL PROTECTED] wrote:
 It would be cool if google added the ability to check your version
 against the market, but for the time being, I'm fine with using a
 version URL as you described. But I'm still fuzzy on one thing, is
 there an action available to launch the market app directly to your
 product page?

 Example:
 -user opens app
 -app checks update url finds new version exists
 -app presents dialog box - click ok to goto the Android Market
 -user clicks ok
 -new intent launches android market with your app's content_id

 Does anyone know if a simple solution like that currently exists, or
 do we just have to notify the user about the update, and tell them to
 goto the market?

 Also in regards to the OI Update app, is there a way to require it be
 installed as well, or would my app have to download and install it
 directly on it's first run? And would that even be possible if the
 user never checked off Allow Non-Market Apps?

 On Nov 11, 12:53 pm, Peli [EMAIL PROTECTED] wrote:

  As far as I understand, Google plans something like this for the
  future (maybe when paid apps start to become possible). For now the
  developer is left by themselves.

  We also initially copied an update checker routine in all of our OI
  applications, but this has 2 major drawbacks:
  1) It requires each application to have the INTERNET permission, even
  though the app itself won't use it.
  2) A lot of code is duplicated in the various applications.

  We have been developing OI Update, an open source update checker,
  which is ready to be released soon. We wrote it mainly for our own
  applications, but it is written generally enough to allow other
  applications to take advantage of it as well easily.

  Your application only needs to include a small meta-data in your
  manifest, and you need to keep a file on a server with update
  information (which can be compatible to VeeCheck; AndAppStore.com can
  generate that file on the fly). This inconvenience is necessary,
  because the Market does not provide version information to 3rd party
  applications (or at least I'm not aware of how to do it).

  All the rest is handled by OI Update. It checks every couple of days
  (as set by the user) for updates, and notifies the user. If the user
  wishes they are then directly forwarded to the Market where they can
  download the new version.

  I hope this could clarify a couple of points.

  Peliwww.openintents.org

  On Nov 11, 3:48 pm,loty[EMAIL PROTECTED] wrote:

   I'm wondering about the same thing. All applications need to have a
   simple ability to notify users of new versions. For me 3rd party
   updaters/checkers is not an option - I can just as easily add simple
   check against my web site and download new APK file directly.

   A much cleaner solution is to query Android Market directly for new
   version.
   Can anyone illuminate me if this is possible or planned in the future.

   On Nov 10, 10:02 am, G [EMAIL PROTECTED] wrote:

So version checking needs to be done through an outside resource...
Is there anintentwe can use to launch theAndroidMarketApp
directly to the listing for our own app, for when an update is
available?

On Nov 10, 4:35 am, friedger [EMAIL PROTECTED] wrote:

 Hi,

 we have prepared a release version of the OI Updater. There is no need
 to send intents, but developers only need to add a meta-data node to
 the application manifest in order to be handled by the updater.

 Early feedback welcome!

 Description:http://www.openintents.org/en/node/136
 Download:http://openintents.googlecode.com/files/UpdateChecker-1.0.0.apk

 Cheers,
 Friedger

 On 6 Nov., 20:31, Guillaume Perrot [EMAIL PROTECTED] wrote:

  Because we use a XMPP based application, we chosed Pubsub as a way 
  to
  notify new versions to the user. The main advantage is that it uses 
  a
  push model. The user is aware of a new version when he launches
  the app or in real time if he's online while a new version has just
  been released. No timer or service at all in the application code.

  On Nov 5, 11:57 pm, friedger [EMAIL PROTECTED] wrote:

   Currently, relying on an external resource is the way to do 
   updates,
   this is how it is described in the documentation.

   If someone is checking againstMarket, please let us know.

   Friedger

   On Nov 4, 8:49 pm, Dan B. [EMAIL PROTECTED] wrote:

isn't there some way tocheckthe version against theMarketinstead
of having to host version information somewhere else? I know 
the app
Locale somehow knows when

[android-developers] Re: Check for new version of applications

2008-11-11 Thread loty

I'm wondering about the same thing. All applications need to have a
simple ability to notify users of new versions. For me 3rd party
updaters/checkers is not an option - I can just as easily add simple
check against my web site and download new APK file directly.

A much cleaner solution is to query Android Market directly for new
version.
Can anyone illuminate me if this is possible or planned in the future.


On Nov 10, 10:02 am, G [EMAIL PROTECTED] wrote:
 So version checking needs to be done through an outside resource...
 Is there anintentwe can use to launch theAndroidMarketApp
 directly to the listing for our own app, for when an update is
 available?

 On Nov 10, 4:35 am, friedger [EMAIL PROTECTED] wrote:

  Hi,

  we have prepared a release version of the OI Updater. There is no need
  to send intents, but developers only need to add a meta-data node to
  the application manifest in order to be handled by the updater.

  Early feedback welcome!

  Description:http://www.openintents.org/en/node/136
  Download:http://openintents.googlecode.com/files/UpdateChecker-1.0.0.apk

  Cheers,
  Friedger

  On 6 Nov., 20:31, Guillaume Perrot [EMAIL PROTECTED] wrote:

   Because we use a XMPP based application, we chosed Pubsub as a way to
   notify new versions to the user. The main advantage is that it uses a
   push model. The user is aware of a new version when he launches
   the app or in real time if he's online while a new version has just
   been released. No timer or service at all in the application code.

   On Nov 5, 11:57 pm, friedger [EMAIL PROTECTED] wrote:

Currently, relying on an external resource is the way to do updates,
this is how it is described in the documentation.

If someone is checking againstMarket, please let us know.

Friedger

On Nov 4, 8:49 pm, Dan B. [EMAIL PROTECTED] wrote:

 isn't there some way tocheckthe version against theMarketinstead
 of having to host version information somewhere else? I know the app
 Locale somehow knows when anupdateis available, it seems reasonable
 to query theMarketrather than relying on outside sources :\

 On Nov 1, 1:50 pm,friedger[EMAIL PROTECTED] wrote:

  I'd say the package name is the global identifier.

  Maybe you can just provide a VeeCheck url based on the package name
  (as alternative to the app id). So I couldcheckthat url. If you
  don't host an app for the package name or if it is not unique you
  could return a HTTP 400.

 Friedger

  On 1 Nov., 17:37, Al Sutton [EMAIL PROTECTED] wrote:

  Friedger,

   How are you identifying the apps?, I'd happily add an extra field 
   or two
   to the AndAppStore.com data that you can search for if it would 
   be useful.

   Al.

  friedgerwrote:
The idea is that the Updater will also be ablecheckall 
applications
it knows about by a single button clicked or scheduled task. 
So, once
theintentfrom one application is processed by theUpdateit is
possible to include this application to the periodicupdate.

A more general solution that includes all installed 
applications is
currently not possible as I can't determine the location of the
   versioninfo file.

The apk mentioned above is provided for developers to test. In 
the
releaseversionthe interval between two checks will be at least 
24
hours, so you can start the service as often as you like but 
thecheck
is only performed once every 24 hours. Furthermore, only the 
log cat
shows whether the installedversionis up-to-date or not. In both
cases the notification is show (this is to simplify the tests).

Would you like to have a different Notification text? Any ideas 
for
icons?

   Friedger

On 1 Nov., 13:18, Al Sutton [EMAIL PROTECTED] wrote:

HiFriedger,

I've updated AndAppStore.com to provide a versionCode in 
theupdate.xml
as you requested.

At the moment anyone with applications listed will find that 
they can
specify the versionCode in the details about a 
releasedversion(not the
application details page, the release details page).

I am working on code to pull the information from the manifest 
included
in the apk, but this is a little way off yet.

Thanks for making this available.

Al.

   friedgerwrote:

Hi,

we are preparing the OI Updater that checks a given info file 
for new
updates as described in theAndroiddocumentation.

You can find the current build (rev 1284) at
   http://openintents.googlecode.com/files/UpdateChecker.apk

In order to initiate theupdatecheckyou just have to add the
following code:

           Intentservice = newIntent();