[android-developers] Re: Problem in the guide "Building your first app"

2016-06-02 Thread Noam Meirovitch
Hey,
Try to use "Basic Activity" template , it should create the content.xml 
file for you in the layout..

בתאריך יום חמישי, 2 ביוני 2016 בשעה 15:54:27 UTC+3, מאת Jesper Lindberg:
>
> Hello!
> I'm going to take an android programming course this summer and I thought 
> I could start and get prepared by following some of the guides on 
> developer.andoird.com
> I was following the guide "Building your first app" when I encounter a 
> problem.
> The problem I encounter was on step "Display the message"
>
> https://developer.android.com/training/basics/firstapp/starting-activity.html
>
> The "content" file for my ny activity do not exist. (
> content_display_message.xml)
> The contant file for my frist activity do exist. The only thing I did 
> diffrent fomr the guide was when I was going to make the second activity. I 
> took "empty actiity" instead of "blank activity" since I couldent find 
> blank activity. Now, is there an easy way to get a content file?
>
> I tried ofc googeling the question first but diden't find any good awnsers 
> more then what the content file was for and why it was important.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/3ad2ff78-5cca-4cf9-9bc3-003b4344ec10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] AndroidStudio Freeze while working on UI

2016-06-02 Thread Noam Meirovitch


Hi,

In the last couple of days, my AndroidStudio suddenly freezes while working 
on the UI. It's simply freezes and even if I wait for 10 minutes it won't 
resume itself and the only thing I can do is to terminate the process 
through task manager and start the Studio again.

I checked for updated to the AndroidStudio thinking this might help so I 
did the update and my current version is:

<https://lh3.googleusercontent.com/-o4_ykU-MuXs/V1B8M8vAL2I/ATc/M4cpRsc-jSYwYFi0VFHI29dNRIVciXqgwCLcB/s1600/aboutAndroidStudio.jpg>


But even after the update - it's still happens after about 5 minutes of 
work on the UI. I took a screen shout of task manager after the freeze 
happened and it doesn't seem like it happens due to some overload on the 
system , here's the screenshot: 

<https://lh3.googleusercontent.com/--EhFmWKbom8/V1B8VQqaQfI/ATg/xaUVJ45tIQkfwIy7sdP7gbFrFLyBH5g3QCLcB/s1600/AndroidStudioFreeze.png>


I searched the forum before posting but I didn't find any post that 
described the same problem as I have. Thank you in advance, Noam

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/4025d74c-bcc9-4c81-9621-0310fbb0ab51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] More Than One Instance of Application

2009-04-09 Thread Noam

Hello,
Is there a way to prevent the user of opening more than one instance
of my application?

For example:
User clicks on App and opens it.
The user clicks on the home button. (the app is still running in the
background)
The user clicks on (not the menu button, but the button above it in
the homescreen), and then opens the application again.
Does it open the same instance, or does it create another one?
If it does create another one, how can I prevent it from creating
another one, and just opening the existing instance?

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

2009-04-08 Thread Noam

What interval could I send an email at that won't drain the battery?
30 seconds?
60 seconds?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Send Email Automatically

2009-04-08 Thread Noam

The problem is that the application will send out an email every 10
seconds. The user can't click "send" every 10 seconds
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Send Email Automatically

2009-04-08 Thread Noam

So what you're trying to say is that the external libraries are
useless in the new andoid SDKs. That's fine.
I'm just wondering if there is a way to work around it? If there is a
way to do the same action, but with code that will work?

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

2009-04-07 Thread Noam

Mikas,
I just noticed your post after I posted my last one.
If that is true, then how did you get it to work?

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

2009-04-07 Thread Noam

Mikas,
After I posted my last post I saw yours.
If the new SDK really doesn't allow it, then how did you get it to
work?

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

2009-04-07 Thread Noam

I have used the mail 1.4 jar, and installed it successfully.
Even though I tried multiple examples, none of them seem to work.
All I get, when I look at the logcat, is

Uncaught handler: thread main exiting due to uncaught exception
 java.lang.VerifyError: javax.mail.internet.MimeMessage

I have tried all of these examples:

http://www.rgagnon.com/javadetails/java-0321.html
http://davanum.wordpress.com/2007/12/22/android-send-email-via-gmail-actually-via-smtp/

What am I doing wrong?

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

2009-04-07 Thread Noam

Would these three links help me in any way? Maybe I can use IMAP
instead of SMTP (I don't know the differences)? And how can I use each
class?

http://www.java2s.com/Code/Jar/wsit/Downloadmail14jar.htm
http://www.java2s.com/Code/Jar/Web-Services-AXIS2/Downloadactivation11jar.htm
http://eppleton.sharedhost.de/blog/?p=176

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

2009-04-07 Thread Noam

Would you know where I could find one of those?

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

2009-04-06 Thread Noam

> What text box?

Scratch that out. Let's just say that I have the user's email address
in a String named "userEmail".

> What application? Running where?

It is actually a dialog box that when he presses send, it will send an
email to his mailbox.

> What mailbox?

The user's personal email address. For example noam.ha...@gmail.com

> What mail client?

Every time I try to send an email with my code,
1) The "To: " field does not get populated.
2) The mail client pops up with the "To: , Subject, and Body" fields
and a "send" button. However, I want the email to be sent
automatically, without having to go through the mail UI.

My code:

// Setup the recipient in a String array
String[] mailto = {"noam.ha...@gmail.com"};
// Create a new Intent to send messages
Intent sendIntent = new Intent(Intent.ACTION_SEND);
//Write the body of the Email
String emailBody = "You're password is: ";
// Add attributes to the intent
sendIntent.setType("text/plain"); //use this line for testing in the
emulator
//sendIntent.setType("message/rfc822"); //use this line for testing on
the real phone
sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Your Password");
sendIntent.putExtra(Intent.EXTRA_TEXT, emailBody);
startActivity(Intent.createChooser(sendIntent, "Please pick your
preferred email application."));


The address which will send this email is pre-defined.

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



[android-developers] Send Email Automatically

2009-04-06 Thread Noam

Hello everyone,
I am looking for a way to send an email from a DEFINED email to the
user's email. I will also have a defined subject and a defined email -
body.

My situation is that when the user forgets his password, he needs to
enter in his email into the text box and then the application will
automatically send an email to his mailbox.

Is there any way to do this without the user getting his mail client
popping up?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-04-05 Thread Noam

?

On Apr 1, 6:50 pm, Noam  wrote:
> Is my code worth anything?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-04-01 Thread Noam

Is my code worth anything?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-31 Thread Noam

Anyone?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-31 Thread Noam

Craig - None of your responses are valid because I am using the two
PreferenceScreens in the same .java file, so that wouldn't help.

Peli - No, I do not use onPreferenceTreeClick(PreferenceScreen,
Preference). This is my code:


@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setPreferenceScreen(createPreferenceHierarchy());
}

private PreferenceScreen createPreferenceHierarchy() {
PreferenceScreen root = getPreferenceManager
().createPreferenceScreen(this);
// Toggle preference
CheckBoxPreference passProtect = new CheckBoxPreference(this);
passProtect.setTitle("Password Protection");
passProtect.setKey("PasswordProtection");
String email = settings.getString("Email", null);
String password = settings.getString("Password", null);
String emailIsValid = new Boolean(isValid(email)).toString();
if (email != null && email != "" && password != null &&
password != "" && emailIsValid == "true") {
passProtect.setEnabled(true);
} else {
passProtect.setEnabled(false);
passProtect.setChecked(false);
}


// List preference
ListPreference interval = new ListPreference(this);
interval.setEntries(R.array.intervalTimes);
interval.setEntryValues(R.array.intervalTimes);
interval.setDialogTitle("Interval Time");
interval.setKey("IntervalTime");
interval.setTitle("Interval Time");
interval.setValueIndex(0);


//Dialog Preference
PreferenceCategory settingsCategory = new PreferenceCategory
(this);
settingsCategory.setTitle("Settings");
root.addPreference(settingsCategory);


// Screen preference
PreferenceScreen screenPref = getPreferenceManager
().createPreferenceScreen(this);
screenPref.setKey("userInfoScreen");
screenPref.setTitle("User Information");
//screenPref.getOnPreferenceClickListener({String falsee =
"false";});
settingsCategory.addPreference(interval);
settingsCategory.addPreference(screenPref);
settingsCategory.addPreference(passProtect);


//User Information Category
PreferenceCategory userInfoCategory = new PreferenceCategory
(this);
userInfoCategory.setTitle("User Information");
screenPref.addPreference(userInfoCategory);


// Edit text preference
EditTextPreference passwordPref = new EditTextPreference
(this);
passwordPref.setDialogTitle("Password");
passwordPref.setKey("Password");
passwordPref.setTitle("Password");


EditText passwordEditText = passwordPref.getEditText();
PasswordTransformationMethod transMethod = new
PasswordTransformationMethod();
passwordEditText.setTransformationMethod(transMethod);
screenPref.addPreference(passwordPref);
// Edit text preference


EditTextPreference emailPref = new EditTextPreference(this);
emailPref.setDialogTitle("Email Address");
emailPref.setKey("Email");
emailPref.setTitle("Email Address");
screenPref.addPreference(emailPref);

return root;
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-30 Thread Noam

Does anyone have a solution?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-30 Thread Noam

Yes, I have tried that but it still doesn't work. I think it's because
both of the PreferenceScreens are in the same .java file, so it never
gets to the onResume() point.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-30 Thread Noam

"How do you know that "i" is equal to 1 on screen A and "i" equal to 2
on screen B? Where do you set it? Can't you check there directly?"

That is exactly what I want to find out - how to make "i" equal to 1
on screen A and how to make "i" equal to 2 on screen B. That is what I
want to do and haven't found how to do that yet.

I probably mis-worded my question.


Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-29 Thread Noam

Thanks Ralf.
Where in the documentation might I find a list of what override
methods I could use? For example onClick, onAttachedToActivity,
onCreateView, etc.?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-29 Thread Noam

Thanks Peli for your contribution to my problemo.
The default for the integer "i" will be 1.
I have two PreferenceScreens - A and B.
Whenever the user is on PreferenceScreen A, "i" will be equal to 1.
Whenever the user is on PreferenceScreen B, "i" will be equal to 2.
Basically, I want to know when the user is on PreferenceScreen A, and
when he's on PreferenceScreen B.

If I still need to clarify, please tell me what you don't understand.

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-28 Thread Noam

?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-26 Thread Noam

Anyone??

On Mar 25, 4:22 pm, Noam  wrote:
> Do I need to clarify?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Current Preference Screen? (easyy)

2009-03-25 Thread Noam

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



[android-developers] Current Preference Screen? (easyy)

2009-03-25 Thread Noam

Hello everyone,
I have two PreferenceScreens - A and B.
Let's say that the default for the variable i = 0;
PrefScreen B is a child screen of A.

When I first get to A, i = 0;
When I move to B, i = 1;
When I move BACK to A, i = 2;
when I move back to B, i = 1 again;

Whenever i = 2, I want to run a certain method.

Is there a way to get this to work?

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

2009-03-24 Thread Noam

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



[android-developers] Re: PreferenceScreen Close

2009-03-23 Thread Noam

This is what I have so far:

ListAdapter thisListAdapter = this.getListAdapter();
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: PreferenceScreen Close

2009-03-23 Thread Noam

Mark,
The onContentChanged() did not seem to do the trick.
I am still trying to figure out how to do the second option.

I have tried looking for code that contains the DataSetObserver but
have not found any.
Can you please write an example code to show me how it works?

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

2009-03-22 Thread Noam

Thanks for that incredible answer.

Since I'm such a noobie, I hardly understand anything from that
paragraph. Could you please show me some code so I could understand
better?

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

2009-03-22 Thread Noam

I have tried that, but since both A and B are in the same java file,
then it won't work.
If I misunderstood, please clarify.
Any other suggestions?

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

2009-03-22 Thread Noam

Let me rephrase my question.

I have two PreferenceScreens - A and B.
In PrefScreen A, there is an option to go to B. When the user is on B,
and then leaves B and goes back to A, I would want to run a certain
method. Is there a way to do that?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: javax.mail.internet.InternetAddress cannot be found?

2009-03-10 Thread Noam

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



[android-developers] Re: javax.mail.internet.InternetAddress cannot be found?

2009-03-09 Thread Noam

Where could I download the JAR?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: javax.mail.internet.InternetAddress cannot be found?

2009-03-09 Thread Noam

Could I import the JAR of JavaMail into my Application also?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: javax.mail.internet.InternetAddress cannot be found?

2009-03-09 Thread Noam

If that is so, how is google using it in their program?

http://code.google.com/p/salesforceandroid/source/browse/trunk/SalesforceAndroid/src/com/android/salesforce/operation/ErrorLogMailSender.java?spec=svn72&r=72
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: javax.mail.internet.InternetAddress cannot be found?

2009-03-09 Thread Noam

Could anyone please answer this in a detailed manner?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: javax.mail.internet.InternetAddress cannot be found?

2009-03-09 Thread Noam

bump

On Mar 8, 7:12 pm, Noam  wrote:
> Hello everyone,
> I am using Eclipse to develop and application for the android
> platform.
> When I try to tell it "import javax.mail.internet.InternetAddress", it
> does not recognize it.
> Does anyone know why?
>
> Thanks,
> Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] javax.mail.internet.InternetAddress cannot be found?

2009-03-08 Thread Noam

Hello everyone,
I am using Eclipse to develop and application for the android
platform.
When I try to tell it "import javax.mail.internet.InternetAddress", it
does not recognize it.
Does anyone know why?

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

2009-03-05 Thread Noam

Anyone?

On Mar 4, 6:53 pm, Noam  wrote:
> Hello everyone,
> Is there a certain way for me to know when a PreferenceScreen is
> closed?
>
> Thanks,
> Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] PreferenceScreen Close

2009-03-04 Thread Noam

Hello everyone,
Is there a certain way for me to know when a PreferenceScreen is
closed?

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



[android-developers] Check EditText for email?

2009-03-01 Thread Noam

Hello everyone,
Is there a way to verify that the text that the user entered into the
EditText widget is actually an email?

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

2009-03-01 Thread Noam

Anyone?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: CheckBoxPreference onClick Problems (Really Easy)

2009-02-28 Thread Noam

Thanks very much Mark.
And what about how to make the EditTextPreference a password box? Like
put little dots before each letter?

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



[android-developers] Easy Eclipse Help?

2009-02-28 Thread Noam

Hello all,
When I type in eclipse, lets say,

EditTextPreference passwordPref = new EditTextPreference(this);
passwordPref

After I put the "." after "passwordPref", I want there to be a list
for me to choose what options I have to put there. I know this is
possible because a while ago it did work, but now for some reason it
doesn't.

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: CheckBoxPreference onClick Problems (Really Easy)

2009-02-28 Thread Noam

Thanks Mark.
One last question.
If I have a checkBoxPreference, how can I enable/disable it? And if I
can't, what is a work-around?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: CheckBoxPreference onClick Problems (Really Easy)

2009-02-28 Thread Noam

Hello Mark,
Your explanation was awesome! Now I understand how it's supposed to
work.
I have another question though.
If I have this code, how do I know how/where it saves it in the
SharedPreferences?

PreferenceScreen root = getPreferenceManager().createPreferenceScreen
(this);
ListPreference interval = new ListPreference(this);
interval.setEntries(R.array.intervalTimes);
interval.setEntryValues(R.array.intervalTimes);
interval.setDialogTitle("Interval Time");
interval.setKey("Interval Time");
interval.setTitle("Interval Time");
interval.setValueIndex(0);
root.addPreference(interval);


Now, I want to see what it saved.
SharedPreferences settings = getSharedPreferences(nameOfPreference,
0);

What should I insert there in the "nameOfPreference" in order for it
to find the value that the user saved?

Thanks,
Noam.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: CheckBoxPreference onClick Problems (Really Easy)

2009-02-27 Thread Noam

Can anyone help me?

On Feb 26, 2:59 pm, Noam  wrote:
> Anyone?
>
> On Feb 25, 7:39 pm, Noam  wrote:
>
>
>
> > Hello everyone,
> > I have a checkboxpreference called passProtect.
> > When the user clicks on it, I want it to run a method "someMethod".
> > How do I get it to do that?
>
> > Thanks,
> > Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: CheckBoxPreference onClick Problems (Really Easy)

2009-02-26 Thread Noam

Anyone?

On Feb 25, 7:39 pm, Noam  wrote:
> Hello everyone,
> I have a checkboxpreference called passProtect.
> When the user clicks on it, I want it to run a method "someMethod".
> How do I get it to do that?
>
> Thanks,
> Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] CheckBoxPreference onClick Problems (Really Easy)

2009-02-25 Thread Noam

Hello everyone,
I have a checkboxpreference called passProtect.
When the user clicks on it, I want it to run a method "someMethod".
How do I get it to do that?

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

2009-02-25 Thread Noam

Thanks for your reply.
However, I have a simple problem. Whenever I run my code, it tells me
that "java.lang.IllegalArgumentException: Can't have a viewTypeCount <
1"
This is my code:
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
PreferenceScreen root = getPreferenceManager
().createPreferenceScreen(this);
setPreferenceScreen(root);
setTitle("Settings");
SharedPreferences settings = getSharedPreferences("somePref",
0);
SharedPreferences.Editor editor = settings.edit();
editor.commit();
}

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



[android-developers] Nice Settings Management?

2009-02-22 Thread Noam

Hello everyone,
In the Android Emulator, when I press on Settings, and then on
"Security & location", I see this nice, menu-type thing that has
checkboxes and all that jazz..
I would like to know how I could integrate that into my application,
too. Where can I find the code needed to do that?

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

2009-02-21 Thread Noam

Hello everyone,
I have found this K9 source code, but I'm looking for the actual piece
of code that actually sends the email.

http://k9mail.googlecode.com/svn/k9mail/trunk/

Can anyone help me?

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

2009-02-17 Thread Noam

Ok. 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: Send SMS to Email

2009-02-17 Thread Noam

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



[android-developers] Re: Send SMS to Email

2009-02-16 Thread Noam

I know that this would work because if I send an SMS on my Verizon
Razor V3m to an email address, it gets sent to that email address.
There has to be a way to do this with the Android.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Send SMS to Email

2009-02-16 Thread Noam

Hello everyone,
I would like to send an SMS from the device to an email. I use this
code for it:

SmsManager sm = SmsManager.getDefault();
 sm.sendTextMessage(bodyText, null, "test123", null, null);

When the "bodyText" variable is set to "1234567890", then it works.
When the "bodyText" variable is set to any character, even "n", it
tells me a java.lang.StringIndexOutOfBoundsException.

Is there any way to trick it so that it will let me send to an email?

Thanks,
Noam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "No applications can perform this action." error.

2009-02-15 Thread Noam

Thanks Marco, but it still doesn't work.
Does anyone know why?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "No applications can perform this action." error.

2009-02-15 Thread Noam

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



[android-developers] "No applications can perform this action." error.

2009-02-15 Thread Noam

Hello everyone,
I am using this code to send an email (with no errors in eclipse), but
when I run it in the emulator, I get the "No applications can perform
this action." error.

String[] mailto = {prefemail};
// Create a new Intent to send messages
Intent sendIntent = new Intent(Intent.ACTION_SEND);
//Write the body of the Email
String emailBody = "";
// Add attributes to the intent
sendIntent.setType("message/rfc822");
sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "TrackMe Password");
sendIntent.putExtra(Intent.EXTRA_TEXT, emailBody);
startActivity(Intent.createChooser(sendIntent, "Email sent."));

Do I need to install some mail app from it? I tried the K9 email app,
installed it with adb, but I don't see any changes. Do I need to do
something other than installing? Or is there another good program for
it?

Thanks,
Noam.

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



[android-developers] "No applications can perform this action." error

2009-02-15 Thread Noam Habot
Hello everyone,I am using this code to send an email (with no errors in
eclipse), but when I run it in the emulator, I get the "No applications can
perform this action." error.

String[] mailto = {prefemail};

// Create a new Intent to send messages

Intent sendIntent = new Intent(Intent.ACTION_SEND);

//Write the body of the Email

String emailBody = "";

// Add attributes to the intent

sendIntent.setType("message/rfc822");

sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);

sendIntent.putExtra(Intent.EXTRA_SUBJECT, "TrackMe Password");

sendIntent.putExtra(Intent.EXTRA_TEXT, emailBody);

startActivity(Intent.createChooser(sendIntent, "Email sent."));


Do I need to install some mail app from it? I tried the K9 email app,
installed it with adb, but I don't see any changes. Do I need to do
something other than installing? Or is there another good program for it?


Thanks,

Noam.

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



[android-developers] Send Email (Not from User's Account)

2009-02-15 Thread Noam

Hello everyone,
I am looking for a way to send an email from a specified email (that I
predefine the username, password, etc.) to a different specified email
that I have in the string:

String email = "exam...@domain.com";

Thanks,
Noam.

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



[android-developers] Sending Emails

2009-02-15 Thread Noam

Hello everyone,
I am looking for a way to send an email from a specified email (that I
predefine the username, password, etc.) to a different specified email
that I have in the string:

String email = "exam...@domain.com";

Thanks,
iloveisrael.

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



[android-developers] Intent.ACTION_SEND doesn't work?

2009-02-15 Thread Noam

Hello everyone,
When I use this line of code, in the editor, I get an error
(Intent.ACTION_SEND cannot be resolved):

Intent sendIntent = new Intent(Intent.ACTION_SEND);

Why is this happening?

Thanks,
Noam.

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



[android-developers] "No applications can perform this action."

2009-02-15 Thread Noam Habot
Hello everyone,I get the usual "No applications can perform this action." Do
I need to install a mail program on the emulator? I have tried the K9 email
program, but I have not seen any changes. Are there any other programs out
there that could do the same? This is my code:

String[] mailto = {prefemail};

// Create a new Intent to send messages

Intent sendIntent = new Intent(Intent.ACTION_SEND);

//Write the body of the Email

String emailBody = "test123";

// Add attributes to the intent

sendIntent.setType("message/rfc822");

sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);

sendIntent.putExtra(Intent.EXTRA_SUBJECT, "somesubject");

sendIntent.putExtra(Intent.EXTRA_TEXT, emailBody);

startActivity(Intent.createChooser(sendIntent, "Email sent."));

Thanks,
Noam.

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



[android-developers] Sending Emails

2009-02-15 Thread Noam

Hello everyone,
I am looking for a way to send an email from a specified email (that I
predefine the username, password, etc.) to a different specified email
that I have in the string:

String email = "exam...@domain.com";

Thanks,
iloveisrael.

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



[android-developers] Send Email

2009-02-15 Thread Noam

Hello everyone,
I am looking for a way to send an email from a specified email (that I
predefine the username, password, etc.) to a different specified email
that I have in the string:

String email = "exam...@domain.com";

Thanks,
Noam.

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



[android-developers] EditText (textbox) to String

2009-02-15 Thread Noam

Hello everyone,
I am trying to take an EditText textbox that I set in my XML (named
"tracknametext") and turn it into a String.
What is the code to do this?

Thanks,
Noam.

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



[android-developers] EditText (textbox) to String

2009-02-15 Thread Noam

Hello everyone,
I have this piece of code which doesn't seem to work. I can't get the
EditText to a String.

//This is the part before onCreate:

public EditText nametext;
public String name;

//This is after the onCreate (I actually call this method from within
onCreate):

public void dialog() {
final Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.name);
dialog.setTitle("Name");
Button auto = (Button) dialog.findViewById(R.id.automatic);
auto.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
nametext = (EditText) findViewById(R.id.nametextxml);
name = (String) nametext.getText().toString();
dialog.dismiss();
}
});
dialog.show();
}


Whenever I run this code, it gives me NullPointerException. I know
that this line is the problem:

trackname = (String) tracknametext.getText().toString();

Why is this happening? What's the correct way to convert this to a
String?

Thanks,
Noam.

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

2009-01-03 Thread Noam Wolf

Is there a way to actually send the email without having the user
choose an email client and hitting send? (without using a network
connection and having a server do it on the back end)

On Jan 3, 7:11 pm, Abraham Lincoln  wrote:
> This doesn't seem to work for regular text file. I have tried giving
> mime types of "*/*", "text/plain" etc.
>
> Anyone knows how to attach text files using Gmail? Doesn't even work
> from Gmail app.
>
> On Dec 12 2008, 12:08 pm, Peli  wrote:
>
> > > I'd love to see that one extra line in your example that shows how to
> > > add an image fileattachmentwith the image file stored on the SD
> > > card. :-)
>
> > Oh, sorry, you said image.
>
> > sendIntent.setType("image/png");
> > sendIntent.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/
> > mygirlfriend.png");
>
> > I'm sure the next question is how to have both, subject andattachment, but 
> > I'll leave this as an exercise to the reader :-)
>
> > Peli
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-12-05 Thread Noam Wolf

I was setting my AlarmManager in the wrong place, namely an onXxx
event.  What i did was set the AlarmManager on a user action (like
save or whatever) and that solved my problem.

Check it out Applications > Tools > ClockApps



On Dec 5, 2:56 am, Jon Colverson <[EMAIL PROTECTED]> wrote:
> On Dec 5, 6:41 am, Jon Colverson <[EMAIL PROTECTED]> wrote:
>
> > I'd been having some weird issues with AlarmManager seemingly not
> > firing my alarms when the device is asleep. I'm using the alarm to
> > start a service and I was acquiring my wake lock in onStart(). I tried
> > acquiring the lock in onCreate() instead, and that seems to have
> > solved the problem.
>
> Oops. I spoke too soon. After some more testing that doesn't seem to
> have helped.
>
> --
> Jon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-12-02 Thread Noam Wolf

ping... anyone?

On Nov 29, 12:15 pm, Noam  Wolf <[EMAIL PROTECTED]> wrote:
> I have a BroadcastReceiver which acquires a lock onReceive.  I use an
> alarm manager with AlarmManager.RTC_WAKEUP set to broadcast my
> intent.  I have found that when the phone is locked (and asleep) it
> will not wake up sometimes, and when it does many times it will have a
> delay (up to 30 seconds from when the alarm manager was supposed to go
> off).
>
> I don't understand how/what I'm doing different than the AlarmClock
> application since I'm acquiring the lock in the receiver.  I've also
> seen the screen turn on but then immediately turn off
>
> Does anyone have any ideas as to why this is happening?  Or has anyone
> run into this?  Is RTC_WAKEUP stable and trustworthy?
>
> Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-12-02 Thread Noam Wolf

Ok I figured this out with the help of the great DS.

Basically the image was too large and the phone was chocking on it.
So instead i'm using the BitmapFactory to get a smaller size of the
image, no more outOfMemory errors!

On Dec 1, 8:50 pm, Noam  Wolf <[EMAIL PROTECTED]> wrote:
> Here is what I commented out and didn't see the OutOfMemory error
> again:
>
> Cursor cursor = getCursor();
> ImageView displayImage = (ImageView) findViewById(R.id.belongsImage);
>     try {
>       if (cursor.moveToFirst()) {
> Line 1: String imageUri = cursor.getString(0);
> Line 2: displayImage.setImageURI(Uri.parse(imageUri));
>       }
>    } catch 
>
> When I comment out Line 2 i don't get the error again.  Of course this
> is bad for my application but I just wanted to point out that it isn't
> a memory leak by something in the application other than the
> displayImage... or at least it seems that way... any ideas?
>
> On Dec 1, 11:29 am, Noam  Wolf <[EMAIL PROTECTED]> wrote:
>
> > I'm not explicitly passing context around at all but I am using a
> > ContentProvider which calls getContext()... is that something I should
> > be handling too?
>
> > On Dec 1, 1:23 am, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> > > > Always delete references to Context or
> > > > anything that you passed the context to on clean-up.  It's a huge one.
>
> > > Just to emphasize this: leaking a Context means you will leak *all*
> > > the views and *all* the resources attached to these views (bitmaps,
> > > text, etc.)
>
> > > --
> > > Romain Guywww.curious-creature.org
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-12-01 Thread Noam Wolf

Here is what I commented out and didn't see the OutOfMemory error
again:

Cursor cursor = getCursor();
ImageView displayImage = (ImageView) findViewById(R.id.belongsImage);
try {
  if (cursor.moveToFirst()) {
Line 1: String imageUri = cursor.getString(0);
Line 2: displayImage.setImageURI(Uri.parse(imageUri));
  }
   } catch 

When I comment out Line 2 i don't get the error again.  Of course this
is bad for my application but I just wanted to point out that it isn't
a memory leak by something in the application other than the
displayImage... or at least it seems that way... any ideas?

On Dec 1, 11:29 am, Noam  Wolf <[EMAIL PROTECTED]> wrote:
> I'm not explicitly passing context around at all but I am using a
> ContentProvider which calls getContext()... is that something I should
> be handling too?
>
> On Dec 1, 1:23 am, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> > > Always delete references to Context or
> > > anything that you passed the context to on clean-up.  It's a huge one.
>
> > Just to emphasize this: leaking a Context means you will leak *all*
> > the views and *all* the resources attached to these views (bitmaps,
> > text, etc.)
>
> > --
> > Romain Guywww.curious-creature.org
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-12-01 Thread Noam Wolf

I'm not explicitly passing context around at all but I am using a
ContentProvider which calls getContext()... is that something I should
be handling too?

On Dec 1, 1:23 am, Romain Guy <[EMAIL PROTECTED]> wrote:
> > Always delete references to Context or
> > anything that you passed the context to on clean-up.  It's a huge one.
>
> Just to emphasize this: leaking a Context means you will leak *all*
> the views and *all* the resources attached to these views (bitmaps,
> text, etc.)
>
> --
> Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-11-30 Thread Noam Wolf

I'm seeing the exact same error only I'm not even storing an image.

I have an ImageView that loads an image from the users picture gallery
on the phone, once the image is loaded using setImageUri() when I
change orientation I get the exact same error songs described.

I don't understand what's hogging the memory since the image is
already on the device, it's not being copied...

Is there something I should do to the ImageView to clear out it's
bitmap or something?

confused

On Oct 13, 5:40 pm, songs <[EMAIL PROTECTED]> wrote:
> I think we might be talking about a couple of different things.  I've
> got a handle on the leak.  What I'm saying is that there seem to be
> side-effects that change the assumptions of how the think about the
> lifecycle.  From the perspective of the lifecycle and side-effects, I
> would have expected hitting the curved back arrow and then starting
> the app to have had the same effect as changing the orientation
> (except that the former would have had no saved state passed in and
> the latter would).  This isn't the case.  One has side-effects that
> the other doesn't so they behave differently.
>
> What about the lag?  Even with cleaning up the thread, since it takes
> a couple of seconds for the system to actually reclaim the memory, a
> zealous user can still cause an OutOfMemoryError.
>
> On Oct 13, 3:05 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > You need to make sure you have cleaned up everything by the time you
> > return from onDestroy().  If you do that, there will not be a leak.
>
> > On Oct 13, 1:46 pm, songs <[EMAIL PROTECTED]> wrote:
>
> > > This is a little confusing then, though.  The animation thread dies as
> > > expected when I stop the application using the back arrow, but does
> > > not die (without being explicitly killed) when I flip the
> > > orientation.  So some extra cleaning up must be happening for one that
> > > isn't happening for the other.
>
> > > Also, any ideas on the lag?
>
> > > On Oct 12, 11:00 am, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > > onCreate -is- called when the activity is starting fresh.  When an
> > > > orientation switch happens, the old activity is removed through
> > > > onPause()->onStop()->onDestroy(), and a new instance created in the
> > > > new orientation.
>
> > > > On Oct 11, 10:15 pm, songs <[EMAIL PROTECTED]> wrote:
>
> > > > > Tracked the leak down to my animation thread which was getting
> > > > > recreated on every onCreate.  From the lifecycle docs, I had thought
> > > > > that onCreate only got called when the activity was starting fresh and
> > > > > any old instances had died (and killed everything associated with
> > > > > it).  Since this apparently isn't always the case, I'm now managing
> > > > > this thread more actively.
>
> > > > > This mostly solved the issue except for two things - I can still get
> > > > > the memory issue to happen (I just have to try harder), and after
> > > > > changing the orientation it takes about 2-3 seconds before the app
> > > > > will respond to touch events.  From watching the heap using DDMS,
> > > > > there's a good a couple of seconds between the thread dying and its
> > > > > resources getting cleaned up.  Because of this lag, if I quickly
> > > > > switch back and forth between orientations I can get the memory error
> > > > > to happen.
>
> > > > > These remaining issues are kind of on outside of expected behavior so
> > > > > I'm not too worried about things now, but there's gotta be something
> > > > > I'm missing that would help button this up a little tighter.
>
> > > > > - Steve
>
> > > > > On Oct 10, 1:53 am, songs <[EMAIL PROTECTED]> wrote:
>
> > > > > > Interesting.  Thanks for the lead.  I'll look into this an report 
> > > > > > back
> > > > > > either way.
>
> > > > > > On Oct 10, 1:48 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Then you should check carefully where exactly you pass your 
> > > > > > > Activity
> > > > > > > (or Context) to other classes/APIs, etc. The Context is used by 
> > > > > > > many
> > > > > > > different classes in the Android framework and if you somehow 
> > > > > > > "leak"
> > > > > > > the Context, you leak all the views, images, etc. Your issue is 
> > > > > > > very
> > > > > > > similar to several issues we fixed over the past few months: on 
> > > > > > > each
> > > > > > > rotation the Context leaks and everything leaks with it. You can 
> > > > > > > use
> > > > > > > DDMS to check how the heap is growing after each rotation, it 
> > > > > > > should
> > > > > > > tell you whether this is the problem or not.
>
> > > > > > > On Fri, Oct 10, 2008 at 1:44 AM, songs <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Nope, the only static variables I have are constants.  I do 
> > > > > > > > keep an
> > > > > > > > array of Drawable in the view, but that's an instance variable.
>
> > > > > > > > On Oct 10, 1:14 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> > > > > > > >> Looks like you're leaking memory so

[android-developers] Re: AppMarket: does changing title/description of an app wipe out ratings and reviews?

2008-11-30 Thread Noam Wolf

I don't see this any longer even though I still see the alert when I
do update.

On Nov 4, 12:45 pm, atrus123 <[EMAIL PROTECTED]> wrote:
> IIRC, you can change the title/desc without it wiping out ratings,
> etc.
>
> I hope Google fixes this soon.  I try and do frequent updates for my
> users, and I hateseeingall their ratings/commentsgo away every time
> I add a feature.
>
> On Nov 3, 4:24 pm, zl25drexel <[EMAIL PROTECTED]> wrote:
>
> > Hi all
>
> > I know putting a new version upgrade will clear out ratings and
> >reviews. Does anyone knows if changing title/description of an app
> > will wipe out ratings andreviews?
>
> > Thanks,
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AlarmManager not always waking device (using RTC_WAKEUP)

2008-11-30 Thread Noam Wolf

Thanks for your response Dianne.

This is the code I use to setup the alarmManager (from "MyActivity"):

  Intent intent = new Intent(MyActivity.this,
MyBroadCastReceiver.class);
  PendingIntent sender = PendingIntent.getBroadcast
(MyActivity.this, 0,
  intent, 0);

  AlarmManager alarmManager = (AlarmManager) getSystemService
(ALARM_SERVICE);
  alarmManager.set(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis(), sender);

Should I be releasing the lock after I setup the AlarmManager? The
reason I ask is because right after this block of code I have some
code that tries to open a dialog window and when the MyActivity is not
running it bombs so I was wondering if it makes sense to release the
lock here rather than in the receiver itself.

I hope my question is clear... thanks!



On Nov 30, 12:15 am, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> You need to hold a wake lock the entire time you want to be running, from
> when onReceiveIntent() is called until you have done all of your work.
>
>
>
> On Tue, Nov 18, 2008 at 9:56 PM, Adam K <[EMAIL PROTECTED]> wrote:
> > Thanks Dianne.
>
> > Should I be holding a wakelock in the pendingintent receiver of the
> > alarm (basically acquiring at the start of the onReceive() and
> > releasing at the end)?  All I am doing in the receiver is setting off
> > a notification - I am not creating any other intents or accessing any
> > other threads or services.
>
> > Cheers,
>
> > Adam
>
> > On Tue, Nov 18, 2008 at 9:22 PM, Dianne Hackbod <[EMAIL PROTECTED]>wrote:
>
> >> Fwiw, I am not aware of any issues with the alarm itself not waking up the
> >> phone.  Typically bugs in this area are a result of applications not 
> >> holding
> >> wake locks the entire time needed.
>
> >> Note that the behavior when not holding a wake lock can change
> >> significantly between devices, depending on things like how often sync is
> >> running.
>
> >> On Tue, Nov 18, 2008 at 6:15 PM, Adam K <[EMAIL PROTECTED]>wrote:
>
> >>> Ping.  Anyone?  It seems for certain people the alarm can never wake
> >>> up the phone.  For others (like myself) it pretty much always wakes up
> >>> the phone.
>
> >>> Thanks,
>
> >>> Adam
>
> >>> On Nov 16, 8:15 pm, "Adam K" <[EMAIL PROTECTED]> wrote:
> >>> > Hi all,
>
> >>> > I noticed that AlarmManager does not always seem to wake the device
> >>> > correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
> >>> > seems like whatever intent was pending is triggered later after the
> >>> > Menu key is hit.
>
> >>> > I realize you need to hold a wakelock for any activity fired after the
> >>> > initial pending intent event - but I thought at least the pending
> >>> > intent should execute without a wakelock being required?  All I want
> >>> > to do is set off a Notification when the alarm is complete - nothing
> >>> > else.
>
> >>> > It does seem to work 90% of the time without an issue, just not 100%
> >>> > of the time.  Has anyone else noticed this?
>
> >>> > Here is a summarized version of what I'm doing:
>
> >>> > //in main activity, set alarm for some time in future
> >>> > myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
> >>> > Intent(myContext, MyReceiver.class), 0);
> >>> > myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
> >>> > myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);
>
> >>> > //in MyReceiver.class, onReceiver(), trigger notification
> >>> > NotificationManager myNM = (NotificationManager)
> >>> > context.getSystemService(Context.NOTIFICATION_SERVICE);
> >>> > Notification notif = new Notification();
> >>> > ..setup notification to play alarm, vibrate etc.
> >>> > myNM.notify(MYNOTIFICATION_ID, notif);
>
> >>> > Thanks,
>
> >>> > Adam
>
> >> --
> >> Dianne Hackborn
> >> [EMAIL PROTECTED]
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AlarmManager not always waking device (using RTC_WAKEUP)

2008-11-29 Thread Noam Wolf

Hi Adam,

Have you figured this out?  I'm seeing something similar.  Basically I
acquired the lock at the start of the onReceive() in my receiver and
release it when it's done doing it's work.  I still dont' see the
phone waking up correctly...

On Nov 19, 12:56 am, "Adam K" <[EMAIL PROTECTED]> wrote:
> Thanks Dianne.
>
> Should I be holding a wakelock in the pendingintent receiver of the
> alarm (basically acquiring at the start of the onReceive() and
> releasing at the end)?  All I am doing in the receiver is setting off
> a notification - I am not creating any other intents or accessing any
> other threads or services.
>
> Cheers,
>
> Adam
>
> On Tue, Nov 18, 2008 at 9:22 PM, Dianne Hackbod <[EMAIL PROTECTED]> wrote:
> > Fwiw, I am not aware of any issues with the alarm itself not waking up the
> > phone.  Typically bugs in this area are a result of applications not holding
> > wake locks the entire time needed.
>
> > Note that the behavior when not holding a wake lock can change
> > significantly between devices, depending on things like how often sync is
> > running.
>
> > On Tue, Nov 18, 2008 at 6:15 PM, Adam K <[EMAIL PROTECTED]>wrote:
>
> >> Ping.  Anyone?  It seems for certain people the alarm can never wake
> >> up the phone.  For others (like myself) it pretty much always wakes up
> >> the phone.
>
> >> Thanks,
>
> >> Adam
>
> >> On Nov 16, 8:15 pm, "Adam K" <[EMAIL PROTECTED]> wrote:
> >> > Hi all,
>
> >> > I noticed that AlarmManager does not always seem to wake the device
> >> > correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
> >> > seems like whatever intent was pending is triggered later after the
> >> > Menu key is hit.
>
> >> > I realize you need to hold a wakelock for any activity fired after the
> >> > initial pending intent event - but I thought at least the pending
> >> > intent should execute without a wakelock being required?  All I want
> >> > to do is set off a Notification when the alarm is complete - nothing
> >> > else.
>
> >> > It does seem to work 90% of the time without an issue, just not 100%
> >> > of the time.  Has anyone else noticed this?
>
> >> > Here is a summarized version of what I'm doing:
>
> >> > //in main activity, set alarm for some time in future
> >> > myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
> >> > Intent(myContext, MyReceiver.class), 0);
> >> > myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
> >> > myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);
>
> >> > //in MyReceiver.class, onReceiver(), trigger notification
> >> > NotificationManager myNM = (NotificationManager)
> >> > context.getSystemService(Context.NOTIFICATION_SERVICE);
> >> > Notification notif = new Notification();
> >> > ..setup notification to play alarm, vibrate etc.
> >> > myNM.notify(MYNOTIFICATION_ID, notif);
>
> >> > Thanks,
>
> >> > Adam
>
> > --
> > Dianne Hackborn
> > [EMAIL PROTECTED]
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-11-29 Thread Noam Wolf

I have a BroadcastReceiver which acquires a lock onReceive.  I use an
alarm manager with AlarmManager.RTC_WAKEUP set to broadcast my
intent.  I have found that when the phone is locked (and asleep) it
will not wake up sometimes, and when it does many times it will have a
delay (up to 30 seconds from when the alarm manager was supposed to go
off).

I don't understand how/what I'm doing different than the AlarmClock
application since I'm acquiring the lock in the receiver.  I've also
seen the screen turn on but then immediately turn off

Does anyone have any ideas as to why this is happening?  Or has anyone
run into this?  Is RTC_WAKEUP stable and trustworthy?

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



[android-developers] Re: WindowManager$BadTokenException: Unable to add window -- token null is not for an application

2008-11-28 Thread Noam Wolf

I think it existed before the update too.  The way I get around it is
kind of stupid, right now i'm wrapping the call to "show" with a try/
catch.  That way when the activity is running/alive it will work,
otherwise it will die quietly.

On Nov 27, 3:09 pm, Noam  Wolf <[EMAIL PROTECTED]> wrote:
> Is this something new?  I wasn't seeing this behavior before
> yesterday's update.  Any idea on how to get around it?
>
> On Nov 26, 12:33 pm, Ash <[EMAIL PROTECTED]> wrote:
>
> > Hello super smart people, I've got a strangle little bug to test you.
>
> > I have an application that tries to display an RTSP video in a view
> > (Content View -> ScrollView -> AbsoluteLayout -> VideoView). However,
> > in the emulator the MediaPlayer throws dispatches an error message
> > which tries to display an Alert which throws the WindowManager
> > exception. On device I hear the sound but do not see the the video
> > then I get the exception when the MediaController is shown. WTF is
> > going on? If I create a tiny Activity this works fine but once I get
> > into a "real" application it all goes to hell. Is this Dalvik and the
> > Android SDK showing it's immaturity?
>
> > Ash
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hiding view elements

2008-11-28 Thread Noam Wolf

PERFECTION.  Thank you!

On Nov 28, 11:41 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Noam Wolfwrote:
> > I was wondering if there was an equivalent to css' display: none in
> > android.  My goal is to have a fluid UI that if certain elements are
> > hidden from it all other elements shift into the void.
>
> > Any way to achieve this?  view.setVisibility is holding the width and
> > height of the invisible element, which is exactly what I want to
> > avoid.
>
> Try setVisibility(View.GONE)
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WindowManager$BadTokenException: Unable to add window -- token null is not for an application

2008-11-28 Thread Noam Wolf

Is this something new?  I wasn't seeing this behavior before
yesterday's update.  Any idea on how to get around it?

On Nov 26, 12:33 pm, Ash <[EMAIL PROTECTED]> wrote:
> Hello super smart people, I've got a strangle little bug to test you.
>
> I have an application that tries to display an RTSP video in a view
> (Content View -> ScrollView -> AbsoluteLayout -> VideoView). However,
> in the emulator the MediaPlayer throws dispatches an error message
> which tries to display an Alert which throws the WindowManager
> exception. On device I hear the sound but do not see the the video
> then I get the exception when the MediaController is shown. WTF is
> going on? If I create a tiny Activity this works fine but once I get
> into a "real" application it all goes to hell. Is this Dalvik and the
> Android SDK showing it's immaturity?
>
> Ash

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



[android-developers] Hiding view elements

2008-11-28 Thread Noam Wolf

I was wondering if there was an equivalent to css' display: none in
android.  My goal is to have a fluid UI that if certain elements are
hidden from it all other elements shift into the void.

Any way to achieve this?  view.setVisibility is holding the width and
height of the invisible element, which is exactly what I want to
avoid.

Thanks.

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



[android-developers] Re: Error receiving broadcast ... on Activity Finish

2008-04-09 Thread Noam Habot
Ok..this is my onPause:

@Override
public void onPause() {
this.registerReceiver(this.myIntentReceiver, this.myIntentFilter);
 super.onPause();
}

It doesn't give the error I posted 2 minutes ago, but it gives the error
"error receiving broadcast null in [package]$[IntentReceiver]".

Thanks,
Noam.

On Wed, Apr 9, 2008 at 1:07 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

>
> Now it tells me that the receiver isn't registered:
>
> Unable to pause activity [package]:
> java.lang.IllegalArgumentException: Receiver not registered: [package]$
> [IntentReceiver].
>
> Why is this happening?
>
> Thanks,
> Noam.
>
> On Apr 9, 12:54 pm, cirion <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > unregisterReceiver should definitely be called from onPause.  onFreeze
> > will only get called if another Activity is starting and your own
> > Activity may be destroyed.  In contrast, onPause will be called every
> > time your Activity stops displaying.
> >
> > Hope this helps,
> > Chris
> >
> > On Apr 9, 12:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
> >
> > > I don't have an onPause. Could this be the problem?
> > > However, I have a onResume and a onFreeze:
> >
> > > @Override
> > > public void onFreeze(Bundle icicle) {
> > >  this.unregisterReceiver(this.myIntentReceiver);
> > >  super.onFreeze(icicle);
> > > }
> > > @Override
> > > public void onResume() {
> > >  super.onResume();
> > >  this.registerReceiver(this.myIntentReceiver,
> > > this.myIntentFilter);
> > > }
> >
> > > What am I doing wrong?
> >
> > > Thanks,
> > > Noam.
> >
> > > On Apr 9, 9:18 am, Hielko <[EMAIL PROTECTED]> wrote:
> >
> > > > Check if your onResume and onPause methods are called properly.
> There
> > > > are some bugs in the lifecycle model, sometimes onPauze will be
> called
> > > > but onResume isn't called when you go back to the activity so that
> > > > could generate some problems.
> >
> > > > On Apr 9, 5:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > > > wrote:
> >
> > > > > I tried emulator -wipe-data and it still doesn't work..Does anyone
> > > > > have a suggestion?
> >
> > > > > Thanks,
> > > > > Noam.
> >
> > > > > On Mar 13, 9:33 pm, cirion <[EMAIL PROTECTED]> wrote:
> >
> > > > > > Argh, never mind.  This seems to be one of those problems that
> can be
> > > > > > fixed with emulator -wipe-data.
> >
> > > > > > On Mar 13, 7:47 pm, cirion <[EMAIL PROTECTED]> wrote:
> >
> > > > > > > I'm having the exact same problem.  This is in a MapActivity.
>  Does
> > > > > > > anyone know of a solution?  Thanks!
> >
> > > > > > > On Mar 7, 3:46 am, Mark <[EMAIL PROTECTED]> wrote:
> >
> > > > > > > > Occassionally, I am getting an exception like this when I
> finish my
> > > > > > > > activity.
> >
> > > > > > > >ERROR/AndroidRuntime(605):
> java.lang.RuntimeException:Errorreceiving
> > > > > > > >broadcastnullin [EMAIL PROTECTED]
> > > > > > > >ERROR/AndroidRuntime(605): at android.app.ActivityThread
> > > > > > > > $PackageInfo$ReceiverDispatcher.run(ActivityThread.java:492)
> > > > > > > >ERROR/AndroidRuntime(605): at
> > > > > > > > android.os.Handler.handleCallback(Handler.java:455)
> > > > > > > >ERROR/AndroidRuntime(605): at
> > > > > > > > android.os.Handler.dispatchMessage(Handler.java:78)
> > > > > > > >ERROR/AndroidRuntime(605): at
> android.os.Looper.loop(Looper.java:
> > > > > > > > 91)
> > > > > > > >ERROR/AndroidRuntime(605): at
> > > > > > > > android.app.ActivityThread.main(ActivityThread.java:3052)
> > > > > > > >ERROR/AndroidRuntime(605): at
> > > > > > > > java.lang.reflect.Method.invokeNative(Native Method)
> > > > > > > >ERROR/AndroidRuntime(605): at
> > > > > > > > java.lang.reflect.Method.invoke(Method.java:356)
> > > > > &