[android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
Hi, thanks, but, when i try to send the email, the emulator says:
unsuported action

is this compatible with API 1.5?

On 3 dic, 12:58, Kostya Vasilyev kmans...@gmail.com wrote:
 Hi,

 You are describing three tasks:

 1 - handling a button click.

 http://developer.android.com/guide/topics/ui/ui-events.html

 http://developer.android.com/reference/android/view/View.html

 see View.setOnClickListener(android.view.View.OnClickListener)

 2 - getting the value of an EditText field (the email address)

 http://developer.android.com/reference/android/widget/EditText.html

 see getText()

 3 - sending the email.

 The code I use is:

  Intent view = new Intent(Intent.ACTION_VIEW);
  StringBuilder uri = new StringBuilder(mailto:;);
  uri.append(email address here);
  uri.append(?subject=).append(Uri.encode(subject here));
  uri.append(body=).append(Uri.encode(message body here));
  view.setData(Uri.parse(uri.toString()));
  startActivity(view);

 There are other ways to specify subject and body, but this one works
 with certain buggy email clients (H*C Se*se).

 -- Kostya

 03.12.2010 14:16, saex пишет:

  Hi

  im searching on google and here and i only find hard ways, that i
  can't understand, because i am starting on android.

  I have a textfield on my app, and a button. I only want that when user
  press the button, my app have to send a email with the text Hello to
  the direction on the textfield.

  there is a easy way to do it?

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


Re: [android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 7:26 AM, saex elpablos...@gmail.com wrote:
 Hi, thanks, but, when i try to send the email, the emulator says:
 unsuported action

 is this compatible with API 1.5?

You need a configured email program in your emulator.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
Hi, i did it but i have two problems:

1. Does not send automatically the email when i press the send button,
it shows a new window to edit the tittle, receptor and body of the
email and to send it.¿is not possible to send it automatically without
giving the user the possibility to edit it?

2. I test it and i didn't recibe the email... ¿how many time needs to
be recibed??

On 3 dic, 12:58, Kostya Vasilyev kmans...@gmail.com wrote:
 Hi,

 You are describing three tasks:

 1 - handling a button click.

 http://developer.android.com/guide/topics/ui/ui-events.html

 http://developer.android.com/reference/android/view/View.html

 see View.setOnClickListener(android.view.View.OnClickListener)

 2 - getting the value of an EditText field (the email address)

 http://developer.android.com/reference/android/widget/EditText.html

 see getText()

 3 - sending the email.

 The code I use is:

  Intent view = new Intent(Intent.ACTION_VIEW);
  StringBuilder uri = new StringBuilder(mailto:;);
  uri.append(email address here);
  uri.append(?subject=).append(Uri.encode(subject here));
  uri.append(body=).append(Uri.encode(message body here));
  view.setData(Uri.parse(uri.toString()));
  startActivity(view);

 There are other ways to specify subject and body, but this one works
 with certain buggy email clients (H*C Se*se).

 -- Kostya

 03.12.2010 14:16, saex пишет:

  Hi

  im searching on google and here and i only find hard ways, that i
  can't understand, because i am starting on android.

  I have a textfield on my app, and a button. I only want that when user
  press the button, my app have to send a email with the text Hello to
  the direction on the textfield.

  there is a easy way to do it?

 --
 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] picture uploading from android application to php server

2010-12-03 Thread zeeshan mirza
Hello Friends,

I want to upload images from android application to php server. Both
are developed by me. Server is not accepting files from android
client. Please have a loot at my code and let me know if someone knows
the problem. I am using xampp for apache and php. Here is my code for
php server and android application.

*
PHP SERVER
*
?php

$target_path = /uploads/;

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo The file . basename( $_FILES['uploadedfile']['name']).
 has been uploaded;
}

else{
echo There was an error uploading the file, please try again!;
}
?
***

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

private void doFileUpload(){

HttpURLConnection conn = null;

DataOutputStream dos = null;
DataInputStream 
inStream = null;
String 
exsistingFileName = /sdcard/def.JPG;

String lineEnd 
= rn;
String 
twoHyphens = --;
String boundary 
=  *;

int bytesRead, 
bytesAvailable, bufferSize;
byte[] buffer;
int 
maxBufferSize = 1*1024*1024;
String 
responseFromServer = ;
String 
urlString = http://192.168.1.6/uploader.php;;

try
{

//-- CLIENT REQUEST

Log.e(MediaPlayer,Inside second Method);

FileInputStream fileInputStream = new
FileInputStream(new File(exsistingFileName) );


// open a URL connection to the Servlet

URL url = new URL(urlString);


// Open a HTTP connection to the URL

conn = (HttpURLConnection) url.openConnection();


// Allow Inputs

conn.setDoInput(true);


// Allow Outputs

conn.setDoOutput(true);


// Don't use a cached copy.

conn.setUseCaches(false);


// Use a post method.

conn.setRequestMethod(POST);
  

[android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
i did it working because i test on my movile, not on the emulator (on
the emulator doesn't works)

but i still have these two serious problems of my previous answer,
please help me

On 3 dic, 13:32, saex elpablos...@gmail.com wrote:
 Hi, i did it but i have two problems:

 1. Does not send automatically the email when i press the send button,
 it shows a new window to edit the tittle, receptor and body of the
 email and to send it.¿is not possible to send it automatically without
 giving the user the possibility to edit it?

 2. I test it and i didn't recibe the email... ¿how many time needs to
 be recibed??

 On 3 dic, 12:58, Kostya Vasilyev kmans...@gmail.com wrote:

  Hi,

  You are describing three tasks:

  1 - handling a button click.

 http://developer.android.com/guide/topics/ui/ui-events.html

 http://developer.android.com/reference/android/view/View.html

  see View.setOnClickListener(android.view.View.OnClickListener)

  2 - getting the value of an EditText field (the email address)

 http://developer.android.com/reference/android/widget/EditText.html

  see getText()

  3 - sending the email.

  The code I use is:

   Intent view = new Intent(Intent.ACTION_VIEW);
   StringBuilder uri = new StringBuilder(mailto:;);
   uri.append(email address here);
   uri.append(?subject=).append(Uri.encode(subject here));
   uri.append(body=).append(Uri.encode(message body here));
   view.setData(Uri.parse(uri.toString()));
   startActivity(view);

  There are other ways to specify subject and body, but this one works
  with certain buggy email clients (H*C Se*se).

  -- Kostya

  03.12.2010 14:16, saex пишет:

   Hi

   im searching on google and here and i only find hard ways, that i
   can't understand, because i am starting on android.

   I have a textfield on my app, and a button. I only want that when user
   press the button, my app have to send a email with the text Hello to
   the direction on the textfield.

   there is a easy way to do it?

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


Re: [android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 7:32 AM, saex elpablos...@gmail.com wrote:
 Hi, i did it but i have two problems:

 1. Does not send automatically the email when i press the send button,
 it shows a new window to edit the tittle, receptor and body of the
 email and to send it.¿is not possible to send it automatically without
 giving the user the possibility to edit it?

No.

 2. I test it and i didn't recibe the email... ¿how many time needs to
 be recibed??

That would be a question for your email service provider.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Kostya Vasilyev
You can't send email without the user knowing (and confirming).

At least not without writing your own networking code that talks directly to
an SMTP server.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
03.12.2010 15:32 пользователь saex elpablos...@gmail.com написал:
 Hi, i did it but i have two problems:

 1. Does not send automatically the email when i press the send button,
 it shows a new window to edit the tittle, receptor and body of the
 email and to send it.¿is not possible to send it automatically without
 giving the user the possibility to edit it?

 2. I test it and i didn't recibe the email... ¿how many time needs to
 be recibed??

 On 3 dic, 12:58, Kostya Vasilyev kmans...@gmail.com wrote:
 Hi,

 You are describing three tasks:

 1 - handling a button click.

 http://developer.android.com/guide/topics/ui/ui-events.html

 http://developer.android.com/reference/android/view/View.html

 see View.setOnClickListener(android.view.View.OnClickListener)

 2 - getting the value of an EditText field (the email address)

 http://developer.android.com/reference/android/widget/EditText.html

 see getText()

 3 - sending the email.

 The code I use is:

  Intent view = new Intent(Intent.ACTION_VIEW);
  StringBuilder uri = new StringBuilder(mailto:;);
  uri.append(email address here);
  uri.append(?subject=).append(Uri.encode(subject here));
  uri.append(body=).append(Uri.encode(message body here));
  view.setData(Uri.parse(uri.toString()));
  startActivity(view);

 There are other ways to specify subject and body, but this one works
 with certain buggy email clients (H*C Se*se).

 -- Kostya

 03.12.2010 14:16, saex пишет:

  Hi

  im searching on google and here and i only find hard ways, that i
  can't understand, because i am starting on android.

  I have a textfield on my app, and a button. I only want that when user
  press the button, my app have to send a email with the text Hello to
  the direction on the textfield.

  there is a easy way to do it?

 --
 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.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: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
i test with two providers, my university provider, and hotmail, and
didn't recived the emails yet

also, one question, who is the sender? i specifi the email receiver
but not the sender... which sender will see the receiver when he opens
the emails?

On 3 dic, 13:37, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Dec 3, 2010 at 7:32 AM, saex elpablos...@gmail.com wrote:
  Hi, i did it but i have two problems:

  1. Does not send automatically the email when i press the send button,
  it shows a new window to edit the tittle, receptor and body of the
  email and to send it.¿is not possible to send it automatically without
  giving the user the possibility to edit it?

 No.

  2. I test it and i didn't recibe the email... ¿how many time needs to
  be recibed??

 That would be a question for your email service provider.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 7:40 AM, saex elpablos...@gmail.com wrote:
 i test with two providers, my university provider, and hotmail, and
 didn't recived the emails yet

Have you tried sending an email normally (i.e., not sending it through
your code) using this email program?

 also, one question, who is the sender? i specifi the email receiver
 but not the sender... which sender will see the receiver when he opens
 the emails?

It is whatever you configured in the email program.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
what? i dont use any email program on my android phone :S

this method only works if a movile user uses the email program of his
phone?

oh no, then i can't use this method

exist another method to do it?

On 3 dic, 13:45, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Dec 3, 2010 at 7:40 AM, saex elpablos...@gmail.com wrote:
  i test with two providers, my university provider, and hotmail, and
  didn't recived the emails yet

 Have you tried sending an email normally (i.e., not sending it through
 your code) using this email program?

  also, one question, who is the sender? i specifi the email receiver
  but not the sender... which sender will see the receiver when he opens
  the emails?

 It is whatever you configured in the email program.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Application is shutdown unexpectedly

2010-12-03 Thread SREEHARI

Hi Peter,

 can u post the log message??

Sreehari.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 7:52 AM, saex elpablos...@gmail.com wrote:
 what? i dont use any email program on my android phone :S

You need to.

 this method only works if a movile user uses the email program of his
 phone?

Yes.

 exist another method to do it?

Not native to Android. You are welcome to find a SMTP library and
attempt to use it.

However, users will be irritated with you for forcing them to put in
their mail credentials a second time (once for their email program,
once for your program). And, users will be irritated with you if they
feel you are sending emails with their credentials without their
knowledge and consent. And, bear in mind that not all users even know
what their mail credentials are (e.g., Gmail users may not know the
Gmail SMTP server).

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Application is shutdown unexpectedly

2010-12-03 Thread P.N.

Hi sreehari,

no - haven't got any log message; just the message from subject (in German).

Regards
Peter


SREEHARI schrieb:


Hi Peter,

  can u post the log message??

Sreehari.




--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
what? this cant be possible, im sure exist another way

i have some apps on my android phone that haves invite buttons, that
send automatically emails to the people i want to have in my app, That
emails haves automatic text generated by the apps, and i have not to
give to the programs any credentials

i want to do that

is not possible? then why some 3º party apps of the market can do it?

On 3 dic, 14:27, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Dec 3, 2010 at 7:52 AM, saex elpablos...@gmail.com wrote:
  what? i dont use any email program on my android phone :S

 You need to.

  this method only works if a movile user uses the email program of his
  phone?

 Yes.

  exist another method to do it?

 Not native to Android. You are welcome to find a SMTP library and
 attempt to use it.

 However, users will be irritated with you for forcing them to put in
 their mail credentials a second time (once for their email program,
 once for your program). And, users will be irritated with you if they
 feel you are sending emails with their credentials without their
 knowledge and consent. And, bear in mind that not all users even know
 what their mail credentials are (e.g., Gmail users may not know the
 Gmail SMTP server).

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] On disale logging status of Looper.getMainLooper().setMessageLogging(new Printer()) remains enable or becomes disable.

2010-12-03 Thread muhammad mahmood
Hi

When we do logging disable during publishing an app, is
Looper.getMainLooper().setMessageLogging(new Printer()) remains enable
or becomes off/disable. I mean are we still be able to get messages
with printer or not?

Thanks
Muhammad Rashid

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

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 8:40 AM, P.N. peter.nabbef...@gmx.de wrote:
 no - haven't got any log message; just the message from subject (in German).

You really should consider catching and reporting your stack traces.
This happens automatically for some apps on some devices when
distributed through the Android Market. There are also plenty of
third-party solutions, some of which are discussed here:

http://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 8:44 AM, saex elpablos...@gmail.com wrote:
 what? this cant be possible, im sure exist another way

There are many ways.

 i have some apps on my android phone that haves invite buttons, that
 send automatically emails to the people i want to have in my app, That
 emails haves automatic text generated by the apps, and i have not to
 give to the programs any credentials

 i want to do that

Send the email from your server, with your credentials, with data
supplied to the server from your Android application via a Web service
API. That is how I would do it, anyway.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Application is shutdown unexpectedly

2010-12-03 Thread P.N.


Thank You for the link, seems good but too much to read, now - will have 
to work through at the week-end.


However, are there any good samples for more complex layouts? Seems, my 
issue has to do with nesting ...


Kind regards

Peter


Mark Murphy schrieb:

On Fri, Dec 3, 2010 at 8:40 AM, P.N.peter.nabbef...@gmx.de  wrote:

no - haven't got any log message; just the message from subject (in German).


You really should consider catching and reporting your stack traces.
This happens automatically for some apps on some devices when
distributed through the Android Market. There are also plenty of
third-party solutions, some of which are discussed here:

http://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application




--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 i can migrate my app from 1.5 to 1.6 api fast and safe???

2010-12-03 Thread Streets Of Boston
If you don't need/want to support 1.5 phones, just set the project's
Android SDK version to 1.6 (api-level 4). Re-compile. That's it.


On Dec 3, 6:51 am, saex elpablos...@gmail.com wrote:
 Hi, i am making a gigantic app for android, and i start doing it some
 moths ago for android 1.5, but now i know that some of the things i
 need for my app only can be done if you are programming for 1.6 api.

 there is a easy, fast and safe way to migrate my app from 1.5 to 1.6
 without having to lose time?

 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: question about the proper way of quitting the program

2010-12-03 Thread Streets Of Boston
Handle the onPause and onResume as well and put your game in some kind
of sleep-mode (onPause), where it does absolutely nothing but just sit/
sleep there. When your activity that shows the game is brought to the
foreground instead (onResume), bring it out of sleep mode and let the
user continue the game.

Another, but highly 'controversial' option is to call System.exit()
(or android.os.Process.killProcess(android.os.Process.myPid())). Since
you have a one-activity game that is entirely stand-alone (i assume),
this could be considered ok.

On Dec 2, 7:47 pm, billconan billco...@gmail.com wrote:
 Hello guys,

 I'm working on a game, mainly based on NDK. I now have a problem of
 how to quit the application. Right now, i just implement my own
 function to handle the back button. inside that function, I simply
 call the activity.finish() api to finish the activity that uses my C++
 code. However, I discovered that if I open the TaskKiller (I'm using
 Advanced Task Killer) program after that, I can always see my game as
 a running program. More than that, if I run my game again, I can see
 that what I allocated in the C++ program during the first run is still
 there.

 I know that because of the multi-task design of the Android platform,
 an application doesn't really quit when you quit it. But the
 interesting thing is that if you look at the game Angry Birds, that
 one won't appear in the TaskKiller program after you play it. I'm
 worrying about this issue because a game often aggressively refresh
 the game loop, I think it draws the power quickly. It seems that even
 I only played my game for a short time, my battery gets low very
 quickly after I closed the game.

 So I'm guessing there must be something wrong in my program. Is there
 any smarter way to quit an application. How did Angry Birds solve this
 problem?

 Thank you.

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


[android-developers] Re: How i can migrate my app from 1.5 to 1.6 api fast and safe???

2010-12-03 Thread Leon Moreyn-Android Development
that and if your building in eclipse make sure to change the lib to
1.6. Right click on project, properties, android, then select 1.6

On Dec 3, 9:41 am, Streets Of Boston flyingdutc...@gmail.com wrote:
 If you don't need/want to support 1.5 phones, just set the project's
 Android SDK version to 1.6 (api-level 4). Re-compile. That's it.

 On Dec 3, 6:51 am, saex elpablos...@gmail.com wrote:



  Hi, i am making a gigantic app for android, and i start doing it some
  moths ago for android 1.5, but now i know that some of the things i
  need for my app only can be done if you are programming for 1.6 api.

  there is a easy, fast and safe way to migrate my app from 1.5 to 1.6
  without having to lose time?

  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: Please help with an ideea

2010-12-03 Thread Alex Munteanu
Not giving on the ideea that there is someone who has an ideea how
this is (or could) be implemented :) !

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread saex
bruff and there is not another way without using webservices and a
remote server?

a easy and simply way? like in html and C or java

On 3 dic, 14:49, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Dec 3, 2010 at 8:44 AM, saex elpablos...@gmail.com wrote:
  what? this cant be possible, im sure exist another way

 There are many ways.

  i have some apps on my android phone that haves invite buttons, that
  send automatically emails to the people i want to have in my app, That
  emails haves automatic text generated by the apps, and i have not to
  give to the programs any credentials

  i want to do that

 Send the email from your server, with your credentials, with data
 supplied to the server from your Android application via a Web service
 API. That is how I would do it, anyway.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Application is shutdown unexpectedly

2010-12-03 Thread P.N.


Just to note:

In my TableLayout element, the following attributes were missing:
android:layout_width=1px
android:layout_height=1px
These are obviously facultative; wanted to not specify them, because 
I'll need to set the size in my Activity implementation. I'm new to

Android, so not filing a bug, while IMHO this is one.

Regards
Peter




Mark Murphy schrieb:

On Fri, Dec 3, 2010 at 8:40 AM, P.N.peter.nabbef...@gmx.de  wrote:

no - haven't got any log message; just the message from subject (in German).


You really should consider catching and reporting your stack traces.
This happens automatically for some apps on some devices when
distributed through the Android Market. There are also plenty of
third-party solutions, some of which are discussed here:

http://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application




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


[android-developers] Handling multi-byte Unicode strings in native code

2010-12-03 Thread John Gaby
How do I detect a lead byte within Unicode string from native code.  I
have used 'isleadbyte' in the past, but that function does not seem to
be present in the NDK.

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: Handling multi-byte Unicode strings in native code

2010-12-03 Thread John Gaby
Drat, posted to the wrong group.  Sorry.

On Dec 3, 7:48 am, John Gaby jg...@gabysoft.com wrote:
 How do I detect a lead byte within Unicode string from native code.  I
 have used 'isleadbyte' in the past, but that function does not seem to
 be present in the NDK.

 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] ADT is no longer launching APK on device

2010-12-03 Thread Richard Leggett
Hi all,

I've had a very strange thing happen here, one minute I'm debugging my
app (on a Nexus One), no problems, the next it refuses to launch after
installation every time. My logcat contains the following (hopefully
the relevant parts, trimmed out GC logs etc):

D/PackageParser(21026): Scanning package: /data/app/vmdl26933.tmp
I/PackageManager(21026): Removing non-system package:com.domain.proj
I/ActivityManager(21026): Force stopping package com.domain.proj
uid=10046
D/PackageManager(21026): Scanning package com.domain.proj
I/PackageManager(21026): /data/app/com.domain.proj-2.apk changed;
unpacking
I/PackageManager(21026): Package com.domain.proj codePath changed
from /data/app/com.domain.proj-1.apk to /data/app/
com.domain.proj-2.apk; Retaining data and using new
D/installd(   61): DexInv: --- BEGIN '/data/app/com.domain.proj-2.apk'
---
D/dalvikvm(30993): creating instr width table
D/dalvikvm(30993): DexOpt: load 24ms, verify 62ms, opt 2ms
D/installd(   61): DexInv: --- END '/data/app/
com.domain.proj-2.apk' (success) ---
D/PackageManager(21026):   Activities: com.domain.proj.[...snip for
brevity...]
I/ActivityManager(21026): Force stopping package com.domain.proj
uid=10046
W/PackageManager(21026): Code path for pkg : com.domain.proj changing
from /data/app/com.domain.proj-1.apk to /data/app/
com.domain.proj-2.apk
W/PackageManager(21026): Resource path for pkg : com.domain.proj
changing from /data/app/com.domain.proj-1.apk to /data/app/
com.domain.proj-2.apk
I/installd(   61): move /data/dalvik-cache/
d...@app@com.domain.proj-2@classes.dex - /data/dalvik-cache/
d...@app@com.domain.proj-2@classes.dex
D/PackageManager(21026): New package installed in /data/app/
com.domain.proj-2.apk
I/ActivityManager(21026): Force stopping package com.domain.proj
uid=10046
D/VoiceDialerReceiver(21629): onReceive Intent
{ act=android.intent.action.PACKAGE_REMOVED
dat=package:com.domain.proj flg=0x1000
cmp=com.android.voicedialer/.VoiceDialerReceiver (has extras) }
V/RecognizerEngine(21629): deleteCachedGrammarFiles /data/data/
com.android.voicedialer/files/openentries.txt
D/VoiceDialerReceiver(21629): onReceive Intent
{ act=android.intent.action.PACKAGE_ADDED dat=package:com.domain.proj
flg=0x1000 cmp=com.android.voicedialer/.VoiceDialerReceiver (has
extras) }
V/RecognizerEngine(21629): deleteCachedGrammarFiles /data/data/
com.android.voicedialer/files/openentries.txt
D/vending (21454): [79] LocalAssetCache.updateOnePackage(): No local
info for com.domain.proj
I/installd(   61): unlink /data/dalvik-cache/
d...@app@com.domain.proj-1@classes.dex
D/vending (21454): [81] LocalAssetCache.updateOnePackage(): No local
info for com.domain.proj
D/AndroidRuntime(30985): Shutting down VM
I/AndroidRuntime(30985): NOTE: attach of thread 'Binder Thread #3'
failed

That's it, the app icon refreshes in the launcher but it doesn't then
run. This applies to any projects I try to run on the phone, not just
this app.

I should say it launches fine on the emulator, and I have tried
installing eclipse and ADT afresh, creating a new workspace,
uninstalling the app on the phone, rebooting phone and Mac several
times.

Does anyone have an ideas on the cause of this? I can't seem to find
anything online, some bits regarding dalvik-cache but nothing that I
can try out.

Many thanks,
Richard

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


Re: [android-developers] Re: How to send a simple email programatically? (exists a simple way to do it??)

2010-12-03 Thread Kostya Vasilyev

There is nothing in html or C or Java *languages* for sending email.

Each of these platforms requires the use of some library for this.

You can look for such a library and integrate it into your Android 
application.


However, in general, leveraging an already installed and configured 
email application is the Android way of doing things.


It's all about giving the user control and knowledge about what is 
actually happening on the phone, as well as reusing established UI and 
implementation.


Surely you don't want your users to think that once they've configured 
their email account in your program, it will be used to send spam?


-- Kostya

03.12.2010 18:20, saex пишет:

bruff and there is not another way without using webservices and a
remote server?

a easy and simply way? like in html and C or java

On 3 dic, 14:49, Mark Murphymmur...@commonsware.com  wrote:

On Fri, Dec 3, 2010 at 8:44 AM, saexelpablos...@gmail.com  wrote:

what? this cant be possible, im sure exist another way

There are many ways.


i have some apps on my android phone that haves invite buttons, that
send automatically emails to the people i want to have in my app, That
emails haves automatic text generated by the apps, and i have not to
give to the programs any credentials
i want to do that

Send the email from your server, with your credentials, with data
supplied to the server from your Android application via a Web service
API. That is how I would do it, anyway.

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

_Android Programming Tutorials_ Version 3.0.1 Available!



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


Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev

Here are a few ideas:

1. Create a background that has the maximum possible aspect ratio: it's 
16:9 (1.777) for 480 by 854, and less than that for 480 by 800 (1.66), 
1024 by 600 (1.7) and 320 by 480 (1.5).


Push the background to the top when drawing, so that the bottom part is 
clipped on devices with smaller aspect ratio (320 by 480.


Place the buttons at a fixed position, specified in dp units (device 
independent).


This should cover phones, as well as tablets.

2. Scale the background or use a nine-patch.

Implement your own subclass of ViewGroup that can position the buttons, 
calculating their positions based on screen resolution and aspect ratio.


As a further enhancement, create several background at several common 
aspect ratios (I'd pick 1.7 and 1.5).


-- Kostya

03.12.2010 15:05, Serdel пишет:

Thank you all for your response. I am now reading about supporting
multiple screens in android :
http://developer.android.com/guide/practices/screens_support.html

My problem is that the buttons must be preciously placed to correspond
properly with the background (that's why the accurate, exact dip
values like 291). I can support multiple layout but how much of them I
am inf act able to present - giving different layouts for each device
is quite pointless (and the main problem is in the layout not the size
of images).




--
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] Shutdown A PC With An Automatic Timer Itself

2010-12-03 Thread Sami
Please Check This How To Shutdown A PC With An Automatic Timer Itself

http://softsami.blogspot.com/2010/12/shutdown-pc-with-automatic-timer-itself.html

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thanks Vasilyev,

The aspect ration is in deed a very important factor - I was surprised
why my layout looks fine in eclipse plug in but corrupts on the
device. Only when I design my own dev config with proper size and
ratio as long it worked correct. I now have a quite similar problem.
Because I have design some images for the background of my buttons (I
use button not imagebuttons to avoid the white 'frame' around the
image). However the images are bigger than I expected them to be.
Using my example - images for B1 and B2 (despite being 240px long) are
much longer than the half of the screen. If I place them with relative
layout they overlap. If I switch to linear layout with weigth 1 the
width is adjusted properly however the height stays the same (I need
to set it manually which I would like to avoid). Can I somehow do it
so the image would resize both its dimensions automatically to keep
it's previous ratio? So that If I fit the images with linear layout
their height would also shrink due to 'forced' shorted width?

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thanks Vasilyev,

The aspect ration is in deed a very important factor - I was surprised
why my layout looks fine in eclipse plug in but corrupts on the
device. Only when I design my own dev config with proper size and
ratio as long it worked correct. I now have a quite similar problem.
Because I have design some images for the background of my buttons (I
use button not imagebuttons to avoid the white 'frame' around the
image). However the images are bigger than I expected them to be.
Using my example - images for B1 and B2 (despite being 240px long) are
much longer than the half of the screen. If I place them with relative
layout they overlap. If I switch to linear layout with weigth 1 the
width is adjusted properly however the height stays the same (I need
to set it manually which I would like to avoid). Can I somehow do it
so the image would resize both its dimensions automatically to keep
it's previous ratio? So that If I fit the images with linear layout
their height would also shrink due to 'forced' shorted width?

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


[android-developers] TabHost Layout Question

2010-12-03 Thread Tommy
Hi everyone,

I was wondering if it is possible to set a height for the individual
tabs on the widgets or if I am stuck using the default heights.

Thanks for your time,

Tommy

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

2010-12-03 Thread Kostya Vasilyev

03.12.2010 19:37, Serdel пишет:

Thanks Vasilyev,


It's Kostya (V. is my last name).


The aspect ration is in deed a very important factor - I was surprised
why my layout looks fine in eclipse plug in but corrupts on the
device. Only when I design my own dev config with proper size and
ratio as long it worked correct. I now have a quite similar problem.
Because I have design some images for the background of my buttons (I
use button not imagebuttons to avoid the white 'frame' around the
image). However the images are bigger than I expected them to be.
Using my example - images for B1 and B2 (despite being 240px long) are
much longer than the half of the screen.


If they are in res/drawable, they are considered mdpi images (for 320 
by 480 screen size, etc).


If your emulator is higher-res (typical for 480 by 800, etc.), then 
Android will scale those images at load time, by a factor of 1,5 (hdpi 
is 240 pixels per inch, mdpi is 160 pixels per inch).


You should carefully read through multiple screen support link you 
referred to in your previous email to understand image resource scaling.


Then I'd recommend you make your layouts work at default resolution  
density (320 by 480, medium screen density) and only then move onto 
high-density and high-resolution screens.



If I place them with relative
layout they overlap. If I switch to linear layout with weigth 1 the
width is adjusted properly however the height stays the same (I need
to set it manually which I would like to avoid). Can I somehow do it
so the image would resize both its dimensions automatically to keep
it's previous ratio? So that If I fit the images with linear layout
their height would also shrink due to 'forced' shorted width?
You could use ImageView, it has a lot of flexibility for image scaling 
and resizing:


http://developer.android.com/reference/android/widget/ImageView.html

In particular, take a look at these settings: adjustViewBounds, 
cropToPadding, scaleType.


You can set a click listener on an ImageView, and can implement visual 
feedback for when it's touched by using a state-list drawable with 
state_pressed:


http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

-- Kostya

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


Re: [android-developers] Save ID name in list view

2010-12-03 Thread TreKing
On Fri, Dec 3, 2010 at 5:51 AM, Faheem Khatri faheemkhatr...@gmail.comwrote:

 I know but if i wanna do these things in android, how can i do it?


Implement your own solution.
Or adapt to doing things the Android way. There are plenty of examples out
there on using adapters for binding data to a list view.

-
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: App freezes when the power key is pressed

2010-12-03 Thread Eyvind Almqvist
I think I have fixed it now. I discovered that lots of objects were
created over and over again for every screen turn in the view
constructor. I fixed this by making the these objects static. I mailed
the new version to you. You got it for free, it will cost 4,5 $   in
the appstores:)

On 3 Dec, 10:23, Eyvind Almqvist eyv...@mobile-visuals.com wrote:
 I got this test result from SonyEricsson:

 We have tested your latest version which you send to me.  The rotation
 issue still can reproduce on both android 1.6 and 2.1. And the
 reproducibility of this issue is much higher than before. On 1.6, theappwill 
 force closed after I rotate the screen more than 2 times.

 This is very strange. I thougth that I fixed the rotation problem and
 they say that it is worse now...

 On 2 Dec, 20:38, Eyvind Almqvist eyv...@mobile-visuals.com wrote:



  Thanks, I read the article. Then I saw that I had a global reference
  to a context, which I didn't need. I removed it and then it worked
  much smoother. I think this fixed the leak. I don't have any reference
  to a context at all now. I mailed youmyapp. Hope it works like it
  should on your HTC!

  On 2 Dec, 14:48, Yahel kaye...@gmail.com wrote:

 When they rotate the screen several times,

   This is usually a symptom of a memory leak.

   Try to read this article from Romain Guy 
   :http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-andr...

   It explains how they can happen from a single handle to the context.

   The fact that you do not have crash but again this black screen(no
   drawing being done) probably means that you actually handle this
   exception with a try catch somewhere. Ifmyguess is correct then you
   simply have to put a Log.e(error,error happens here : xxx); in
   every catch of yourappand you'll find where it happens. Again the
   difficulty is to be able to reproduce the problem.

   Again you should implement something like the android-remote-
   stacktrace so that when it happens on someone devices you get the
   stacktrace from their session which will give you good clues on what's
   happening.

   “Sorry! Activity XXX(in application XXX) is not responding” happens
   when you have a very long operation that hangs the main UI thread so
   that the user can't use it anymore. Maybe this is a clue for you to
   what is happening. Do you have a long calcultation, double buffering
   drawing, loading of a big bitmap or something similar in the main
   thread ?

   If you tell me which game it is I can try to reproduce the problem 
   onmyHTC Hero which is an older phone so might be more sensitive to the
   problem.

   Yahel- Dölj citerad text -

  - Visa citerad text -- Dölj citerad text -

 - Visa citerad 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] BroadCastReceiver SMS receiver Force Close on AVD

2010-12-03 Thread om
Hi, I am creating just a simple android app which will respond to
received. I am using braodcastreceiver to receive sms. Code for
activity is

package com.om;

import android.app.Activity;

import android.content.BroadcastReceiver;

import android.content.Context;

import android.content.Intent;

import android.content.IntentFilter;

import android.os.Bundle;

import android.widget.Toast;

import android.telephony.SmsManager;

import android.telephony.SmsMessage;

public class MyTest extends Activity {

public static final String SMS_RECEIVED =

android.provider.Telephony.SMS_RECEIVED;

/** Called when the activity is first created. */

BroadcastReceiver smsReceiver =

  new BroadcastReceiver() {

  @Override

  public void onReceive(Context _context, Intent _intent) {

  System.out.println(SMS Received);

  }

  };

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

IntentFilter filter = new IntentFilter(SMS_RECEIVED);


registerReceiver(smsReceiver, filter);

}

}

When i Run this activity on SDK 2.1 AVD and sends SMS to that port it
says Force close. Please tell me what is error in code. Thanks in
advance.

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


Re: [android-developers] Save ID name in list view

2010-12-03 Thread Faheem Khatri
Thanks.

On Fri, Dec 3, 2010 at 10:01 PM, TreKing treking...@gmail.com wrote:

 On Fri, Dec 3, 2010 at 5:51 AM, Faheem Khatri faheemkhatr...@gmail.comwrote:

 I know but if i wanna do these things in android, how can i do it?


 Implement your own solution.
 Or adapt to doing things the Android way. There are plenty of examples out
 there on using adapters for binding data to a list view.



 -
 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


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

2010-12-03 Thread akkilis
You can set the height of the Tabs of your TabHost
or simply can provide the images to them also to change their
background.

Setting Height:

TabHost
android:id=@+id/tab_host

LinearLayout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
TabWidget
android:id=@android:id/tabs
android:layout_width=fill_parent
android:layout_height=10px/ (Setting 
the height
here)
FrameLayout
android:id=@android:id/tabcontent
android:layout_width=fill_parent
android:layout_height=fill_parent
LinearLayout
android:id=@+id/content1
!--Layout of Tab 1 --

/LinearLayout
LinearLayout
android:id=@+id/content2
/LinearLayout

Setting Image:

View v = tabWidget.getChildAt(i);
v.setBackgroundDrawable(getResources().getDrawable(

R.drawable.tab_image_selector_recent));

On Dec 3, 9:52 pm, Tommy droi...@gmail.com wrote:
 Hi everyone,

 I was wondering if it is possible to set a height for the individual
 tabs on the widgets or if I am stuck using the default heights.

 Thanks for your time,

 Tommy

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

2010-12-03 Thread Tommy
Very Awesome! Thanks a bunch. I was wondering which one controlled that.
Again thank you for your time!

Tommy

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of akkilis
Sent: Friday, December 03, 2010 12:53 PM
To: Android Developers
Subject: [android-developers] Re: TabHost Layout Question

You can set the height of the Tabs of your TabHost or simply can provide
the images to them also to change their background.

Setting Height:

TabHost
android:id=@+id/tab_host

LinearLayout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
TabWidget
android:id=@android:id/tabs
android:layout_width=fill_parent
android:layout_height=10px/
(Setting the height
here)
FrameLayout
android:id=@android:id/tabcontent
android:layout_width=fill_parent
android:layout_height=fill_parent
LinearLayout
android:id=@+id/content1
!--Layout of Tab 1 --

/LinearLayout
LinearLayout
android:id=@+id/content2
/LinearLayout

Setting Image:

View v = tabWidget.getChildAt(i);
v.setBackgroundDrawable(getResources().getDrawable(

R.drawable.tab_image_selector_recent));

On Dec 3, 9:52 pm, Tommy droi...@gmail.com wrote:
 Hi everyone,

 I was wondering if it is possible to set a height for the individual 
 tabs on the widgets or if I am stuck using the default heights.

 Thanks for your time,

 Tommy

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

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


RE: [android-developers] Re: One More Question TabHost Layout Question

2010-12-03 Thread Tommy
Something I just noticed. If I don't have a picture and I just have text if
I set the height of the tab to say 45dp it cuts off the text. I tried to add
gravity=top but that didn't do anything. Is there a way to move the text
up so it won't get cut off or should I create an Image that contains the
text I want to show so it fits in the tab?

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of akkilis
Sent: Friday, December 03, 2010 12:53 PM
To: Android Developers
Subject: [android-developers] Re: TabHost Layout Question

You can set the height of the Tabs of your TabHost or simply can provide
the images to them also to change their background.

Setting Height:

TabHost
android:id=@+id/tab_host

LinearLayout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
TabWidget
android:id=@android:id/tabs
android:layout_width=fill_parent
android:layout_height=10px/
(Setting the height
here)
FrameLayout
android:id=@android:id/tabcontent
android:layout_width=fill_parent
android:layout_height=fill_parent
LinearLayout
android:id=@+id/content1
!--Layout of Tab 1 --

/LinearLayout
LinearLayout
android:id=@+id/content2
/LinearLayout

Setting Image:

View v = tabWidget.getChildAt(i);
v.setBackgroundDrawable(getResources().getDrawable(

R.drawable.tab_image_selector_recent));

On Dec 3, 9:52 pm, Tommy droi...@gmail.com wrote:
 Hi everyone,

 I was wondering if it is possible to set a height for the individual 
 tabs on the widgets or if I am stuck using the default heights.

 Thanks for your time,

 Tommy

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

2010-12-03 Thread Mariux
Hi,

does someone know what are the Intents launched by:

1) turning on/off GPS (using settings page launched as
Settings.ACTION_SECURITY_SETTINGS)
2) turning on/off Sync (using
ContentResolver.setMasterSyncAutomatically(false/true))

I need this for update widget views.

Thanks

Mario

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

2010-12-03 Thread andrej sarkic
Yes! Been trying for days now.

On Nov 18, 2:25 pm, Skip skip.tavakkol...@gmail.com wrote:
 Hi,

 My organization's purchasing dept. has not been successful in
 completing the order for aNexusOnephone. There is an error after
 the credit card information is submitted. They've tried contacting by
 phone and have left voice messages. FYI, this is the page where the
 ordering is initiated from:

 https://android.brightstarcorp.com/index_adp3.htm

 Anyone else having this problem?

 Thanks,
 -Skip

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Keeping IntentService alive even if app is killed

2010-12-03 Thread Tejas
I was under the impression that if we register with the AlarmManager
and set a Repeating PendingIntent to be fired, it will invoke our
IntentService, even if the application is running or not.

Isn't it the most popular way to make sure you run your task even if
your application is not running ?

On Oct 8, 1:05 am, Dianne Hackborn hack...@android.com wrote:
 Oh sorry, I see that you are specifically talking about manage apps.  In
 that case...  the whole point of the force stop in manage apps is for a
 user to stop an app that they really want to make stop.  As such, there is
 nothing you can do about it.

 The next version of the platform will include an interstitial dialog warning
 the user that the force stop could break the app they are stopping.

 On Thu, Oct 7, 2010 at 11:02 PM, Dianne Hackborn hack...@android.comwrote:









  No there is nothing you can do about that.  You just have to tell your
  users to stop breaking your app with their $#^!! task killers.  (Starting
  with Froyo task killers will not be able to do this.)

  On Thu, Oct 7, 2010 at 7:37 PM, William Ferguson william.ferguson.au@
  gmail.com wrote:

  I have an app that occassionally starts an IntentService (bundled in
  the same app) in which to process some backrgound work.

  Its not unusual for the user to exit the app (ie move on to somethign
  else)  and the backrgound work should continue until it is complete,
  which the IntentService handles nicely.

  But if the user decides to explicilty kill my app using ManageApps
  then it kills not only the remnants of my application but also the
  IntentService. And that's not so great. If they had specifically
  targetted the running service I could live with it.

  Is there a way that I can configure the IntentService (without
  bundling it in its own app) so that killing the app does not kill the
  IntentService too?

  I tried setting a different Process for the Activity, the
  IntentService, the application. But it didn't have a positive effect.

  Anyone know how I can manage it?

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

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

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@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: Unsuccessful in completing a Nexus One purchase

2010-12-03 Thread Maps.Huge.Info (Maps API Guru)
You might want to try ebay. There are quite a few available in that
venue and they can be had at less than the cost of a unit from Google.

http://shop.ebay.com/?_nkw=google+nexus+one

-John Coryat

On Dec 3, 12:47 pm, andrej sarkic andrej.sar...@gmail.com wrote:
 Yes! Been trying for days now.

 On Nov 18, 2:25 pm, Skip skip.tavakkol...@gmail.com wrote:







  Hi,

  My organization's purchasing dept. has not been successful in
  completing the order for aNexusOnephone. There is an error after
  the credit card information is submitted. They've tried contacting by
  phone and have left voice messages. FYI, this is the page where the
  ordering is initiated from:

 https://android.brightstarcorp.com/index_adp3.htm

  Anyone else having this problem?

  Thanks,
  -Skip

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


[android-developers] Clarification about IntentService

2010-12-03 Thread Tejas
I'm using AlarmManager to fire a PendingIntent after a certain period
of time. This leads to running of my IntentService.

- What happens if the PendingIntent fires, but my IntentService hasn't
completed its task ?
- If the IntentService is taking too long, will the android platform
kill it ?
- If the Android platform kills it, will the next PendingIntent invoke
this IntentService again ?

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you Kostya and sorry for my mistake :

The ImageView approach works. Though the eclipse layout 'designer'
doesn't show this (the images are cropped) it works on the device.
Again thanks for the solution.

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you Kostya and sorry for my mistake :

The ImageView approach works. Though the eclipse layout 'designer'
doesn't show this (the images are cropped) it works on the device.
Again thanks for the solution.

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


[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
As long as you have been so helpful - do you know any way to put an
imageview (or any other object) deliberately behind other objects?
For example if I would like to put an image behind my buttons to make
a background for the small gap between them (and I want this gap to be
filled - don't want them to merge into one since they have they are
the same color).

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Keeping IntentService alive even if app is killed

2010-12-03 Thread Chris Stratton
On Oct 8, 1:05 am, Dianne Hackborn hack...@android.com wrote:
 Oh sorry, I see that you are specifically talking about manage apps.  In
 that case...  the whole point of the force stop in manage apps is for a
 user to stop an app that they really want to make stop.  As such, there is
 nothing you can do about it.

Is there any way the app could on next run detect that this has
happened and educate the user that their actions stopped it from
completing it's work?

One could I supposed do this by leaving a file with the service's pid
in the application's storage and clean it up on ordinary exits such
that it's presence on startup means there was an abnormal exit, but I
still wonder about unnecessarily writing to flash memory.

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

2010-12-03 Thread Kostya Vasilyev
Adam,

The in-front/behind order by default is the order in which views are
declared in the XML file. The order, first to last (XML) becomes back to
front (on screen).

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
03.12.2010 22:35 пользователь Serdel adam.lichwierow...@gmail.com
написал:
 As long as you have been so helpful - do you know any way to put an
 imageview (or any other object) deliberately behind other objects?
 For example if I would like to put an image behind my buttons to make
 a background for the small gap between them (and I want this gap to be
 filled - don't want them to merge into one since they have they are
 the same color).

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] release keys do not work

2010-12-03 Thread i b
I've had a problem for the last week that the release keys I derive
using keytool or the Export .apk do not function. The map pages show
up blank. When I reinsert my debug key instead, everything works
fine.

For example I have a MD5 fingerprint

Keystore type: JKS
Keystore provider: SUN
Your keystore contains 3 entries
alias77, Dec 1, 2010, PrivateKeyEntry,
Certificate fingerprint (MD5):
AC:F5:3B:F5:E4:01:CA:B0:A5:D0:67:91:16:CE:05:3C
alias7, Nov 30, 2010, PrivateKeyEntry,
Certificate fingerprint (MD5): 98:E4:24:BB:
03:84:A9:76:67:B3:0D:B7:16:89:AB:85
alias00, Dec 2, 2010, PrivateKeyEntry,
Certificate fingerprint (MD5): C7:19:8F:5E:A5:59:E7:5A:DC:B0:ED:EA:BF:
57:5F:EB

Using the last of the above, alias00 above as input, Google offered
this release key:
0VhiLw2B2QaNSmcZKtY-R5Qf40AL9adtEmlpbnw

Everything seems normal but this key does not work. Just inserting it
where my debug key was before, causes the maps to come up blank.

I don't understand how this could happen.

Because of this key problem, I have had to unpublish my five apps as
arecent download customer complained that the maps failed to work for
them either.

Now it seems to me that because I never had an uninstall or complaint
from any other customer before, that all my apps must have been
working OK till just a few days ago.

I made no code changes yet my published apps ceased to work. I believe
this unusual problem is not my fault but rather due to a flaw in the
way the release key is generated or recognized by Google.

This is a major problem for me and I need some assistance ASAP.

- Ian in Nova Scotia


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

2010-12-03 Thread Christian
Hi,

Nothing. It does not work correct on HTC Sense.
As it seems, the Contacts App only supports the internal adapters for
showing up all Contacts.
But: You can link contacts from your Sync Adapter to existing Contacts
when the name matches. Unfortunately they are not auto-linked.

Regards,
Christian

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


[android-developers] Use MediaPlayer in background and control it after app restarts

2010-12-03 Thread 1001knights
Hello everyone,

I have an application with 2 buttons. Click button button_testWav will
play wav audio, and click button button_quit will call method
quit(View view) to exit the application (this is defined in layout XML
file). One interesting thing is after I click button_testWav, audio
starts playing. Then I press key back on my Droid X, audio still
plays in background.
I would like to know how to control MediaPlayer again after I launch
the application later, so that I won't have too many copies open?
Thanks!

Below is the test code:
package com.MediaPlayerTest;

import java.io.IOException;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MediaPlayerTest extends Activity
{
private static final String TAG = MediaPlayerTest;
private static MediaPlayer mp;

private void playMusic(String pathToFile)
{
mp.reset();
try
{
mp.setDataSource(pathToFile);
} catch (IllegalArgumentException e)
{
Log.d(TAG, IllegalArgumentException);
e.printStackTrace();
} catch (IllegalStateException e)
{
Log.d(TAG, IllegalStateException in setDataSource);
e.printStackTrace();
} catch (IOException e)
{
Log.d(TAG, IOException  in setDataSource);
e.printStackTrace();
}
try
{
mp.prepare();
} catch (IllegalStateException e)
{
Log.d(TAG, IllegalStateException in prepare);
e.printStackTrace();
} catch (IOException e)
{
Log.d(TAG, IOException in prepare);
Toast.makeText(this, Couldn't open audio file.,
Toast.LENGTH_LONG).show();
e.printStackTrace();
}
mp.start();
}

public void quit(View view)
{
mp.stop();
mp.release();
this.finish();
}

@Override
public void onCreate(Bundle savedInstanceState)
{
Log.d(TAG, onCreate);

super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mp = new MediaPlayer();

final Button button_testWav = (Button)
findViewById(R.id.button_testWav);
button_testWav.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
playMusic(/sdcard/res/test.wav);
}
});
}
}

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


[android-developers] Problem binding a remote service

2010-12-03 Thread Markus Drösser
hey guys,

strange problem ~.~ trying that out the whole day. its made after an
example i found in a book. in my case the example simply does not
work.

if i do


public class Launcher extends Activity {


IRemoteRecordService mRemoteRecordService = null;

private ServiceConnection remoteRecordServiceVerbindung = new
ServiceConnection()
{

public void onServiceConnected(ComponentName name, IBinder 
service)
{
// TODO Auto-generated method stub
mRemoteRecordService =
IRemoteRecordService.Stub.asInterface(service);

}

};


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

//Verbindung zum Service aufnehmen
Intent intent = new
Intent(IRemoteRecordService.class.getName());
if(bindService(intent, remoteRecordServiceVerbindung,
Context.BIND_AUTO_CREATE))
System.out.println(Service successfully bound!);

if(mRemoteRecordService==null) System.out.println(Our
mRemoteRecordService is null :( );

  }
}


... i always get the message that my mRemoteRecordService is null in
logcat. how can that be?
no other errors, but i can not work with a nullpointerexception of
course ;D

thanks in advance.





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


[android-developers] How to listen outgoing calls

2010-12-03 Thread Lakshman Sai
Hi,

I tried various options to listen out going calls. I tried with
intents Phone_state,ACTION_NEW_OUTGOING_CALL and NEW_OUTGOING_CALL,
but none are working. I could able to track incomming calls and i
could able to find duration of each call. Can any help me in 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] How to develop apps coming from Apple iOS

2010-12-03 Thread wesg
I work for a small mobile applications company that is looking to
branch out to other platforms, mainly Android and Windows phone. Our
first job is to get out a few of our existing in house apps for iOS
into the respective stores on the other platforms. We're stymied by
Androids layout system, however. In iOS if you wanted to do everything
programmatically (which was required in our game apps) you could do
so, by giving views a frame and arranging that on screen. What is a
good way to do that in Android?

Does anyone have suggestions for developers going between the two
platforms? Is there a website that explains a little about equivalent
methods on the two systems?

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


[android-developers] Heap size and SoftReferences?

2010-12-03 Thread Ab
I have an application which creates a series of Bitmaps. I am holding
these Bitmaps in SoftReferences, to avoid running out of memory. I
would like the heap size to grow to the maximum 16MBs before it starts
collecting my SoftReferences. However, the SoftReferences are
collected very eagerly, prior to growing the heap to it's max. Is
there anyway to force the references to be collected less eagerly? or
to manually grow the heap to the max? Possibly a way to just start the
application with 16mb allocated?

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


[android-developers] Drawing App

2010-12-03 Thread Cruiz
I have two Classes (Draw and DrawView)  I'm trying to get the buttons
to function.  The buttons need to change stroke color, change stroke
width, undo redo, erase and etc...  I can see the buttons in emulator
but cannot get them to function.

Someone please help..this is diving me crazy...I'm fairly new to
android app development.

Here is what I have...


package com.example;

import android.app.Activity;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Toast;


public class Draw extends Activity implements OnClickListener {
 DrawView drawView;
 private Paint currentPaint = new Paint();



 @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
drawView = new DrawView(this, null);

// Set full screen view hiding the status bar
getWindow().setFlags
   (WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

   // Shows the title
requestWindowFeature(Window.FEATURE_NO_TITLE);

//uses the main.xml layout
   setContentView(R.layout.main);


}


@Override
public void onClick(View view) {
//super.onClick(view);
switch (view.getId()) {
case R.id.blackbutton:
showToastMessage(Color Black);  // message when 
button is
clicked
currentPaint = new Paint();
currentPaint.setAntiAlias(true);
currentPaint.setColor(Color.RED);
currentPaint.setStyle(Paint.Style.STROKE);
currentPaint.setStrokeJoin(Paint.Join.ROUND);
currentPaint.setStrokeCap(Paint.Cap.ROUND);   // round 
stroke
ends on start and stop
currentPaint.setStrokeWidth(5);
break;
case R.id.redbutton:
showToastMessage(Color Red);
break;
case R.id.greenbutton:
showToastMessage(Color Green);
break;
case R.id.bluebutton:
showToastMessage(Color Blue);
break;
case R.id.undobutton:
showToastMessage(Undo);
break;
case R.id.erasebutton:
showToastMessage(Eraser);
break;
case R.id.clearbutton:
showToastMessage(Screen Cleared);
setContentView(R.layout.main);
break;
}
}
  private void showToastMessage(String msg){
  Toast toast = Toast.makeText(this, msg, 
Toast.LENGTH_SHORT);
  toast.setGravity(Gravity.TOP|Gravity.TOP, 0, 50);
  toast.show();
}


@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
}


\

// DrawView is a view. It listens to mouse click events and draws a
point at the point that it was clicked on.

package com.example;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;


public class DrawView extends View {
  private Paint currentPaint = new Paint();
  private Path path = new Path();


  /**
   * Optimizes painting by invalidating the smallest possible 
area.
   */
  private float lastTouchX;
  private float lastTouchY;
  private final RectF dirtyRect = new RectF();

  public DrawView(Context context, AttributeSet attrs) {
super(context, attrs);

currentPaint.setAntiAlias(true);
currentPaint.setColor(Color.MAGENTA);
currentPaint.setStyle(Paint.Style.STROKE);
currentPaint.setStrokeJoin(Paint.Join.ROUND);
currentPaint.setStrokeCap(Paint.Cap.ROUND);

[android-developers] How to create a tablet App with direct FULLSCREEN?

2010-12-03 Thread Foolx
Hi there!

I just got my Android Tablet (Archos 10.1 IT) and want to programm
some little Tools for it.
I already started with eclipse and the first Tutorials, but i already
found some problems i can't handle.
Please help me!

I defined a Virtual Device fitting my real Device with 10.1 1280 x
720px
but when i start the app its just a little screen in the middle of
this Device.
How can i change the view to being fullscreen and widescreen also, -
Full fill parent.
My Main View looks like this:

?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent
TextView
android:id=@+id/label
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=Type here:/
EditText
android:id=@+id/entry
android:layout_width=fill_parent
android:layout_height=wrap_content
android:background=@android:drawable/editbox_background
android:layout_below=@id/label/
Button
android:id=@+id/ok
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/entry
android:layout_alignParentRight=true
android:layout_marginLeft=10dip
android:text=OK /
Button
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toLeftOf=@id/ok
android:layout_alignTop=@id/ok
android:text=Cancel /
/RelativeLayout

Where is my problem, how can i change it to real 1280x720 widescreen?

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] Touchscreen coordinates problem on Samsung Galaxy S (Vibrant)

2010-12-03 Thread Emmanuel Marty
Hello everyone,

I am developing a game that uses a fullscreen GL view and getting its
motion events with onTouchEvent(), nothing fancy. When I test on a
Samsung Vibrant (Galaxy S), the coordinates I get from the motion
event are slightly off. The top,left corner is around x=20,y=20 and
the bottom,right something like x=780,y=460  . The Galaxy S's screen
is 800x480, which is also the view size, as configured, and also as
measured with getWidth() / getHeight(). The view isn't off, getX() and
getY() both return 0.

The device uses soft-keys, that are part of the touchscreen surface
but not the game's. It seems that the touch events return coordinates
in a space that spans the entire screen, including the borders and the
soft keys area. They don't map pixel for pixel to the game's surface.

I am assuming that I've done something really stupid but I've been
looking for hours and trying to google for an answer for hours as
well. Since noone else seems to have the issue, it must be something
I'm doing. I also tried a fellow developer's game on the same device
tracing touch events and I also get the same coordinate range, though.

Can you tell me what I could be doing wrong? Is there a way to read
the min/max coordinates that should be expected for the fullscreen GL
view so I can rescale? or a way to get properly translated events?

Thanks in advance!

Best regards,
Emmanuel



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

2010-12-03 Thread Damo
Im trying to do something very similar, any luck with this?

On Dec 1, 8:50 am, Sarwar Erfan erfanonl...@gmail.com wrote:
 Hi,
 For this purpose, you need to override the onResume method.
 Unlock is irrelevant here.

 Review the Activity life cycle for better understanding what is going
 on:http://developer.android.com/reference/android/app/Activity.html#Acti...

 Hope this helps.

 Regards
 Sarwar Erfan

 On Dec 1, 10:13 am, Milind Bhusari milindbhusar...@gmail.com wrote:

  Hi,
      While mediaplayer playing rtsp stream if user press lock button and then
  he press menu(unlock) mediaplayer shows blank screen. I want to know how to
  capture this unlock event inside activity so that i can resume mediaplayer.

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


[android-developers] Toast cropped on small screens

2010-12-03 Thread jraanamo
Toast messages get truncated/cropped when app is running on a smaller
screen like SDK's QVGA. All messages with more than one word get
wrapped on multiple lines but only the first line is visible and next
is fading into transparency. Even tried with custom view, margins and
positioning but now luck. Any workarounds?

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

2010-12-03 Thread edrowland
If you check carefully,i think you'll find the sub-activities get
constructed immediately, but onCreate doesn't get called until the tab
gets selected. My guess: get the code out of your constructor (it
doesn't belong there anyway) and you'll get what you want. I had to
deal with the opposite problem -- code that expected other tabs to
have been previously onCreated -- so I'm pretty certain that's the way
it works


On Dec 2, 8:38 am, pedr0 pulsarpie...@gmail.com wrote:
 Hi at all,

 I develop an Tab based application, and I add activity in my tab in
 this way:

 mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator(TAB
 1).setContent(intent1));
 mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator(TAB
 2).setContent(intent2));
 mTabHost.addTab(mTabHost.newTabSpec(tab_test4).setIndicator(TAB
 3).setContent(intent3));
 mTabHost.addTab(mTabHost.newTabSpec(tab_test5).setIndicator(TAB
 4).setContent(intent4));

 mTabHost.setCurrentTab(1);

 where mTabHost is an object of TabHost  type.

 I discovered that this way start ALL intents at the same time!

 I have some issues in my code or exists a way to configure TabHost to
 start new intent when user click on a Tab?

 Thanks a lot.

 pedr0

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


[android-developers] Getting information about external applications used by one particular application

2010-12-03 Thread Tux
Hi all,

I was wondering if it is possible to see which external applications
(i.e.: other applications of the phone), a particular application use
or to be more precise, which activities an application use that
belongs to an external application?

I want thus a way to say: Application a uses activities of
application c and d.

Is it possible with on-device applications? if not, how could I access
this information on a device?

Cheers

Guillaume

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


[android-developers] Re: Can you detect a touch to the screen when the screen is off? (Wake up screen with a touch)

2010-12-03 Thread Damo
Thats a really good idea
is it possible to do that or to use the hardware buttons when the
screen is asleep


On Nov 30, 9:38 pm, Ken H hunt1...@gmail.com wrote:
  anyone out there got any ideas?

 Use your other sensors like the accelerometer...shake it awake.

 Ken

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

2010-12-03 Thread amulya rattan
I may be wrong but i am guessing that you r trying to access your own
system.in that case you need to provide the loopback address(127.0.0.1) in
the url. If that doesnt help, something's wrong with your local.hosts file.
Google should help you with that.

On 2 Dec 2010 22:40, zeeshan mirza zeeshan.nabeel.mi...@gmail.com wrote:

I am trying to upload a picture to my php server from android
application. Both are developed by me. I am getting error when i try
to upload picture from my android app to php server.
The error is 11-28 05:37:55.310: DEBUG/SntpClient(59): request time
failed: java.net.SocketException: Address family not supported by
protocol

and the code for my android app and php server is as follows

PHP SERVER
?php
 $target_path = uploads/;
 $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
 if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo The file . basename( $_FILES['uploadedfile']['name']).
has been uploaded;
 }
 else{
 echo There was an error uploading the file, please try again!;
  }
?

Android App
import java.io.FileInputStream;
import android.app.Activity;
import android.os.Bundle;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import android.util.Log;

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

private void doFileUpload(){
HttpURLConnection conn =null;
DataOutputStream dos = null;
DataInputStream inStream = null;
String exsistingFileName = /sdcard/def.jpg;

// Is this the place are you doing something wrong.
String lineEnd = rn;
String twoHyphens = --;
String boundary =  *;

int bytesRead, bytesAvailable, bufferSize;
byte[] buffer;
int maxBufferSize = 1*1024*1024;
String responseFromServer = ;
String urlString = http://192.168.1.6/index.php;;

try
   {
   //-- CLIENT REQUEST
   Log.e(MediaPlayer,Inside second Method);
   FileInputStream fileInputStream = new FileInputStream(new
File(exsistingFileName) );

   // open a URL connection to the
Servlet
   URL url = new URL(urlString);

   // Open a HTTP connection to the URL
   conn = (HttpURLConnection)
url.openConnection();

   // Allow Inputs
   conn.setDoInput(true);

   // Allow Outputs
   conn.setDoOutput(true);

   // Don't use a cached copy.
   conn.setUseCaches(false);

   // Use a post method.
   conn.setRequestMethod(POST);

conn.setRequestProperty(Connection, Keep-Alive);

conn.setRequestProperty(Content-Type,
multipart/form-data;boundary=+boundary);

   dos = new DataOutputStream(
conn.getOutputStream() );
   dos.writeBytes(twoHyphens +
boundary + lineEnd);

dos.writeBytes(Content-Disposition: form-data;
name=\uploadedfile\;filename=\
   +
exsistingFileName + \ + lineEnd);
   dos.writeBytes(lineEnd);
   Log.e(MediaPlayer,Headers
are written);

   // create a buffer of maximum size
   bytesAvailable =
fileInputStream.available();
   bufferSize =
Math.min(bytesAvailable, maxBufferSize);
   buffer = new byte[bufferSize];

   // read file and write it into
form...
   bytesRead =
fileInputStream.read(buffer, 0, bufferSize);

   while (bytesRead  0){

dos.write(buffer, 0, bufferSize);

bytesAvailable = fileInputStream.available();

bufferSize = Math.min(bytesAvailable, maxBufferSize);

bytesRead = fileInputStream.read(buffer, 0, bufferSize);
   }

   // send multipart form data
necesssary after file data...
   dos.writeBytes(lineEnd);
   dos.writeBytes(twoHyphens +
boundary + twoHyphens + lineEnd);

   // close streams
   Log.e(MediaPlayer,File is
written);
   

[android-developers] widgets

2010-12-03 Thread Ramesh M
Hi, can any one tell me about.. how to display widget in top of
application
i.e even if you working on some other application example typing text
in messages..
 the widget should display some portion on the application

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


[android-developers] Application Icon on the Homepage

2010-12-03 Thread George Yogurtian
Is there a way to get an application icon to automatically install on
the homepage instead of the application list? We just wrote a small
application that, when installed, appears in the application list. The
client would like the icon to appear on the homepage instead of in the
application list upon installation so the user doesn't have to drag it
into the homepage.

Thanks in advance!

George Yogurtian
The Chatfield Group

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

2010-12-03 Thread Ramesh M
Hi,
  Can any one have code for Cricket scorecard widget application..

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


[android-developers] Running SDK samples

2010-12-03 Thread Tobiah

I did the Hellow World using tools/android to create the project
from the command line.  I don't understand how to run the projects
in the sample directory.  There is no build.xml in them.  How do
I get them on my phone?  I usually install like this:

ant debug
adb uninstall com.rcsreg.exposmart
adb -d install bin/exposmart-debug.apk


But ant wants the build.xml that the android tool
creates.

Thanks,

Tobiah

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Getting information about external applications used by one particular application

2010-12-03 Thread guillaume benats
any ideas?

On Thu, Dec 2, 2010 at 4:44 PM, Tux guillaume.ben...@gmail.com wrote:

 Hi all,

 I was wondering if it is possible to see which external applications
 (i.e.: other applications of the phone), a particular application use
 or to be more precise, which activities an application use that
 belongs to an external application?

 I want thus a way to say: Application a uses activities of
 application c and d.

 Is it possible with on-device applications? if not, how could I access
 this information on a device?

 Cheers

 Guillaume




-- 
Benats Guillaume .

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

[android-developers] connect my phone(Galaxy 2.1) to PC using socket communication, which IP and port number should i use?

2010-12-03 Thread Tantu
i want to connect my phone to PC using socket communication and my
phone acts as a client in this communication. my code is working in
emulator but not in phone.It shows  an error like this:
java.net.SocketException: network unreachable in android while
running.

//code part//
 socket = new Socket(127.0.0.1, 5228);

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

2010-12-03 Thread nithya nataraj
it internally aggregates the 160 + 40 characters and
   sends out a single broadcast?


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

[android-developers] Give some guidence for convert jar to apk using c # app

2010-12-03 Thread Karnesh
Hello everyone,

I  want to make app in c # , That can convert jar to apk. please give
me some idea about.

i don't have any idea about how i convert it.

Note:

The porting tool searches for the jad/jar files located in the

   application folder structure i.e. it searches in Test\Bin and once
found porting commences

  and the final apk file is created after porting. End Result should
be Android_Version_Test.apk i.e.

  Android_1.6_Test.apk depending on the version of Android selected.
If multiple versions of Android

are selected then the tool should give out multiple versions and save
them in the application folder i.e.

Test\Android\Version1.5, Version1.6, etc depending on the version or
versions selected.

Please help me!

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


Re: [android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-03 Thread Tapomay Dey
Mark has been repeatedly saying don't call getview
Adding to it, your call to adapt.notifyDataSetChanged(); is what's going to
trigger a getView() call for each of the items visible in your list. So some
internal code in  listview widget is what's going to call getview, not the
user(you). However deciding what view to return as per the arguments
(especially position) passed to getview is what user is supposed to take
care of. Google up some listview-baseadapter examples to figure out what's
the data model. Generally its a list or array of data objects whose size you
return in adapt.getcount, whose data fields you use while constructing or
updating a view inside getview, whose primary key you return i n
adapt.getitemid().
So replace the getview call in your onitemclick or any other UI listener
with
update_affected_dataobjects_of_your _data_model_thats_inside_the_adapter();
then call adapt.notifyDataSetChanged();

If you look carefully at the BaseAdapter API, getview, getcount etc. are
abstract methods. You implement them and decide what you are going to return
to the system, but you dont call them.

On Fri, Dec 3, 2010 at 1:35 AM, kiros88 ghui...@gmail.com wrote:

 Okay so i guess this kinda makes sense I'm not really sure how am i
 suppose to change my data model. I did
 ((TextView)adapt.getView(0, null, parent)).setText(hello);
 adapt.notifyDataSetChanged();

 but nothing changed ?


 On Dec 2, 11:28 am, Mark Murphy mmur...@commonsware.com wrote:
  Of course. Again, ordinarily, you do not call getView().
 
  You are going about your problem in the wrong way. You are attempting
  to change your UI directly by grabbing some row out of a ListView and
  changing it. That's not going to be reliable at all, since that row
  might not exist. Rather, you need to change your data model (whatever
  you have an Adapter on), then update the ListView from the revised
  model. The way you would update the ListView varies by your type of
  Adapter, and it may be automatic.
 
 
 
 
 
 
 
 
 
  On Thu, Dec 2, 2010 at 2:18 PM, kiros88 ghui...@gmail.com wrote:
   Okay wait so i get the concept tthat u do a getView from an
   ArrayAdapter but what i tried this before during the
 
   i called the adapter i used
   ArrayAdapter adapt = new
   ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
   songs);
 
   then after its already created i do
 
   public void onItemClick(AdapterView? parent, View view,
  int position, long id) {
 
   ((TextView)adapt.getView(position+1,null,parent)).setText(hello);
 
   And this doesnt work it crashes the app
 
   On Dec 2, 11:06 am, kiros88 ghui...@gmail.com wrote:
   Okay like where do u gets getView I dont see that function in the
   Listview class or the adapterView class so im not really sure where im
   suppose to be able to call getView.
 
   On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:
 
My 2c - you are over-complicating this.The getView is ONLY to give
 back the
view for the item that is requested. If you want this item to be
 colored X
then do it here. If you want another item to be colored Y then do it
 when
getView is called for that item. The state maintenance, i.e. what is
 X or Y
is done independent of the code within getView which needs to just
 return
the View...
 
As for the specific text, if you are returning a TextView t, then
 t.setText
would work.
 
On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
 Okay i dont want to get to many ppl confused so im going to try to
 ask
 this very simply. When android goes to this function when a user
 clicks on a item on your listview. basically u get a parent who im
 assuming is the array of textview that was set up during the
 setAdapter phase and view which the the corresponding View to
 which
 the user touched.   My main and only questions is i know i can
 adjust
 the view of View by saying stuff like
 
 (TextView)view = setText(hello)
 
 during the same time i want to beable to change another TextView
 in
 the AdapterView like the View after the View view so i guess
 view
 +1   i want to also be able to change that view into another word.
 
 Please dont ask me y im doing this just that im doing it for a
 reason
 I just really need help and i hope this explains that During the
 onItemClick listener function basically I want to adjust 2
 different
 Views in the arrays of Views but i have no idea how to access the
 any
 other view then the given View view thats the argument they give
 you
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 

[android-developers] Answer Incoming call automatically.

2010-12-03 Thread DebUggEr
Well I need to do to things,

1. automatically answer the calls which are in the blacklist
2. Receive all other calls through the usual android call receiver.

I know the first thing is to register intent, but since no activity
can handle it, I need to use services and a media recorder somehow in
conjunction.

Any ideas??

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


[android-developers] Is there any way i can get the deleted contacts from data tables?

2010-12-03 Thread Tantu
I want to read data from contacts, raw_contacts  data tables but not
using content providers. Is there any way ?
Secondly is there any way i can get the deleted contacts from those
tables? after deleting some contacts it shows in the data table. but
cannot read.

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


Re: [android-developers] question about the proper way of quitting the program

2010-12-03 Thread sunskyor sunskyor
for java layer, you can use following methods to real exit your
application.
1.ActivityManager.resetPackage
2. android.os.Process.killProcess(android.os.Process .myPid());

for ndk layer, maybe you can kill your prcoess too?

2010/12/3 billconan billco...@gmail.com

 Hello guys,

 I'm working on a game, mainly based on NDK. I now have a problem of
 how to quit the application. Right now, i just implement my own
 function to handle the back button. inside that function, I simply
 call the activity.finish() api to finish the activity that uses my C++
 code. However, I discovered that if I open the TaskKiller (I'm using
 Advanced Task Killer) program after that, I can always see my game as
 a running program. More than that, if I run my game again, I can see
 that what I allocated in the C++ program during the first run is still
 there.

 I know that because of the multi-task design of the Android platform,
 an application doesn't really quit when you quit it. But the
 interesting thing is that if you look at the game Angry Birds, that
 one won't appear in the TaskKiller program after you play it. I'm
 worrying about this issue because a game often aggressively refresh
 the game loop, I think it draws the power quickly. It seems that even
 I only played my game for a short time, my battery gets low very
 quickly after I closed the game.

 So I'm guessing there must be something wrong in my program. Is there
 any smarter way to quit an application. How did Angry Birds solve this
 problem?

 Thank you.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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: SyncAdapter questions: monitoring sync status; getting sync settings; sync icon

2010-12-03 Thread afterhoursdevelopers.com
Check out

http://developer.android.com/reference/android/content/SyncStatusObserver.html

On Dec 2, 6:34 pm, focuser linto...@gmail.com wrote:
 Hi,

 I am experiementing with SyncAdatpers and have a few questions that I
 could not find answers either in the documentation or this group
 yet.

 - How to monitor the status of sync after requesting it via
 ContentResolver.requestSync?  For example, I need to refresh the UI
 when the requested sync finishes.

 The javadoc of the method talks about SyncObserver which does not
 actually exist.  The ContentResolver.addSyncStatusListener method
 seems not useful since it notifies SyncStatusObserver when the sync
 status of any SyncAdapter changes, not the particular sync identified
 by an account+authority combination.  The current method I use is to
 spawn a thread which checks the result of ContentResolver.isSyncActive/
 isSyncPending continuously.  But it's quick and dirty solution.  I
 guess one could also extends AbstractThreadedSyncAdapter and write a
 new binder but it seems overkill.  I assume there are better
 solutions?

 - How to check if a SyncAdatper is CHECKED in the Accounts  Sync
 settings?  ContentResolver.getIsSyncable only checks if a SyncAdapter
 is available for a given account.  It will always return true no
 matter if that checkbox is checked or not, as long as the checkbox
 exists in the settings.

 - The sync icon on the status bar seems only visible when calling
 requestSync with SYNC_EXTRAS_MANUAL set to true.  Without that extra,
 a sync would be succesfully requested and executed, but the icon does
 not appear at all.  Is this by design?  And why?

 Thanks for your help!

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


[android-developers] Re: eclipse HELIOS (3.6) Code Assist very slow

2010-12-03 Thread fe
Thanks SChaser, worked a charm.

On Oct 16, 7:06 pm, SChaser crotalistig...@gmail.com wrote:
 If you are using the JEE edition of HELIOS, the assists can be speeded
 up by turning off JAX-WS assist in the edit/advanced preference
 (Window-Preferences-Java-Editor-Content Assist-Advanced.

 It also appears that the assists cycle through a list of suggestion
 sources, starting with a different one each time, which would explain
 why the assists are not always slow.

 Seehttps://bugs.eclipse.org/bugs/show_bug.cgi?id=317979

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Handler.postDelayed not working when screen goes off

2010-12-03 Thread Paul Townsend
:) yeah I find the emulator slow its just easier with a phone.

On 29 November 2010 11:39, Evi Song evis...@gmail.com wrote:

 Thank you all for the discussion which saves my investigation.
 I was using the Handler.postDelayed() with something like a
 AlarmRunner to make a count down. Then I get the same problem that,
 handler paused when my phone standby.
 I'll switch to AlarmManager instead according to your suggestions.

 Btw, seems it's really important for Android developers to get a real
 phone for testing. Emulator is just emulator...

 On Nov 29, 1:31 am, Kostya Vasilyev kmans...@gmail.com wrote:
  Paul,
 
  You don't need a Service or a Handler to handle events from Alarm
  Manager - just a Broadcast Receiver. It's even better, in that Android
  guarantees to hold a wake lock for the duration of your receiver's
  onReceive.
 
  -- Kostya
 
  28.11.2010 18:59, Paul Townsend ?:
 
 
 
 
 
   Hi guys thx for your help, been playing around with it and I tried
   setting up a service which works, but this will run in the background
   all the time so if I use an alarm manager how accurate is it can you
   set one for say 30 seconds time, or is it still bad to use a service
   even though all its doing is waiting for handler.post() to come along
   to play a sound. The timer is designed to have several times per timer
   so each timer will finish several times, i.e pyramid splits, and can
   have many timers
 
   On 21 November 2010 23:30, Dianne Hackborn hack...@android.com
   mailto:hack...@android.com wrote:
 
   You don't need to try around with different things, the behavior
   is very well defined: if you are not holding a wake lock, the CPU
   is allowed to go to full sleep, so no code can be executed until
   an external event wakes it up.  A thread sitting there waiting on
   a timer is never an external event.
 
   If you need to make sure you wake up even if the CPU is asleep,
   use the AlarmManager.
 
   On Sun, Nov 21, 2010 at 8:21 AM, Paul Townsend deer...@gmail.com
   mailto:deer...@gmail.com wrote:
 
   Just tried that bvut dose the same thing, although I have used
   countdownTimer in a custom TextView that I wrote so I could
   have a countdown timer for the UI and this dose not pause. I
   might look into to transfering the other timer bits to the
   text view and use that as a all in one timer solution and see
   if that works.
 
   On 21 November 2010 03:34, Hal dsheppar...@gmail.com
   mailto:dsheppar...@gmail.com wrote:
 
   You may want to look at CountDownTime also. It seems to
   work fine
   (even when the Screen goes off).
   I  took the following from the web:
 
  public class MyCount extends CountDownTimer {
  public MyCount(long millisInFuture, long
   countDownInterval) {
super(millisInFuture, countDownInterval);
  }
 
  public void onFinish() {
counter = new MyCount(5000, 1000);
counter.start ();
  }
 
  public void onTick(long millisUntilFinished) {
  tv.setText(Hal: + timer.getTime());
  }
  }
 
   The timer component uses a Live Jt component (separate
   thread):
 
  private void timer() {
 
  JtFactory main = new JtFactory ();
 
  // Create the component
 
  timer = (Timer) main.createObject
 (Timer.JtCLASS_NAME);
 
  // Asynchronous processing of messages.
  main.setSynchronous(false);
  main.sendMessage (timer, new JtMessage
   (Timer.UPDATE_TIME));
 
  }
 
  .
  counter = new MyCount(5000, 1000);
  counter.start();
  setContentView(tv);
  ...
 
   On Nov 20, 3:58 pm, Paul Townsend deer...@gmail.com
   mailto:deer...@gmail.com wrote:
I made a simple countdown timer and it works as expected
   when plugged
in via usb for debugging but when I take it off
   debugging and the
screen goes off either time out or power button the
   handler fails to
fire at the end time. I have created a custom timer
   class that gets
created from the main activity when needed, because its
   able to have
multiple countdowns running at the same time. Am I right
   in thinking
that the handler just gets paused when the screen goes
   off and if so
what are my 

Re: [android-developers] Drawing App

2010-12-03 Thread TreKing
On Thu, Dec 2, 2010 at 11:27 AM, Cruiz bkatro...@gmail.com wrote:

 I can see the buttons in emulator but cannot get them to function.


What does can't get them to function mean, exactly?


 Someone please help..this is diving me crazy...I'm fairly new to android
 app development.

 Here is what I have...


Are you setting click listeners for your buttons?

-
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] Posting failed? Please ping me back

2010-12-03 Thread Tobiah

I've noticed that some lists don't seem to send me my own posts - just
replies, so It's possible that my problem is that my question did not
draw any answers.  In order for me to determine whether my posts are seen,
could someone just reply to this, copying me off list as well please?
It will help me know whether I'm getting through, and whether I'm receiving
replies and my original posts.

Thanks!

Tobiah

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


[android-developers] What Tablet would you get

2010-12-03 Thread Gaelin
I searched through the board and I didn't see anyone ask this yet so I
apologize if this has been asked. With Christmas coming up I am
considering the purchase of a couple of tablets for my development
staff to both use in development and also for personal use.  I would
appreciate your opinions on what tablet would be the most bang for the
buck.  So lay it on me what are you people using and how do you like
them.  There are just too many choices for me to make a decision
without help.

Thanks in advance for any help,

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


Re: [android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 16 Topics

2010-12-03 Thread Qin Ding
I have android 2.2. and I downloaded gson 1.6 and used it for deserializing
json messages from web services.  The java object implements serializable.
and has instance varialbles string, Long, Bigdecimal, and byte[].   The
json array is generated by the gson on the server side.  I assume that the
json should be deserialized on the client side.  However It is not the
case.  I got the an error as issue 6636.  At
http://code.google.com/p/android/issues/detail?id=6636,  I saw that the
issue was fixed with status future release. How can I get the patch or new
release? Or is there a workaround?  Our development depends on the fix.

Please update.  thanks

qd

12-03 14:00:57.276: ERROR/AndroidRuntime(307): Caused by:
java.lang.NullPointerException
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
org.apache.harmony.luni.lang.reflect.ListOfTypes.length(ListOfTypes.java:47)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
org.apache.harmony.luni.lang.reflect.ImplForType.toString(ImplForType.java:83)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
java.lang.StringBuilder.append(StringBuilder.java:203)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:56)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:88)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.JsonDeserializationVisitor.visitUsingCustomHandler(JsonDeserializationVisitor.java:76)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:106)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.JsonDeserializationContextDefault.fromJsonArray(JsonDeserializationContextDefault.java:64)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:49)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.Gson.fromJson(Gson.java:568)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.Gson.fromJson(Gson.java:515)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.Gson.fromJson(Gson.java:484)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.google.gson.Gson.fromJson(Gson.java:434)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.qding.enterprise.pickntaste.helper.DataManager.getLocalRestaurants(DataManager.java:98)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
com.qding.enterprise.pickntaste.MyRestaurants.onCreate(MyRestaurants.java:47)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-03 14:00:57.276: ERROR/AndroidRuntime(307): ... 11 more
12-03 14:00:57.295: WARN/ActivityManager(65):   Force finishing activity
com.qding.enterprise.pickntaste/.MyRestaurants

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Keeping IntentService alive even if app is killed

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 2:03 PM, Tejas tej...@gmail.com wrote:
 I was under the impression that if we register with the AlarmManager
 and set a Repeating PendingIntent to be fired, it will invoke our
 IntentService, even if the application is running or not.

That is correct.

 Isn't it the most popular way to make sure you run your task even if
 your application is not running ?

It's pretty popular. Bear in mind that it is still subject to nuclear
attack from task killers on Android 2.1 on down -- their tactics
eradicate scheduled alarms.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Sync and GPS Intents name

2010-12-03 Thread Ali Chousein
Hi,

For turning on GPS satellites I use the intent below. Hope that helps
you as well.

Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);


Ali Chousein
Published apps:
- Geo-Filtered Assistant Pro
- Geo-Filtered Assistant Basic (freeware version)

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

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 2:20 PM, Tejas tej...@gmail.com wrote:
 I'm using AlarmManager to fire a PendingIntent after a certain period
 of time. This leads to running of my IntentService.

 - What happens if the PendingIntent fires, but my IntentService hasn't
 completed its task ?

If you mean that the IntentService is processing the previous alarm,
the Intent for the new alarm is queued and will be processed as soon
as the previous one is done.

 - If the IntentService is taking too long, will the android platform
 kill it ?

No, because the work in onHandleIntent() is done on a background thread.

 - If the Android platform kills it, will the next PendingIntent invoke
 this IntentService again ?

That depends on the implementation of onStartCommand(), and I don't
remember off the top o' my head what they are using there.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Is there any way i can get the deleted contacts from data tables?

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 12:49 AM, Tantu arungopa...@gmail.com wrote:
 I want to read data from contacts, raw_contacts  data tables but not
 using content providers. Is there any way ?

No, sorry.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Give some guidence for convert jar to apk using c # app

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 12:07 AM, Karnesh karnesh...@gmail.com wrote:
        I  want to make app in c # , That can convert jar to apk. please give
 me some idea about.

You cannot convert jar to apk.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Keeping IntentService alive even if app is killed

2010-12-03 Thread Tejas
Thanks for the reply Mark,
So, 2.2 onwards, the task killers won't be able to prevent or remove
scheduled alarms ?

On Dec 3, 4:17 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Dec 3, 2010 at 2:03 PM, Tejas tej...@gmail.com wrote:
  I was under the impression that if we register with the AlarmManager
  and set a Repeating PendingIntent to be fired, it will invoke our
  IntentService, even if the application is running or not.

 That is correct.

  Isn't it the most popular way to make sure you run your task even if
  your application is not running ?

 It's pretty popular. Bear in mind that it is still subject to nuclear
 attack from task killers on Android 2.1 on down -- their tactics
 eradicate scheduled alarms.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] widgets

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 12:19 AM, Ramesh M rameshm.m...@gmail.com wrote:
 Hi, can any one tell me about.. how to display widget in top of
 application
 i.e even if you working on some other application example typing text
 in messages..
  the widget should display some portion on the application

That is not possible, sorry.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Application Icon on the Homepage

2010-12-03 Thread Mark Murphy
On Thu, Dec 2, 2010 at 7:18 PM, George Yogurtian
geo...@thechatfieldgroup.com wrote:
 Is there a way to get an application icon to automatically install on
 the homepage instead of the application list?

No, sorry.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Getting information about external applications used by one particular application

2010-12-03 Thread Mark Murphy
On Thu, Dec 2, 2010 at 10:44 AM, Tux guillaume.ben...@gmail.com wrote:
 I was wondering if it is possible to see which external applications
 (i.e.: other applications of the phone), a particular application use
 or to be more precise, which activities an application use that
 belongs to an external application?

 I want thus a way to say: Application a uses activities of
 application c and d.

 Is it possible with on-device applications? if not, how could I access
 this information on a device?

There is no way to do this on a device. It is not even a deterministic
question, as the answer depends on the device and what other
applications are installed upon it.


 Cheers

 Guillaume

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




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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Getting information about external applications used by one particular application

2010-12-03 Thread guillaume benats
Well that's deterministic to me, as that's encoded in the sources, I do not
want to know if an application a uses a _particular_ application b but
_any_ activity of any other application.

But yeah I guess that's not possible as intents are not referenced anywhere
else but in the source. Thanks.

I'll have to modify iBinder then to sort of log communications between
processes and flag data that represent this scenario.
I was just hoping there was an easier way.

Regards,

On Fri, Dec 3, 2010 at 10:23 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, Dec 2, 2010 at 10:44 AM, Tux guillaume.ben...@gmail.com wrote:
  I was wondering if it is possible to see which external applications
  (i.e.: other applications of the phone), a particular application use
  or to be more precise, which activities an application use that
  belongs to an external application?
 
  I want thus a way to say: Application a uses activities of
  application c and d.
 
  Is it possible with on-device applications? if not, how could I access
  this information on a device?

 There is no way to do this on a device. It is not even a deterministic
 question, as the answer depends on the device and what other
 applications are installed upon it.

 
  Cheers
 
  Guillaume
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 Programming Tutorials_ Version 3.0.1 Available!

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




-- 
Benats Guillaume .

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

Re: [android-developers] Getting information about external applications used by one particular application

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 4:30 PM, guillaume benats
guillaume.ben...@gmail.com wrote:
 Well that's deterministic to me, as that's encoded in the sources, I do not
 want to know if an application a uses a _particular_ application b but
 _any_ activity of any other application.

If I try to do an ACTION_VIEW of a PDF file, my application may invoke
zero, one, or several applications, depending on what is installed and
what the user chooses to do.

At most, via decompiling an APK, you can figure out what *Intents* are
used with startActivity(). What those turn into at runtime is the
non-deterministic part.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Re: Keeping IntentService alive even if app is killed

2010-12-03 Thread Mark Murphy
On Fri, Dec 3, 2010 at 4:21 PM, Tejas tej...@gmail.com wrote:
 Thanks for the reply Mark,
 So, 2.2 onwards, the task killers won't be able to prevent or remove
 scheduled alarms ?

Not unless they find a new loophole.

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

_Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: Keeping IntentService alive even if app is killed

2010-12-03 Thread Tejas
Thanks Mark :)

On Dec 3, 4:34 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Dec 3, 2010 at 4:21 PM, Tejas tej...@gmail.com wrote:
  Thanks for the reply Mark,
  So, 2.2 onwards, the task killers won't be able to prevent or remove
  scheduled alarms ?

 Not unless they find a new loophole.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


Re: [android-developers] Getting information about external applications used by one particular application

2010-12-03 Thread guillaume benats
MMh ok sorry, I did not understood it that way, you are right.

But isn't there a database including all URIs, intents can target? Maybe it
is a stupid question but I do not get where the gap between ACTION_VIEW and
acitivities filtering ACTION_VIEW is.



On Fri, Dec 3, 2010 at 10:34 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Fri, Dec 3, 2010 at 4:30 PM, guillaume benats
 guillaume.ben...@gmail.com wrote:
  Well that's deterministic to me, as that's encoded in the sources, I do
 not
  want to know if an application a uses a _particular_ application b
 but
  _any_ activity of any other application.

 If I try to do an ACTION_VIEW of a PDF file, my application may invoke
 zero, one, or several applications, depending on what is installed and
 what the user chooses to do.

 At most, via decompiling an APK, you can figure out what *Intents* are
 used with startActivity(). What those turn into at runtime is the
 non-deterministic part.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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




-- 
Benats Guillaume .

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

  1   2   >