[android-developers] Re: TweetDeck android app like column view

2010-09-01 Thread warenix
@jean-guy
you widget looks great! I will study your code.
Thanks for sharing!

On Aug 27, 1:31 am, jean-guy jean...@gmail.com wrote:
 Earlier in the month I wrote and open-sourced a simple widget that may
 fit your needs:

 http://code.google.com/p/deezapps-widgets/

 Each column could be a page in the paradigm I'm using.  Grab the
 source and customize as you see fit!

 On Aug 26, 8:11 am, warenix ware...@gmail.com wrote:







  I found an approach by extending the gallery widget.
  the look and feel is quite similar to what i want.

  On 8月21日, 下午11時34分, warenix ware...@gmail.com wrote:

   Hi! The add/remove columns UI of TweetDeck android app is very
   promising. But I have no idea how to make one like that.

   If I make it with HorizontalScrollView, and the children with
   layout_width set to fill_parent

   HorizontalScrollView
          LinearLayout android:id=@+id/column_group_view
                   android:layout_width=fill_parent
   android:layout_height=fill_parent
                   android:orientation=horizontal
                   include layout=@layout/column_view1
   android:layout_width=fill_parent
                           android:layout_height=fill_parent /
                   include layout=@layout/column_view2
   android:layout_width=fill_parent
                           android:layout_height=fill_parent /
           /LinearLayout
   /HorizontalScrollView

   I can't scroll horizontally and only see one view.

   If I set the layout_width with number like this: layout_width=320sp
   then the two columns sit next to each other and I can scroll
   horizontally.

   Do you have any idea how TweetDeck makes theirs?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Want to confirm that app is in background due to Home Key press

2010-09-01 Thread JAVANAND
HI San and Flying coder,
onUserLeaveHint is called whenever the activity is supposed to be
paused due to user action.

Whether it Home Or Navigation to another activity screen( caused due
to user action).
Except for incoming calls or SMS.

Thanks
Sumanth

On Aug 31, 4:15 pm, San sanees...@gmail.com wrote:
 You are right Flying Code.
 I checked this somedays before. onUserLeaveHint() getting called as
 soon the Home key is pressed.
 I checked other interruptions like pressing search key, incoming call
 etc.
 But this method only called when i press the HOME key.
 (I tested on a 2.1 phone)

 On Aug 31, 3:49 pm, Flying Coder av8r.st...@gmail.com wrote:

  I agree with Frank  Mark:  you don't need to detect the HOME key to
  do what you want.  Simply doing the check as part of the activity life
  cycle should be sufficient.

  However, I think you can detect when the HOME key is pressed by
  overriding onUserLeaveHint.  I haven't yet had a reason to use it, but
  according to the docs it will only be called if the user put the app
  in the background (e.g., by pressing HOME).

  Cheers,
  Steve

  On Aug 31, 1:39 pm, Frank Weiss fewe...@gmail.com wrote:

   When the user launches the app from the home screen, the activity
   given in the manifest is started. I suppose the licensing check should
   be done in that activity's lifecycle methods.- 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] Color the cells in gridview

2010-09-01 Thread Ramesh Sangili
Guys,

 Is it possible to color the cells in the grid view? If yes, please share
your thoughts.

Thanks,
Ramesh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: If I turn off Copy Protection, what will happen?

2010-09-01 Thread Sam
If you are using a Sqlite database in your app then users on android
1.5 will need to uninstall and then re-install.

If you are not using Sqlite then there should be no issues.

On Sep 1, 10:34 am, Chris Stewart cstewart...@gmail.com wrote:
 I'm not sure how I'd test it.  There's nothing I'm setting in my app
 regarding copy protection, it's all market-based.  Because I'm not able to
 buy my own application, and then do the update, I'm not sure how I'd test
 it.

 From what I could gather, it should only affect users running 1.5.  They'd
 need to uninstall and reinstall.  Thankfully my 1.5 user base is extremely
 low.  I've gone ahead and made the change in the market and will keep an eye
 out for when my next update hits.

 --
 Chris Stewarthttp://chriswstewart.com

 Fantasy 
 Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
 Android app for MFL fantasy football owners
 Fantasy Football
 Insiderhttp://chriswstewart.com/android-applications/fantasy-football-insider/-
 Android app for all fantasy football fanatics
 Social Updaterhttp://chriswstewart.com/android-applications/social-updater/-
 An easy way to send your status blast to multiple social networks

 On Tue, Aug 31, 2010 at 10:25 PM, Maps.Huge.Info (Maps API Guru) 



 cor...@gmail.com wrote:
  Why don't you test it on your own device? That will certainly answer
  your question. I believe the answer is it won't be a problem but it
  could mean your users have to uninstall and reinstall, which means any
  data the app has collected on the device could be lost.

  -John Coryat

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

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


[android-developers] Urgent Help - Diff between Phone Window and Mid Window

2010-09-01 Thread Revathi K J Ramanan
Hi,

What is the basic difference between the PhoneWindow and MidWindow
policies?

I found that the emulator version takes the implementations of the
PhoneWindow.When the MidWindow implementations will be used?

Also, I found that PhoneWindow handles the call settings
implementation and the same is not there in MidWindow?

Please someone help me pointing out the differences between both the
policies and under which circumstances which one will be used..

Please help me

Regards,
Revathi K J Ramanan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Licensing Verification Library Apps Solely for Unlocking/Removing Ads

2010-09-01 Thread String

On Tue, Aug 31, 2010 at 8:52 PM, GJTorikian gjtorik...@gmail.com
wrote:

  Launch Free App-Launch Unlocker App-Run LVL-Return Result-Parse Result
  in Free App

 That was the gist of it, yes.

I agree, having done an unlocker app in the past (and, separately,
using LVL now) that's the approach that makes most sense to me.
Especially if you already have an unlocker - convert it to LVL, and
change the call in the free app as outlined above, but leave the rest
of your architecture alone.


On Tue, Aug 31, 2010 at 9:42 PM, Chris Stratton cs07...@gmail.com
wrote:

  I'm not seeing any obvious reason why the free version can't just query the
  license server about the unlocker by itself, but maybe I'm overlooking
  something.

I think that this is a real possibility, but I've not heard of anyone
doing it. The key would be for the free app to query LVL about the
unlocker's package name, NOT to try to use LVL for the free version's
package. You'd also probably need to keep your version numbers aligned
between the free  unlocker apps, because it has been established that
this will cause an LVL failure.

IF this works, it would be much cleaner; it would mean that your users
would never have to actually have the unlocker installed, just
purchased. I can't see that this sort of thing is mentioned anywhere
in the LVL docs (though of course I could be missing it). It's
possible that you can't do this, that LVL checks the calling package
name or signature someplace. You'd just need to try it.

Please keep us posted!

String

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: If I turn off Copy Protection, what will happen?

2010-09-01 Thread Peter Webb
I have just gone through exactly this, except my app is free.

1. I know a (pathetic) 6 people with Android phones. One couldn't see
my app. We compared which apps he could see; he was missing about 10%
including mine.

2. The user who couldn't see the app owns a Samsung Galaxy. There is a
known issue that it will not accept copy protected free apps.

3. I removed copy protection from my app and updated the Release
number. Everything worked exactly the same in the market, no problems.

4. My friend could still not see the app. But by the next day,
downloads had increased ten fold. I did make a couple of other minor
changes, and at that stage it had only been on the market for a week.
I can't see how this is related to removing the copy protection,
because both before and after I removed the copy protection 5 out the
6 users I know could download, most unlikely that suddenly 10 times as
many people could download when it made no difference to thje 6 people
I know. Neverthelessthe sudden jump did occur at exactly the same
time, and has remained at that level. Whatever it was, I'm not
complaining.

5. My friend still can't see it on his @#$%^ Samsung Galaxy.



On Sep 1, 12:34 pm, Chris Stewart cstewart...@gmail.com wrote:
 I'm not sure how I'd test it.  There's nothing I'm setting in my app
 regarding copy protection, it's all market-based.  Because I'm not able to
 buy my own application, and then do the update, I'm not sure how I'd test
 it.

 From what I could gather, it should only affect users running 1.5.  They'd
 need to uninstall and reinstall.  Thankfully my 1.5 user base is extremely
 low.  I've gone ahead and made the change in the market and will keep an eye
 out for when my next update hits.

 --
 Chris Stewarthttp://chriswstewart.com

 Fantasy 
 Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
 Android app for MFL fantasy football owners
 Fantasy Football
 Insiderhttp://chriswstewart.com/android-applications/fantasy-football-insider/-
 Android app for all fantasy football fanatics
 Social Updaterhttp://chriswstewart.com/android-applications/social-updater/-
 An easy way to send your status blast to multiple social networks

 On Tue, Aug 31, 2010 at 10:25 PM, Maps.Huge.Info (Maps API Guru) 
 cor...@gmail.com wrote:
  Why don't you test it on your own device? That will certainly answer
  your question. I believe the answer is it won't be a problem but it
  could mean your users have to uninstall and reinstall, which means any
  data the app has collected on the device could be lost.

  -John Coryat

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

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


[android-developers] Re: How to create TextView without write the XML file

2010-09-01 Thread rb
Thanks for the suggestions San and Fllip.  I have tried the example
that San gave but still errors.  Here's the revised code in the
main.xml file:

package com.HelloWorld;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class Hello extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// start code here
tv = (TextView) findViewById(R.id.TextView01);
tv.setText(This is sample.);
Button button = (Button) findViewById(R.id.Button01);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Toast.makeText(Hello.this, Hello World,
Toast.LENGTH_SHORT).show();
tv.setText(Button Clicked);
}
});
}
}


Errors are:

for the line: tv = (TextView) findViewById(R.id.TextView01);
  tv can not be resolved to a variable
for the line: tv.setText(This is sample.);    tv can not be
resolved
for the line: tv.setText(Button Clicked);     tv can not be
resolved

Any ideas why the errors?

On Aug 31, 4:56 pm, San sanees...@gmail.com wrote:
 As Havlicek said, create thetextviewusing findViewByID and set the
 text when button is clicked.

 Sample code:

 tv = (TextView) findViewById(R.id.TextView01);
 tv.setText(This is sample.);
 Button button = (Button) findViewById(R.id.Button01);
 button.setOnClickListener(new OnClickListener() {
 public void onClick(View v) {
         tv.setText(Button Clicked);

 }
 });

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


Re: [android-developers] Urgent Help - Diff between Phone Window and Mid Window

2010-09-01 Thread Dianne Hackborn
These are not part of the SDK, they are implementation details, that change
over time.  In fact MidWindow will be gone in the next release.

On Tue, Aug 31, 2010 at 11:31 PM, Revathi K J Ramanan 
revathiramana...@gmail.com wrote:

 Hi,

 What is the basic difference between the PhoneWindow and MidWindow
 policies?

 I found that the emulator version takes the implementations of the
 PhoneWindow.When the MidWindow implementations will be used?

 Also, I found that PhoneWindow handles the call settings
 implementation and the same is not there in MidWindow?

 Please someone help me pointing out the differences between both the
 policies and under which circumstances which one will be used..

 Please help me

 Regards,
 Revathi K J Ramanan

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




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

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

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

Re: [android-developers] KeyEvent Methods

2010-09-01 Thread Dianne Hackborn
On Tue, Aug 31, 2010 at 10:47 PM, Tez earlencefe...@gmail.com wrote:

 1. what is the getKeyDownTime() method? What does its return value
 mean logically?


The time when the key down event occurred.


 2. what is the getKeyEventTime() method? What does its return value
 mean logiccaly?


The time when the current key event occurred.


 3. I want to measure the time a key was depressed for.
 Eg: Key A was pressed for 60 ms.


Subtract the two.

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

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

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

[android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-09-01 Thread Jens
Yup, i usually don't commit the exact name of hidden constants to
memory, the value of that constant is however defined as enableHIPRI
- and should produce the desired effect of enabling explicit
connection routing over 3G.


On 31 Aug, 14:11, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Aug 31, 2010 at 7:36 AM, Jens dunkingbikk...@gmail.com wrote:
  Look into the ConnectivtyManager#startUsingNetworkFeature(TYPE_MOBILE,
  ENABLE_HIPRI)

 There is no ENABLE_HIPRI constant in the Android SDK. There is a
 FEATURE_ENABLE_HIPRI
 constant on an internal Phone class, but that is not part of the
 Android SDK either.

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Re: How to create TextView without write the XML file

2010-09-01 Thread rb
As a newbie, I am just trying to program the various functions to
ensure that I am doing things right (gui wise).
An example would be to set a default template with textview, editview,
buttons, etc and just changing
the parameters of those objects either by direct (as by this code) or
by calling a class (method).  I have done this with standard
java but not in a gui environment.  That is why I have created this
simple Hello World example, and attempting
to add other objects to see if I can make it work once it is
compiled.  Hope this answers your question.

 On Aug 31, 4:59 am, parag parag.shetgaon...@gmail.com wrote:



  Any suggestions on why I am getting the false reading -- in the
  xml , set the button propert android:clickable   as true,

   anyone
  can suggest on how to place the results in aTextViewvia a button
  click, that would be appreciated.

  as i can c u have the listener to the button,
  on click
  can u be specific what exact result u need?
  wether u need to change the text... etc.
  u can use
  tv.XXX specifically to change the required properties


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


[android-developers]

2010-09-01 Thread vineeshkc
There is a user input then on submit pass the search keywords to the db
server and return the results (the db server has to be external by the way).

Could i pass the search query to server side (php) and get the php script to
execute the queries and return the scripts output? eg. just a bunch of
arrays or even plain text or html tables.

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

Re: [android-developers] Re: How to create TextView without write the XML file

2010-09-01 Thread Filip Havlicek
You still need to specify the tv variable type (of course, think about
it!!!).

TextView tv = (TextView) findViewById(R.id.TextView01);

Best regards,
Filip Havlicek

2010/9/1 rb rbs...@gmail.com

 As a newbie, I am just trying to program the various functions to
 ensure that I am doing things right (gui wise).
 An example would be to set a default template with textview, editview,
 buttons, etc and just changing
 the parameters of those objects either by direct (as by this code) or
 by calling a class (method).  I have done this with standard
 java but not in a gui environment.  That is why I have created this
 simple Hello World example, and attempting
 to add other objects to see if I can make it work once it is
 compiled.  Hope this answers your question.

  On Aug 31, 4:59 am, parag parag.shetgaon...@gmail.com wrote:
 
 
 
   Any suggestions on why I am getting the false reading -- in the
   xml , set the button propert android:clickable   as true,
 
anyone
   can suggest on how to place the results in aTextViewvia a button
   click, that would be appreciated.
 
   as i can c u have the listener to the button,
   on click
   can u be specific what exact result u need?
   wether u need to change the text... etc.
   u can use
   tv.XXX specifically to change the required properties
 

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


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

Re: [android-developers] What is Context and what is its use?

2010-09-01 Thread Martin Obreshkov
http://developer.android.com/reference/android/content/Context.html
gives you what you need

On Tue, Aug 31, 2010 at 7:07 PM, cool.manish mannishga...@gmail.com wrote:

 What is context. We always pass an argument context in the intent or
 manageQuery etc. What is it and what is the use of it?
 does it have the information about the process stack?

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




-- 
When I raise my flashing sword, and my hand takes hold on judgment, I will
take vengeance upon mine enemies, and I will repay those who haze me. Oh,
Lord, raise me to Thy right hand and count me among Thy saints.

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

Re: [android-developers] Reducing Permissions

2010-09-01 Thread Dianne Hackborn
On Mon, Aug 30, 2010 at 1:37 PM, Brad Gies rbg...@gmail.com wrote:


 I've been following the Is there a way to request permissions from a user
 as you need them? thread with a lot of interest, but even if someone is
 convinced to make the Android permissions system better, it doesn't do
 anything for right now.

 So, I thought I'd start a thread for coming up with alternative ways to
 reduce the permissions your app needs.

 My app absolutely needs internet access (it's useless without it), and it
 uses Google Maps extensively (it's the main activity), so I have the
 following :

 uses-permission
 android:name=android.permission.ACCESS_NETWORK_STATE/uses-permission

 uses-permission
 android:name=android.permission.ACCESS_COARSE_LOCATION/uses-permission
 uses-permission
 android:name=android.permission.ACCESS_FINE_LOCATION/uses-permission
 uses-permission
 android:name=android.permission.INTERNET/uses-permission

 I want to be able to know if I have a network connection, hence the
 ACCESS_NETWORK_STATE. I also try to use GPS hence the
 ACCESS_FINE_LOCATION, and if GPS is not available I try to find the user's
 location using something else hence ACCESS_COARSE_LOCATION and of couse
 the INTERNET permission. I also use the My Location' feature of Google
 Maps.

 So... the question is : Is there a robust way to use Google Maps, and be
 able to send requests to my server without all those permissions (in a user
 friendly way) ?


If you use maps with locations extensively, then internet and location
permissions are *fundamental* to your app and I would argue that it would be
entirely wrong for these to not be presented to the user when it is
installed.

Why are you thinking these should not be presented?  From what you say, it
sounds like this is what your app does.

It doesn't seem to me that you should need a permission just to find out if
there is a network connection.  To be honestly, I am not that familiar with
the networking parts of the system, so I don't know for sure how to address
this...  though from glancing at the API, it seems like the
ConnectivityManager.CONNECTIVITY_ACTION broadcast is a sticky broadcast so
you can retrieve the last broadcast state without any permission?  Also this
permission is a normal permission, not dangerous, so it won't be shown to
the user unless they explicitly want to see it.


 I'm also experimenting with C2DM, so I have the following:

 permission android:name=com.bgies.hottonight.permission.C2D_MESSAGE
 android:protectionLevel=signature /
 uses-permission android:name=com.bgies.hottonight.permission.C2D_MESSAGE
 /
 uses-permission android:name=com.google.android.c2dm.permission.RECEIVE
 /
 uses-permission
 android:name=android.permission.READ_SYNC_SETTINGS/uses-permission


 If I want to use C2DM, it seems I am stuck with those... Anybody know


signature-only permissions are never shown to the user, so they are not of
concern here.  (And also since you are declaring the permission, if it was
shown to the user, you could have it say whatever you wanted...  such as
makes app work better than competitor X.  Though actually, since the
platform doesn't know about the perm until the app is installed, it just
won't be displayed anyway.)

The C2DM receiver permission...  makes me unhappy.  First because the
permission text that gets displayed is utterly ridiculous.  Second because I
really question the value of this permission at all.  At the very least, for
the next release I hope to make this a normal permission so it isn't shown
to the user unless they explicitly display it.  I also really want to reword
the text to make it less crazy.

And as far as READ_SYNC_SETTINGS...  why do you need that?  I don't see it
mentioned anywhere in the C2DM documentation.  (Though this also is not an
area I am super knowledgeable about.)



 Now... I also want to use the camera (optional) and vibrate (optional but
 most users will want it) so I have to add :


 uses-permission android:name=android.permission.CAMERA /
 uses-permission android:name=android.permission.VIBRATE /


Here again, vibrate is a normal permission, so it will not be seen unless
the user wants to dig into it.  (And seriously, makes your phone vibrate.
 I think the vast majority of users, if they *do* explicitly go to see it,
will have no trouble figuring out that they are okay with it.)

As for the camera permission, the only option I can offer is if you just
need them to take a picture then you can start the intent to have the camera
app take a picture and return it to you.  However if you need to drive the
camera yourself, you'll need to take the permission.


 Total 10 lines of permissions in the manifest AND this is AFTER
 removing 4 other permissions that a small percentage of users would have
 found very handy, AND not adding a few other features because of the
 permissions bloat they would have added

 CALL_PHONE
 READ_CONTACTS
 GET_ACCOUNTS
 SEND_SMS

 So... given all of this, is there a way to reduce 

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-09-01 Thread Dianne Hackborn
Thank for the update.  I am just very glad to know that it isn't a nasty
platform bug. :)

On Mon, Aug 30, 2010 at 3:49 PM, TreKing treking...@gmail.com wrote:

 PROBLEM SOLVED!

 Conclusion: I'm an idiot (shocked!?)

 So, for those of you that care, here was the problem. I followed Zsolt's
 suggestion to go back to the previous version and then updated the app and
 sure enough it crashed.

 Quick background: The app gets data from the inter webs and then caches it
 in my own format with some extra data for quicker access and to support
 extra functionality. This cache is wiped on each update to refresh the
 data and avoid issues exactly like this.

 At least it's *supposed* to be wiped.

 Unfortunately, while developing the latest version, I
 apparently inadvertently removed the single line of code that clears the
 cache when the app is updated! Genius!

 So the new code was trying to load the old cache which was missing a new
 piece of data (which it otherwise would get from that static map discussed
 earlier).

 I had no idea I'd removed that line to clear the cache so I didn't even
 think it to be a possibility! I assumed all users were getting fresh data.

 Well, now that I've thoroughly embarrassed myself, thank you all for your
 time, sorry to have wasted it on such a stupid oversight, and Zsolt, you're
 my hero for the brain-dead simple idea to try to update the app for
 myself. I should really work that concept into my test plan ...

 Now, if you'll excuse me, I have a proper update to release ...

 Thanks everyone!


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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




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

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

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

[android-developers] Re: Enabling wifi tethering mode

2010-09-01 Thread guru
Hi All

How to enable Tethering UI in froyo. I got some help from group, but
still I am unable to enable UI.

Please let me know procedure if any one enabled it.

Thanks
Gururaja B O

On Aug 30, 2:45 pm, guru guru.nav...@gmail.com wrote:
 Hi All,

 I am not seeing Wif tethering app in my phone. I enabled wifi in froyo
 build. But it is not showing tethering app ?
 What do i need to enable the app?

 Thanks
 Gururaja B O

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

2010-09-01 Thread Tez
I tried subtracting the 2 values. I always get zero.

On Sep 1, 1:04 pm, Dianne Hackborn hack...@android.com wrote:
 On Tue, Aug 31, 2010 at 10:47 PM, Tez earlencefe...@gmail.com wrote:
  1. what is the getKeyDownTime() method? What does its return value
  mean logically?

 The time when the key down event occurred.

  2. what is the getKeyEventTime() method? What does its return value
  mean logiccaly?

 The time when the current key event occurred.

  3. I want to measure the time a key was depressed for.
  Eg: Key A was pressed for 60 ms.

 Subtract the two.

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

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

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


[android-developers] Not detecting soft keyboard keypresses

2010-09-01 Thread Tez
I have an EditText. I have set a OnKeyListener to listen to key
presses.
I get proper info when I use the keyboard in the emulator.
If i try to use the soft keyboard I dont receive any events.
Is this behavior normal? If so, How do I get the soft keyboard key
presses?

Cheers,
Earlence

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


[android-developers] Re: how can i store a view in a .png file in emulator sdcard

2010-09-01 Thread Vishal
When you create the instance of Canvas, you need to provide the
reference of the bitmap and when you are done with drawing use this

http://developer.android.com/reference/android/graphics/Bitmap.html#compress%28android.graphics.Bitmap.CompressFormat,%20int,%20java.io.OutputStream%29

Vishal

On Aug 26, 5:30 pm, Shalini coolcool.shal...@gmail.com wrote:
 On Aug 25, 2:36 pm, Shalini coolcool.shal...@gmail.com wrote:



  i had created a view and wanted to store it as a image in the sdcard
  of the emulator, i mean i have done drawing on canvas and now i want to 
  store the drawing as an image in sdcard
  how can i do this?/?
  please tell as soon as possible- Hide quoted text -

 - Show quoted text -

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


Re: [android-developers] Reducing Permissions

2010-09-01 Thread Tauno Talimaa

 On 1.09.2010 11:36, Dianne Hackborn wrote:
On Mon, Aug 30, 2010 at 1:37 PM, Brad Gies rbg...@gmail.com 
mailto:rbg...@gmail.com wrote:



Now... I also want to use the camera (optional) and vibrate
(optional but most users will want it) so I have to add : 



uses-permission android:name=android.permission.CAMERA /
uses-permission android:name=android.permission.VIBRATE /


Here again, vibrate is a normal permission, so it will not be seen 
unless the user wants to dig into it.  (And seriously, makes your 
phone vibrate.  I think the vast majority of users, if they *do* 
explicitly go to see it, will have no trouble figuring out that they 
are okay with it.)


What's the point of the VIBRATE permission anyway? I can't imagine a 
case where the user decides to not install some application because it 
has the VIBRATE permission - so why is there a requirement for apps to 
declare this permission?


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


Re: [android-developers]

2010-09-01 Thread Miguel Morales
Yes, yes you can.

On Wed, Sep 1, 2010 at 1:20 AM, vineeshkc kcvine...@gmail.com wrote:
 There is a user input then on submit pass the search keywords to the db
 server and return the results (the db server has to be external by the way).
 Could i pass the search query to server side (php) and get the php script to
 execute the queries and return the scripts output? eg. just a bunch of
 arrays or even plain text or html tables.

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



-- 
http://developingthedream.blogspot.com/,
http://diastrofunk.com,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9

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


Re: [android-developers] Help with simple Bitmap issue

2010-09-01 Thread Pedro Teixeira
The same old error... NullPoinerException which is strange considering  
I have the correct values on the variables when I run them on the  
debugger.. any suggestion?


On Aug 31, 2010, at 4:26 PM, Pedro Teixeira wrote:


Hi there...
I'm having an issue with a Bitmap which is giving me an error but any
kind of report so I can understand it..
The code is simpley this this:

- I get a image path from a bundle:
   Bundle w = getIntent().getExtras();
final String thenPicPath= w.getString(oldpicpath);

- And I set it on a ImageView called returnpic:
   Bitmap oldPicture = BitmapFactory.decodeFile(thenPicPath);
   returnpic.setImageBitmap(oldPicture);


In the debugger the String thenPicPath reads : /sdcard/download/
7122gato.jpg
And the oldPicture Bitmap reads: android.graphics.bit...@437700c0

Everything looks fine but I get and error when setting the
imagebitmap.. any clue?

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


Pedro Teixeira

www.pedroteixeira.org

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


[android-developers] Android Window policy

2010-09-01 Thread Pilu
Hello,

My query is regarding the window policy in android. As far as i know
two policies are present i.e. phonewindow and midwindow. What is the
difference between these two and on what basis the policy will be
choosen ?

Any pointer will be appreciated.

Thanks.

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


[android-developers] Re: How to clear static variable values when will i close my application in android

2010-09-01 Thread joebowbeer
There are several alternatives listed at
http://developer.android.com/guide/appendix/faq/framework.html#3

I like to maintain global state in a subclass of
android.app.Application.

I share your concerns about static variables, particularly in Android
because the process classloader may outlive any of its activities or
services.

On Aug 31, 10:59 am, siva sivaraj.r...@gmail.com wrote:
 Thanks for reply,no chance to clear static variable?what alternative
 solutions for that

 On Aug 31, 10:50 pm, Mark Murphy mmur...@commonsware.com wrote:



  On Tue, Aug 31, 2010 at 1:46 PM, siva sivaraj.r...@gmail.com wrote:
   Thanks ,can u explain,i am fresher in android,i want to clear static
   variable value,please give solutions

  Delete the static data members. Then you do not have to clear them.
  Mutable static data members have been considered an anti-pattern in
  Java for a decade or so.

  Rather than worrying about clearing the data members, worry about
  where the data really should live. Does it belong in a database?
  Should it be managed by a Service? Do you want a subclass of
  Application? Etc.

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

  Android Development Wiki:http://wiki.andmob.org

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


Re: [android-developers]

2010-09-01 Thread vineeshkc
 sorry pls give me  exact idea

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

[android-developers] EditText field not update, how to do this?

2010-09-01 Thread Mystique
Hi,

I have an EditText field and a button.
My aim is to let user enter text info to the EditText or click the
button to launch a dialog to select some checkbox and radio button
which it will perform some computation and return a value to display
at the EditText field.

I can't seems to get the value to display at the EditText field after
the dialog dismiss. I did try a toast to display the value and it is
ok.
I *think* the view was not refresh to display the text in the EditText
field.

Can anyone tell me roughly how to do this?

Cheers.

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


[android-developers] Re: layout_gravity

2010-09-01 Thread Zsolt Vasvari
 I believe that layout_gravity (for LinearLayout) probably only has an
 effect if it specifies a direction that is orthogonal to the
 orientation of the layout.
 Ie if the LinearLayout orientation is horizontal then the only
 acceptable layout_gravity options fors its children are top, bottom
 etc (and NOT left, right, center_horizontal).

 Happy now. Thanks everyone.

That's very possible.  Good to remember that one, if though it's a bug
IMO, or at least, it should put a warning into the log that the
attribute is being ignored.

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


[android-developers] Re: How do I create a background loop method

2010-09-01 Thread Laxs
Thanks for your answers,

there are no Server connections required for my method. What I'm doing
is to check my actual position and compare it to defined areas in the
database.
if I find a matching Area I want to start an Intent and notify the
user.

If I get it right, my method should be a Broadcast receiver which will
be triggered by the AlarmManager, is this right?

so I will push my futher resarches in the direction of alarmManager.
If you got some examples I would appreciate if you send me a link.

regards larry

On 1 Sep., 02:47, JP joachim.pfeif...@gmail.com wrote:
 A partial wake lock will do the trick, except in that it places a
 burden on the battery beyond normal operation.
 Also heads-up that the System seems to like killing Services that
 snooze.

 On Aug 31, 4:19 pm, Laxs oum.la...@googlemail.com wrote:

  Hi,

  I got a problem, I want to call a method every X minutes, if my method
  got a result it ´should inform the user by vibrating or showing a
  alertbox. if the method doesn't get a result it should wait for X
  minutes and restart.
  What is important, this should also work when the phone turns to
  sleep. Which means I want to wake the phone from sleep to run my
  method.

  Actualy I can activate my method via a Button, and it is working like
  I want it to be except thebackgroundloopthing.

  I already searching for a solution here in the group or also on google
  but I think I don't got the right search terms to find a solution for
  my problme.

  I already read about the AlarmManager and broadcast receiver but I'm
  not sure if this is right for my problem.

  I hope you could help me.

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


Re: [android-developers] Urgent Help - Diff between Phone Window and Mid Window

2010-09-01 Thread Revathi K J Ramanan
Hi Dianne,

Thanks for the immediate response.

I need the basic difference between the PhoneWindow and MidWindow.Like why
android is choosing PhoneWindow for its implementation not MidWindow.

And In the x86 code of Cupcake 1.6 version, I found that MidWindow was being
used.
But in x86 of Eclair 2.1 Version, PhoneWindow is being used.

What is the advantage of PhoneWindow over MidWindow?

Please help me,

Regards,
Revathi K J Ramanan

On Wed, Sep 1, 2010 at 1:33 PM, Dianne Hackborn hack...@android.com wrote:

 These are not part of the SDK, they are implementation details, that change
 over time.  In fact MidWindow will be gone in the next release.


 On Tue, Aug 31, 2010 at 11:31 PM, Revathi K J Ramanan 
 revathiramana...@gmail.com wrote:

 Hi,

 What is the basic difference between the PhoneWindow and MidWindow
 policies?

 I found that the emulator version takes the implementations of the
 PhoneWindow.When the MidWindow implementations will be used?

 Also, I found that PhoneWindow handles the call settings
 implementation and the same is not there in MidWindow?

 Please someone help me pointing out the differences between both the
 policies and under which circumstances which one will be used..

 Please help me

 Regards,
 Revathi K J Ramanan

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




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

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


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


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

Re: [android-developers] Urgent Help - Diff between Phone Window and Mid Window

2010-09-01 Thread Revathi K J Ramanan
Hi Dianne,

I was trying to find the reply for the below question in short..

What is the
difference between these two and on what basis the policy will be
choosen ?

Please help me...

Regards,
Revathi K J Ramanan

On Wed, Sep 1, 2010 at 4:09 PM, Revathi K J Ramanan 
revathiramana...@gmail.com wrote:

 Hi Dianne,

 Thanks for the immediate response.

 I need the basic difference between the PhoneWindow and MidWindow.Like why
 android is choosing PhoneWindow for its implementation not MidWindow.

 And In the x86 code of Cupcake 1.6 version, I found that MidWindow was
 being used.
 But in x86 of Eclair 2.1 Version, PhoneWindow is being used.

 What is the advantage of PhoneWindow over MidWindow?

 Please help me,

 Regards,
 Revathi K J Ramanan

   On Wed, Sep 1, 2010 at 1:33 PM, Dianne Hackborn hack...@android.comwrote:

 These are not part of the SDK, they are implementation details, that
 change over time.  In fact MidWindow will be gone in the next release.


 On Tue, Aug 31, 2010 at 11:31 PM, Revathi K J Ramanan 
 revathiramana...@gmail.com wrote:

 Hi,

 What is the basic difference between the PhoneWindow and MidWindow
 policies?

 I found that the emulator version takes the implementations of the
 PhoneWindow.When the MidWindow implementations will be used?

 Also, I found that PhoneWindow handles the call settings
 implementation and the same is not there in MidWindow?

 Please someone help me pointing out the differences between both the
 policies and under which circumstances which one will be used..

 Please help me

 Regards,
 Revathi K J Ramanan

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




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

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


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




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

Re: [android-developers] Re: How do I create a background loop method

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 6:28 AM, Laxs oum.la...@googlemail.com wrote:
 Thanks for your answers,

 there are no Server connections required for my method. What I'm doing
 is to check my actual position and compare it to defined areas in the
 database.
 if I find a matching Area I want to start an Intent and notify the
 user.

 If I get it right, my method should be a Broadcast receiver which will
 be triggered by the AlarmManager, is this right?

And if there is significant work to be done, the BroadcastReceiver
should probably delegate to an IntentService, since onReceive() runs
at foreground priority on the main application thread.

 so I will push my futher resarches in the direction of alarmManager.
 If you got some examples I would appreciate if you send me a link.

http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices/Alarm/

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] EditText field not update, how to do this?

2010-09-01 Thread Shashidhar
Can you please post the code here..

On Wed, Sep 1, 2010 at 3:42 PM, Mystique joven.ch...@gmail.com wrote:

 Hi,

 I have an EditText field and a button.
 My aim is to let user enter text info to the EditText or click the
 button to launch a dialog to select some checkbox and radio button
 which it will perform some computation and return a value to display
 at the EditText field.

 I can't seems to get the value to display at the EditText field after
 the dialog dismiss. I did try a toast to display the value and it is
 ok.
 I *think* the view was not refresh to display the text in the EditText
 field.

 Can anyone tell me roughly how to do this?

 Cheers.

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

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

Re: [android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-09-01 Thread Mark Murphy
My point is that it is not in the Android SDK and therefore is not safe to use.

On Wed, Sep 1, 2010 at 4:12 AM, Jens dunkingbikk...@gmail.com wrote:
 Yup, i usually don't commit the exact name of hidden constants to
 memory, the value of that constant is however defined as enableHIPRI
 - and should produce the desired effect of enabling explicit
 connection routing over 3G.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] Re: Problem with spinner in a list view

2010-09-01 Thread Shashidhar
Thanks for the replies. I have fixed this one.

Previously while returning the view from getview() method it was checking
for convertview to null or not, if its null then only I was creating a new
view.
But I have removed the null checking login now and always returning a new
view. This sovled my problem.

Thanks,
Shashidhar

On Tue, Aug 31, 2010 at 1:12 AM, Kumar Bibek coomar@gmail.com wrote:

 Can you post some code as to what you are doing?

 That's interesting I would say, A spinner in a List View, :) I would
 suggest not to do that, but still if you have to, well, let's fix it.

 -Kumar Bibek
 http://techdroid.kbeanie.com

 On Aug 30, 6:42 pm, Shashidhar shashi.zep...@gmail.com wrote:
  Hi,
I am using a custom list adapter with a spinner in each item.
  There is a strange problem with the value the spinner shows.
  For some of the items the spinner always shows the first value in the
  adapter set to the spinner but when I touch on spinner, on the pop up
  selection list it shows the actual value which I have set before. I mean
 the
  value shown in the spinner and the selected item that is shown in pop
 list
  of the spinner are some times different.
 
  Please help me and tell me why this happens.

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


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

[android-developers] Re: EditText field not update, how to do this?

2010-09-01 Thread Mystique
Thanks, I did 1 week ago and receive no reply :D
I thought I can keep it simple this time to have some direction and I
figure it out myself.

Here it is, but the formatting is lost.. so hard to read it here.
http://groups.google.com/group/android-developers/browse_thread/thread/cf34462df693208d/7dc45b12fb1fdee7?lnk=gstq=mystique#7dc45b12fb1fdee7


On Sep 1, 6:44 pm, Shashidhar shashi.zep...@gmail.com wrote:
 Can you please post the code here..



 On Wed, Sep 1, 2010 at 3:42 PM, Mystique joven.ch...@gmail.com wrote:
  Hi,

  I have an EditText field and a button.
  My aim is to let user enter text info to the EditText or click the
  button to launch a dialog to select some checkbox and radio button
  which it will perform some computation and return a value to display
  at the EditText field.

  I can't seems to get the value to display at the EditText field after
  the dialog dismiss. I did try a toast to display the value and it is
  ok.
  I *think* the view was not refresh to display the text in the EditText
  field.

  Can anyone tell me roughly how to do this?

  Cheers.

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

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


Re: [android-developers] Re: Problem with spinner in a list view

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 6:47 AM, Shashidhar shashi.zep...@gmail.com wrote:
 Thanks for the replies. I have fixed this one.
 Previously while returning the view from getview() method it was checking
 for convertview to null or not, if its null then only I was creating a new
 view.
 But I have removed the null checking login now and always returning a new
 view. This sovled my problem.

It also created new problems, such as increased memory usage.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] Re: Problem with spinner in a list view

2010-09-01 Thread Shashidhar
Yeah agreed, but I have no other quick option.

On Wed, Sep 1, 2010 at 4:20 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Wed, Sep 1, 2010 at 6:47 AM, Shashidhar shashi.zep...@gmail.com
 wrote:
  Thanks for the replies. I have fixed this one.
  Previously while returning the view from getview() method it was checking
  for convertview to null or not, if its null then only I was creating a
 new
  view.
  But I have removed the null checking login now and always returning a new
  view. This sovled my problem.

 It also created new problems, such as increased memory usage.

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

 Android Development Wiki: http://wiki.andmob.org

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


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

[android-developers] Re: Apps availability on US Market

2010-09-01 Thread Yahel
  A world of faces is on the market with a 5 star rating.

Thanks you Traveler.

5 stars rating, looks like I'm not the only one with a little voyeur
side :D

Take care.

Yahel

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


[android-developers] softKeyboard's next button not taking focus to the next edit text

2010-09-01 Thread Shashidhar
Hi,
  In My code I have an alter window in which I take a mac address as input.
For this I have created 6 Edit texts to accept mac address. Now my problem
is When I am in first edit text and click on next button in soft
keyboard it does not take the focus to the next available edittext. I have
set the next focus down id for Each of the Edit text to be its next Edit
text. But still its not working. Please Help me.

I am posting the code here.
_
*main.xml*
*__*
*
*
*
?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

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=@string/hello
/
Button android:id=@+id/button
 android:layout_width =wrap_content
 android:layout_height=wrap_content
 android:text=Click Me
/
/LinearLayout



__

Activity File
___

public class Test extends Activity {
/** Called when the activity is first created. */
private Button b;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
b = (Button) findViewById(R.id.button);
b.setOnClickListener(new OnClickListener(){

public void onClick(View v) {

AlertDialog.Builder alert = new AlertDialog.Builder(v.getContext());

alert.setTitle(Dialog);
alert.setMessage(Enter MAC);

// Set an EditText view to get user input
final EditText input1 = new EditText(v.getContext());
final EditText input2 = new EditText(v.getContext());
final EditText input3 = new EditText(v.getContext());
final EditText input4 = new EditText(v.getContext());
final EditText input5 = new EditText(v.getContext());
final EditText input6 = new EditText(v.getContext());
 input1.setNextFocusDownId(input2.getId());
input2.setNextFocusDownId(input3.getId());
input3.setNextFocusDownId(input4.getId());
input4.setNextFocusDownId(input5.getId());
input5.setNextFocusDownId(input6.getId());
 input1.setImeOptions(5);
input2.setImeOptions(5);
input3.setImeOptions(5);
input4.setImeOptions(5);
input5.setImeOptions(5);
input6.setImeOptions(6);

final TextView tv1 = new TextView(v.getContext());
tv1.setText(:);
tv1.setTextSize(15);
final TextView tv2 = new TextView(v.getContext());
tv2.setText(:);
final TextView tv3 = new TextView(v.getContext());
tv3.setText(:);
final TextView tv4 = new TextView(v.getContext());
tv4.setText(:);
final TextView tv5 = new TextView(v.getContext());
tv5.setText(:);
final TextView tv6 = new TextView(v.getContext());
final TextView emptytv = new TextView(v.getContext());
emptytv.setText(  );
emptytv.setWidth(2);

InputFilter[] FilterArray = new InputFilter[1];
FilterArray[0] = new InputFilter.LengthFilter(2);
input1.setFilters(FilterArray);
input2.setFilters(FilterArray);
input3.setFilters(FilterArray);
input4.setFilters(FilterArray);
input5.setFilters(FilterArray);
input6.setFilters(FilterArray);

int width = 40;
input1.setWidth(width);
input2.setWidth(width);
input3.setWidth(width);
input4.setWidth(width);
input5.setWidth(width);
input6.setWidth(width);

input1.setSingleLine(true);
input1.setSingleLine(true);
input2.setSingleLine(true);
input3.setSingleLine(true);
input4.setSingleLine(true);
input5.setSingleLine(true);
input6.setSingleLine(true);

int inputTextSize = 15;
input1.setTextSize(inputTextSize);
input2.setTextSize(inputTextSize);
input3.setTextSize(inputTextSize);
input4.setTextSize(inputTextSize);
input5.setTextSize(inputTextSize);
input6.setTextSize(inputTextSize);

final LinearLayout ll = new LinearLayout(v.getContext());
ll.addView(emptytv);
ll.addView(input1);
ll.addView(tv1);
ll.addView(input2);
ll.addView(tv2);
ll.addView(input3);
ll.addView(tv3);
ll.addView(input4);
ll.addView(tv4);
ll.addView(input5);
ll.addView(tv5);
ll.addView(input6);
ll.addView(tv6);


alert.setView(ll);

alert.setPositiveButton(Save, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
 InputMethodManager imm =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(input1.getWindowToken(), 0);
 String value1 = input1.getText().toString().trim();
String value2 = input2.getText().toString().trim();
String value3 = input3.getText().toString().trim();
String value4 = input4.getText().toString().trim();
String value5 = input5.getText().toString().trim();
String value6 = input6.getText().toString().trim();
Log.i(getClass().getName(), New
mac:+value1+:+value2+:+value3+:+value4+:+value5+:+value6);
}
});

alert.setNegativeButton(Cancel, new DialogInterface.OnClickListener() {
public 

Re: [android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-09-01 Thread Tauno Talimaa
 Indeed but imagine a case where you have two options (after spending 
quite a lot of resources on a project already):

a) Don't release your software at all.
b) Release your app and use hidden constants( that do work on current 
devices) but risk with the fact that your application will break in the 
future and you have to fix it again.

Which one would you choose?

Btw, the operator requirement that apps can only use 2g/3g networks and 
not WiFi, comes up quite often when your application has anything to do 
with some carriers around the world.
The sad part is that sometimes this comes as a surprise to app 
developers because the operator mentality is We didn't tell you about 
this in the beginning because we thought that it's a trivial change in 
your app anyway - the same app can do this on platform X so it has to be 
able to do this also on Android! And as far operators are concerned, 
NO is not an answer :)



On 1.09.2010 13:44, Mark Murphy wrote:

My point is that it is not in the Android SDK and therefore is not safe to use.

On Wed, Sep 1, 2010 at 4:12 AM, Jensdunkingbikk...@gmail.com  wrote:

Yup, i usually don't commit the exact name of hidden constants to
memory, the value of that constant is however defined as enableHIPRI
- and should produce the desired effect of enabling explicit
connection routing over 3G.


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


[android-developers] Disabling Autolock

2010-09-01 Thread Uander
Hello All ,

When I am booting my android OS , by default it is in Locked State . Can
someone tell me how to
disable this autolock of screen at startup . ?

Is there a corresponding APK present ?

Where to disable this LOCK_PATTERN_ENABLED ?

I am using Froyo right now  .


Thanks :
Uander

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

[android-developers] ListActivity with Button at bottom

2010-09-01 Thread chetan
Hi,
   I have created a class extends ListActivity and i want to add a
button at bottom of Listactivity. Can any body tell me how it can be
done.

Thanks
Chetan Chauhan

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


Re: [android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 7:14 AM, Tauno Talimaa tau...@gmail.com wrote:
  Indeed but imagine a case where you have two options (after spending quite
 a lot of resources on a project already):
 a) Don't release your software at all.
 b) Release your app and use hidden constants( that do work on current
 devices) but risk with the fact that your application will break in the
 future and you have to fix it again.
 Which one would you choose?

The right answer is:

c) Do your homework first and don't write apps that can't be
implemented -- the carrier limitation you describe is a well-known
problem

Of the two choices you outline, if your end distribution channel is a
pre-load on a device through a specific carrier, go with b). Or, if
this app is being done on a consulting basis, and the customer gives
the go-ahead, go with b). Otherwise, go with a), because the future
costs (in terms of time, reputation, etc.) have a good chance of
exceeding your revenues.

I am all for lobbying to have this promoted to be in the SDK, because
it's a seriously useful feature, for a variety of reasons (though I
could see requiring a permission for it). If there's no issue in
b.android.com about putting this in the SDK, you may wish to add one.

However, the business decision for going forward with distribution has
to be made on future costs and revenues -- it does not matter one bit
how much time you have put in to date. If the costs are controllable
(i.e., distribution is limited to certain devices), or if the costs
are incurred by somebody else (i.e., consulting client), and the
revenues are known, it may make sense to run the risk.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] ListActivity with Button at bottom

2010-09-01 Thread Mark Murphy
Use a RelativeLayout, putting the Button at the bottom and anchoring
the ListView to the top of the screen and the top of the Button.

Or, use a LinearLayout, setting the ListView's android:layout_height
to 0px and its android:layout_weight to 1, and leaving
android:layout_weight off the Button.

On Wed, Sep 1, 2010 at 7:15 AM, chetan chetanchauha...@gmail.com wrote:
 Hi,
       I have created a class extends ListActivity and i want to add a
 button at bottom of Listactivity. Can any body tell me how it can be
 done.

 Thanks
 Chetan Chauhan

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




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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: softKeyboard's next button not taking focus to the next edit text

2010-09-01 Thread Shashidhar
Figured it out. I thought android will automatically create id's for
dynamically created UI elements. Thats why I put

*
input1.setNextFocusDownId(input2.getId());

Here I was not assigning any id explicitly for input2.

If I set explicitly some id to input2 and the set the next focus down id,
it worked.
*



On Wed, Sep 1, 2010 at 4:31 PM, Shashidhar shashi.zep...@gmail.com wrote:

 Hi,
   In My code I have an alter window in which I take a mac address as input.
 For this I have created 6 Edit texts to accept mac address. Now my problem
 is When I am in first edit text and click on next button in soft
 keyboard it does not take the focus to the next available edittext. I have
 set the next focus down id for Each of the Edit text to be its next Edit
 text. But still its not working. Please Help me.

 I am posting the code here.
 _
 *main.xml*
 *__*
 *
 *
 *
 ?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
 
 TextView
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=@string/hello
 /
 Button android:id=@+id/button
  android:layout_width =wrap_content
  android:layout_height=wrap_content
  android:text=Click Me
 /
 /LinearLayout



 __

 Activity File
 ___

 public class Test extends Activity {
 /** Called when the activity is first created. */
  private Button b;
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 b = (Button) findViewById(R.id.button);
 b.setOnClickListener(new OnClickListener(){

 public void onClick(View v) {

 AlertDialog.Builder alert = new AlertDialog.Builder(v.getContext());

 alert.setTitle(Dialog);
  alert.setMessage(Enter MAC);

 // Set an EditText view to get user input
  final EditText input1 = new EditText(v.getContext());
  final EditText input2 = new EditText(v.getContext());
  final EditText input3 = new EditText(v.getContext());
  final EditText input4 = new EditText(v.getContext());
  final EditText input5 = new EditText(v.getContext());
  final EditText input6 = new EditText(v.getContext());
  input1.setNextFocusDownId(input2.getId());
  input2.setNextFocusDownId(input3.getId());
  input3.setNextFocusDownId(input4.getId());
  input4.setNextFocusDownId(input5.getId());
  input5.setNextFocusDownId(input6.getId());
  input1.setImeOptions(5);
  input2.setImeOptions(5);
  input3.setImeOptions(5);
  input4.setImeOptions(5);
  input5.setImeOptions(5);
  input6.setImeOptions(6);

  final TextView tv1 = new TextView(v.getContext());
  tv1.setText(:);
  tv1.setTextSize(15);
  final TextView tv2 = new TextView(v.getContext());
  tv2.setText(:);
  final TextView tv3 = new TextView(v.getContext());
  tv3.setText(:);
  final TextView tv4 = new TextView(v.getContext());
  tv4.setText(:);
  final TextView tv5 = new TextView(v.getContext());
  tv5.setText(:);
  final TextView tv6 = new TextView(v.getContext());
  final TextView emptytv = new TextView(v.getContext());
  emptytv.setText(  );
  emptytv.setWidth(2);

 InputFilter[] FilterArray = new InputFilter[1];
  FilterArray[0] = new InputFilter.LengthFilter(2);
  input1.setFilters(FilterArray);
  input2.setFilters(FilterArray);
  input3.setFilters(FilterArray);
  input4.setFilters(FilterArray);
  input5.setFilters(FilterArray);
  input6.setFilters(FilterArray);

 int width = 40;
  input1.setWidth(width);
  input2.setWidth(width);
  input3.setWidth(width);
  input4.setWidth(width);
  input5.setWidth(width);
  input6.setWidth(width);

 input1.setSingleLine(true);
  input1.setSingleLine(true);
  input2.setSingleLine(true);
  input3.setSingleLine(true);
  input4.setSingleLine(true);
  input5.setSingleLine(true);
  input6.setSingleLine(true);

 int inputTextSize = 15;
  input1.setTextSize(inputTextSize);
  input2.setTextSize(inputTextSize);
  input3.setTextSize(inputTextSize);
  input4.setTextSize(inputTextSize);
  input5.setTextSize(inputTextSize);
  input6.setTextSize(inputTextSize);

 final LinearLayout ll = new LinearLayout(v.getContext());
  ll.addView(emptytv);
  ll.addView(input1);
  ll.addView(tv1);
  ll.addView(input2);
  ll.addView(tv2);
  ll.addView(input3);
  ll.addView(tv3);
  ll.addView(input4);
  ll.addView(tv4);
  ll.addView(input5);
  ll.addView(tv5);
  ll.addView(input6);
  ll.addView(tv6);


 alert.setView(ll);

 alert.setPositiveButton(Save, new DialogInterface.OnClickListener() {
  public void onClick(DialogInterface dialog, int whichButton) {
  InputMethodManager imm =
 

Re: [android-developers] ListActivity with Button at bottom

2010-09-01 Thread Damien Cooke
Chetan,
Like Mark said: here is one I prepared earlier in xml:)

LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
ListView
android:id=@+id/list
android:layout_width=fill_parent
android:layout_height=fill_parent 
android:layout_weight=1/
Button
android:id=@+id/button1
android:layout_width=fill_parent
android:layout_height=wrap_content 
android:text=My Funky Button/
/LinearLayout


On 01/09/2010, at 8:45 PM, chetan wrote:

 Hi,
   I have created a class extends ListActivity and i want to add a
 button at bottom of Listactivity. Can any body tell me how it can be
 done.
 
 Thanks
 Chetan Chauhan
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] traversing activity stack

2010-09-01 Thread kamiseq
hi,
how can I assure I always go back clicking on custom menu option to
previous activity.
I think it is a good idea to start new activities by
startActivity(context, XActivity.class) but then when option is
selected I should call finish on that activity or again call
startActivity(this, previousActivityName) ??

on the other hand android has all activities on a stack so clicking
goback button on a phone I will always go back to previous view, so
how can I get this stack.

I think Im missing something simple here

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


Re: [android-developers] traversing activity stack

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 8:15 AM, kamiseq kami...@gmail.com wrote:
 how can I assure I always go back clicking on custom menu option to
 previous activity.

Don't have a custom menu option to previous activity. Let the user
press the BACK button.

 on the other hand android has all activities on a stack so clicking
 goback button on a phone I will always go back to previous view, so
 how can I get this stack.

You cannot get this stack.

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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: what member variable in Activity class stores its state?

2010-09-01 Thread Anil
ok, so perhaps the ActivityManager or some such class stores the state
of each activity?

On Sep 1, 1:12 am, TreKing treking...@gmail.com wrote:
 On Tue, Aug 31, 2010 at 8:47 PM, Anil anil.r...@gmail.com wrote:
  just wondered what the member variable in Activity is that stores it - we
  are after all, extending from it - so we could directly access it unless it
  is private.

 What makes you think there is a member variable that stores the current
 state?

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] start emulator with ant

2010-09-01 Thread for android
I need to start the emulator from an ant script run the test cases and stop
the emulator.Any pointers on how to acheive 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] stop listview kinetic scrolling

2010-09-01 Thread manigault
How can i stop listview kinetic scrolling ?

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


[android-developers] deep effect in gallery?

2010-09-01 Thread genxsol
Hi Folks,

I am looking for Deep effect in Android gallery.
i did some work around coverflow at 
http://www.inter-fuser.com/search/label/Coverflow
but it also do scroll left and right. it does give me the idea to
calculate offset top and left for each item separately but still there
is no access.

what i am trying to do is,
when user scroll, images would scroll from deep behind the right edge
to center and then to left side deep behind.

i am wondering if anyone have some thought about arranging the
imageView's on deep offset (something like V shape ) rather than on
horizontal as it is.

can anybody point me to the right direction plz

Thanks

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


Re: [android-developers] start emulator with ant

2010-09-01 Thread Mark Murphy
Create an ant exec task that executes the emulator command:

http://developer.android.com/guide/developing/tools/emulator.html#starting

On Wed, Sep 1, 2010 at 8:56 AM, for android forandr...@gmail.com wrote:
 I need to start the emulator from an ant script run the test cases and stop
 the emulator.Any pointers on how to acheive this?

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] start emulator with ant

2010-09-01 Thread Guru
yep thanks i was able to start it:-

target name=start.emulator

exec executable=${emulator} failonerror=true
arg value=-avd/
arg value=${my-avd}/
/exec


/target


On Wed, Sep 1, 2010 at 6:50 PM, Mark Murphy mmur...@commonsware.com wrote:

 Create an ant exec task that executes the emulator command:

 http://developer.android.com/guide/developing/tools/emulator.html#starting

 On Wed, Sep 1, 2010 at 8:56 AM, for android forandr...@gmail.com wrote:
  I need to start the emulator from an ant script run the test cases and
 stop
  the emulator.Any pointers on how to acheive this?

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

 Android App Developer Books: http://commonsware.com/books

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


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

[android-developers] Memory problem with UI elements

2010-09-01 Thread Shashidhar
Hi,
  In my application I change layouts very frequently with most of the user
interactions. Each time when a new layout is drawn, the applications memory
size is increasing. I can see this in DDMS.
This is absolutely fine. I have analyzed my application with memory analyze
tool and it shows that there around 42 Table layouts at some point of time
and this number increase as user does more interactions with the app. Now my
question is why doesn't the GC collect the stale layout objects. Does
GC collect on UI widgets also??? I feel it does but can any one tell me what
may be the reason for GC not collecting my UI elements.

Thanks,
Shashidhar

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

Re: [android-developers] Memory problem with UI elements

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 9:48 AM, Shashidhar shashi.zep...@gmail.com wrote:
   In my application I change layouts very frequently with most of the user
 interactions.

Do you mean you call setContentView() repeatedly? Or how do you
change layouts?

 Now my
 question is why doesn't the GC collect the stale layout objects.

Because something is holding onto them. If you cannot identify what is
holding onto them, you can use DDMS to dump an HPROF file of the
objects in your process' heap. There are several tools to help you
examine that HPROF file:

http://stackoverflow.com/questions/185893/how-do-i-analyze-a-hprof-file

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

Android App Developer Books: http://commonsware.com/books

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

2010-09-01 Thread kamiseq
ok I know I can always press on phone back button, but I want to mimic
such a functionality and allow a user can choose option from option
menu.
the problem I see is that when starting activity by passing context
and next-activity-name I cannot get context (the caller) from intent
that started that (next) activity. on the other hand I could pass a
name of the caller to intent and retrieve it on callee side, right.

so the last question
If I got this right when I call startActivity() another activity is
brought to front and caller is paused marked by GC but not distroyed.
but I could call finish() method on a caller and destroy caller once
for all, is that right?

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


[android-developers] Sensors with thread or not?

2010-09-01 Thread Paolo
I have an activity, that uses sensor strongly. Until now I have
managed the sensor with a background thread, because I thought it was
better to understand and to develop my app, but now I'm not sure about
it. The performance is very low.

Do you think i should use sensor in the activity directly, without
using thread? Generally which is the best 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


Re: [android-developers] Help with simple Bitmap issue

2010-09-01 Thread Pedro Teixeira

Can someone help me with this?
I'm really having a hard time to understand why this error is  
happening... my code is simple as:


File imageFile = new File(thenPicPath);
if(imageFile.exists()){
Bitmap myBitmap = BitmapFactory.decodeFile(thenPicPath);
	ImageView returnpic = (ImageView) findViewById 
(R.id.addinfopic);

returnpic.setImageBitmap(myBitmap);
}else{
Context context = getApplicationContext();
CharSequence text = nao existe essa foto!;
int duration = Toast.LENGTH_SHORT;

Toast toast = Toast.makeText(context, text, duration);
toast.show();
}

When I get to the returnpic.setImageBitmap(myBitmap); part it  
crashes and gives this error on the logcat: (PS: the variable  
thenPicPath is ok being sdcard/downloads/something.jpg)



09-01 15:29:03.357: ERROR/AndroidRuntime(5057): Uncaught handler:  
thread main exiting due to uncaught exception
09-01 15:29:03.367: ERROR/AndroidRuntime(5057):  
java.lang.RuntimeException: Unable to start activity ComponentInfo 
{com.pedroteixeira.thennnow/com.pedroteixeira.thennnow.addPicInfo}:  
java.lang.NullPointerException
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 
2401)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 
2417)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.ActivityThread.access$2100(ActivityThread.java:116)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.os.Handler.dispatchMessage(Handler.java:99)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.os.Looper.loop(Looper.java:123)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.ActivityThread.main(ActivityThread.java:4203)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
java.lang.reflect.Method.invokeNative(Native Method)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
java.lang.reflect.Method.invoke(Method.java:521)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run 
(ZygoteInit.java:791)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
dalvik.system.NativeStart.main(Native Method)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): Caused by:  
java.lang.NullPointerException
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
com.pedroteixeira.thennnow.addPicInfo.onCreate(addPicInfo.java:99)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 
1123)
09-01 15:29:03.367: ERROR/AndroidRuntime(5057): at  
android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 
2364)

09-01 15:29:03.367: ERROR/AndroidRuntime(5057): ... 11 more


On Aug 31, 2010, at 4:26 PM, Pedro Teixeira wrote:


Hi there...
I'm having an issue with a Bitmap which is giving me an error but any
kind of report so I can understand it..
The code is simpley this this:

- I get a image path from a bundle:
   Bundle w = getIntent().getExtras();
final String thenPicPath= w.getString(oldpicpath);

- And I set it on a ImageView called returnpic:
   Bitmap oldPicture = BitmapFactory.decodeFile(thenPicPath);
   returnpic.setImageBitmap(oldPicture);


In the debugger the String thenPicPath reads : /sdcard/download/
7122gato.jpg
And the oldPicture Bitmap reads: android.graphics.bit...@437700c0

Everything looks fine but I get and error when setting the
imagebitmap.. any clue?

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


Pedro Teixeira

www.pedroteixeira.org

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

2010-09-01 Thread kamiseq
just one more thing, what is the difference between startActivity and
startActivityForResult, can I have two activities of the same class on
a stack displaying ie list with different data each?
in another words what android really does when startActivity is
called, does it resume or create activity and reload all data view
needed so I can have only one activity of a given class or is it
always creating new instance of the activity no matter there is one
already created.

from my point of view when startActivityForResult is used android for
sure must preserve caller's state as app will eventually return to
caller with result.

Im a bit confused about that so please be patient :-)

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


Re: [android-developers] Re: traversing activity stack

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 10:27 AM, kamiseq kami...@gmail.com wrote:
 ok I know I can always press on phone back button, but I want to mimic
 such a functionality and allow a user can choose option from option
 menu.

Please do not do that. Android developers have a bad reputation for
ignoring what few human interface guidelines we have. This is one of
them -- do not have close, quit, exit, back, or equivalent
menu options in an activity, please.

 If I got this right when I call startActivity() another activity is
 brought to front and caller is paused marked by GC but not distroyed.
 but I could call finish() method on a caller and destroy caller once
 for all, is that right?

finish() will cause the activity to be paused, stopped, and destroyed.
The next activity on the stack will be started, resumed, and brought
to the foreground. Here, next activity is either the previous
activity on the stack, or an activity you just started with
startActivity().

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

Android App Developer Books: http://commonsware.com/books

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


[android-developers] Edittext Cursor and Highlight Problem

2010-09-01 Thread SurtaX
I am trying to implement a textview which has select text/copy and
paste functionality. I tried to do this by making an Edittext with the
following properties.

I currently have the following Edittext:
EditText style=?android:attr/textViewStyle
android:editable=false
android:background=@null 
android:textColor=@null
android:id=@+id/textbox/

I want users to be able to highlight the text with long click --
select text. This works fine with the above code and the highlights of
selected text come out fine. However I do not want the cursor to
always be flashing. I successfully get rid of the cursor by using:

textBox.setCursorVisible(false);

However with this change whenever a user long clicks and hits select
text, the highlighted text no longer has any color over it. I have
tried to change the color of the highligthed text to

textBox.setHighlightColor(android.graphics.Color.RED);

But this does not seem to have any effect. Any suggestions will be
greatly appreciated!

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


[android-developers] GOOGLE, WHAT IS GOING ON with the Active Install %? Bug in install to SDCARD is my guess!

2010-09-01 Thread niko20
Yes we have threads about this already but we still have not gotten an
answer AND I think it's about time somebody at least explain what does
this number actually MEAN. I'm getting frustrated with the lack of
transparency on this.

My apps used to be around 56% active installs

VERY soon after I updated the apps to allow install to SDCARD
(preferExternal), then the active install count started dropping like
a rock. Now it's around 39% today for my main app.

My opinion is there is a bug in the SDCARD install feature somewhere
that is not counting those installs. We know there already is a bug
with home screen icons if you install to sdcard you will get a blank
icon until the Home app restarts.

Actually probably time to submit this issue in the bugtracker.


-niko20

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: EditText field not update, how to do this?

2010-09-01 Thread Brion Emde
You should update the value of you EditText in onResume(), which you
don't seem to have right now. That is called when your activity
returns to the foreground. At that point you should have your new
value and you just do a setText() on the EditText to display the new
value.

On Sep 1, 6:49 am, Mystique joven.ch...@gmail.com wrote:
 Thanks, I did 1 week ago and receive no reply :D
 I thought I can keep it simple this time to have some direction and I
 figure it out myself.

 Here it is, but the formatting is lost.. so hard to read it 
 here.http://groups.google.com/group/android-developers/browse_thread/threa...

 On Sep 1, 6:44 pm, Shashidhar shashi.zep...@gmail.com wrote:



  Can you please post the code here..

  On Wed, Sep 1, 2010 at 3:42 PM, Mystique joven.ch...@gmail.com wrote:
   Hi,

   I have an EditText field and a button.
   My aim is to let user enter text info to the EditText or click the
   button to launch a dialog to select some checkbox and radio button
   which it will perform some computation and return a value to display
   at the EditText field.

   I can't seems to get the value to display at the EditText field after
   the dialog dismiss. I did try a toast to display the value and it is
   ok.
   I *think* the view was not refresh to display the text in the EditText
   field.

   Can anyone tell me roughly how to do this?

   Cheers.

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

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


[android-developers] Re: Sensors with thread or not?

2010-09-01 Thread Bret Foreman
I use sensors extensively and find that they work best in a Service
which you can bind to your Activity.

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


[android-developers] Understanding Horizontal Scrollview and relationship to bitmap

2010-09-01 Thread Robert Schmid
I am creating an app with a very long horizontal custom view (about
500 pages horizontally).  I don't draw to it often enough to justify
using a surface view.

As I approached the problem I inserted my custom view into a
horizontal scroll view and that works OK.  Still, I think it can be
smoother.  Right now it redraws the whole bitmap each time.  So I
tried creating the bitmap by hand and discovered that it is too large
- the VM won't allow the memory to be allocated.  This is, of course,
a big clue to how the HorizontalScrollView draws to the canvas.  So,
I'd rather redo the onDraw function to use a smaller bitmap.  I don't
quite understand, though, how the bitmap, canvas and
horizontalScrollView are related and I need some strategy suggestions
as to how to go about 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: GOOGLE, WHAT IS GOING ON with the Active Install %? Bug in install to SDCARD is my guess!

2010-09-01 Thread Maps.Huge.Info (Maps API Guru)
As stated in the other thread, the problem may just be that the
algorithm that computes active install percentage may just be more
accurate now. It could also be that your user base started
uninstalling your app when you posted the update. Many people will
uninstall an app they haven't used for a while when an update comes
around because they are reminded they have it.

I too have seen a drop from 64% to 61% in one of my apps and from 58%
to 47% in another. Is this a problem or a correction? I guess we may
never know.

Regardless, since it's happening to everyone, it won't affect your
position in the market or anything else tangible, so you might as well
just live with it.

-John Coryat

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


Re: [android-developers] Understanding Horizontal Scrollview and relationship to bitmap

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 11:09 AM, Robert Schmid
robertsch...@airstriptech.com wrote:
 I am creating an app with a very long horizontal custom view (about
 500 pages horizontally).  I don't draw to it often enough to justify
 using a surface view.

That would seem to be bad from a memory consumption standpoint.

For example, a ListView on an ListAdapter with 500 rows does not
create 500 row Views, but rather only as many as can be shown on
screen. That's a performance optimization, to minimize runtime memory
usage.

ScrollView/HorizontalScrollView do not do the same, forcing you to
allocate 500 pages worth of content up front.

 As I approached the problem I inserted my custom view into a
 horizontal scroll view and that works OK.  Still, I think it can be
 smoother.  Right now it redraws the whole bitmap each time.  So I
 tried creating the bitmap by hand and discovered that it is too large
 - the VM won't allow the memory to be allocated.  This is, of course,
 a big clue to how the HorizontalScrollView draws to the canvas.  So,
 I'd rather redo the onDraw function to use a smaller bitmap.  I don't
 quite understand, though, how the bitmap, canvas and
 horizontalScrollView are related and I need some strategy suggestions
 as to how to go about this.

I'll be stunned if you can successfully do 500 pages of bitmaps in
memory at one time, which is what HorizontalScrollView will require.

You could look at the code for ListView (and AbsListView) to see how
they do what they do. That's a few thousand lines of code and, I
suspect, took a few engineer-months to get to its current state.

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] Re: what member variable in Activity class stores its state?

2010-09-01 Thread TreKing
On Wed, Sep 1, 2010 at 7:24 AM, Anil anil.r...@gmail.com wrote:

 ok, so perhaps the ActivityManager or some such class stores the state of
 each activity?


Maybe, there's probably *some* class somewhere that's aware of the Activity
stack and what's where and whatnot. But you really don't need to know this.

If you communicating with a Service, you can bind to it and simply call
through to it from onPause and onResume, which is basically what tells you
if you're Active or not.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Understanding Horizontal Scrollview and relationship to bitmap

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 11:24 AM, Mark Murphy mmur...@commonsware.com wrote:
 You could look at the code for ListView (and AbsListView) to see how
 they do what they do. That's a few thousand lines of code and, I
 suspect, took a few engineer-months to get to its current state.

Another strategy, if you can settle for a page at a time metaphor,
would be to use ViewFlipper. Set up horizontal swipe animations to
move between pages. You then only need 3 pages at one time:

-- Load in 3 pages and show the user the middle one
-- On a flip, remove the outlier page (one that is two away from the
current page) and add another page in the direction of the flip, if
applicable

I should be releasing a ViewSwiper component shortly that demonstrates
how to use a GestureLibrary to swipes to flip between children of a
ViewFlipper. I'll ponder adding a PagedViewSwiper subclass that
handles the pattern I outline here.

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] GOOGLE, WHAT IS GOING ON with the Active Install %? Bug in install to SDCARD is my guess!

2010-09-01 Thread TreKing
On Wed, Sep 1, 2010 at 9:57 AM, niko20 nikolatesl...@yahoo.com wrote:

 Yes we have threads about this already but we still have not gotten
 an answer


And don't expect one. It's not how Google rolls.


 AND I think it's about time somebody at least explain what does this number
 actually MEAN.


Yeah, don't hold your breath on that one.


 I'm getting frustrated with the lack of transparency on this.


It sucks, but this is the way it is. No sense in getting all riled up about
it, particularly when we're all in the same boat.


 My opinion is there is a bug in the SDCARD install feature somewhere that
 is not counting those installs.


I do not use the SDCARD install option and my stats have plunged off a steep
cliff as well.

On Wed, Sep 1, 2010 at 10:20 AM, Maps.Huge.Info (Maps API Guru) 
cor...@gmail.com wrote:

 As stated in the other thread, the problem may just be that the algorithm
 that computes active install percentage may just be more accurate now.


I doubt this in particular for paid apps. There is a
vast discrepancy between what I see in the Dev Console and Google Checkout.


 It could also be that your user base started uninstalling your app when you
 posted the update. Many people will uninstall an app they haven't used for a
 while when an update comes around because they are reminded they have it.


Also not likely for paid apps.


 I too have seen a drop from 64% to 61% in one of my apps and from 58% to
 47% in another. Is this a problem or a correction? I guess we may
 never know.


My paid app has dropped about 25% TOTAL, meanwhile sales, according to
Google Checkout, have never been better. I think it's a problem.


 Regardless, since it's happening to everyone, it won't affect your position
 in the market or anything else tangible, so you might as well just live with
 it.


Yup. Just another day (week, month, year?) dealing with Da Market. Good
times!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Android preprocessor, //#ifdef...

2010-09-01 Thread Huynh Ngoc Vu Nguyen
Hi,
You can use antena. Same as J2ME.
Best.

2010/7/31 Kostya Vasilyev kmans...@gmail.com

 The absence of preprocessor has to do with Java, not Android.

 And tlhere is a lot of Java software out there...

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

 01.08.2010 0:00 пользователь sblantipodi perini.dav...@dpsoftware.org
 написал:


 ah ah... it's incredible...
 I develop on Windows Mobile, JavaME, Bada, Blackberry, Symbian.
 I can use preprocessing on every platform...
 How can you develop on a mobile without preprocessing? Sure android is
 really good for fart app,
 but what else?

 I don't want to troll but I really can't understand why I heard many
 developers saying viva android when
 google released the first buggy SDK.


 On Jul 31, 8:22 pm, TreKing treking...@gmail.com wrote:
  On Sat, Jul 31, 2010 at 10:25 AM, sblan...

  perini.dav...@dpsoftware.orgwrote:

 
   is there some sort of preprocessing in eclipse using android?
 
  No.
 
   I haven't understo...

  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago

  transit tracking app for Android-powered devices

 --
 You received this message because you are su...

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




-- 
Huynh Ngoc Vu Nguyen
Add: Duy Xuyên - Quang Nam
E-mail: vunguye...@gmail.com
Phone: 0935102789

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

[android-developers] Re: How to create TextView without write the XML file

2010-09-01 Thread rb
I knew there was something that I missed.  Thanks to all who shed
light on this thread.  Here's the final code for those newbies who may
have the same problem.

package com.HelloWorld;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

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

// declare tv object by findViewByID
final TextView tv = (TextView) findViewById(R.id.TextView01);

// set TextView's text property to a new string upon launch of
app
tv.setText(This is sample.);

// declare button object by findViewByID
Button button = (Button) findViewById(R.id.Button01);

// Method if you click the button
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// this is a pop up message then goes away 
after a short period of
time
Toast.makeText(Hello.this, Hello World,
Toast.LENGTH_SHORT).show();

// this changes the text in the TextView object 
to the said string
tv.setText(Button Clicked);
}
});
}
}


On Sep 1, 2:26 am, Filip Havlicek havlicek.fi...@gmail.com wrote:
 You still need to specify the tv variable type (of course, think about
 it!!!).

 TextView tv = (TextView) findViewById(R.id.TextView01);

 Best regards,
 Filip Havlicek

 2010/9/1 rb rbs...@gmail.com


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


[android-developers] SQLite implementation - need help!

2010-09-01 Thread kingh32
Hello All

I'm stuck on an SQLite problem and have been for the past few day so I
thought I would share it with you.
All I'm trying to do is create an SQLite database to display the data
generated by the use of my app.

I've managed to get the app to send data to a MySQL database (quite
easily) but for some reason I'm finding this really difficult.

I've made a DB helper class which creates the database and adds one
table to it. I would like to create two tables but achieving one table
for now would be great!

public class DBHelper extends SQLiteOpenHelper
{
// Database constants
private static final String DB_NAME=ScoreStore;
private static final int DB_VERSION = 1;

public static final String TABLE_EVENT = event;
public static final String COL_ENTRYID = entryID;
public static final String COL_EVENTNAME = eventName;
public static final String COL_DATE = date;
public static final String COL_EVENTTYPE = eventType;
public static final String COL_NUMROUNDS = numRounds;
public static final String COL_PLAYSPERROUND = shotsPerRound;
public static final String COL_PLAYER = player;
public static final String COL_DISTANCE = distance;
public static final String COL_TOTALSCORE = totalScore;

public DBHelper(Context context)
{
super(context, DB_NAME, null, DB_VERSION);
// TODO Auto-generated constructor stub
}

/** Database created for the first time */
@Override
public void onCreate(SQLiteDatabase db)
{
   String sql = create table+TABLE_EVENT+
(_id integer not null primary key autoincrement,+
COL_ENTRYID + integer, +
COL_EVENTNAME + varchar, +
COL_DATE + date, +
COL_EVENTTYPE + varchar, +
COL_NUMROUNDS + integer, +
COL_PLAYSPERROUND + integer, +
COL_PLAYER + varchar, +
COL_DISTANCE + varchar, +
COL_TOTALSCORE + integer, );


db.execSQL(sql);
}

 /** Updates the database based on version id */
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion)
{

}
}



Then when I want to add data to the DB I use this code...


 DBHelper dbHelper = new DBHelper(this);
 SQLiteDatabase db = dbHelper.getWritableDatabase();

 //Load data
 Cursor cursor = db.query(DBHelper.TABLE_EVENT, null, null,
null, null, null, null);
 startManagingCursor(cursor);

 // populate the database
ContentValues values = new ContentValues();
values.put(DBHelper.COL_EVENTNAME, Test name);
values.put(DBHelper.COL_DATE, Today);
values.put(DBHelper.COL_EVENTTYPE, Test type);
values.put(DBHelper.COL_NUMROUNDS, 1);
values.put(DBHelper.COL_PLAYSPERROUND, 4);
values.put(DBHelper.COL_PLAYER, Tester);
values.put(DBHelper.COL_DISTANCE, 100 yards);
values.put(DBHelper.COL_TOTALSCORE, 45);
db.insert(DBHelper.TABLE_EVENT, null, values);

 // Set the list adapter
 String[]from = {DBHelper.COL_ENTRYID,
DBHelper.COL_EVENTNAME,
 DBHelper.COL_DATE, DBHelper.COL_EVENTTYPE,
DBHelper.COL_NUMROUNDS,
DBHelper.COL_PLAYSSPERROUND, 
DBHelper.COL_PLAYERS,
DBHelper.COL_DISTANCE,
DBHelper.COL_TOTALSCORE};

 int[]to = {R.id.the name of my textview};

// Put retrieved data into a list view
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_1, cursor, from, to);
setListAdapter(adapter);
registerForContextMenu(getListView());

The app runs fine until I try any of the above, then it just crashes.
2 1/2 Questions...

What am I doing wrong? Is what I'm doing hopelessly, completely
incorrect?
Once I've fixed this, how do I make it work for two tables?

Any help would be very much appreciated.

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


[android-developers] Re: Can't use ServerSocket

2010-09-01 Thread shuwo
You were right. It appears that it's something wrong with my phones
WiFi.
The problem should be that it's not responding to the ARP request.

Is there anything I can do in my server/client code to make it work
anyway? For example connect to the phone without sending any ARP
request to it, just connect directly?

I tested to open the listening port on my router and then use the
networks WAN IP-address, it worked like a charm.

On 30 Aug, 20:58, Kostya Vasilyev kmans...@gmail.com wrote:
   Works for me.

 Note that the Spica i5700 has some... hmmm, peculiarities when it
 comes to Wifi. You might want to verify that it actually works with your
 custom firmware - download some kind of server (an FTP server, for
 example - there are quite a few in Market) and try connecting to it over
 Wifi from another phone / computer.

 Here is my code if it helps (note that I use NIO):

 http://pastebin.com/uBNprnrc

 -- Kostya

 28.08.2010 19:45, shuwo пишет:





  I'm trying to listen on a port using ServerSocket on an Android
  device. I want to be able to connect to this port over WiFi using a
  computer on the same network.

  I get no exception when binding it to a port, however when I check
  netstat it says:

  Proto Recv-Q Send-Q Local Address           Foreign Address
  State
  tcp        0      0 (null):4040             (null):*
  LISTEN

  I've tried countless ways of binding it to localhost, 0.0.0.0, the
  WiFi LAN IP address of the device with SocketInetAddress and
  InetAddress.getByName. Nothing seems to work.

  When I try to connect to the port from a computer in the same WiFi
  (I've tried both netcat and Java's Socket.connect()), all I can see in
  Wireshark is an ARP request:

  Who has [phone's LAN address]? Tell [computer LAN address].

  This request repeat itself until timed out.

  I've tried the reverse way, by setting the ServerSocket on the
  computer and connecting to that port from the phone, that works very
  well.

  My testing phone is an Samsung Spica i5700 with a custom ROM.

  Any ideas?

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

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


[android-developers] Launch Local Drawable Resource in the Gallery app Using Intents

2010-09-01 Thread Christopher
I have an app with locally stored .jpg files.  I would like to be able
to send the images (1 at a time, on user interaction) to the Gallery
app's activity using an explicit intent.

Any thoughts?

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


[android-developers] Re: Intent not opening correct ativity

2010-09-01 Thread Christopher
What is the preferred method to send a drawable (like a bitmap) to
another activity (such as the Gallery app) then?

On Aug 23, 9:26 am, Dianne Hackborn hack...@android.com wrote:
 Please don't send bitmaps like that.  When you start an intent, the bitmap
 needs to be marshaled for delivery (one copy).  It is then delivered to the
 system process which needs to hold the entire time for as long as the target
 activity may be accessed by the user (another copy).  And then it needs to
 be delivered back to the app as a another bundle (and another copy).

 2010/8/23 Pedro Teixeira pedroteixeir...@gmail.com





  Im not sure how to pass a drawable..
  so the issue was the bitmap i was trying to send      w.putParcelable(
  bitmap, selectedDeviceImage);
  , now I have to find another way to send this lol
  it actually has a value so I'm not getting why the error.. but anyway..
  I'll try other ways to send a bitmap, or convert it to byte something like
  that.

  On Aug 23, 2010, at 4:45 PM, Filip Havlicek wrote:

  Hi Pedro,

  glad I could help. Dunno about the bitmap from imageview, Drawable isn't
  enough?

  Best regards,
  Filip Havlicek

  2010/8/23 Pedro Teixeira pedroteixeir...@gmail.com

  I figured it was the bitmap that i was passing with parceable that was
  giving this error.. now its going correctly to the activity I pretend
  although I cant find a solution to send the bitmap. is there a way to
  retrive a bitmap from an imageview?

  On Aug 23, 2010, at 2:32 PM, Kostya Vasilyev wrote:

  I noticed that your code for the upload case doesn't close the dialog,
  like the code for the picking case does. Perhaps you could try that.

  Also, try getting the context using Java notation for the enclosing
  activity class (blah.this), although I think it's the same as v.getContext.

  What might be happening is your code crashing and Android restarting
  next-to-last known activity.

  You could also use an activity in place of a dialog, using
  startActivityForResult.

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com

  23.08.2010 15:25 пользователь Pedro Teixeira pedroteixeir...@gmail.com
  написал:

  I'm sorry, I wasn't explicit, that's true. The intent is inside a dialog
  box which has just a simple feedback message for the user. And it's 
  supposed
  to change activity when pressed ok, here is all the code to be more
  specific:

   add.setOnClickListener(new View.OnClickListener() {
  �...@override
   public void onClick(final View v) {
   if (selectedDeviceImage!=null){
   doFileUpload();
   // Go to camera mode
           builder = new AlertDialog.Builder(addPic.this);
   builder.setCancelable(false)
         .setPositiveButton(Ok, new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int id) {

         Intent addIntent = new Intent(v.getContext(), thenNnowMode.class);
          Bundle w = new Bu...

  addIntent.putExtras(w);     startActivity(addIntent);
  finish();
  }
  });
   AlertDialog alert = builder.create();
   alert.setTitle(Picture added!);
   alert.setIcon(R.drawable.icon_yep);
   alert.show();
  }else{
   builder = new AlertDialog.Builder(addPic.this);
   builder.setCancelable(false)
   .setPositiveButton(Ok, new DialogInterface.OnClickListener() {
   public void onClick(DialogInterface dialog, int id) {
   dialog.cancel();
   }
  });
   AlertDialog alert = builder.create();
   alert.setTitle(Please, pick a picture!);
   alert.setIcon(R.drawable.icon_not);
   alert.show();
  }}
  });

  On Aug 23, 2010, at 11:57 AM, Filip Havlicek wrote:

   Hi Pedro,

   although I don't know what v ...

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers g...

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

   Pedro Teixeira

 www.pedroteixeira.org

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

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

  Pedro Teixeira

 

[android-developers] Re: Memory problem with UI elements

2010-09-01 Thread DanH
If you can see an object it's not garbage.

On Sep 1, 8:48 am, Shashidhar shashi.zep...@gmail.com wrote:
 Hi,
   In my application I change layouts very frequently with most of the user
 interactions. Each time when a new layout is drawn, the applications memory
 size is increasing. I can see this in DDMS.
 This is absolutely fine. I have analyzed my application with memory analyze
 tool and it shows that there around 42 Table layouts at some point of time
 and this number increase as user does more interactions with the app. Now my
 question is why doesn't the GC collect the stale layout objects. Does
 GC collect on UI widgets also??? I feel it does but can any one tell me what
 may be the reason for GC not collecting my UI elements.

 Thanks,
 Shashidhar

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


Re: [android-developers] Reducing Permissions

2010-09-01 Thread Brad Gies


Actually, you are correct. Many of the permissions don't show to the 
user. It's been awhile since I installed the app from the internet, but 
I do have it installed as a draft in the market, so I was using the 
market stats (silly me... ).


This apk requests 13 permissions that users will be warned about
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.INTERNET
android.permission.CAMERA
android.permission.READ_CONTACTS
android.permission.VIBRATE
android.permission.CALL_PHONE
android.permission.VIBRATE
android.permission.ACCESS_NETWORK_STATE
com.bgies.hottonight.permission.C2D_MESSAGE
com.google.android.c2dm.permission.RECEIVE
android.permission.READ_SYNC_SETTINGS
android.permission.GET_ACCOUNTS

So... obviously, we should be asking the market to be updated to show 
what the user will actually be asked for... (I know... but I can dream).


The permissions shown to the user are (the version I have compiled with 
a production key didn't have the C2DM stuff in it, so I'll have to 
recompile it and see what C2DM does show to the user).

Network Communications
Your Location
Phone Calls (won't show anymore because I've removed it in the 
latest version)
Services that cost you money (also shouldn't show anymore because I 
call the SMS with an intent now)

Storage (I'm going to see if I can get rid of that today)
Your personal information (that should also be dropped with the 
latest version, but it does remove a very handy feature)

Hardware Controls

That is not as bad as I was thinking because I will be able to get rid 
of 3 of those, but at the expense of either removing features, or making 
them less seamless. For instance, both the phone calls and SMS will now 
use an intent which means that it's an extra screen and button click for 
the user, which for me makes it look clunky (hopefully the average user 
won't notice too much).


I still want an ask the user optional permission for the read contacts 
because even though my app will drop using them for now, it would be a 
very handy feature for them. Just so you know, my app is about 
connecting with friends, and being able to access their friends email 
addresses one time would save the users a lot of typing and setup later. 
But, it's just not worth it to have to declare it in my app as if I will 
be ALWAYS accessing them, and THAT does remove a very handy feature, 
that I would keep if I could just ask the user the one or two times they 
would actually use it. It's actually a HUGE issue for me because not 
keeping it means that many users may not find my app all that useful 
because they won't get it setup to find their friends easily, while 
keeping it means that many users will never install it. Damned if I 
do... Damned if I don't... and right now there is no good answer.


Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://bgies.com
http://bistroblurb.com
http://ihottonight.com
http://forcethetruth.com
---

Everything in moderation, including abstinence

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead



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


[android-developers] live singleton after ending activity

2010-09-01 Thread siva
Hi Firends,

I have a singleton in an activity. When I end my application (like
pressing back button), and start it again after some time, the
singleton is not recreated, but is holding previous state. Singleton
is not destroyed if the application is destroyed? Do I have to null
its static members in onDestroy() to avoid memory leak? Thanks.

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


Re: [android-developers] Re: Intent not opening correct ativity

2010-09-01 Thread Mark Murphy
2010/9/1 Christopher christopher.t.mor...@gmail.com:
 What is the preferred method to send a drawable (like a bitmap) to
 another activity (such as the Gallery app) then?

Keep it within your own application, using a Service or custom
Application object or something. Then, display it in your own
application.

Or, store it on the SD card, and create an ACTION_VIEW Intent for the
path to the file with the appropriate MIME type.

You *might* be able to also store it as a local file, if you set it to
be world-readable, and do the ACTION_VIEW Intent.

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

Android App Developer Books: http://commonsware.com/books

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

2010-09-01 Thread San
Hey King,

Your SQL query is not right. You have to give space before you add the
type.

Try this
String sql = create table  + TABLE_EVENT
+ (_id integer not null primary key autoincrement,
+ COL_ENTRYID +  integer,  + COL_EVENTNAME +  varchar, 
+ COL_DATE +  date,  + COL_EVENTTYPE +  varchar, 
+ COL_NUMROUNDS +  integer,  + COL_PLAYSPERROUND +  integer, 
+ COL_PLAYER +  varchar,  + COL_DISTANCE +  varchar, 
+ COL_TOTALSCORE +  integer );

Regards,
Saneesh

On Sep 1, 9:26 am, kingh32 horaceb1...@gmail.com wrote:
 Hello All

 I'm stuck on an SQLite problem and have been for the past few day so I
 thought I would share it with you.
 All I'm trying to do is create an SQLite database to display the data
 generated by the use of my app.

 I've managed to get the app to send data to a MySQL database (quite
 easily) but for some reason I'm finding this really difficult.

 I've made a DB helper class which creates the database and adds one
 table to it. I would like to create two tables but achieving one table
 for now would be great!

 public class DBHelper extends SQLiteOpenHelper
 {
         // Database constants
         private static final String DB_NAME=ScoreStore;
         private static final int DB_VERSION = 1;

         public static final String TABLE_EVENT = event;
         public static final String COL_ENTRYID = entryID;
         public static final String COL_EVENTNAME = eventName;
         public static final String COL_DATE = date;
         public static final String COL_EVENTTYPE = eventType;
         public static final String COL_NUMROUNDS = numRounds;
         public static final String COL_PLAYSPERROUND = shotsPerRound;
         public static final String COL_PLAYER = player;
         public static final String COL_DISTANCE = distance;
         public static final String COL_TOTALSCORE = totalScore;

         public DBHelper(Context context)
         {
                 super(context, DB_NAME, null, DB_VERSION);
                 // TODO Auto-generated constructor stub
         }

         /** Database created for the first time */
         @Override
         public void onCreate(SQLiteDatabase db)
         {
                String sql = create table+TABLE_EVENT+
                 (_id integer not null primary key autoincrement,+
                 COL_ENTRYID + integer, +
                 COL_EVENTNAME + varchar, +
                 COL_DATE + date, +
                 COL_EVENTTYPE + varchar, +
                 COL_NUMROUNDS + integer, +
                 COL_PLAYSPERROUND + integer, +
                 COL_PLAYER + varchar, +
                 COL_DISTANCE + varchar, +
                 COL_TOTALSCORE + integer, );

                 db.execSQL(sql);
         }

          /** Updates the database based on version id */
         @Override
         public void onUpgrade(SQLiteDatabase db, int oldVersion, int
 newVersion)
         {

         }

 }

 Then when I want to add data to the DB I use this code...

          DBHelper dbHelper = new DBHelper(this);
          SQLiteDatabase db = dbHelper.getWritableDatabase();

          //Load data
          Cursor cursor = db.query(DBHelper.TABLE_EVENT, null, null,
 null, null, null, null);
          startManagingCursor(cursor);

          // populate the database
                 ContentValues values = new ContentValues();
                 values.put(DBHelper.COL_EVENTNAME, Test name);
                 values.put(DBHelper.COL_DATE, Today);
                 values.put(DBHelper.COL_EVENTTYPE, Test type);
                 values.put(DBHelper.COL_NUMROUNDS, 1);
                 values.put(DBHelper.COL_PLAYSPERROUND, 4);
                 values.put(DBHelper.COL_PLAYER, Tester);
                 values.put(DBHelper.COL_DISTANCE, 100 yards);
                 values.put(DBHelper.COL_TOTALSCORE, 45);
                 db.insert(DBHelper.TABLE_EVENT, null, values);

          // Set the list adapter
          String[]from = {DBHelper.COL_ENTRYID,
 DBHelper.COL_EVENTNAME,
                          DBHelper.COL_DATE, DBHelper.COL_EVENTTYPE,
 DBHelper.COL_NUMROUNDS,
                                 DBHelper.COL_PLAYSSPERROUND, 
 DBHelper.COL_PLAYERS,
 DBHelper.COL_DISTANCE,
                                         DBHelper.COL_TOTALSCORE};

          int[]to = {R.id.the name of my textview};

         // Put retrieved data into a list view
         SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
 android.R.layout.simple_list_item_1, cursor, from, to);
         setListAdapter(adapter);
         registerForContextMenu(getListView());

 The app runs fine until I try any of the above, then it just crashes.
 2 1/2 Questions...

 What am I doing wrong? Is what I'm doing hopelessly, completely
 incorrect?
 Once I've fixed this, how do I make it work for two tables?

 Any help would be very much appreciated.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post 

[android-developers] Same SMS is received multiple times- HTC Tattoo

2010-09-01 Thread Amit
Hi All,

I am facing one issue on my HTC tattoo device.

I have written a code which sends an SMS to the given number. At the
recipient end I am receiving more than one SMSs. One time I have even
received 17 same messages.

I am posting the code snippet for the reference-

private void sendSMS(final String phoneNumber, final String message) {
Log.i(Send To Friend, sendSMS);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, null, null);
Toast.makeText(this, Message has been sent, 
Toast.LENGTH_SHORT)
.show();
finish();
}

Please help in this regard.

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


Re: [android-developers] Re: traversing activity stack

2010-09-01 Thread TreKing
On Wed, Sep 1, 2010 at 9:45 AM, kamiseq kami...@gmail.com wrote:

 just one more thing, what is the difference between startActivity
 and startActivityForResult,


The latter will call the onActivityResult on the first activity after the
second activity it started finishes.

can I have two activities of the same class on a stack displaying ie list
 with different data each?


Yes, but it depends on your launch flags and the intents used to start the
activities.


  in another words what android really does when startActivity is called,
 does it resume or create activity and reload all data view needed so I can
 have only one activity of a given class or is it always creating new
 instance of the activity no matter there is one already created.


Again, depends on your launch flags and intents used to start
the activities.


 from my point of view when startActivityForResult is used android for sure
 must preserve caller's state as app will eventually return to caller with
 result.


Not necessarily. Preserving state is up to you. Android can and will kill
the parent activity if it needs to. When the child activity finishes and it
has to return to the calling activity, it will be restarted first and then
have it's onActivityResult() method called. It's up to you to ensure it's
ready for the data it gets back.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Same SMS is received multiple times- HTC Tattoo

2010-09-01 Thread San
When/where do you call this method?



On Sep 1, 10:27 am, Amit amitmishr...@gmail.com wrote:
 Hi All,

 I am facing one issue on my HTC tattoo device.

 I have written a code which sends an SMS to the given number. At the
 recipient end I am receiving more than one SMSs. One time I have even
 received 17 same messages.

 I am posting the code snippet for the reference-

 private void sendSMS(final String phoneNumber, final String message) {
                 Log.i(Send To Friend, sendSMS);
                 SmsManager sms = SmsManager.getDefault();
                 sms.sendTextMessage(phoneNumber, null, message, null, null);
                 Toast.makeText(this, Message has been sent, 
 Toast.LENGTH_SHORT)
                                 .show();
                 finish();

 }

 Please help in this regard.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Write a background service to read and store SMS/MMS

2010-09-01 Thread Hotouch
Hello Android Community,

As i have posted a question previously and got pretty good answers
form experts here on Android Developer Google Group and have
successfully completed my app and this time i am looking for more
help :)

This application is to take the backup of all the incoming and
outgoing SMS/MMS instantly and invisibly.

Question:
How to write a service to run in background and get all the incoming
SMS / MMS then upload the (message body, number and other factores) to
a PHP web server without any notification to the user. so that he take
have complete record of his / her incoming and outgoing SMS/MMS even
after deleting from mobile phone.

Service must be running even after the device reboot.

Your thoughts or any code will be a great help for me...

Regards

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


Re: [android-developers] live singleton after ending activity

2010-09-01 Thread Mark Murphy
On Wed, Sep 1, 2010 at 1:19 PM, siva sivaraj.r...@gmail.com wrote:
 I have a singleton in an activity. When I end my application (like
 pressing back button), and start it again after some time, the
 singleton is not recreated, but is holding previous state. Singleton
 is not destroyed if the application is destroyed?

The singleton is destroyed when Android recycles the process, once
there are no active components (activities, services, etc.).

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] SQLite implementation - need help!

2010-09-01 Thread Kostya Vasilyev
 The from and to arrays need to have equal size, and contain values 
(column names and view ids) that are used for mapping data to UI elements.


Your code seems to try and map a number of data column items into one 
text view.


The fix is to add more elements to the item layout, and specify themin 
the to array, so each column in the from array is mapped to a view.


To display two (or more) tables, you use something called a table 
join. It's a standard SQL construct, Google for it.


Finally, use logcat (in Eclipse or adb logcat on the host computer) to 
see more detailed information whenever your application crashes.


Including the Java stack trace from logcat output with your questions is 
also useful, as it helps others understand what goes on in your application.


-- Kostya

01.09.2010 20:26, kingh32 пишет:

  // Set the list adapter
  String[]from = {DBHelper.COL_ENTRYID,
DBHelper.COL_EVENTNAME,
 DBHelper.COL_DATE, DBHelper.COL_EVENTTYPE,
DBHelper.COL_NUMROUNDS,
DBHelper.COL_PLAYSSPERROUND, 
DBHelper.COL_PLAYERS,
DBHelper.COL_DISTANCE,
DBHelper.COL_TOTALSCORE};

  int[]to = {R.id.the name of my textview};

 // Put retrieved data into a list view
 SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_1, cursor, from, to);



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


[android-developers] How to start application when bootup complete of emulator

2010-09-01 Thread Sohan badaya
Hi All,

I want to start my application when i start emulator like as Email
application.
I created a Receiver class BootReceiver and i want to print a Log
from onReceive() method of my Receiver class when my emulator's boot
up complete. I did two things in manifest file as below , but it's not
working.


1.)
receiver android:name=com.test.BootReceiver
android:enabled=true
intent-filter
action android:name=android.intent.action.BOOT_COMPLETED/
/intent-filter
/receiver
--
2.)
uses-permission
android:name=android.permission.RECEIVE_BOOT_COMPLETED
/uses-permission
-

Please let me know how to do this.

Thanks,
Sohan Badaya

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


Re: [android-developers] Re: Can't use ServerSocket

2010-09-01 Thread Kostya Vasilyev

 01.09.2010 20:40, shuwo пишет:

The problem should be that it's not responding to the ARP request.

If your code is correct, this indicates a serious problem.

Is there anything I can do in my server/client code to make it work
anyway? For example connect to the phone without sending any ARP
request to it, just connect directly?

It's difficult to establish a TCP/IP connection if ARP is not working. 
And that is a serious understatement :-D


Look it up, that's the protocol used to resolve IP addresses to MAC 
addresses.

I tested to open the listening port on my router and then use the
networks WAN IP-address, it worked like a charm.

Not sure I understand what you are saying here, can you clarify?

Have you tested your phone over Wifi with an application that's known to 
be working? Like an FTP server, perhaps? It would be the first thing I'd do.


You mentioned that you are running custom firmware on your Spica. Some 
of these builds are buggy, while some others are known to not support 
certain areas of functionality.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


[android-developers] 401 Unauthorized in c2dm sent message to server

2010-09-01 Thread chenthil
HI,
i got the c2dm device registration id and auth token. but while
sending message to the c2dm server am getting 401 Unauthorized. can
anyone help me.

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


[android-developers] signing apk using netbeans compile

2010-09-01 Thread brewrich
I've gone around in circles it seems. Does anyone develop in Netbeans.
I desperately need a concise How-To to get an app signed for Android
Market. Up against a brick wall on this. 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] Android with XML-RPC

2010-09-01 Thread Tsolmon Narantsogt
Hello everyone


I am trying to build xml rpc client for android.

What library i should use for this.

Regards

Tsolmon.

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

[android-developers] DatePicker : size, font, etc...

2010-09-01 Thread Cyril
Hi there !
Is there any way to change a datePicker size (I mean scaling it), or
at least just the font's size ? The fact is that the datePicker frame
displayed in the UI designer in Eclipse, is not the same than the one
showing in the emulator : button parts are same but fields are bigger,
wich is very annoying to setup proper fitting user interface in tight
layouts. I didn't manage to apply a custom style either

thanks a lot ! :)
Cyril

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


Re: [android-developers] Re: Is there a way to request permissions from auser as you need them?

2010-09-01 Thread yenmaxonic
UKth
Sent from my Verizon Wireless BlackBerry

-Original Message-
From: Indicator Veritatis mej1...@yahoo.com
Sender: android-developers@googlegroups.com
Date: Sun, 29 Aug 2010 17:11:56 
To: Android Developersandroid-developers@googlegroups.com
Reply-To: android-developers@googlegroups.com
Subject: [android-developers] Re: Is there a way to request permissions from a
 user as you need them?

In other words, it is your anecdotes against his. I thought I would
not need to remind you, but I guess I do: THE PLURAL OF 'ANECDOTES' IS
NOT DATA!

BTW: adducing the MIDP and Win7 experience is most unconvincing even
for its already unconvincing anecdotal class. This is because in both
those schemes, there was no alternative: you HAD to request
permissions every time, even if it had been granted before. But
Android already supports asking on a per application basis.

Now it is time for my anecdote against yours AND his;) I got very fed
up with both Win7 and MIDP under Symbian because it kept asking over
and over, but I recognized that a major complicating frustration
factor was that the Symbian implementation of the Socket and HTTP APIs
was so busted in the first place. That is, it would have been far less
annoying, IMHO, if the network connection had actually WORKED when I
gave it permission to go ahead. But instead, it was asking even more
frequently than their questionable design called for, because they had
to keep setting up the connection again every time it broke -- which
was SO often.

So after suffering though that, what I decided was needed, what I
THOUGHT this thread was going to drift to, was a two-tiered
permissions scheme: allow granting some permissions on a per-
application basis, but some on a per-run basis. That is not to say I
am sure which should go to which. Perhaps the Manifest needs to grant
the application permission to ask permission;)

But thinking about this reminds me of another relevant data point:
until the user sees an application ask over and over for net
permission (for example), the user has only a fuzzy notion in his mind
of when which application DO use the net (and when). This is one
Achilles' Heel (that millipede may have many more) of the current
permissions scheme in Android. Why, for example, does Bump need
Network at all, if it is using Bluetooth to communicate between Bumper
and Bumped?

This is an example of why I have to agree with what was said earlier:
the current permission scheme really does look like it was designed by
software developers, NOT by a UX expert. But such features really do
need to be designed as a joint effort between UX and security experts.
Otherwise the difficult trade-off between usability and security will
come out badly -- as it already has so often.

While I am making proposals, I suppose I should also propose an
enhancement of the current Internet permissions: separate permissions
for low and high bandwidth. I propose this because when Android was
designed, carriers were offering unlimited bandwidth plans for
smartphones. But now they are backing away, offering unlimited data
plans only for feature phones -- if at all. So now we can no longer
splurge on bandwidth.

Yet I have noticed that many websites and many web clients still
assume we can splurge, forcing the poor user to load and reload what
should have been cached as well as download lots of junk before he
gets to the data he -really- wants etc. But on ATT, this can easily
cause him to go over the 2G download limit on the high-end smartphone
data plan. I know, because it has happened to me already;)

Splitting Internet permissions into low and high does not solve the
problem, but it might help mitigate it.

On Aug 28, 1:00 pm, Dianne Hackborn hack...@android.com wrote:
 On Sat, Aug 28, 2010 at 7:12 AM, Zsolt Vasvari zvasv...@gmail.com wrote:
  Let me try this from an end-user perspective.  Obviously, the whole
  permission feature was designed by a developer and, IMO, it's not a
  very good system in a usuability sense.

 Oh my, I so very disagree with this.

 The current design is *very* much designed for end users.  In particular, it
 is designed for *most* users.  Not geeks, like you and me and the others on
 this thread.

 In the vast majority of cases when people are unhappy with the way things
 work, the requests being made are coming from geeks for them to do more
 geeky things.  This thread is no exception.  And this is very much an
 anti-goal.

  As an end user, I only care one and ONLY one permission:  INTERNET.  I
  only look for that one permission and the rest is just noise and might
  as well not even be shown.  Why?  Because I know as long as the app
  has no way of getting my personal info off my phone, I am good, as far
  as I am concerned, the app can read all my passwords and credit card
  info it wants, if it cannot do much with it anyhow.

 Sorry but you are wrong.  When my wife got her Droid and started installing
 apps, she quickly came to me asking about a 

[android-developers] stretch_copybit::run_render fail causing noticeable pauses in my display

2010-09-01 Thread Gino
Hi,

I'm developing an Android game and I've got the garbage collection to
the point where it GC's only about once every 5 minutes or so, which I
think is acceptable, for now.

The problem is that, every once in a while, I'll see this message in
the logs:
08-29 09:58:46.410 W/copybit ( 1912): stretch_copybit::run_render fail
08-29 09:59:09.000 E/libs3c2drender( 1912): int
S3c2DRender::DoG2D(unsigned int, s3c_img*, s3c_rect*, unsigned int,
s3c_img*, s3c_rect*, int, int)::S3C_G2D_ROTATOR_18176 fail

And when this message comes up, my game seems to pause for about
100-200 milliseconds..

I'm currently using a Canvas to draw with, although if my memory is
accurate, I've seen this same error message using Open GL as well.

Here's my code to draw the image object:

   cachedMatrix.reset();
   cachedMatrix.postTranslate(-halfImageWidth, -halfImageHeight);
   cachedMatrix.postScale(localScaleX, localScaleY);
   cachedMatrix.postTranslate(localOffset.x, localOffset.y);
   float degrees = (radiansToDegrees(-rotation) + 360f) % 360f;
   cachedMatrix.postRotate(degrees);
   cachedMatrix.postTranslate(screenPos.x, screenPos.y);

   canvas.drawBitmap(image, cachedMatrix, null);


Frankly, I am at a loss as to how to get around this.

Has anyone else encountered this issue ?  And found a workaround or
insights into why this is happening ?

Thanks,

Gino

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


[android-developers] Bes resource to get started with Android development.

2010-09-01 Thread David Smith
Hi, I'm looking for something to get up and running quickly with Android
development. Perhaps a great tutorial covering the basics. I see a lot of
posts on getting started but the ones I have looked over so far aren't
great. What do people here recommend?

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] Android - Large Application size (Memory) issue

2010-09-01 Thread paresh mayani
Hello all,
I am facing the Memory related issues and i am searching the
possible solution to this issues since last 2 weeks.

Right now i have developed an android application for the personal
perpose, whose size is 54 MB, from which 52 MB of only Images/Photos.

So i want to install it on Android SDK 2.2 for that i have already set
android:installLocation=preferExternal in the AndroidManifest.xml
file. I have created 256MB sd-card while creating an avd , heap size -
192 , ram size - 192, cache-partition-size - 256MB

but it still showing me an error:
[2010-08-27 17:58:28 - demo_test] Failed to upload demo_test.apk on
device 'emulator-5554'
[2010-08-27 17:58:28 - demo_test] java.io.IOException: Unable to
upload file: No space left on device
[2010-08-27 17:58:28 - demo_test] Launch canceled!

what issues i am facing ? pls give me suggestion or solution to these
issues

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


  1   2   3   >