[android-developers] Re: android TOAST?

2011-03-10 Thread kiros88
Okay so the issue im having witht this method is that now with a
seekbar i push the button down like the original way has it where u
can push the volume button down and then the seekbar goes down and if
u keep pushing it the seekbar will continue to go down but i cant seem
to get the bar moving constantly while the toast is up

On Mar 9, 2:51 pm, Hari Edo hari@gmail.com wrote:
 On Mar 9, 5:38 pm, kiros88 ghui...@gmail.com wrote:

  rather then the basic Ringer Volume display so i couldnt find any
  code that was using those words does anyone have an idea what it is
  like is it a toast cuz if it is does anyone know how to put a seekbar
  and textview on a single toast

 You can put any view into a toast.   So make a layout in XML with all
 you want to show, then inflate that layout, then assign it to the
 toast.  Not difficult.

 However, the one big rule about toasts:  no touch, click or typing
 interaction is possible.  It fades in, it lingers, it fades out, and
 you can't interact at all through 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: Dynamically including a custom view defined in another app

2011-03-10 Thread Shri
You can use Context.createPackageContext to load the other apk, and
then use reflection to load the class. See 
http://www-jo.se/f.pfleger/apk-piracy.

Also take a look at DexClassLoader and PathClassLoader.

On Mar 10, 10:08 am, Justin Anderson magouyaw...@gmail.com wrote:
 And TabActivity doesn't fully support displaying activities... That
 functionality is left over from very early Android development days and
 there are all sorts of little gotchas and subtleties when using them to
 display activities.

 Really, each tab in a TabActivity should be a View and then it works much
 more nicely.

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Thu, Mar 10, 2011 at 10:58 AM, Mark Murphy mmur...@commonsware.comwrote:

  On Thu, Mar 10, 2011 at 12:54 PM, Mark Carter mjc1...@googlemail.com
  wrote:
   How about TabActivity? Doesn't that do something similar to what I'm
  talking
   about (i.e. using a portion of the screen to show something
   created/controlled by (potentially) another app)?

  TabActivity cannot display something from another app.

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

  Android Training Worldwide:http://commonsware.com/training

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

2011-03-10 Thread Brad Stintson
I tried that but still it is not working.

On Fri, Mar 11, 2011 at 12:04 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 On 10 March 2011 19:27, Brad Stintson geek.bin...@gmail.com wrote:

cal.setTimeInMillis(System.currentTimeMillis());
cal.clear();

 These two does not make much sense in that order.

 --
 Regards,
 Marcin Orlowski

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

2011-03-10 Thread kiros88
Is there any way programmically to tell if the toast is still
appearing on the droid like there doesnt seem to be a
getStatusFunction on the toast class that would do it. Is the only
approach to doing this is having a timer that setsoff the same time
the duration goes on so i can be sure the droid knows when the toast
is on the screen or not?

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

2011-03-10 Thread TreKing
On Thu, Mar 10, 2011 at 12:32 PM, Adam adamash...@gmail.com wrote:

 I can't use the in-built java API as I am trying to develop my app on
 Andoid on 1.5 so I'm using JDOM.


What does 1.5 have to do with it? All the XML stuff, AFAICT, has been
available since the beginning.


 Anyone know how I can parse the XML for m android app?


Check the docs, there are plenty of options.

http://developer.android.com/reference/javax/xml/parsers/package-summary.html
http://developer.android.com/reference/javax/xml/parsers/package-summary.html
http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
 http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
http://developer.android.com/reference/org/xml/sax/package-summary.html
 http://developer.android.com/reference/org/xml/sax/package-summary.html
http://developer.android.com/reference/org/w3c/dom/package-summary.html

-
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: ProgressDialog persisting after screen rotation inspite of call to dismissDialog

2011-03-10 Thread Shri
I had taken a look at onSaveInstanceState, but it is called before the
activity is destroyed. Note that I also tried to call dismissDialog in
onPause *before* the call to super.onPause in case the default
implementation of onPause was saving the state of managed dialogs.  I
can certainly switch over to using unmanaged dialogs, but I would be
curious to know which callback is called before managed dialog state
is stored.

Thanks for the reply!

On Mar 9, 9:38 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Removing the dialog in onPause is too late, because by that time the
 managed dialogs have been alerady saved (around the time of
 onSaveInstanceState callback).

 If you don't want the dialog to persist through orientation changes,
 don't use a managed dialog.

 Create one without calling showDialog, save the reference as an instance
 variable of your activity, and dismiss it in onPause.

 -- Kostya

 10.03.2011 3:57,Shriпишет:



  I am seeing that aProgressDialogis persisting after a screen
  rotation, even though I am calling dismissDialog in the onPause
  method. I do know that a new Activity is created after the screen
  rotation and I have read threads like
 http://groups.google.com/group/android-developers/browse_thread/threa
  However, my scenario is simpler in that there is no background task
  which holds onto the old Activity. Any ideas?

  Thanks
 Shri

  package com.shri.helloandroid;

  import android.app.Activity;
  import android.os.Bundle;
  import android.app.ProgressDialog;
  import android.app.Dialog;
  import android.view.View;

  public class MainActivity extends Activity {
     private static final int DIALOG_LOADING_DOCUMENT = 0;

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

     @Override
     public void onPause() {
       // dismissDialog(DIALOG_LOADING_DOCUMENT);
       super.onPause();
       dismissDialog(DIALOG_LOADING_DOCUMENT);
     }

     //
     // Click the button to start theProgressDialog, and then rotate the
  screen. I expect the dialog to be
     // dismissed as onPause gets called when the current Activity is
  being destroyed, and it calls dismissDialog.
     // However, I see that the dialog persists after the screen
  rotation.
     //
     public void onClick(View view) {
       showDialog(DIALOG_LOADING_DOCUMENT);
     }

     @Override
     protected Dialog onCreateDialog(int id) {
       switch (id) {
         case DIALOG_LOADING_DOCUMENT: {
           ProgressDialogprogressDialog= newProgressDialog(this);
           progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
           progressDialog.setMessage(Loading document...);
           returnprogressDialog;
         }
         default:
           return super.onCreateDialog(id);
       }
     }
  }

 --
 Kostya Vasilyev --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: Dynamically including a custom view defined in another app

2011-03-10 Thread Mark Murphy
On Thu, Mar 10, 2011 at 1:42 PM, Shri shri.bo...@gmail.com wrote:
 You can use Context.createPackageContext to load the other apk, and
 then use reflection to load the class. See 
 http://www-jo.se/f.pfleger/apk-piracy.

I stand corrected.

However, anyone loading code indiscriminately from another package is
asking for trouble (e.g., malware injection).

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

Android Training Worldwide: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ProgressDialog persisting after screen rotation inspite of call to dismissDialog

2011-03-10 Thread Kostya Vasilyev
Managed dialogs are not saved in the base class's onPause or 
onSaveInstanceState. That's why I wrote around the time of, not in 
onSaveInstanceState.


What this means - a managed dialog is a managed dialog, and you can't 
have a semi managed dialog where you first use showDialog() and then 
decide to not persist it.


That's the point of using a managed dialog - so it's saved and restored 
for you. If you don't want this behavior, don't use a managed dialog.


( As a side note, managed dialogs can also be reused for efficiency, but 
that not relevant to your question ).


-- Kostya

10.03.2011 21:56, Shri пишет:

I had taken a look at onSaveInstanceState, but it is called before the
activity is destroyed. Note that I also tried to call dismissDialog in
onPause *before* the call to super.onPause in case the default
implementation of onPause was saving the state of managed dialogs.  I
can certainly switch over to using unmanaged dialogs, but I would be
curious to know which callback is called before managed dialog state
is stored.

Thanks for the reply!

On Mar 9, 9:38 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Removing the dialog in onPause is too late, because by that time the
managed dialogs have been alerady saved (around the time of
onSaveInstanceState callback).

If you don't want the dialog to persist through orientation changes,
don't use a managed dialog.

Create one without calling showDialog, save the reference as an instance
variable of your activity, and dismiss it in onPause.

-- Kostya

10.03.2011 3:57,Shriпишет:




I am seeing that aProgressDialogis persisting after a screen
rotation, even though I am calling dismissDialog in the onPause
method. I do know that a new Activity is created after the screen
rotation and I have read threads like
http://groups.google.com/group/android-developers/browse_thread/threa
However, my scenario is simpler in that there is no background task
which holds onto the old Activity. Any ideas?
Thanks
Shri
package com.shri.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.app.ProgressDialog;
import android.app.Dialog;
import android.view.View;
public class MainActivity extends Activity {
private static final int DIALOG_LOADING_DOCUMENT = 0;
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  }
@Override
public void onPause() {
  // dismissDialog(DIALOG_LOADING_DOCUMENT);
  super.onPause();
  dismissDialog(DIALOG_LOADING_DOCUMENT);
}
//
// Click the button to start theProgressDialog, and then rotate the
screen. I expect the dialog to be
// dismissed as onPause gets called when the current Activity is
being destroyed, and it calls dismissDialog.
// However, I see that the dialog persists after the screen
rotation.
//
public void onClick(View view) {
  showDialog(DIALOG_LOADING_DOCUMENT);
}
@Override
protected Dialog onCreateDialog(int id) {
  switch (id) {
case DIALOG_LOADING_DOCUMENT: {
  ProgressDialogprogressDialog= newProgressDialog(this);
  progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  progressDialog.setMessage(Loading document...);
  returnprogressDialog;
}
default:
  return super.onCreateDialog(id);
  }
}
}

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



--
Kostya Vasilyev -- 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] Re: android toast alert?

2011-03-10 Thread Jake Wharton
I'm not aware of a status query method. However, be wary of firing off a 
timer with your Toast. Just because you call .show() on it does not mean it 
will be displayed right away. It is put into the toast queue (my term) and 
only displayed when the items in the queue before it, if any, have been 
displayed.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Dynamically including a custom view defined in another app

2011-03-10 Thread Shri
With Context.createPackageContext, you can use the
CONTEXT_IGNORE_SECURITY flag along with CONTEXT_INCLUDE_CODE to load
the code in the apk. You will then need to do your own security
checks, which is probably making sure that the .apk you are loading is
signed with the same certificate as your own. Yup, you do need to be
careful here to avoid creating security bugs.

Btw, about DexClassLoader, I think that approach is not recommended as
the code you load will not be able to access the resources from its
own apk. However, with Context.createPackageContext, since you are
creating a Context, the code will have access to its resources.

On Mar 10, 10:56 am, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Mar 10, 2011 at 1:42 PM, Shri shri.bo...@gmail.com wrote:
  You can use Context.createPackageContext to load the other apk, and
  then use reflection to load the class. 
  Seehttp://www-jo.se/f.pfleger/apk-piracy.

 I stand corrected.

 However, anyone loading code indiscriminately from another package is
 asking for trouble (e.g., malware injection).

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

 Android Training Worldwide:http://commonsware.com/training

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

2011-03-10 Thread Adam Ashton
It's the xpath that wasn't put in until level 8.

On 10 March 2011 18:51, TreKing treking...@gmail.com wrote:

 On Thu, Mar 10, 2011 at 12:32 PM, Adam adamash...@gmail.com wrote:

 I can't use the in-built java API as I am trying to develop my app on
 Andoid on 1.5 so I'm using JDOM.


 What does 1.5 have to do with it? All the XML stuff, AFAICT, has been
 available since the beginning.


 Anyone know how I can parse the XML for m android app?


 Check the docs, there are plenty of options.


 http://developer.android.com/reference/javax/xml/parsers/package-summary.html
 http://developer.android.com/reference/javax/xml/parsers/package-summary.html
 http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
  http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
 http://developer.android.com/reference/org/xml/sax/package-summary.html
  http://developer.android.com/reference/org/xml/sax/package-summary.html
 http://developer.android.com/reference/org/w3c/dom/package-summary.html


 -
 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


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

[android-developers] Joins vs. Content provider

2011-03-10 Thread Jay Bloodworth
Is there a standard or recommended idiom for doing the equivalent of a
join of data in a local database versus a content provider?  is there
anything more efficient than explicitly looping on the result set from
the local database query and doing individual queries of the content
provider to grab the related rows?

Jay

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


[android-developers] override back button

2011-03-10 Thread Colin
Can someone help me understand how to stop the back button from
exiting out of my program?  I want it to just return to my main menu
or exit if pressed on the main menu but when I override the method it
still exits.  Here is what I currently have:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event)  {
if (keyCode == KeyEvent.KEYCODE_BACK  
event.getRepeatCount()
== 0) {
if (animation.state != 1){
animation.state = 1;
return true;
}
else return false;
}

return super.onKeyDown(keyCode, event);
}

I have messed with it a little but my program is always still closes.

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


Re: [android-developers] Re: android toast alert?

2011-03-10 Thread Kostya Vasilyev

In order to track state in a toast-like thing, one could:

- Create a transparent activity (using @android:theme/Translucent);
- Model a toast-like thing in the middle of it (using 
@android:drawable/toast_frame);

- Handle key events, update the UI;
- Dismiss based on elapsed time;
- Include android:noHistory=true for the activity in the manifest.

-- Kostya

10.03.2011 22:28, Jake Wharton пишет:
I'm not aware of a status query method. However, be wary of firing off 
a timer with your Toast. Just because you call .show() on it does not 
mean it will be displayed right away. It is put into the toast queue 
(my term) and only displayed when the items in the queue before it, if 
any, have been displayed. --

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



--
Kostya Vasilyev -- 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: android TOAST?

2011-03-10 Thread Justin Anderson
Sounds like you have a bug.  What are you doing differently between the two
buttons?  What does your code look like?


Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 10, 2011 at 11:40 AM, kiros88 ghui...@gmail.com wrote:

 Okay so the issue im having witht this method is that now with a
 seekbar i push the button down like the original way has it where u
 can push the volume button down and then the seekbar goes down and if
 u keep pushing it the seekbar will continue to go down but i cant seem
 to get the bar moving constantly while the toast is up

 On Mar 9, 2:51 pm, Hari Edo hari@gmail.com wrote:
  On Mar 9, 5:38 pm, kiros88 ghui...@gmail.com wrote:
 
   rather then the basic Ringer Volume display so i couldnt find any
   code that was using those words does anyone have an idea what it is
   like is it a toast cuz if it is does anyone know how to put a seekbar
   and textview on a single toast
 
  You can put any view into a toast.   So make a layout in XML with all
  you want to show, then inflate that layout, then assign it to the
  toast.  Not difficult.
 
  However, the one big rule about toasts:  no touch, click or typing
  interaction is possible.  It fades in, it lingers, it fades out, and
  you can't interact at all through 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


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

2011-03-10 Thread Kostya Vasilyev
Not sure I understand the question: the implementation of a 
ContentProvider doesn't have to map data URIs to one particular table each.


It's probably the most obvious thing to do, but it doesn't have to be 
this way. You can map URIs to DB queries any way you like, and include 
JOIN's if needed (just use db.rawQuery for this).


And then there is:

http://developer.android.com/reference/android/database/CursorJoiner.html

if you need to do the join yourself. Which is just a simple helper class 
that makes joins more efficient by requiring that both result sets (left 
 right) are sorted.


-- Kostya

10.03.2011 22:40, Jay Bloodworth пишет:

Is there a standard or recommended idiom for doing the equivalent of a
join of data in a local database versus a content provider?  is there
anything more efficient than explicitly looping on the result set from
the local database query and doing individual queries of the content
provider to grab the related rows?

Jay




--
Kostya Vasilyev -- 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] override back button

2011-03-10 Thread Dia
Hello,

Does your Back Button exit the application in both cases? When
animation.state!=1 it should not do anything.  In the other case it should
exit.

From documentation:

   - If you handled the event, return true. If you want to allow the event
   to be handled by the next receiver, return false.

Hope this helps.

On Thu, Mar 10, 2011 at 9:54 PM, Colin colin...@gmail.com wrote:

 Can someone help me understand how to stop the back button from
 exiting out of my program?  I want it to just return to my main menu
 or exit if pressed on the main menu but when I override the method it
 still exits.  Here is what I currently have:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event)  {
if (keyCode == KeyEvent.KEYCODE_BACK 
 event.getRepeatCount()
 == 0) {
if (animation.state != 1){
animation.state = 1;
return true;
}
else return false;
}

return super.onKeyDown(keyCode, event);
}

 I have messed with it a little but my program is always still closes.

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

2011-03-10 Thread Robin Talwar
i had the same problem

In my parser i replaced the qName with localName parameter and boom i got it
working.
Hope that works :)

On Fri, Mar 11, 2011 at 1:02 AM, Adam Ashton adamash...@gmail.com wrote:

 It's the xpath that wasn't put in until level 8.


 On 10 March 2011 18:51, TreKing treking...@gmail.com wrote:

 On Thu, Mar 10, 2011 at 12:32 PM, Adam adamash...@gmail.com wrote:

 I can't use the in-built java API as I am trying to develop my app on
 Andoid on 1.5 so I'm using JDOM.


 What does 1.5 have to do with it? All the XML stuff, AFAICT, has been
 available since the beginning.


 Anyone know how I can parse the XML for m android app?


 Check the docs, there are plenty of options.


 http://developer.android.com/reference/javax/xml/parsers/package-summary.html
 http://developer.android.com/reference/javax/xml/parsers/package-summary.html
 http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
 http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
 http://developer.android.com/reference/org/xml/sax/package-summary.html
  http://developer.android.com/reference/org/xml/sax/package-summary.html
 http://developer.android.com/reference/org/w3c/dom/package-summary.html


 -
 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


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

2011-03-10 Thread Droid
One way is to capture the geocoder responses into a collection (over
time) then write an algoritm to determine the which contents of that
collection are usable.
The geocode throws bad results and nulls all thge time. Most of the
good algorithms are propietary (skyhook), but there is room for
exploration with your own exciting code.



On Mar 10, 2:34 pm, Jake Colman col...@ppllc.com wrote:
 At random times my production app will get

 GeoCoder error: java.io.IOException: Unable to parse response from
 server

 When I try to get the location name corresponding to a given
 latitude/longitude taken from a Location object.

 Is there anything I should be doing differently so that this doesn't
 happen?  It's random and usually clears itself up next time I try to
 update the information.  But it's annoying.

 Is it just that Google's sever may have been unavailable at the time of
 the request or that my phone's internet connection was temporarily
 flaky?

 Thanks.

 ...Jake

 --
 Jake Colman -- Android Tinkerer

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

2011-03-10 Thread Greg Donald
On Thu, Mar 10, 2011 at 2:31 PM, Droid rod...@gmail.com wrote:
 One way is to capture the geocoder responses into a collection (over
 time) then write an algoritm to determine the which contents of that
 collection are usable.
 The geocode throws bad results and nulls all thge time. Most of the
 good algorithms are propietary (skyhook), but there is room for
 exploration with your own exciting code.

http://developer.android.com/guide/topics/location/obtaining-user-location.html#BestEstimate

Google's isBetterLocation() works fine for me.


-- 
Greg Donald
destiney.com | gregdonald.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] Re: Android manifest no longer can be found on any of my packages

2011-03-10 Thread Droid
1) I get this too in WIndows Vista. I think its from Oracles JDK
updates, so lowering the build in preferences for a project seems to
work (sometimes!)

2)  You can always take the res src and manifest files only to a
folder of its own - on your c drive and then create a new project
using them as source. It works but is time consuming and then Eclipse
keeps that odd folder you just made as source (wot an idiot!) - so I
copy the project and it ends up in workspace once again. Phew.

Let me know if there is an easier way too.



 9, 2:27 pm, Bejonesnyc bejones...@gmail.com wrote:
 Forum-

 I have been using my Eclipse Dev enviornment for about 18 months no
 issues.  Then I tried importing a working package into my
 environment.  After this ALL of my packages reported errors about not
 being able to find resources, specifically the native library
 containing ANDROID_FRAMEWORKS

 Couldn't figure it out.  So I did a clean install.
 -New Eclipse (helios for mac)
 -new SDK
 -new ADT
 -new virgin  workspace

 Followed Google's documentaton regarding order of installation.

 Then I restarted my machine.

 Created a new android hello world package.

 Upon creation of package I get the following message.

 eclipse.buildId=M20110210-1200
 java.version=1.6.0_22
 java.vendor=Apple Inc.
 BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
 Framework arguments:  -product org.eclipse.epp.package.java.product -
 keyring /Users/bejones/.eclipse_keyring -showlocation
 Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product
 org.eclipse.epp.package.java.product -keyring /Users/
 /.eclipse_keyring -showlocation

 Error
 Tue Mar 08 13:20:33 EST 2011
 Unable to read /Developer_Android/Android-sdk/AndroidManifest.xml:
 java.io.FileNotFoundException: /Developer_Android/Android-sdk/
 AndroidManifest.xml (No such file or directory)

 Which sets of a cascade of various error messages due to this missing
 resource.

 I have tried Stackoverflow and a bunch of different forums regarding
 this error, This being a clean install and a new project ( as opposed
 to an import) I am at a loss.

 Cheers,

 Brian

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

2011-03-10 Thread dirk
Another option is to expose a View which includes the joined results.

On Mar 10, 11:40 am, Jay Bloodworth johnabloodwor...@gmail.com
wrote:
 Is there a standard or recommended idiom for doing the equivalent of a
 join of data in a local database versus a content provider?  is there
 anything more efficient than explicitly looping on the result set from
 the local database query and doing individual queries of the content
 provider to grab the related rows?

 Jay

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

2011-03-10 Thread Colin
That is what I understood and was my intention, but it exits in all
cases.

On Mar 10, 3:16 pm, Dia lorydi3...@gmail.com wrote:
 Hello,

 Does your Back Button exit the application in both cases? When
 animation.state!=1 it should not do anything.  In the other case it should
 exit.

 From documentation:

    - If you handled the event, return true. If you want to allow the event
    to be handled by the next receiver, return false.

 Hope this helps.

 On Thu, Mar 10, 2011 at 9:54 PM, Colin colin...@gmail.com wrote:
  Can someone help me understand how to stop the back button from
  exiting out of my program?  I want it to just return to my main menu
  or exit if pressed on the main menu but when I override the method it
  still exits.  Here is what I currently have:

                 @Override
                 public boolean onKeyDown(int keyCode, KeyEvent event)  {
                     if (keyCode == KeyEvent.KEYCODE_BACK 
  event.getRepeatCount()
  == 0) {
                         if (animation.state != 1){
                                 animation.state = 1;
                                 return true;
                         }
                         else return false;
                     }

                     return super.onKeyDown(keyCode, event);
                 }

  I have messed with it a little but my program is always still closes.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, 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] Re: ACR122 USB NFC Reader with Android Mobile

2011-03-10 Thread FrankG
IMHO this smard card reader uses usb Chip Card Interface Device class
and I'm in doubt that even if you find a device with usb host support,
that this devise can use this u ccid usb mode.  But maybe I'm wrong.

Good luck ! Frank

On 9 Mrz., 10:26, ramakrishna rkreddy@gmail.com wrote:
 Hi,

 My sincere apologies if i disturbed you.But have few doubts needs to
 be clarified.

 I am planning to develop an NFC app.I am from India in our market no
 NFC enabled Android mobile is available. I bought a USB based NFC
 Reader ACR122.My question is can i integrated that with Android Mobile
 LG Optimus One's or any(Android 2.3 O.S.) USB port ???.

 Is it possible to connect USB devices to Android Mobiles???.If yes is
 there is procedure ??

 Waiting for your reply.

 Thanks in advance.

 Ramakrishna

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

2011-03-10 Thread Eurig Jones
Anyone? PLEASE?

On Mar 10, 1:55 pm, TreKing treking...@gmail.com wrote:
 On Thu, Mar 10, 2011 at 3:12 AM, Eurig Jones eurigjo...@gmail.com wrote:
  What is the hold-up?

 It's Google. Customer service is not something they're exactly known for.

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

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


Re: [android-developers] back button for new canvas

2011-03-10 Thread TreKing
On Tue, Mar 8, 2011 at 5:36 AM, graffiti catalanopi...@gmail.com wrote:

 Is there a code snippet for using the back button for a new paint surface.


Probably not. Particularly since that does not make much sense.


 I am using finger paint and after painting there is no way to create a new
 paint.


What?

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

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

Re: [android-developers] override back button

2011-03-10 Thread TreKing
On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:

  return super.onKeyDown(keyCode, event);


The super method likely executes the default action for the given key
press.
The default action on the back key is to call finish() on the activity.

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

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

Re: [android-developers] override back button

2011-03-10 Thread TreKing
On Thu, Mar 10, 2011 at 3:36 PM, TreKing treking...@gmail.com wrote:

 On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:

  return super.onKeyDown(keyCode, event);


 The super method likely executes the default action for the given key
 press.
 The default action on the back key is to call finish() on the activity.


And on second review of your code, I see you only do that if the key is not
the back key. Don't mind me.

-
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: C2DM for production. Please sort this out Google!

2011-03-10 Thread Trevor Johns
Eurig,
Sorry about that, there's a slight backlog in approving C2DM production 
quota requests at the moment. I've been working to clear it out.

I just approved your request, you should be getting a reply in about 5 
minutes from our ticket system saying your'e good to go. Let me know if 
there's anything else you need.

-- 
Trevor Johns
Developer Programs Engineer, Android
http://developer.android.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] Compare MonkeyImage

2011-03-10 Thread aniruddha dhamal
Thanks Bill,
That really helps a lot.

On Mon, Mar 7, 2011 at 4:09 PM, Bill Napier nap...@google.com wrote:

 Yes.  Our tests are written on top of pyunit (which runs inside
 monkeyrunner).  We use sameAs and an asset.

 For the test cases we are developing, sameAs (with a percentage) is
 sufficient.  This allows things like the time in the status bar and any
 other possible notifications to get ignored.

 If you want to do a more complicated comparison (like being able to handle
 a different background color), you could write your own.
  MonkeyImage.getRawPixel (
 http://developer.android.com/guide/developing/tools/MonkeyImage.html#getRawPixel)
 is provided exactly for that reason.

 Bill

 On Mon, Mar 7, 2011 at 11:55 AM, aniruddha dhamal ani123.dha...@gmail.com
  wrote:

 @bill,
 You mentioned that you compare the subsequent snapshots.
 I have questions:
 Do you use *sameAs* method as an assertion method (like Assert in JUnit)
 to verify pass or failure of the testcase?
 How do you say that this percentage have changed with the next screenshot
 so that testcase is passed?

 Because that wouldn't make my testcases obsolete even if i change the
 background color.

 Thanks a lot for your help.



 On Tue, Feb 15, 2011 at 4:11 PM, Bill Napier nap...@android.com wrote:

 Hi Christopher,

 Being able to load an image into MonkeyRunner from the filesystem
 makes a lot of sense, I don't see how I had missed that.  All the
 test's we've been using MonkeyRunner before only ever wanted to
 compare to subsequent snapshots (to see what has changed).  This looks
 pretty straight forward feature to add, but may take me a couple days
 to get to it.

 Bill

 On Mon, Feb 14, 2011 at 6:14 PM, Christopher M. Judd javaj...@gmail.com
 wrote:
  According to the monkeyrunner documentation, you can compare
  screenshot output to known screenshot for regression testing. How do
  you do this? I see the method sameAs on MonkeyImage but that takes a
  MonkeyImage presumably one saved on disk for regression testing but
  there appears to be no way to load one from disk.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, 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




 --
 Thanks and Regards

 Aniruddha Dhamal
 ani123.dha...@gmail.com

  No matter which direction you start
 Its always against the wind coming  back 

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

2011-03-10 Thread Justin Anderson
Starting with Android 2.0 you also need to implement onBackPressed() in
order to achieve this...
http://developer.android.com/reference/android/app/Activity.html#onBackPressed%28%29

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com wrote:

 On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:

  return super.onKeyDown(keyCode, event);


 The super method likely executes the default action for the given key
 press.
 The default action on the back key is to call finish() on the activity.


 -
 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


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

[android-developers] Best practices for tablet-centric development

2011-03-10 Thread Chris Stewart
I'm beginning to investigate bringing an application to the tablet form
factor, the idea being the tablet is the primary platform of focus.  I
understand that Fragments are the way we should be developing applications
moving forward to accommodate both phones and tablets, but perhaps my
knowledge of them at this point is minimal.  All I really understand about
them to this point is that we can effectively bring a two Activity scenario
from the phone, into a single view with Fragments on 3.0 tablets.  I'm sure
there's more to it, but like I said, my knowledge isn't there yet.

If I wanted to have an optimized view for tablet users, but maintain the
phone user experience, I've always thought that simply maintaining two views
for each Activity, one for a phone and one for a tablet, would be a good way
to go.  You'd then need to maintain two sets of Activities in your code base
(one for each view, for each Activity), but at least you're simply
implementing functionality from your service layer in those instead of
duplicating everything if you happened to go with two completely different
applications.  That was my initial thought at least.  Does this make sense,
or am I way off in my thinking?

I guess what I'm after is understanding how others have approached this,
assuming we're talking about making an optimized view for tablets but also
having a full version for phones.  While I want to target tablets first and
foremost, it would be nice if phones could run the application as well.  I
really want to optimize for the Xoom and devices that come out to compete
with it.  Being able to maintain some functionality for phones would be
nice, but if I simply excluded them and went Xoom only, it wouldn't hurt
my feelings -- just my download numbers. :o

--
Chris Stewart
http://chriswstewart.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] SJXP 2.0 Released - Simple XML Parsing in Android

2011-03-10 Thread Riyad
Simple Java XML Parser (SJXP) 2.0 is released.

SJXP is a very light weight (4 class) abstraction to XML Pull Parsing
on Android (and Java in general) that allows you to use XPath-like
expressions in parsing without needing to worry about while loops,
event handling, try-catch blocks, etc.

A quick example of parsing story links from an RSS feed would look
like this:
=
IRule linkRule = new DefaultRule(Type.CHARACTER, /rss/channel/item/
link) {
@Override
public void handleParsedCharacters(XMLParser parser, String
text, Object userObject) {
// Also store the link, or something equivalently
fancy
}
}

XMLParser parser = new XMLParser(linkRule);
parser.parse(xmlInputStream);
=

You just specify a type for the rule, provide a path in the XML you
want parsed and then override 1 of 3 default no-op handlers and then
you can just sit around waiting for data to show up at your doorstep.
Namespaces are also supported, please see the project page for a lot
more documentation, examples and benchmarks.

Performance + Ease of Use is the big win and the design focus of SJXP.


New and Noteworthy
===
* Memory usage and CPU usage are a magnitude times smaller than what
they were in 1.x series. Spent some quality time with HPROF finding
and removing hotspots.
* A new TAG type of rule is supported if you are just analyzing XML
metrics and don't want the overhead of parsing data out of it.
* Support for user-object passthrough was added to make it easier to
get at data stores inside of the handlers.


Project: http://www.thebuzzmedia.com/software/simple-java-xml-parser-sjxp/
Download: 
https://github.com/downloads/thebuzzmedia/simple-java-xml-parser/sjxp-2.0.zip


SJXP is licensed under the Apache 2 license.


Good or bad feedback is appreciated!

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


Re: [android-developers] Best practices for tablet-centric development

2011-03-10 Thread TreKing
On Thu, Mar 10, 2011 at 3:59 PM, Chris Stewart cstewart...@gmail.comwrote:

 You'd then need to maintain two sets of Activities in your code base (one
 for each view, for each Activity), but at least you're simply implementing
 functionality from your service layer in those instead of duplicating
 everything if you happened to go with two completely different applications.
  That was my initial thought at least.  Does this make sense, or am I way
 off in my thinking?


http://blog.radioactiveyak.com/2011/02/strategies-for-honeycomb-and-backwards.html

Relates to:
http://android-developers.blogspot.com/2011/03/fragments-for-all.html
http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
http://android-developers.blogspot.com/2011/02/best-practices-for-honeycomb-and.html

-
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: NDEF intent filters

2011-03-10 Thread hansamann
I don't think you can filter by well known type, you'll probably have
to filter by tech and then the user would get a intent chooser.

I am also experimenting with Android NFC and was able to write a NFC
Tag with a NdefMessage including a TNF of TNF_MIME_MEDIA, a type of
application/json and some sample json {test:test} as payload.

When I start an activity with the foreground dispatch system, I can
see that the scanned tag is indeed an NDEF message tag, is et to a
TNF_MIME_MEDIA, has the type of apppliation/json and also the rigth
content. But somehow this intent-filter does not work:

activity android:name=.MimeActivity android:label=MIME
   !-- Add a ndef mime filter --
   intent-filter
action android:name=android.nfc.action.NDEF_DISCOVERED/

data android:mimeType=application/* /
/intent-filter
/activity
I also tried application/json but the intent chooser does not offer me
the app.

Any ideas? Could it be a bug?

I wrote an intent filter using a tech list which worked. NDEF
filtering has priority, so this should actually work.

---

When I touch the tag, the defaults tags app comes up and I see a new
tag with record application/json in the list. I assume the tag itself
is ok.

Cheers
Sven


On Mar 9, 12:04 am, Dominik dominik.gru...@fhnw.ch wrote:
 I have defined an intent-filter for NDEF formatted tags as follows

    intent-filter
       action android:name=android.nfc.action.NDEF_DISCOVERED /
       data android:mimeType=text/* /
    /intent-filter

 With the data field, a mime-type can be specified.

 Is it also possible to add additional data to an NDEF intent filter
 for NDEF tags which are not of type TNF_MIME_MEDIA? For example for
 NDEF tags with a well-known type name format, i.e. a NDEF tag of
 type TNF_WELL_KNOWN?

 Or for NDEF tags of type TNF_EXTERNAL_TYPE (i.e. NFC Forum external
 type tags)? Here tye type has fhe form urn:nfc:ext:company.com:app (or
 company.com:app for short)

 - Dominik

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

2011-03-10 Thread LAM_Creations
You do not get paid per impression and CPM varies a lot daily from a few 
cents - $100+ just depends. 

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

2011-03-10 Thread Joseph Earl
What's this like in terms of speed/memory compared to say a
SaxParser ?

On Mar 10, 10:02 pm, Riyad rka...@gmail.com wrote:
 Simple Java XML Parser (SJXP) 2.0 is released.

 SJXP is a very light weight (4 class) abstraction to XML Pull Parsing
 on Android (and Java in general) that allows you to use XPath-like
 expressions in parsing without needing to worry about while loops,
 event handling, try-catch blocks, etc.

 A quick example of parsing story links from an RSS feed would look
 like this:
 =
 IRule linkRule = new DefaultRule(Type.CHARACTER, /rss/channel/item/
 link) {
         @Override
         public void handleParsedCharacters(XMLParser parser, String
 text, Object userObject) {
                 // Also store the link, or something equivalently
 fancy
         }

 }

 XMLParser parser = new XMLParser(linkRule);
 parser.parse(xmlInputStream);
 =

 You just specify a type for the rule, provide a path in the XML you
 want parsed and then override 1 of 3 default no-op handlers and then
 you can just sit around waiting for data to show up at your doorstep.
 Namespaces are also supported, please see the project page for a lot
 more documentation, examples and benchmarks.

 Performance + Ease of Use is the big win and the design focus of SJXP.

 New and Noteworthy
 ===
 * Memory usage and CPU usage are a magnitude times smaller than what
 they were in 1.x series. Spent some quality time with HPROF finding
 and removing hotspots.
 * A new TAG type of rule is supported if you are just analyzing XML
 metrics and don't want the overhead of parsing data out of it.
 * Support for user-object passthrough was added to make it easier to
 get at data stores inside of the handlers.

 Project:http://www.thebuzzmedia.com/software/simple-java-xml-parser-sjxp/
 Download:https://github.com/downloads/thebuzzmedia/simple-java-xml-parser/sjxp...

 SJXP is licensed under the Apache 2 license.

 Good or bad feedback is appreciated!

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


Re: [android-developers] DTD Handlers aren't supported.

2011-03-10 Thread Adam
Thanks for your reply.

qName? local name?? How would I go about doing this with the SAXBuilder? I 
can't see any documentation on changing my URL to use qualified names and 
such. 

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

2011-03-10 Thread Jay
Thank you for your reply. I do know that there is no requirement for
ContentProviders to map URIs one-to-one to tables. To clarify, I am
asking about the case where the ContentProvider and the joined DB are
in separate applications, so the join can't be done within the SQLite
engine. The CursorJoiner class you reference seems to be designed for
exactly what I am talking about, but I would still appreciate any
insights anyone has in making a manual join like this efficient.

Thanks again,
Jay

On Mar 10, 3:07 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Not sure I understand the question: the implementation of a
 ContentProvider doesn't have to map data URIs to one particular table each.

 It's probably the most obvious thing to do, but it doesn't have to be
 this way. You can map URIs to DB queries any way you like, and include
 JOIN's if needed (just use db.rawQuery for this).

 And then there is:

 http://developer.android.com/reference/android/database/CursorJoiner

 if you need to do the join yourself. Which is just a simple helper class
 that makes joins more efficient by requiring that both result sets (left
  right) are sorted.

 -- Kostya

 10.03.2011 22:40, Jay Bloodworth пишет:

  Is there a standard or recommended idiom for doing the equivalent of a
  join of data in a local database versus a content provider?  is there
  anything more efficient than explicitly looping on the result set from
  the local database query and doing individual queries of the content
  provider to grab the related rows?

  Jay

 --
 Kostya Vasilyev --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] ProgressDialog not showing

2011-03-10 Thread David Williams

All,

I have my main class GolfCaddie.java which is called when the app is 
launched.  GolfCaddie.java extends the TabActivity.
I have 3 other classes, one for each tab, and at the moment these 3 
classes just display text or graphics.


In GolfCaddie.java the code is broken down as follows.   Trying to 
simply it but can provide full code if needed:


onCreate
Set up Tabs
Call initApp

onCreateOptionsMenu
Setup options Menu

initApp
ProgressDialog dialog = ProgressDialog.show(GolfCaddie.this, 
,Initializing. Please wait..., true);

Set up some variables
Obtain deviceID
Checks app name, and determines if this is the trial version or the 
full version
Makes a call to my server and returns a JSONObject which is then 
decoded and certain items checked.
If the app is the trial version AND the trial date has passed throw 
up an Alert with a message. Only option is to click OK which closes the App.
Otherwise, if the app is the trial version through up an alert 
showing when the trial expires.

dialog.dismiss();


That's it for now.  Very crude but working.  My problem is that the 
ProgressDialog never shows up, and all the code in initApp is done 
against a black screen, even though the onCreate sets the tab default to 
0, which has a graphical backdrop.  Probably not doing this in the 
correct way, but I was hoping for the ProgressDialog to display (againt 
Tab(0) which has the background image) whilst it performs the code in 
initApp.  The call to my server is quick, but it's possible it can take 
upwards of 10-20 seconds depending upon connectivity and so wanted to at 
least show that something was happening.  Having a black screen is not 
great at all.


Would appreciate any help, and again, I can provide more detailed code 
if needed.


TIA.
--


David Williams
Check out our WebOS mobile phone app for the Palm Pre and Pixi:
http://www.dtw-consulting.com/GolfCaddie Golf Caddie 
http://www.dtw-consulting.com/GolfCaddie | Golf Caddie Forum 
http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ 
http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc.



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

[android-developers] Aapt.exe keeps crashing with ADT 10.

2011-03-10 Thread Nathan
Since ADT 10, I have been trying to get a build to work with Eclipse
for a week now. It is getting extremely frustrating.

I installed Eclipse 3.6.2 as instructed. I installed ADT 10. I
recreated a library project from existing source. I got that to
build.

Now I tried creating a project that depends on said library - also
from existing source.  Won't build because it won't generate the R
file - again.

Now, aapt is crashing frequently.

I keep getting aapt has failed. Windows is searching for a solution
to the problem.

When I check the error log, I get the error below.

Nathan

java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.build.AidlProcessor.doCompileFiles(AidlProcessor.java:
108)
at
com.android.ide.eclipse.adt.internal.build.SourceProcessor.compileFiles(SourceProcessor.java:
242)
at
com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:
476)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
172)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
203)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
258)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
311)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
343)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
144)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

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

2011-03-10 Thread Xavier Ducrohet
The NPE indicates that your project is configured with some source
folders that don't actually exist.

Do you have a gen folder? Eclipse should create it if it's not there,
but it could not be there maybe?

I'll guard against the NPE (https://review.source.android.com/21721 )
but if it's gen that cannot be created something else might be going
on.

Xav

On Thu, Mar 10, 2011 at 4:27 PM, Nathan critter...@crittermap.com wrote:
 Since ADT 10, I have been trying to get a build to work with Eclipse
 for a week now. It is getting extremely frustrating.

 I installed Eclipse 3.6.2 as instructed. I installed ADT 10. I
 recreated a library project from existing source. I got that to
 build.

 Now I tried creating a project that depends on said library - also
 from existing source.  Won't build because it won't generate the R
 file - again.

 Now, aapt is crashing frequently.

 I keep getting aapt has failed. Windows is searching for a solution
 to the problem.

 When I check the error log, I get the error below.

 Nathan

 java.lang.NullPointerException
        at
 com.android.ide.eclipse.adt.internal.build.AidlProcessor.doCompileFiles(AidlProcessor.java:
 108)
        at
 com.android.ide.eclipse.adt.internal.build.SourceProcessor.compileFiles(SourceProcessor.java:
 242)
        at
 com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:
 476)
        at org.eclipse.core.internal.events.BuildManager
 $2.run(BuildManager.java:629)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 172)
        at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 203)
        at org.eclipse.core.internal.events.BuildManager
 $1.run(BuildManager.java:255)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 258)
        at
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
 311)
        at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 343)
        at
 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
 144)
        at
 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
 242)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. 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] Recent Changes text not sticking

2011-03-10 Thread Doug
I updated my app today and noticed that it did not publish or save the 
recent changes text I entered into the form.  One user was actually noticed 
and asked me about it.  Anyone else see the same thing?

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: java.lang.VerifyError error at the time of using gson library on HTC desire

2011-03-10 Thread fadden
On Mar 10, 3:49 am, Manish Garg mannishga...@gmail.com wrote:
 I am getting java.lang.VerifyError error at the time of parsing one
 json response on HTC desire. My application is running fine on other
 device, only on HTC desire I am getting this error.

What versions of Android are they running?

There's generally a large pile of detail in logcat right above the
VerifyError exception log.

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

2011-03-10 Thread netlander
Try using WebView in your activity.

http://developer.android.com/reference/android/webkit/WebView.html

Llies

On Mar 10, 2:24 pm, Raghav Sood raghavs...@gmail.com wrote:
 Hi everyone,

 I am trying to create an app that take an URl as a user input and displays
 the webpage below the textbox. I would like to know how to get and dipslay
 the webpage and how to pass the URL to the webpage method.

 Thanks
 --
 Raghav Soodhttp://www.raghavsood.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] Re: Aapt.exe keeps crashing with ADT 10.

2011-03-10 Thread Nathan
I did have an extra virtual source folder that was an artifact of all
the tweaking I had done to try to get it to work.

I wished I'd taken more notes on what worked.

New Eclipse-New Workspace - Import existing projects got me the
farthest. After multiple iterations, I might have a build.
New Eclipse-Old Workspace failed.
New Eclipse-New Workspace- Projects from existing source failed.

Nathan

On Mar 10, 4:38 pm, Xavier Ducrohet x...@android.com wrote:
 The NPE indicates that your project is configured with some source
 folders that don't actually exist.

 Do you have a gen folder? Eclipse should create it if it's not there,
 but it could not be there maybe?

 I'll guard against the NPE (https://review.source.android.com/21721)
 but if it's gen that cannot be created something else might be going
 on.

 Xav









 On Thu, Mar 10, 2011 at 4:27 PM, Nathan critter...@crittermap.com wrote:
  Since ADT 10, I have been trying to get a build to work with Eclipse
  for a week now. It is getting extremely frustrating.

  I installed Eclipse 3.6.2 as instructed. I installed ADT 10. I
  recreated a library project from existing source. I got that to
  build.

  Now I tried creating a project that depends on said library - also
  from existing source.  Won't build because it won't generate the R
  file - again.

  Now, aapt is crashing frequently.

  I keep getting aapt has failed. Windows is searching for a solution
  to the problem.

  When I check the error log, I get the error below.

  Nathan

  java.lang.NullPointerException
         at
  com.android.ide.eclipse.adt.internal.build.AidlProcessor.doCompileFiles(Aid 
  lProcessor.java:
  108)
         at
  com.android.ide.eclipse.adt.internal.build.SourceProcessor.compileFiles(Sou 
  rceProcessor.java:
  242)
         at
  com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
  d(PreCompilerBuilder.java:
  476)
         at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:629)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  172)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  203)
         at org.eclipse.core.internal.events.BuildManager
  $1.run(BuildManager.java:255)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  258)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j 
  ava:
  311)
         at
  org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
  343)
         at
  org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
  144)
         at
  org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
  242)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. 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: Fragment Support forward compatibility?

2011-03-10 Thread davemac
There are some subtle differences between the Fragment compatability
library and the native Fragment support in Android 3.0. For example,
the setCustomAnimations() method on FragmentTransaction can use the
new ObjectAnimator in Android 3.0 (see android.R.animator), but must
use the older anim transitions pre-3.0 (see android.R.anim).

- dave

On Mar 9, 7:54 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Mar 7, 2011 at 5:35 PM, Neal Sanche thorins...@gmail.com wrote:
  I guess I just wanted to ask if, when this compatibility library was
  developed, the design intent was to allow applications to run on
  Android 1.6 - Android 3.0 inclusive without needing to change the
  code?

 Yes, that was the intent.

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

 Android Training Worldwide:http://commonsware.com/training

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

2011-03-10 Thread Colin
Thanks, but how do I implement onBackPressed?  My thread extending
activity says there is no method to override.

On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com wrote:
 Starting with Android 2.0 you also need to implement onBackPressed() in
 order to achieve 
 this...http://developer.android.com/reference/android/app/Activity.html#onBa...

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com wrote:
  On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:

   return super.onKeyDown(keyCode, event);

  The super method likely executes the default action for the given key
  press.
  The default action on the back key is to call finish() on the activity.

  -
  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



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

2011-03-10 Thread Miguel Morales
They just released the static library for 1.6+ devices so that they can use
fragments too.
This is freaking awesome, I can't wait to start playing with it.  There is
just so much new stuff there's no time to play with it all.

On Thu, Mar 10, 2011 at 4:57 PM, davemac davemac...@gmail.com wrote:

 There are some subtle differences between the Fragment compatability
 library and the native Fragment support in Android 3.0. For example,
 the setCustomAnimations() method on FragmentTransaction can use the
 new ObjectAnimator in Android 3.0 (see android.R.animator), but must
 use the older anim transitions pre-3.0 (see android.R.anim).

 - dave

 On Mar 9, 7:54 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Mon, Mar 7, 2011 at 5:35 PM, Neal Sanche thorins...@gmail.com
 wrote:
   I guess I just wanted to ask if, when this compatibility library was
   developed, the design intent was to allow applications to run on
   Android 1.6 - Android 3.0 inclusive without needing to change the
   code?
 
  Yes, that was the intent.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  Android Training Worldwide:http://commonsware.com/training

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx

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

2011-03-10 Thread Miguel Morales
Well, I *think* you're using it wrong.
Basically, onKeyDown allows you to override the default key behavior for
whatever key is pressed.  So, if you return 'true' it means that you have
handled the behavior.

So, you have to provide your own code to navigate your activities/view if
you are overriding.
So, detect if you are in the main menu and that's the only time you'll
return super.onKeyDown() (basically let it handle the keydown itself.)

If it is pressed somewhere else, you have to return true and close the menu
or whatever yourself.

On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:

 Thanks, but how do I implement onBackPressed?  My thread extending
 activity says there is no method to override.

 On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com wrote:
  Starting with Android 2.0 you also need to implement onBackPressed() in
  order to achieve this...
 http://developer.android.com/reference/android/app/Activity.html#onBa...
 
  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
  On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com wrote:
   On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:
 
return super.onKeyDown(keyCode, event);
 
   The super method likely executes the default action for the given key
   press.
   The default action on the back key is to call finish() on the activity.
 
  
 -
   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
 
 

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx

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

2011-03-10 Thread Dianne Hackborn
Note that in the current static library animations are broken.  I have a fix
for this that will be available in a later update.

On Thu, Mar 10, 2011 at 4:57 PM, davemac davemac...@gmail.com wrote:

 There are some subtle differences between the Fragment compatability
 library and the native Fragment support in Android 3.0. For example,
 the setCustomAnimations() method on FragmentTransaction can use the
 new ObjectAnimator in Android 3.0 (see android.R.animator), but must
 use the older anim transitions pre-3.0 (see android.R.anim).

 - dave

 On Mar 9, 7:54 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Mon, Mar 7, 2011 at 5:35 PM, Neal Sanche thorins...@gmail.com
 wrote:
   I guess I just wanted to ask if, when this compatibility library was
   developed, the design intent was to allow applications to run on
   Android 1.6 - Android 3.0 inclusive without needing to change the
   code?
 
  Yes, that was the intent.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  Android Training Worldwide:http://commonsware.com/training

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




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

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

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

Re: [android-developers] Re: Joins vs. Content provider

2011-03-10 Thread Dianne Hackborn
The important thing is to have the results returned in a way that the data
doesn't need to all be loaded up-front in order to do the join, like
CursorJoiner does.  This has significant limitations on how you can do the
joins.

On Thu, Mar 10, 2011 at 4:04 PM, Jay johnabloodwor...@gmail.com wrote:

 Thank you for your reply. I do know that there is no requirement for
 ContentProviders to map URIs one-to-one to tables. To clarify, I am
 asking about the case where the ContentProvider and the joined DB are
 in separate applications, so the join can't be done within the SQLite
 engine. The CursorJoiner class you reference seems to be designed for
 exactly what I am talking about, but I would still appreciate any
 insights anyone has in making a manual join like this efficient.

 Thanks again,
 Jay

 On Mar 10, 3:07 pm, Kostya Vasilyev kmans...@gmail.com wrote:
  Not sure I understand the question: the implementation of a
  ContentProvider doesn't have to map data URIs to one particular table
 each.
 
  It's probably the most obvious thing to do, but it doesn't have to be
  this way. You can map URIs to DB queries any way you like, and include
  JOIN's if needed (just use db.rawQuery for this).
 
  And then there is:
 
  http://developer.android.com/reference/android/database/CursorJoiner
 
  if you need to do the join yourself. Which is just a simple helper class
  that makes joins more efficient by requiring that both result sets (left
   right) are sorted.
 
  -- Kostya
 
  10.03.2011 22:40, Jay Bloodworth пишет:
 
   Is there a standard or recommended idiom for doing the equivalent of a
   join of data in a local database versus a content provider?  is there
   anything more efficient than explicitly looping on the result set from
   the local database query and doing individual queries of the content
   provider to grab the related rows?
 
   Jay
 
  --
  Kostya Vasilyev --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




-- 
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: SJXP 2.0 Released - Simple XML Parsing in Android

2011-03-10 Thread Riyad
Joseph,

It is almost identical in performance metrics (CPU and memory) to bare
XML pull parsing on Android.

About 6 months ago I was looking at different parsing techniques,
assuming that SAX was the fastest, but I actually found pull-parsing
to be the fastest. Here are some STAX-spec compliant parsing numbers:
http://www.xml.com/lpt/a/1702

and specifically some XPP3 vs SAX numbers:
http://www.ximpleware.com/benchmark1.html

From what I understand of the Android platform, XPP3/MXP1 was chosen
as the implementation backing the org.xmlpull APIs and includes heavy
customizations for parsing the binary-XML format used a lot by
Android. So any of the XPP3 numbers you see will be the ones to
identify with.

SJXP is the result of months of me working with hand-written STAX
parsers for parsing real-world, spec-molesting feeds in RSS1, 2, ATOM
and RDF format. Just saw an opportunity to simplify the entire XML
parsing approach while maintaining the tight performance of pull
parsing. I thought others might find it handy.

Best,
Riyad

On Mar 10, 4:35 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 What's this like in terms of speed/memory compared to say a
 SaxParser ?

 On Mar 10, 10:02 pm, Riyad rka...@gmail.com wrote:







  Simple Java XML Parser (SJXP) 2.0 is released.

  SJXP is a very light weight (4 class) abstraction to XML Pull Parsing
  on Android (and Java in general) that allows you to use XPath-like
  expressions in parsing without needing to worry about while loops,
  event handling, try-catch blocks, etc.

  A quick example of parsing story links from an RSS feed would look
  like this:
  =
  IRule linkRule = new DefaultRule(Type.CHARACTER, /rss/channel/item/
  link) {
          @Override
          public void handleParsedCharacters(XMLParser parser, String
  text, Object userObject) {
                  // Also store the link, or something equivalently
  fancy
          }

  }

  XMLParser parser = new XMLParser(linkRule);
  parser.parse(xmlInputStream);
  =

  You just specify a type for the rule, provide a path in the XML you
  want parsed and then override 1 of 3 default no-op handlers and then
  you can just sit around waiting for data to show up at your doorstep.
  Namespaces are also supported, please see the project page for a lot
  more documentation, examples and benchmarks.

  Performance + Ease of Use is the big win and the design focus of SJXP.

  New and Noteworthy
  ===
  * Memory usage and CPU usage are a magnitude times smaller than what
  they were in 1.x series. Spent some quality time with HPROF finding
  and removing hotspots.
  * A new TAG type of rule is supported if you are just analyzing XML
  metrics and don't want the overhead of parsing data out of it.
  * Support for user-object passthrough was added to make it easier to
  get at data stores inside of the handlers.

  Project:http://www.thebuzzmedia.com/software/simple-java-xml-parser-sjxp/
  Download:https://github.com/downloads/thebuzzmedia/simple-java-xml-parser/sjxp...

  SJXP is licensed under the Apache 2 license.

  Good or bad feedback is appreciated!

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


[android-developers] Re: Best practices for tablet-centric development

2011-03-10 Thread Nathan
On Mar 10, 1:59 pm, Chris Stewart cstewart...@gmail.com wrote:
I've always thought that simply maintaining two views
 for each Activity, one for a phone and one for a tablet, would be a good way
 to go.  You'd then need to maintain two sets of Activities in your code base
 (one for each view, for each Activity), but at least you're simply

Simple?

I admire you for having such a thin, easily maintainable Activity. My
main activity is 3000 lines of code. Sure, it could and should be
less, but I see it doing a lot of things that should be done in an
activity - findingviews by id, responding to events, changing the
state of other views. There are lots of views in the hierarchy, and
onyl the activity can see them all.

For me, maintaining two activities would not be small.

If the fragements API is usable back to 1.6, Is your intention just to
maintain compatibility with 1.5? All that work for 3% of users when
you are primarily targeting tablets?

Nathan

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

2011-03-10 Thread Colin
The super return would only be for a key besides down.  I believe
Justin is right with the onBackPressed(), I'm just not sure where or
how to do that.

On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com wrote:
 Well, I *think* you're using it wrong.
 Basically, onKeyDown allows you to override the default key behavior for
 whatever key is pressed.  So, if you return 'true' it means that you have
 handled the behavior.

 So, you have to provide your own code to navigate your activities/view if
 you are overriding.
 So, detect if you are in the main menu and that's the only time you'll
 return super.onKeyDown() (basically let it handle the keydown itself.)

 If it is pressed somewhere else, you have to return true and close the menu
 or whatever yourself.



 On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:
  Thanks, but how do I implement onBackPressed?  My thread extending
  activity says there is no method to override.

  On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com wrote:
   Starting with Android 2.0 you also need to implement onBackPressed() in
   order to achieve this...
 http://developer.android.com/reference/android/app/Activity.html#onBa...

   Thanks,
   Justin Anderson
   MagouyaWare Developerhttp://sites.google.com/site/magouyaware

   On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com wrote:
On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:

 return super.onKeyDown(keyCode, event);

The super method likely executes the default action for the given key
press.
The default action on the back key is to call finish() on the activity.

  -
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

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

 --
 ~ Jeremiah:9:23-24
 Android 2D MMORPG:http://solrpg.com/http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] drop down list with id/value pair

2011-03-10 Thread TreKing
On Tue, Mar 8, 2011 at 1:19 AM, Saurabh Goyal sggo...@gmail.com wrote:

 it show id is 0 when Select Mercury But I want it show 1 as set in id.
 Please help me out.


Well if it's just going to be sequential like that, just use the item's
position.

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

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

Re: [android-developers] Re: override back button

2011-03-10 Thread Miguel Morales
Well like he said you must be using 2.0+  what's your target sdk set to?
Other than that, you're probably returning false which means your conditions
aren't being met and you're not returning true.  You might want to add some
logging or a breakpoint to make sure you even get to that statement.

On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:

 The super return would only be for a key besides down.  I believe
 Justin is right with the onBackPressed(), I'm just not sure where or
 how to do that.

 On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com wrote:
  Well, I *think* you're using it wrong.
  Basically, onKeyDown allows you to override the default key behavior for
  whatever key is pressed.  So, if you return 'true' it means that you have
  handled the behavior.
 
  So, you have to provide your own code to navigate your activities/view if
  you are overriding.
  So, detect if you are in the main menu and that's the only time you'll
  return super.onKeyDown() (basically let it handle the keydown itself.)
 
  If it is pressed somewhere else, you have to return true and close the
 menu
  or whatever yourself.
 
 
 
  On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:
   Thanks, but how do I implement onBackPressed?  My thread extending
   activity says there is no method to override.
 
   On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com wrote:
Starting with Android 2.0 you also need to implement onBackPressed()
 in
order to achieve this...
  http://developer.android.com/reference/android/app/Activity.html#onBa.
 ..
 
Thanks,
Justin Anderson
MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com
 wrote:
 On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:
 
  return super.onKeyDown(keyCode, event);
 
 The super method likely executes the default action for the given
 key
 press.
 The default action on the back key is to call finish() on the
 activity.
 
  
 -
 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
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  ~ Jeremiah:9:23-24
  Android 2D MMORPG:
 http://solrpg.com/http://www.youtube.com/user/revoltingx

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Creating app to fetch data from internet and customizing display for mobile device

2011-03-10 Thread TreKing
On Tue, Mar 8, 2011 at 12:31 PM, Steve ranjith2...@gmail.com wrote:

 Could any one of you share any tips or any other ways to implement this?


http://developer.android.com/guide/webapps/index.html ?

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

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

Re: [android-developers] Re: May i join the group?

2011-03-10 Thread yy xuye
Yes, i've joined it.
Tks!
BR.
On Fri, Mar 11, 2011 at 1:59 AM, Indicator Veritatis mej1...@yahoo.comwrote:

 For which he has my condolences;)

 But seriously now: we should welcome newcomers to the group with a
 generous invitation to become familiar with
 http://www.catb.org/~esr/faqs/smart-questions.html
 as a most excellent guide to how to actually get real help from the
 group.

 On Mar 10, 4:53 am, DanH danhi...@ieee.org wrote:
  I think you already have.
 
  On Mar 9, 5:37 am, yy xuye xueyy2...@gmail.com wrote: Dear sir,
   I'm a developer from China.
   For the current, i have some problem about android development. So i
   hope to get some help.
   May i join the group?
   Tks.
   Best regards.

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


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

2011-03-10 Thread Colin
My target is 2.1, can anyone direct me to an example implementation of
onBackPressed?

On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com wrote:
 Well like he said you must be using 2.0+  what's your target sdk set to?
 Other than that, you're probably returning false which means your conditions
 aren't being met and you're not returning true.  You might want to add some
 logging or a breakpoint to make sure you even get to that statement.



 On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:
  The super return would only be for a key besides down.  I believe
  Justin is right with the onBackPressed(), I'm just not sure where or
  how to do that.

  On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com wrote:
   Well, I *think* you're using it wrong.
   Basically, onKeyDown allows you to override the default key behavior for
   whatever key is pressed.  So, if you return 'true' it means that you have
   handled the behavior.

   So, you have to provide your own code to navigate your activities/view if
   you are overriding.
   So, detect if you are in the main menu and that's the only time you'll
   return super.onKeyDown() (basically let it handle the keydown itself.)

   If it is pressed somewhere else, you have to return true and close the
  menu
   or whatever yourself.

   On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:
Thanks, but how do I implement onBackPressed?  My thread extending
activity says there is no method to override.

On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com wrote:
 Starting with Android 2.0 you also need to implement onBackPressed()
  in
 order to achieve this...
   http://developer.android.com/reference/android/app/Activity.html#onBa.
  ..

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com
  wrote:
  On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com wrote:

   return super.onKeyDown(keyCode, event);

  The super method likely executes the default action for the given
  key
  press.
  The default action on the back key is to call finish() on the
  activity.

  -
  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

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

   --
   ~ Jeremiah:9:23-24
   Android 2D MMORPG:
 http://solrpg.com/http://www.youtube.com/user/revoltingx

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

 --
 ~ Jeremiah:9:23-24
 Android 2D MMORPG:http://solrpg.com/http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Parser avec Gson des objets de classe qui extends OverlayItem

2011-03-10 Thread TreKing
My French is rusty, but:

Nous parlons Englais ici. Oui?

-
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: Eclipse wont regenerate files since downloading the 2.3 SDK

2011-03-10 Thread Ed Burnette
Sometimes I have to edit something innocuous in the xml file and in
a .java file and save it (with build automatically set) to get a clean
build. Project  Clean usually works but when it doesn't, the modify-
and-save trick usually works. Changing the Android build target
temporarily might jostle something loose too. I really wish all the
little oddities like this could be ironed out but I have no time to
try and fix it myself.

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

2011-03-10 Thread Nikolay Elenkov
On Fri, Mar 11, 2011 at 12:19 AM, Justin Anderson magouyaw...@gmail.com wrote:
 Just another proof that the current scheme is broken.

 The current scheme is not broken.  It was intentionally designed the way it
 is for security purposes.

Blessed are they who believe without seeing.

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

2011-03-10 Thread Miguel Morales
Ah, yeah then seems that onBackPressed needs to be called.  I've never used
it myself so I can't be of much help there.


On Thu, Mar 10, 2011 at 5:44 PM, Colin colin...@gmail.com wrote:

 My target is 2.1, can anyone direct me to an example implementation of
 onBackPressed?

 On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com wrote:
  Well like he said you must be using 2.0+  what's your target sdk set to?
  Other than that, you're probably returning false which means your
 conditions
  aren't being met and you're not returning true.  You might want to add
 some
  logging or a breakpoint to make sure you even get to that statement.
 
 
 
  On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:
   The super return would only be for a key besides down.  I believe
   Justin is right with the onBackPressed(), I'm just not sure where or
   how to do that.
 
   On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com wrote:
Well, I *think* you're using it wrong.
Basically, onKeyDown allows you to override the default key behavior
 for
whatever key is pressed.  So, if you return 'true' it means that you
 have
handled the behavior.
 
So, you have to provide your own code to navigate your
 activities/view if
you are overriding.
So, detect if you are in the main menu and that's the only time
 you'll
return super.onKeyDown() (basically let it handle the keydown
 itself.)
 
If it is pressed somewhere else, you have to return true and close
 the
   menu
or whatever yourself.
 
On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:
 Thanks, but how do I implement onBackPressed?  My thread extending
 activity says there is no method to override.
 
 On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com wrote:
  Starting with Android 2.0 you also need to implement
 onBackPressed()
   in
  order to achieve this...

 http://developer.android.com/reference/android/app/Activity.html#onBa.
   ..
 
  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
  On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com
   wrote:
   On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com
 wrote:
 
return super.onKeyDown(keyCode, event);
 
   The super method likely executes the default action for the
 given
   key
   press.
   The default action on the back key is to call finish() on the
   activity.
 
  
 -
   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
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
--
~ Jeremiah:9:23-24
Android 2D MMORPG:
  http://solrpg.com/http://www.youtube.com/user/revoltingx
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  ~ Jeremiah:9:23-24
  Android 2D MMORPG:
 http://solrpg.com/http://www.youtube.com/user/revoltingx

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx

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

[android-developers] Re: Fragment Support forward compatibility?

2011-03-10 Thread Ed Burnette
Do you think this compatibility library could be used for more than
just fragments?

For example, action bars, touch event changes, and so on? It would be
nice to cut down on the use of reflection and version checks when new
APIs are added that you'd like to use but still want to run on older
versions of Android.

On Mar 10, 8:14 pm, Dianne Hackborn hack...@android.com wrote:
 Note that in the current static library animations are broken.  I have a fix
 for this that will be available in a later update.



 On Thu, Mar 10, 2011 at 4:57 PM, davemac davemac...@gmail.com wrote:
  There are some subtle differences between the Fragment compatability
  library and the native Fragment support in Android 3.0. For example,
  the setCustomAnimations() method on FragmentTransaction can use the
  new ObjectAnimator in Android 3.0 (see android.R.animator), but must
  use the older anim transitions pre-3.0 (see android.R.anim).

  - dave

  On Mar 9, 7:54 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Mon, Mar 7, 2011 at 5:35 PM, Neal Sanche thorins...@gmail.com
  wrote:
I guess I just wanted to ask if, when this compatibility library was
developed, the design intent was to allow applications to run on
Android 1.6 - Android 3.0 inclusive without needing to change the
code?

   Yes, that was the intent.

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

   Android Training Worldwide:http://commonsware.com/training

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

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

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

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


[android-developers] Force close after adding resources and textview

2011-03-10 Thread Mark Sharpley
I was playing around with the galleryview and image switcher, and I decided
to implement a textview that describes my images as I scroll through them. I
created a string array, and added a text view in my layout xml. I then added
the string and textview to my code. I thought I could reuse the position int
from the images to get the right string from my array. However, this
addition causes my app to force close when I try to run it.

I have a feeling that I have totally butchered my working java code and you
may very well cringe at what you are about to see. Apologies. I am learning
:)

If anyone could help me out, I would be most grateful. I have attached my
java code, some probably not relevant xml and my logcat.

Regards,

Mark (Java Abuser)

package com.markopolo.test;

import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.TextView;
import android.widget.Gallery.LayoutParams;
import android.widget.ViewSwitcher.ViewFactory;
import android.widget.ImageSwitcher;
import android.widget.ImageView;
import android.widget.AdapterView.OnItemClickListener;

public class MainMenuActivity extends Activity
implements ViewFactory

{
//---the images to display--
Integer[] imageIDs = {
R.drawable.swan1,
R.drawable.swan2,
R.drawable.swan3,
R.drawable.swan4,
R.drawable.swan5,
R.drawable.swan6  };

Resources res = getResources();
String[] swans = res.getStringArray(R.array.swan);

private ImageSwitcher imageSwitcher;

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.displayview);

imageSwitcher = (ImageSwitcher) findViewById(R.id.switcher1);
imageSwitcher.setFactory(this);
imageSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_in));
imageSwitcher.setOutAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_out));

Gallery gallery = (Gallery) findViewById(R.id.gallery1);
gallery.setAdapter(new ImageAdapter(this));
gallery.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView parent,
View v, int position, long id)
{
 imageSwitcher.setImageResource(imageIDs[position]);

   }
});
}

public View makeView()
{
ImageView imageView = new ImageView(this);
imageView.setBackgroundColor(0xFF00);
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setLayoutParams(new
ImageSwitcher.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT));
return imageView;
}

public class ImageAdapter extends BaseAdapter
{
private Context context;
private int itemBackground;

public ImageAdapter(Context c)
{
context = c;

//---setting the style---
TypedArray a = obtainStyledAttributes(R.styleable.Gallery1);
itemBackground = a.getResourceId(
R.styleable.Gallery1_android_galleryItemBackground, 0);
a.recycle();
}

//---returns the number of images---
public int getCount()
{
return imageIDs.length;
}

//---returns the ID of an item---
public Object getItem(int position)
{
return position;
}

public long getItemId(int position)
{
return position;
}


//---returns an ImageView and TextView view---
public View getView(int position, View convertView, ViewGroup
parent)
{
ImageView imageView = new ImageView(context);
imageView.setImageResource(imageIDs[position]);
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setLayoutParams(new Gallery.LayoutParams(150, 120));
imageView.setBackgroundResource(itemBackground);

TextView textview = (TextView) findViewById(R.id.textview1);
textview.setText(swans[position]);

return imageView;

}
}
}

And arrays.xml:

?xml version=1.0 encoding=utf-8?
resources
string-array
name=swan
itemswan_1/item
itemswan_2/item
itemswan_3/item
itemswan_4/item
itemswan_5/item
itemswan_6/item
itemswan_7/item
/string-array
/resources

My layout xml:

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

Re: [android-developers] Re: Fragment Support forward compatibility?

2011-03-10 Thread Dianne Hackborn
It already has Loader, a version of CursorAdapter from HC with newer
features that work better with loaders, some small helpers for using new
menu features when running on HC, etc.  Yes it will be a place for these
kinds of helpers for dealing with different platform versions, where we have
currently been writing about them in blog posts and samples in ApiDemos.

There is no plan to have something like action bar in it, though, because
that has a significant UI element (with lots of resources that go with it),
and some tighter bindings into 3.0 framework due to new features to things
like the menu APIs that it relies on.

I also want to be careful about this becoming a big dumping ground of random
stuff people throw in there.  You can see the result of that here:
http://android.git.kernel.org/?p=platform/frameworks/ex.git;a=summary

We plan on managing this more as part of the core platform (maybe even have
it integrated into the platform java docs).  Also if it starts to become
large, that will require developers to use proguard to strip their app if
they are making use of parts of it.

On Thu, Mar 10, 2011 at 6:15 PM, Ed Burnette ed.burne...@gmail.com wrote:

 Do you think this compatibility library could be used for more than
 just fragments?

 For example, action bars, touch event changes, and so on? It would be
 nice to cut down on the use of reflection and version checks when new
 APIs are added that you'd like to use but still want to run on older
 versions of Android.

 On Mar 10, 8:14 pm, Dianne Hackborn hack...@android.com wrote:
  Note that in the current static library animations are broken.  I have a
 fix
  for this that will be available in a later update.
 
 
 
  On Thu, Mar 10, 2011 at 4:57 PM, davemac davemac...@gmail.com wrote:
   There are some subtle differences between the Fragment compatability
   library and the native Fragment support in Android 3.0. For example,
   the setCustomAnimations() method on FragmentTransaction can use the
   new ObjectAnimator in Android 3.0 (see android.R.animator), but must
   use the older anim transitions pre-3.0 (see android.R.anim).
 
   - dave
 
   On Mar 9, 7:54 pm, Mark Murphy mmur...@commonsware.com wrote:
On Mon, Mar 7, 2011 at 5:35 PM, Neal Sanche thorins...@gmail.com
   wrote:
 I guess I just wanted to ask if, when this compatibility library
 was
 developed, the design intent was to allow applications to run on
 Android 1.6 - Android 3.0 inclusive without needing to change the
 code?
 
Yes, that was the intent.
 
--
Mark Murphy (a Commons Guy)http://commonsware.com|
  
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
Android Training Worldwide:http://commonsware.com/training
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




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

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

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

Re: [android-developers] Force close after adding resources and textview

2011-03-10 Thread TreKing
On Thu, Mar 10, 2011 at 8:25 PM, Mark Sharpley m.c.sharp...@gmail.comwrote:

 However, this addition causes my app to force close when I try to run it.


03-11 02:00:59.288: ERROR/AndroidRuntime(12636): Caused by:
java.lang.NullPointerException
03-11 02:00:59.288: ERROR/AndroidRuntime(12636): at
android.content.ContextWrapper.getResources(ContextWrapper.java:80)
03-11 02:00:59.288: ERROR/AndroidRuntime(12636): at
com.markopolo.test.MainMenuActivity.init(MainMenuActivity.java:36)

What's at line 36?

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

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

Re: [android-developers] ProgressDialog not showing

2011-03-10 Thread TreKing
On Thu, Mar 10, 2011 at 6:12 PM, David Williams 
dwilli...@dtw-consulting.com wrote:

 initApp
 ProgressDialog dialog = ProgressDialog.show(GolfCaddie.this,
 ,Initializing. Please wait..., true);
 Set up some variables


You're not running a background thread, are you?

-
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] Force close after adding resources and textview

2011-03-10 Thread Mark Sharpley
Line 36:


Resources res = getResources();

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

[android-developers] Binding to a service from within a ContentProvider - when to unbind?

2011-03-10 Thread Mark Carter
ContentProviders are instantiated at system startup and remain alive until 
the system shuts down.

I have a ContentProvider that binds to one of my (local) services (which is 
most likely not already running) and so would like to unbind at some 
appropriate time. If unbindService is not called then the Service will 
remain running until the system shuts down. I assume this is bad.

When the service stops, appropriate db connections are closed.

The question is, when to call unbindService()? 

My initial thoughts are to wrap any returned Cursors to monitor when all 
returned Cursors have been closed.

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

2011-03-10 Thread TreKing

 Line 36:

 Resources res = getResources();


(Copying from the new thread - not sure why that happened).

Did you mean to call getResources(); *outside* of onCreate?

-
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: Eclipse wont regenerate files since downloading the 2.3 SDK

2011-03-10 Thread Zsolt Vasvari
Yes, this is exactly what I have to do.  I don't think it's anything
on our side of things, but who knows.

On Mar 11, 9:51 am, Ed Burnette ed.burne...@gmail.com wrote:
 Sometimes I have to edit something innocuous in the xml file and in
 a .java file and save it (with build automatically set) to get a clean
 build. Project  Clean usually works but when it doesn't, the modify-
 and-save trick usually works. Changing the Android build target
 temporarily might jostle something loose too. I really wish all the
 little oddities like this could be ironed out but I have no time to
 try and fix it myself.

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

2011-03-10 Thread Justin Anderson
@Override
public void onBackPressed()
{
//Do whatever you need to in here...
//To quit call super.onBackPressed() or call finish()
}

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 10, 2011 at 7:11 PM, Miguel Morales therevolti...@gmail.comwrote:

 Ah, yeah then seems that onBackPressed needs to be called.  I've never used
 it myself so I can't be of much help there.


 On Thu, Mar 10, 2011 at 5:44 PM, Colin colin...@gmail.com wrote:

 My target is 2.1, can anyone direct me to an example implementation of
 onBackPressed?

 On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com wrote:
  Well like he said you must be using 2.0+  what's your target sdk set to?
  Other than that, you're probably returning false which means your
 conditions
  aren't being met and you're not returning true.  You might want to add
 some
  logging or a breakpoint to make sure you even get to that statement.
 
 
 
  On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:
   The super return would only be for a key besides down.  I believe
   Justin is right with the onBackPressed(), I'm just not sure where or
   how to do that.
 
   On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com wrote:
Well, I *think* you're using it wrong.
Basically, onKeyDown allows you to override the default key behavior
 for
whatever key is pressed.  So, if you return 'true' it means that you
 have
handled the behavior.
 
So, you have to provide your own code to navigate your
 activities/view if
you are overriding.
So, detect if you are in the main menu and that's the only time
 you'll
return super.onKeyDown() (basically let it handle the keydown
 itself.)
 
If it is pressed somewhere else, you have to return true and close
 the
   menu
or whatever yourself.
 
On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:
 Thanks, but how do I implement onBackPressed?  My thread extending
 activity says there is no method to override.
 
 On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com
 wrote:
  Starting with Android 2.0 you also need to implement
 onBackPressed()
   in
  order to achieve this...

 http://developer.android.com/reference/android/app/Activity.html#onBa.
   ..
 
  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
  On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com
   wrote:
   On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com
 wrote:
 
return super.onKeyDown(keyCode, event);
 
   The super method likely executes the default action for the
 given
   key
   press.
   The default action on the back key is to call finish() on the
   activity.
 
  
 -
   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
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
--
~ Jeremiah:9:23-24
Android 2D MMORPG:
  http://solrpg.com/http://www.youtube.com/user/revoltingx
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  ~ Jeremiah:9:23-24
  Android 2D MMORPG:
 http://solrpg.com/http://www.youtube.com/user/revoltingx

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




 --
 ~ Jeremiah:9:23-24
 Android 2D MMORPG: http://solrpg.com/
 http://www.youtube.com/user/revoltingx

 --
 You received 

[android-developers] Re: override back button

2011-03-10 Thread Colin
Thanks.  I tried this but my class extending activity but it doesn't
have a method to Override.  Not sure what I am doing wrong or where
this would go.  The setup of my project came from this (http://
mobile.dzone.com/articles/beginning-android-game) if anyone can look.

On Mar 10, 11:12 pm, Justin Anderson magouyaw...@gmail.com wrote:
 @Override
 public void onBackPressed()
 {
     //Do whatever you need to in here...
     //To quit call super.onBackPressed() or call finish()

 }

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Thu, Mar 10, 2011 at 7:11 PM, Miguel Morales 
 therevolti...@gmail.comwrote:

  Ah, yeah then seems that onBackPressed needs to be called.  I've never used
  it myself so I can't be of much help there.

  On Thu, Mar 10, 2011 at 5:44 PM, Colin colin...@gmail.com wrote:

  My target is 2.1, can anyone direct me to an example implementation of
  onBackPressed?

  On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com wrote:
   Well like he said you must be using 2.0+  what's your target sdk set to?
   Other than that, you're probably returning false which means your
  conditions
   aren't being met and you're not returning true.  You might want to add
  some
   logging or a breakpoint to make sure you even get to that statement.

   On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:
The super return would only be for a key besides down.  I believe
Justin is right with the onBackPressed(), I'm just not sure where or
how to do that.

On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com wrote:
 Well, I *think* you're using it wrong.
 Basically, onKeyDown allows you to override the default key behavior
  for
 whatever key is pressed.  So, if you return 'true' it means that you
  have
 handled the behavior.

 So, you have to provide your own code to navigate your
  activities/view if
 you are overriding.
 So, detect if you are in the main menu and that's the only time
  you'll
 return super.onKeyDown() (basically let it handle the keydown
  itself.)

 If it is pressed somewhere else, you have to return true and close
  the
menu
 or whatever yourself.

 On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com wrote:
  Thanks, but how do I implement onBackPressed?  My thread extending
  activity says there is no method to override.

  On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com
  wrote:
   Starting with Android 2.0 you also need to implement
  onBackPressed()
in
   order to achieve this...

 http://developer.android.com/reference/android/app/Activity.html#onBa.
..

   Thanks,
   Justin Anderson
   MagouyaWare Developerhttp://sites.google.com/site/magouyaware

   On Thu, Mar 10, 2011 at 2:36 PM, TreKing treking...@gmail.com
wrote:
On Thu, Mar 10, 2011 at 1:54 PM, Colin colin...@gmail.com
  wrote:

 return super.onKeyDown(keyCode, event);

The super method likely executes the default action for the
  given
key
press.
The default action on the back key is to call finish() on the
activity.

  -
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

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

 --
 ~ Jeremiah:9:23-24
 Android 2D MMORPG:
   http://solrpg.com/http://www.youtube.com/user/revoltingx

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

   --
   ~ Jeremiah:9:23-24
   Android 2D MMORPG:
 http://solrpg.com/http://www.youtube.com/user/revoltingx

  --
  You received this message because you are subscribed to the Google
  

Re: [android-developers] Re: override back button

2011-03-10 Thread Justin Anderson
So you put the onBackPressed() method in the AndroidTutorial class?


Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 10, 2011 at 9:49 PM, Colin colin...@gmail.com wrote:

 Thanks.  I tried this but my class extending activity but it doesn't
 have a method to Override.  Not sure what I am doing wrong or where
 this would go.  The setup of my project came from this (http://
 mobile.dzone.com/articles/beginning-android-game) if anyone can look.

 On Mar 10, 11:12 pm, Justin Anderson magouyaw...@gmail.com wrote:
  @Override
  public void onBackPressed()
  {
  //Do whatever you need to in here...
  //To quit call super.onBackPressed() or call finish()
 
  }
 
  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
  On Thu, Mar 10, 2011 at 7:11 PM, Miguel Morales therevolti...@gmail.com
 wrote:
 
   Ah, yeah then seems that onBackPressed needs to be called.  I've never
 used
   it myself so I can't be of much help there.
 
   On Thu, Mar 10, 2011 at 5:44 PM, Colin colin...@gmail.com wrote:
 
   My target is 2.1, can anyone direct me to an example implementation of
   onBackPressed?
 
   On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com wrote:
Well like he said you must be using 2.0+  what's your target sdk set
 to?
Other than that, you're probably returning false which means your
   conditions
aren't being met and you're not returning true.  You might want to
 add
   some
logging or a breakpoint to make sure you even get to that statement.
 
On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:
 The super return would only be for a key besides down.  I believe
 Justin is right with the onBackPressed(), I'm just not sure where
 or
 how to do that.
 
 On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com
 wrote:
  Well, I *think* you're using it wrong.
  Basically, onKeyDown allows you to override the default key
 behavior
   for
  whatever key is pressed.  So, if you return 'true' it means that
 you
   have
  handled the behavior.
 
  So, you have to provide your own code to navigate your
   activities/view if
  you are overriding.
  So, detect if you are in the main menu and that's the only time
   you'll
  return super.onKeyDown() (basically let it handle the keydown
   itself.)
 
  If it is pressed somewhere else, you have to return true and
 close
   the
 menu
  or whatever yourself.
 
  On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com
 wrote:
   Thanks, but how do I implement onBackPressed?  My thread
 extending
   activity says there is no method to override.
 
   On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com
   wrote:
Starting with Android 2.0 you also need to implement
   onBackPressed()
 in
order to achieve this...
 
  http://developer.android.com/reference/android/app/Activity.html#onBa.
 ..
 
Thanks,
Justin Anderson
MagouyaWare Developerhttp://
 sites.google.com/site/magouyaware
 
On Thu, Mar 10, 2011 at 2:36 PM, TreKing 
 treking...@gmail.com
 wrote:
 On Thu, Mar 10, 2011 at 1:54 PM, Colin 
 colin...@gmail.com
   wrote:
 
  return super.onKeyDown(keyCode, event);
 
 The super method likely executes the default action for
 the
   given
 key
 press.
 The default action on the back key is to call finish() on
 the
 activity.
 
  
 -
 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
 
   --
   You received this message because you are subscribed to the
 Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  ~ Jeremiah:9:23-24
  Android 2D MMORPG:
http://solrpg.com/http://www.youtube.com/user/revoltingx
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To 

[android-developers] Re: override back button

2011-03-10 Thread Colin
Yep, doesn't know what method to Override.

On Mar 10, 11:57 pm, Justin Anderson magouyaw...@gmail.com wrote:
 So you put the onBackPressed() method in the AndroidTutorial class?

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Thu, Mar 10, 2011 at 9:49 PM, Colin colin...@gmail.com wrote:
  Thanks.  I tried this but my class extending activity but it doesn't
  have a method to Override.  Not sure what I am doing wrong or where
  this would go.  The setup of my project came from this (http://
  mobile.dzone.com/articles/beginning-android-game) if anyone can look.

  On Mar 10, 11:12 pm, Justin Anderson magouyaw...@gmail.com wrote:
   @Override
   public void onBackPressed()
   {
       //Do whatever you need to in here...
       //To quit call super.onBackPressed() or call finish()

   }

   Thanks,
   Justin Anderson
   MagouyaWare Developerhttp://sites.google.com/site/magouyaware

   On Thu, Mar 10, 2011 at 7:11 PM, Miguel Morales therevolti...@gmail.com
  wrote:

Ah, yeah then seems that onBackPressed needs to be called.  I've never
  used
it myself so I can't be of much help there.

On Thu, Mar 10, 2011 at 5:44 PM, Colin colin...@gmail.com wrote:

My target is 2.1, can anyone direct me to an example implementation of
onBackPressed?

On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com wrote:
 Well like he said you must be using 2.0+  what's your target sdk set
  to?
 Other than that, you're probably returning false which means your
conditions
 aren't being met and you're not returning true.  You might want to
  add
some
 logging or a breakpoint to make sure you even get to that statement.

 On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com wrote:
  The super return would only be for a key besides down.  I believe
  Justin is right with the onBackPressed(), I'm just not sure where
  or
  how to do that.

  On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com
  wrote:
   Well, I *think* you're using it wrong.
   Basically, onKeyDown allows you to override the default key
  behavior
for
   whatever key is pressed.  So, if you return 'true' it means that
  you
have
   handled the behavior.

   So, you have to provide your own code to navigate your
activities/view if
   you are overriding.
   So, detect if you are in the main menu and that's the only time
you'll
   return super.onKeyDown() (basically let it handle the keydown
itself.)

   If it is pressed somewhere else, you have to return true and
  close
the
  menu
   or whatever yourself.

   On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com
  wrote:
Thanks, but how do I implement onBackPressed?  My thread
  extending
activity says there is no method to override.

On Mar 10, 4:50 pm, Justin Anderson magouyaw...@gmail.com
wrote:
 Starting with Android 2.0 you also need to implement
onBackPressed()
  in
 order to achieve this...

   http://developer.android.com/reference/android/app/Activity.html#onBa.
  ..

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://
  sites.google.com/site/magouyaware

 On Thu, Mar 10, 2011 at 2:36 PM, TreKing 
  treking...@gmail.com
  wrote:
  On Thu, Mar 10, 2011 at 1:54 PM, Colin 
  colin...@gmail.com
wrote:

   return super.onKeyDown(keyCode, event);

  The super method likely executes the default action for
  the
given
  key
  press.
  The default action on the back key is to call finish() on
  the
  activity.

  -
  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

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

   --
   ~ Jeremiah:9:23-24
   Android 2D MMORPG:
 http://solrpg.com/http://www.youtube.com/user/revoltingx

  --

[android-developers] Sync SQLite database with mdb

2011-03-10 Thread Rohith Nandakumar


Hello, I have an existing desktop application in vb that is using .mdb file 
as database.

I have created an android app to use some of the features of the app. Since 
android doesn't support mdb, I've converted the important tables to sqlite 
database. I wish to transfer the data in the sqlite db to the the desktop 
application when I connect my phone. So basically I want to transfer the 
sqlite db to mdb format. Is there any way to do 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

Re: [android-developers] Re: Gettting data from web page

2011-03-10 Thread Kunju Vava
hi all

i think u r not get my qstion correctly, in my app i send the url of a
sites using httppost method and attach my keyvalupair as from and to city
(total 20 sites) my question after sending the url , how  we get json data
or data  of that site , sometimes we want some data that is in any of the
page of that site, how it possible


for example consider the site
http://www.expedia.com   wich consists of details of flight rate bw diff
cities
i want the details of rate bw bnglr newdelhi

thnks

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

2011-03-10 Thread bhagii
Hi,

I am very new to android. I wanna see my app in account manager. How to do 
that

I just added sample code in android. Where do i keep 
samplesyncadapter_server files?

In apache

Pls assist me...

Thanks.

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

[android-developers] Quick Search Box - Getting results in All

2011-03-10 Thread ClarkBattle
I can get search results in my app's search area (selecting the app
icon in the 2.3 quick search box to restrict the search to my app).

However, i dont see any of my results when All is selected.  Does
android just deprioritize them?  What determines what search results
show up in the All category?  Is there something I need to do?

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: lost the password of the keystore

2011-03-10 Thread Indicator Veritatis
Some time? If the password was strong, it could take many years!

On Mar 9, 10:48 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Wed, Mar 9, 2011 at 11:32 AM, Pure J purej1...@gmail.com wrote:
  I am doing an update on my application. I would like to sign it and
  publish
  However, when doing the process of jarsigner. It prompt me for the
  passphrase, unluckily , I forgot the passphrase.
  So, I would like to have some advice on it.

  1) Is it possible to recovery/reset the passpharse of the keystore.

 Write a program to brute force it, start it and keep your fingers crossed :)

 Someone already reverse-engineered it for your convenience:

 http://metastatic.org/source/JKS.html

 Might take some time, depending on how long your password was.
 If you remember *exactly* how long it was, that would make things easier.

 Just another proof that the current scheme is broken.
 (see the 'A Cautionary Tale: Backup your Keystore' thread)

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

2011-03-10 Thread Indicator Veritatis
Well, yes, of course it was intentionally designed the way it is for
security purposes. But sometimes, just sometimes, when people
intentionally design the way it is for security purposes, they have
a backup protocol for establishing your identity when the key is lost.
Not here.

On Mar 10, 7:19 am, Justin Anderson magouyaw...@gmail.com wrote:
 * Just another proof that the current scheme is broken.*

 The current scheme is not broken.  It was intentionally designed the way it
 is for security purposes.

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Wed, Mar 9, 2011 at 11:48 PM, Nikolay Elenkov
 nikolay.elen...@gmail.comwrote:

  On Wed, Mar 9, 2011 at 11:32 AM, Pure J purej1...@gmail.com wrote:
   I am doing an update on my application. I would like to sign it and
   publish
   However, when doing the process of jarsigner. It prompt me for the
   passphrase, unluckily , I forgot the passphrase.
   So, I would like to have some advice on it.

   1) Is it possible to recovery/reset the passpharse of the keystore.

  Write a program to brute force it, start it and keep your fingers crossed
  :)

  Someone already reverse-engineered it for your convenience:

 http://metastatic.org/source/JKS.html

  Might take some time, depending on how long your password was.
  If you remember *exactly* how long it was, that would make things easier.

  Just another proof that the current scheme is broken.
  (see the 'A Cautionary Tale: Backup your Keystore' thread)

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

2011-03-10 Thread Brad Stintson
*My application is not triggering notification at specified alarm time.
Please see below classes and tell me how to do that.*
*
*
*
*
*This is my notification class.*
public class Notificaition extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

  NotificationManager nm = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
 CharSequence from = App Name;
 CharSequence message = Event Title;
 PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
   intent, 0);
 Notification notif = new Notification(R.drawable.icon,
   EVENT, System.currentTimeMillis());
 long[] vibrate = {100,100,200,300};
 notif.vibrate = vibrate;
 notif.defaults =Notification.DEFAULT_ALL;
notif.setLatestEventInfo(context, from, message, contentIntent);
 nm.notify(1, notif);
}

*And this is my alarm class*
public class AlarmTrig extends Activity {
 AlarmManager alarms;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);


setOneTimeAlarm();

}

public void setOneTimeAlarm() {
  Calendar cal = Calendar.getInstance();

  cal.setTimeInMillis(System.currentTimeMillis());
  cal.clear();
  cal.set(Calendar.YEAR, mYear);
  cal.set(Calendar.MONTH,mMonth);
  cal.set(Calendar.DAY_OF_MONTH,mDay);
  cal.set(Calendar.HOUR,mHour);
  cal.set(Calendar.MINUTE,mMinutes);
  cal.set(Calendar.SECOND, mSeconds);

 // where mYear, mMonths, mDay, mHour and mMinutes are int values from the
Date and Time picker dialogs respectively

  Intent activate = new Intent(this, TimeAlarm.class);
  PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0,
activate, 0);
   alarms = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
  alarms.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
alarmIntent);
}




On Thu, Mar 10, 2011 at 7:21 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 From a database? Same as anything else, by using a query. Probably easiest
 to keep date/time values as a long integer (standard Unix representation).

 Once you have the time value, use AlarmManager and NotificationManager
 classes in Android.
 10.03.2011 16:47 пользователь Brad Stintson geek.bin...@gmail.com
 написал:

  How to get time from database n trigger notification on that time?
 
  On Thu, Mar 10, 2011 at 4:45 AM, roberto roberto.fo...@gmail.com
 wrote:
 
 
 
  On Mar 9, 11:41 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
   On 9 March 2011 19:59, roberto roberto.fo...@gmail.com wrote:
  
   http://hub.buzzbox.com/android-sdk/
  
   Looks interesting but I personally am not happy with it being closed
   source (which I could stand) but integration with their analics. Who
   knows what it analites when your app got internet permission. But can
   be I am simply exaggerating :)
 
  the buzzbox sdk actually does not require internet permission if you
  don't want to use the analytics.
  you can use the scheduler without analytics.
 
  Roberto
 
  
   --
   Regards,
   Marcin Orlowski
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, 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

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

2011-03-10 Thread Dianne Hackborn
The code in my blog post does work:

http://android-developers.blogspot.com/2009/12/back-and-other-hard-keys-three-stories.html

http://android-developers.blogspot.com/2009/12/back-and-other-hard-keys-three-stories.htmlIf
it is not working, I think your problem is elsewhere, not in this code.  You
can use the full example in the middle of the article that provides
compatibility with older platforms so that onBackPressed() can be used
everywhere.

Alternatively, FragmentActivity in the new fragment static code also
includes this as part of its implementation.  You can just subclass from
that and override onBackPressed().

On Thu, Mar 10, 2011 at 9:05 PM, Colin colin...@gmail.com wrote:

 Yep, doesn't know what method to Override.

 On Mar 10, 11:57 pm, Justin Anderson magouyaw...@gmail.com wrote:
  So you put the onBackPressed() method in the AndroidTutorial class?
 
  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
  On Thu, Mar 10, 2011 at 9:49 PM, Colin colin...@gmail.com wrote:
   Thanks.  I tried this but my class extending activity but it doesn't
   have a method to Override.  Not sure what I am doing wrong or where
   this would go.  The setup of my project came from this (http://
   mobile.dzone.com/articles/beginning-android-game) if anyone can look.
 
   On Mar 10, 11:12 pm, Justin Anderson magouyaw...@gmail.com wrote:
@Override
public void onBackPressed()
{
//Do whatever you need to in here...
//To quit call super.onBackPressed() or call finish()
 
}
 
Thanks,
Justin Anderson
MagouyaWare Developerhttp://sites.google.com/site/magouyaware
 
On Thu, Mar 10, 2011 at 7:11 PM, Miguel Morales 
 therevolti...@gmail.com
   wrote:
 
 Ah, yeah then seems that onBackPressed needs to be called.  I've
 never
   used
 it myself so I can't be of much help there.
 
 On Thu, Mar 10, 2011 at 5:44 PM, Colin colin...@gmail.com wrote:
 
 My target is 2.1, can anyone direct me to an example
 implementation of
 onBackPressed?
 
 On Mar 10, 8:30 pm, Miguel Morales therevolti...@gmail.com
 wrote:
  Well like he said you must be using 2.0+  what's your target sdk
 set
   to?
  Other than that, you're probably returning false which means
 your
 conditions
  aren't being met and you're not returning true.  You might want
 to
   add
 some
  logging or a breakpoint to make sure you even get to that
 statement.
 
  On Thu, Mar 10, 2011 at 5:27 PM, Colin colin...@gmail.com
 wrote:
   The super return would only be for a key besides down.  I
 believe
   Justin is right with the onBackPressed(), I'm just not sure
 where
   or
   how to do that.
 
   On Mar 10, 8:10 pm, Miguel Morales therevolti...@gmail.com
   wrote:
Well, I *think* you're using it wrong.
Basically, onKeyDown allows you to override the default key
   behavior
 for
whatever key is pressed.  So, if you return 'true' it means
 that
   you
 have
handled the behavior.
 
So, you have to provide your own code to navigate your
 activities/view if
you are overriding.
So, detect if you are in the main menu and that's the only
 time
 you'll
return super.onKeyDown() (basically let it handle the
 keydown
 itself.)
 
If it is pressed somewhere else, you have to return true and
   close
 the
   menu
or whatever yourself.
 
On Thu, Mar 10, 2011 at 5:02 PM, Colin colin...@gmail.com
   wrote:
 Thanks, but how do I implement onBackPressed?  My thread
   extending
 activity says there is no method to override.
 
 On Mar 10, 4:50 pm, Justin Anderson 
 magouyaw...@gmail.com
 wrote:
  Starting with Android 2.0 you also need to implement
 onBackPressed()
   in
  order to achieve this...
 

 http://developer.android.com/reference/android/app/Activity.html#onBa.
   ..
 
  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://
   sites.google.com/site/magouyaware
 
  On Thu, Mar 10, 2011 at 2:36 PM, TreKing 
   treking...@gmail.com
   wrote:
   On Thu, Mar 10, 2011 at 1:54 PM, Colin 
   colin...@gmail.com
 wrote:
 
return super.onKeyDown(keyCode, event);
 
   The super method likely executes the default action
 for
   the
 given
   key
   press.
   The default action on the back key is to call finish()
 on
   the
   activity.
 
  
 -
   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 

Re: [android-developers] Binding to a service from within a ContentProvider - when to unbind?

2011-03-10 Thread Dianne Hackborn
It doesn't remain alive until the system shuts down, it is until your
process is killed to reclaim memory for others.  At this point the binding
will be removed.

On Thu, Mar 10, 2011 at 6:56 PM, Mark Carter mjc1...@googlemail.com wrote:

 ContentProviders are instantiated at system startup and remain alive
 until the system shuts down.

 I have a ContentProvider that binds to one of my (local) services (which is
 most likely not already running) and so would like to unbind at some
 appropriate time. If unbindService is not called then the Service will
 remain running until the system shuts down. I assume this is bad.

 When the service stops, appropriate db connections are closed.

 The question is, when to call unbindService()?

 My initial thoughts are to wrap any returned Cursors to monitor when all
 returned Cursors have been closed.

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




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

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

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

Re: [android-developers] Force close after adding resources and textview

2011-03-10 Thread Dianne Hackborn
Don't implement a constructor and do stuff in it.  Implement your
initialization in onCreate().

On Thu, Mar 10, 2011 at 6:25 PM, Mark Sharpley m.c.sharp...@gmail.comwrote:

 I was playing around with the galleryview and image switcher, and I decided
 to implement a textview that describes my images as I scroll through them. I
 created a string array, and added a text view in my layout xml. I then added
 the string and textview to my code. I thought I could reuse the position int
 from the images to get the right string from my array. However, this
 addition causes my app to force close when I try to run it.

 I have a feeling that I have totally butchered my working java code and you
 may very well cringe at what you are about to see. Apologies. I am learning
 :)

 If anyone could help me out, I would be most grateful. I have attached my
 java code, some probably not relevant xml and my logcat.

 Regards,

 Mark (Java Abuser)

 package com.markopolo.test;

 import android.app.Activity;
 import android.content.Context;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.os.Bundle;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.animation.AnimationUtils;
 import android.widget.AdapterView;
 import android.widget.BaseAdapter;
 import android.widget.Gallery;
 import android.widget.TextView;
 import android.widget.Gallery.LayoutParams;
 import android.widget.ViewSwitcher.ViewFactory;
 import android.widget.ImageSwitcher;
 import android.widget.ImageView;
 import android.widget.AdapterView.OnItemClickListener;

 public class MainMenuActivity extends Activity
 implements ViewFactory

 {
 //---the images to display--
 Integer[] imageIDs = {
 R.drawable.swan1,
 R.drawable.swan2,
 R.drawable.swan3,
 R.drawable.swan4,
 R.drawable.swan5,
 R.drawable.swan6  };

 Resources res = getResources();
 String[] swans = res.getStringArray(R.array.swan);

 private ImageSwitcher imageSwitcher;

 @Override
 public void onCreate(Bundle savedInstanceState)
 {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.displayview);

 imageSwitcher = (ImageSwitcher) findViewById(R.id.switcher1);
 imageSwitcher.setFactory(this);
 imageSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,
 android.R.anim.fade_in));
 imageSwitcher.setOutAnimation(AnimationUtils.loadAnimation(this,
 android.R.anim.fade_out));

 Gallery gallery = (Gallery) findViewById(R.id.gallery1);
 gallery.setAdapter(new ImageAdapter(this));
 gallery.setOnItemClickListener(new OnItemClickListener()
 {
 public void onItemClick(AdapterView parent,
 View v, int position, long id)
 {
  imageSwitcher.setImageResource(imageIDs[position]);

}
 });
 }

 public View makeView()
 {
 ImageView imageView = new ImageView(this);
 imageView.setBackgroundColor(0xFF00);
 imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
 imageView.setLayoutParams(new
 ImageSwitcher.LayoutParams(
 LayoutParams.FILL_PARENT,
 LayoutParams.FILL_PARENT));
 return imageView;
 }

 public class ImageAdapter extends BaseAdapter
 {
 private Context context;
 private int itemBackground;

 public ImageAdapter(Context c)
 {
 context = c;

 //---setting the style---
 TypedArray a = obtainStyledAttributes(R.styleable.Gallery1);
 itemBackground = a.getResourceId(
 R.styleable.Gallery1_android_galleryItemBackground, 0);
 a.recycle();

 }

 //---returns the number of images---
 public int getCount()
 {
 return imageIDs.length;
 }

 //---returns the ID of an item---
 public Object getItem(int position)
 {
 return position;
 }

 public long getItemId(int position)
 {
 return position;
 }


 //---returns an ImageView and TextView view---
 public View getView(int position, View convertView, ViewGroup
 parent)
 {
 ImageView imageView = new ImageView(context);
 imageView.setImageResource(imageIDs[position]);
 imageView.setScaleType(ImageView.ScaleType.FIT_XY);
 imageView.setLayoutParams(new Gallery.LayoutParams(150, 120));
 imageView.setBackgroundResource(itemBackground);

 TextView textview = (TextView) findViewById(R.id.textview1);
 textview.setText(swans[position]);

 return imageView;

 }
 }
 }

 And arrays.xml:

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

[android-developers] Re: Gettting data from web page

2011-03-10 Thread Indicator Veritatis
If they don't publish the API, then you probably don't have rights to
use the data this way in the first place. If they do publish it, then
you should read that.

On Mar 10, 9:30 pm, Kunju Vava android...@gmail.com wrote:
 hi all

 i think u r not get my qstion correctly, in my app i send the url of a
 sites using httppost method and attach my keyvalupair as from and to city
 (total 20 sites) my question after sending the url , how  we get json data
 or data  of that site , sometimes we want some data that is in any of the
 page of that site, how it possible

 for example consider the sitehttp://www.expedia.com  wich consists of details 
 of flight rate bw diff
 cities
 i want the details of rate bw bnglr newdelhi

 thnks

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

2011-03-10 Thread leela
Hi all,

i am working on gridView which will show images..

initially the gridView will show all thumbniles  images..
once click on any thumbnile i need to show that gridVeiw in full
screen.
here the problem is if user clicks on 5th image  i need to show 5th
image of gridView in full screen
But,i can't  it is always showing first image in full screen..

please help me out..

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] Re: lost the password of the keystore

2011-03-10 Thread Nikolay Elenkov
On Fri, Mar 11, 2011 at 3:04 PM, Indicator Veritatis mej1...@yahoo.com wrote:
 Some time? If the password was strong, it could take many years!

Surely. But:

 * most people use a dictionary word or a word + '123'/whatever
 * it is unlikely to be too long
 * with a single multicore machine you can run this in parallel

So, do a dictionary attack, if it doesn't work after some time,
give up. 'Some time' is just how long you are willing to wait, and
would depend on how valuable the application is.

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

2011-03-10 Thread mort
I think this would also break the user experience. Better use a
spinner. You can show different foreground images if you use proper
layouts and adapter.
For both button and spinner you could simply set a new button
background when the item has changed, i.e. in the OnClick- or
OnItemSelectedListener.
However, I don't think background images (at least if they still
should look like common button surfaces) are quite intuitive, esp. not
with so many states.
Depending on your screen layout, it might also be a good idea to
simply show an icon and/or text with prev./next state arrow buttons or
tabs. I for one wouldn't like to press a button 5 times to get to the
previous state 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


Re: [android-developers] HI

2011-03-10 Thread Kristopher Micinski
P.s.,

Bluetooth API support seems to be not that amazingly great, and you have to
pair the phones first, which is annoying. (People always have to pair before
playing your game!). Can you fake it using TCP/IP?

Kris

On Thu, Mar 10, 2011 at 1:47 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 On 8 March 2011 19:40, bhaskar bommala bhaskar...@gmail.com wrote:
  Hi I am new to the android development , i need to access 2 android
 devices
  as remote devices each other via bluetooth..
  for example if i press the 1 as input from device 1 that should appear on
  device 2 ..

 See SDK samples. There's Bluetooth chat app there IIRC

 --
 Regards,
 Marcin Orlowski

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

2011-03-10 Thread Robin Talwar
Ok following is the peice of code how it should be.
qName and localName are the arguments which you place in startElement and
endElement.

Code :-

public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
// reset
tempVal = ;
if (qName.equals(track)) {
track = new Track();
} else if (qName.equals(musicalbum)) {
album = new Album();
}
}

public void characters(char[] ch, int start, int length)
throws SAXException {
tempVal = new String(ch, start, length);
}

public void endElement(String uri, String localName, String qName)
throws SAXException {

if (qName.equals(track)) {
tracks.add(track);
} else if (qName.equals(title)) {
track.setTitle(tempVal);
} else if (qName.equals(image)) {
track.setImageUrl(tempVal);
} else if (qName.equals(content_id)) {
track.setContentId(tempVal);
} else if (qName.equals(musictitle)) {
album.setAlbumName(tempVal);
} else if (qName.equals(musicimage)) {
album.setImageUrl(tempVal);
} else if (qName.equals(preview)){
track.setTrackPreviewUrl(tempVal);
}
}

I dont exactly know the reason but m pretty sure you just have to exchange
the variables qName and localName bla bla
hit and trial

Plus i googled and i also found that you have to remove some overrides as
well to get it working

On Fri, Mar 11, 2011 at 5:29 AM, Adam adamash...@gmail.com wrote:

 Thanks for your reply.

 qName? local name?? How would I go about doing this with the SAXBuilder? I
 can't see any documentation on changing my URL to use qualified names and
 such.

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

2011-03-10 Thread Kristopher Micinski
(But of course, having to pair isn't the Android platform's fault, it's just
802.15.1 in general :-).

Kris

On Fri, Mar 11, 2011 at 2:00 AM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 P.s.,

 Bluetooth API support seems to be not that amazingly great, and you have to
 pair the phones first, which is annoying. (People always have to pair before
 playing your game!). Can you fake it using TCP/IP?

 Kris


 On Thu, Mar 10, 2011 at 1:47 AM, Marcin Orlowski webnet.andr...@gmail.com
  wrote:

 On 8 March 2011 19:40, bhaskar bommala bhaskar...@gmail.com wrote:
  Hi I am new to the android development , i need to access 2 android
 devices
  as remote devices each other via bluetooth..
  for example if i press the 1 as input from device 1 that should appear
 on
  device 2 ..

 See SDK samples. There's Bluetooth chat app there IIRC

 --
 Regards,
 Marcin Orlowski

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

2011-03-10 Thread Jonathan Foley

Is the device going to sleep? If so you'll need to acquire a WakeLock
otherwise it will wake up for the alarm and may fall back asleep
before the notification ever gets fired.


Jonathan

On Mar 10, 10:06 pm, Brad Stintson geek.bin...@gmail.com wrote:
 *My application is not triggering notification at specified alarm time.
 Please see below classes and tell me how to do that.*
 *
 *
 *
 *
 *This is my notification class.*
 public class Notificaition extends BroadcastReceiver {

     @Override
         public void onReceive(Context context, Intent intent) {

           NotificationManager nm = (NotificationManager) context
 .getSystemService(Context.NOTIFICATION_SERVICE);
      CharSequence from = App Name;
      CharSequence message = Event Title;
      PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
        intent, 0);
      Notification notif = new Notification(R.drawable.icon,
        EVENT, System.currentTimeMillis());
      long[] vibrate = {100,100,200,300};
      notif.vibrate = vibrate;
          notif.defaults =Notification.DEFAULT_ALL;
     notif.setLatestEventInfo(context, from, message, contentIntent);
          nm.notify(1, notif);
         }

 *And this is my alarm class*
 public class AlarmTrig extends Activity {
  AlarmManager alarms;

     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);
         am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);

 setOneTimeAlarm();

     }

     public void setOneTimeAlarm() {
       Calendar cal = Calendar.getInstance();

           cal.setTimeInMillis(System.currentTimeMillis());
           cal.clear();
           cal.set(Calendar.YEAR, mYear);
           cal.set(Calendar.MONTH,mMonth);
           cal.set(Calendar.DAY_OF_MONTH,mDay);
           cal.set(Calendar.HOUR,mHour);
           cal.set(Calendar.MINUTE,mMinutes);
           cal.set(Calendar.SECOND, mSeconds);

  // where mYear, mMonths, mDay, mHour and mMinutes are int values from the
 Date and Time picker dialogs respectively

       Intent activate = new Intent(this, TimeAlarm.class);
       PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0,
 activate, 0);
        alarms = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
       alarms.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
 alarmIntent);
     }







 On Thu, Mar 10, 2011 at 7:21 PM, Kostya Vasilyev kmans...@gmail.com wrote:
  From a database? Same as anything else, by using a query. Probably easiest
  to keep date/time values as a long integer (standard Unix representation).

  Once you have the time value, use AlarmManager and NotificationManager
  classes in Android.
  10.03.2011 16:47 пользователь Brad Stintson geek.bin...@gmail.com
  написал:

   How to get time from database n trigger notification on that time?

   On Thu, Mar 10, 2011 at 4:45 AM, roberto roberto.fo...@gmail.com
  wrote:

   On Mar 9, 11:41 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
On 9 March 2011 19:59, roberto roberto.fo...@gmail.com wrote:

http://hub.buzzbox.com/android-sdk/

Looks interesting but I personally am not happy with it being closed
source (which I could stand) but integration with their analics. Who
knows what it analites when your app got internet permission. But can
be I am simply exaggerating :)

   the buzzbox sdk actually does not require internet permission if you
   don't want to use the analytics.
   you can use the scheduler without analytics.

   Roberto

--
Regards,
Marcin Orlowski

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

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

2011-03-10 Thread Brad Stintson
How to implement spinner like array adapter on button?

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

Re: [android-developers] Re: Android AVD 3.0 Problem

2011-03-10 Thread Marcin Orlowski
On 10 March 2011 16:18, Chrystian Vieyra chrys.vie...@gmail.com wrote:
 I don't quite understand your problem, are you trying to do Android
 development using Visual Studio??

I think he got VS installed and starting AVD 3.0 is unsucessful and
something crashes, which causes VS's to catch it and popup with
debugger window requester.


-- 
Regards,
Marcin Orlowski

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


[android-developers] GridView.scrollTo(int,int) is not working

2011-03-10 Thread leela
Hi all,

while populating my GridView/listView  i want to show 20th item
first..

i was tried to scroll up to that  position by calling
gridView.scrollTO(20,20);

this is not working.. means it's always showing first item..

any suggestions

Thanks in Advance...

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


[android-developers] Re: Gettting data from web page

2011-03-10 Thread Jonathan Foley


I am assuming you are emulating a form by posting the parameters as a
query string. If that's the case, the data you're getting back is
simply whatever webpage would normally be returned in response to a
user query of the website. So to get your data, you'd have to parse
that HTML. There is no standard way to do this for all the sites,
because each is going to have a different layout. You can use Jsoup
http://jsoup.org/ to screen scrape if that's what you want to do, but
it's going to be slow and ugly.


JF


On Mar 10, 9:30 pm, Kunju Vava android...@gmail.com wrote:
 hi all

 i think u r not get my qstion correctly, in my app i send the url of a
 sites using httppost method and attach my keyvalupair as from and to city
 (total 20 sites) my question after sending the url , how  we get json data
 or data  of that site , sometimes we want some data that is in any of the
 page of that site, how it possible

 for example consider the sitehttp://www.expedia.com  wich consists of details 
 of flight rate bw diff
 cities
 i want the details of rate bw bnglr newdelhi

 thnks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] GridView.scrollTo(int,int) is not working

2011-03-10 Thread Romain Guy
GridView doesn't support the use of scrollTo(). Also, scrollTo() takes
distances in pixels. Use setSelectedPosition(20) instead.

On Thu, Mar 10, 2011 at 11:28 PM, leela morampudile...@gmail.com wrote:

 Hi all,

 while populating my GridView/listView  i want to show 20th item
 first..

 i was tried to scroll up to that  position by calling
 gridView.scrollTO(20,20);

 this is not working.. means it's always showing first item..

 any suggestions

 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




-- 
Romain Guy
Android framework engineer
romain...@android.com

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

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

<    1   2   3   >