[android-beginners] Cannot get Level-List Drawable to work in ListAdapter

2010-07-23 Thread Jason Van Anden
I am attempting to use a level-list.  When run, my listview is showing
either nothing or the zero drawable.

I must be doing something wrong - a second set of eyes and a different brain
appreciated.

Here are the particulars ...

level list stored as an star_levels.xml in drawable folder:

?xml version=1.0 encoding=utf-8?

 level-list xmlns:android=http://schemas.android.com/apk/res/android;
item android:maxLevel=0 android:drawable=@drawable/stars_0 /
item android:maxLevel=1 android:drawable=@drawable/stars_1 /
item android:maxLevel=2 android:drawable=@drawable/stars_2 /
item android:maxLevel=3 android:drawable=@drawable/stars_3 /
item android:maxLevel=4 android:drawable=@drawable/stars_4 /
item android:maxLevel=5 android:drawable=@drawable/stars_5 /
 /level-list


image view inside a relative layout:

ImageView
android:id=@+id/rating
android:layout_width=wrap_content
android:layout_height=wrap_content
android:orientation=horizontal
android:layout_alignTop=@id/something_else
android:layout_alignParentRight=true
android:layout_marginRight=10dp
android:src=@drawable/star_levels
/


code from Adapter:

@Override
public void setViewImage(ImageView v, String value) {

super.setViewImage(v, value);

if (v.getId() == R.id.rating){
v.setImageLevel(Integer.parseInt(value)); // this returns an
integer - logcat confirms this
}

   }

Thanks,
j

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

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Cannot get Level-List Drawable to work in ListAdapter

2010-07-23 Thread Jason Van Anden
Hmm... figured it out right after hitting send.  Removed
super.setViewImage(v, value);

j


On Fri, Jul 23, 2010 at 6:46 PM, Jason Van Anden
jason.van.an...@gmail.comwrote:

 I am attempting to use a level-list.  When run, my listview is showing
 either nothing or the zero drawable.

 I must be doing something wrong - a second set of eyes and a different
 brain appreciated.

 Here are the particulars ...

 level list stored as an star_levels.xml in drawable folder:

 ?xml version=1.0 encoding=utf-8?

  level-list xmlns:android=http://schemas.android.com/apk/res/android;
 item android:maxLevel=0 android:drawable=@drawable/stars_0 /
 item android:maxLevel=1 android:drawable=@drawable/stars_1 /
 item android:maxLevel=2 android:drawable=@drawable/stars_2 /
 item android:maxLevel=3 android:drawable=@drawable/stars_3 /
 item android:maxLevel=4 android:drawable=@drawable/stars_4 /
 item android:maxLevel=5 android:drawable=@drawable/stars_5 /
  /level-list


 image view inside a relative layout:

 ImageView
 android:id=@+id/rating
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:orientation=horizontal
 android:layout_alignTop=@id/something_else
 android:layout_alignParentRight=true
 android:layout_marginRight=10dp
 android:src=@drawable/star_levels
 /


 code from Adapter:

 @Override
 public void setViewImage(ImageView v, String value) {

 super.setViewImage(v, value);

 if (v.getId() == R.id.rating){
 v.setImageLevel(Integer.parseInt(value)); // this returns
 an integer - logcat confirms this
 }

}

 Thanks,
 j





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

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Layout Tabhost with Header?

2010-06-19 Thread Jason Van Anden
Hi All,

Can someone tell me if its possible to add a header layout over tabs in
1.5?  If so, how?  When I attempt to nest a TabHost within another layout -
things go terribly wrong.

Thanks,
i++

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

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Layout Tabhost with Header?

2010-06-19 Thread Jason Van Anden
Thanks Mark,

When I tried nesting inside a layout I got a null pointer exception.  I was
convinced that the TabHost could not be used within another layout (maybe I
was wrong).  I figured out a different solution - I replaced the title bar
entirely.  This is ultimately a better solution for what I was trying to do.

j


On Sat, Jun 19, 2010 at 10:35 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Sat, Jun 19, 2010 at 10:25 AM, Jason Van Anden robotiss...@gmail.com
 wrote:
  Can someone tell me if its possible to add a header layout over tabs in
  1.5?  If so, how?

 Put the TabHost within another layout.

  When I attempt to nest a TabHost within another layout -
  things go terribly wrong.

 It is difficult to help you without more details about terribly wrong.

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.com

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

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


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

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-10-25 Thread Jason Van Anden
Does anyone know if this thread ended well?  I attempting to create a fancy
list with a multiple selection (in 1.6).

The following code give seemingly random results using a SimpleCursorAdapter
...

@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {

super.onListItemClick(l, v, position, id);

CheckedTextView cb = (CheckedTextView)
v.findViewById(R.id.bulkload_ok);

Log.d(Peeps.TAG, view clicked was ..  + cb.isChecked());

if (cb.isChecked()){
cb.setChecked(false);
Log.d(Peeps.TAG, set to .. false ==  + cb.isChecked());
} else {
cb.setChecked(true);
Log.d(Peeps.TAG, set to .. true ==  + cb.isChecked());
}

v.refreshDrawableState();

//select_track();
}


LAYOUT HERE:


?xml version=1.0 encoding=utf-8?

RelativeLayout


xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=vertical
android:padding=6sp

ImageView
android:id=@+id/album_art
android:layout_width=wrap_content
android:layout_height=wrap_content
android:paddingTop=6sp
android:paddingBottom=6sp
android:paddingLeft=10sp
android:maxWidth = 70sp
android:maxHeight= 70sp
android:adjustViewBounds=true
android:src=@drawable/icon
/

TextView
android:id=@+id/song_name
android:textSize=16sp
android:textStyle=bold
android:layout_width=wrap_content
android:layout_height=wrap_content
android:paddingRight=70sp
android:paddingLeft=78sp
android:text=Song Title /


TextView android:id=@+id/song_album_title
android:textSize=14sp
android:layout_width=fill_parent
android:layout_height=wrap_content
android:paddingLeft=78sp
android:layout_below=@id/song_name
android:layout_alignParentLeft=true
android:text=Album Title /

TextView android:id=@+id/song_artist_name
android:textSize=14sp
android:layout_width=wrap_content
android:layout_height=wrap_content
android:paddingLeft=78sp
android:layout_below=@id/song_album_title
android:layout_alignParentLeft=true
android:text=Artist Name /

CheckedTextView
android:id=@+id/bulkload_ok
android:layout_alignTop=@+id/song_name
android:layout_height=wrap_content
android:layout_width=wrap_content
android:layout_alignParentRight=true
android:checkMark=?android:attr/listChoiceIndicatorMultiple
android:checked = false
android:text=
  /CheckedTextView

TextView android:id=@+id/song_duration
android:textSize=12sp
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/song_album_title
android:textColor=#FDFCDC
android:layout_alignParentRight=true
android:text=0:00 /


/RelativeLayout

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



[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-10-25 Thread Jason Van Anden
OK.  I am an idiot.

This was not working for me because I had left-over code in onCreate from
something else I tried:

//listView.setItemsCanFocus(false);
//listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

In the process I learned an awful lot from Mark Murphy's examples in Fancy
Lists section of the Busy Coders Guide (
http://commonsware.com/Android/index.html) and Romain Guy's YouTube
presentation here (http://www.youtube.com/watch?v=UApv-ZMJ51g).

Jason

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



[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Jason Van Anden
Clearly the solution to this is an Android Market Market.

;)

Jason Van Anden
http://www.BubbleBeats.com

On Tue, Oct 20, 2009 at 11:29 AM, Jeffrey Blattman 
jeffrey.blatt...@gmail.com wrote:

  some comments on the appslib market,

 1. no way to unpublish an app?
 2. no way to unpublish an app release?
 3. no way to edit an app release (comments, binary, or anything else)
 4. app description doesn't maintain newlines

 so yes, make sure you really want your app there, forever, before you
 publish it.

 in general, i wish the android market  would just facilitate this sort of
 thing ... i know they now allow tagging by cell provider, tagging by device
 seems a small stretch.  this proliferation of markets could really dilute
 android. developers now have to manage their apps across N markets, and
 users have to browse N different markets to look for apps :(


 On 10/20/09 1:56 AM, arnouf wrote:

 If you  have developed or if you are developing applications, and they
 are on the Android Market - Great! - But these apps are only
 available for devices that have contracts with Google.

 Archos, a major PMP manufacturer, launched its first device on 25th of
 September: the Archos 5 IT. Archos has a real community of fans who
 are waiting for applications for their devices. This device is the
 first of a long product line (the first Archos phone should be
 available soon too!).

 It's a new opportunity for your applications to find new fans!

 You can post your apps, for free, on the Archos Market called Appslib
 (http://www.appslib.com).

 Today, only free applications are available for distribution on
 AppsLib, but Archos promises the possibility to distribute your paid
 apps soon !

 Don't wait : more applications, more users, more fans...and more
 revenue (soon)!

 Arnaud
 



 --


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

inline: qr-gmail.png

[android-beginners] Re: How to access the files on SD card through emulator?

2009-10-08 Thread Jason Van Anden

Instructions here:

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

j

On Thu, Oct 8, 2009 at 8:46 AM, Abhi hk.abhij...@gmail.com wrote:

 Hi,
      I need to search for certain type of files (like .mp3) and
 populate the list of files present in that particular category from
 the SD card. Can anyone help me with this?

 -Regards Abhi.

 


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



[android-beginners] How do you get the dimensions of a Dialog?

2009-10-05 Thread Jason Van Anden

I need to get the height and width of a dialog from inside a dialog class.

Clearly confused.  Help appreciated.

Thank You,
Jason

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



[android-beginners] HowTo Link to Market App via URL?

2009-09-09 Thread Jason Van Anden

If I wanted to give users a link to my app in an email - is there a way?

Thank You,
Jason Van Anden

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



[android-beginners] Load a YouTube video via intent - how?

2009-08-28 Thread Jason Van Anden

I would like to load a video via an intent using the YouTube player.
Can someone point me in the direction to find an example?

Thank You,
Jason

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



[android-beginners] Re: Load a YouTube video via intent - how?

2009-08-28 Thread Jason Van Anden

More specifically ... I know that this is the way to broadcast:

Uri 
uri=Uri.parse(http://www.youtube.com/watch?v=Enu-BbWCtT4;);
startActivity(new Intent(Intent.ACTION_VIEW, 
uri));

Thing is, this gives me a choice between YouTube and Browser ... is
there a way imply a preference (like, just YouTube?).

Thanks!
Jason

On Fri, Aug 28, 2009 at 1:41 PM, Jason Van
Andenjason.van.an...@gmail.com wrote:
 I would like to load a video via an intent using the YouTube player.
 Can someone point me in the direction to find an example?

 Thank You,
 Jason


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



[android-beginners] Re: Why XML to define layouts and components?

2009-08-06 Thread Jason Van Anden
When I started ramping up on Android all the XML did seem like a speed
bump.  It felt a little like forcing people to use CSS from the get-go in
order to learn how to code simple web pages.  Now that I am acclimated with
the syntax, I appreciate its design, big time.

Check out DroidDraw to ramp up a little quicker (at least in terms of
Layouts)  ... http://www.droiddraw.org

Good Luck!
Jason Van Anden
http://www.smileproject.com

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



[android-beginners] Re: A complete newbie

2009-08-05 Thread Jason Van Anden
If you have never programmed, you may want to start by learning the basics
with Python.  It is probably the best language to learn with and it has many
things in common with Java.  There is a ton of stuff online to get you
started.

It is not the best language for user interface.  Good thing that Android
development makes this a lot more straight forward.

So, my suggestion ... learn the basics of Python, then start learning Java
by playing with Android.

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



[android-beginners] Unicode character symbols as resource elements

2009-07-26 Thread Jason Van Anden
I want to use unicode characters in a toast.  I can do this via code.

I am not having any luck associating this as a resource element.

Is this impossible or am I using the wrong syntax?

This is what I have tried to no avail:

string name=title_no_titleNo Title \u2639/string

If you know the answer - pls correct!

Thank You,
Jason Van Anden

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



[android-beginners] AlertDialog text input problem

2009-07-24 Thread Jason Van Anden
I am having a problem using AlertDialog for input text.

Code follows ... everything appears on screen as it should until I click OK
- then I get a force close.

I get a null error on line where Editable e = et.getText();.

Second set of eyes and a sturdy brain appreciated...



private void enter_search(){

LayoutInflater factory = LayoutInflater.from(this);
final View textEntryView = factory.inflate(R.layout.search_dialog,
null);

new AlertDialog.Builder(Peeps.this)

 //.setIcon(R.drawable.alert_dialog_icon)
.setTitle(R.string.search_dialog_text_entry)
.setView(textEntryView)
.setPositiveButton(R.string.search_dialog_ok, new
DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int whichButton)
{

EditText et =
(EditText)findViewById(R.id.search_edit);   // !!! apparently I am doing
this wrong!
Editable e =
et.getText();   //  this
is where the error occurs
Log.d(TAG, search test is  + e.toString());

}
})

.setNegativeButton(R.string.search_dialog_cancel, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton)
{

/* User clicked cancel so do some stuff */
}
})

.show();

}

protected void do_search(String search_text){

// search here

}

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



[android-beginners] Re: AlertDialog text input problem

2009-07-24 Thread Jason Van Anden
That was it.

Hopefully this post will help others.  I could not find a good example of
using AlertDialog for text input.  The API Demos example does not show how
to return the text!

Thanks again Mark!

Jason Van Anden



On Fri, Jul 24, 2009 at 4:55 PM, Mark Murphy mmur...@commonsware.comwrote:


 Jason Van Anden wrote:
  I am having a problem using AlertDialog for input text.
 
  Code follows ... everything appears on screen as it should until I click
  OK - then I get a force close.
 
  I get a null error on line where Editable e = et.getText();.
 
  Second set of eyes and a sturdy brain appreciated...
 
 
 
  private void enter_search(){
 
  LayoutInflater factory = LayoutInflater.from(this);
  final View textEntryView =
  factory.inflate(R.layout.search_dialog, null);
 
  new AlertDialog.Builder(Peeps.this)
 
   //.setIcon(R.drawable.alert_dialog_icon)
  .setTitle(R.string.search_dialog_text_entry)
  .setView(textEntryView)
  .setPositiveButton(R.string.search_dialog_ok, new
  DialogInterface.OnClickListener() {
 
  public void onClick(DialogInterface dialog, int
  whichButton) {
 
  EditText et =
  (EditText)findViewById(R.id.search_edit);   // !!! apparently I am doing
  this wrong!

 I am assuming R.id.search_edit is a field in the textEntryView you
 supplied to the builder.

 In that case, try textEntryView.findViewById(R.id.search_edit).

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

 _Android Programming Tutorials_ Version 1.0 In Print!

 


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



[android-beginners] How do you determine screen orientation at startup?

2009-06-28 Thread Jason Van Anden

I would like to know what the screen orientation is when my app
starts.  Can someone please point me in the right direction?

Thank You,
j

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



[android-beginners] Re: startActivity called from non-Activity context - help

2009-06-26 Thread Jason Van Anden

Just a shout out ... still no luck.  Still frustrated.

I have a hunch as to what is happening - but its seems a little nutty.
 My hunch is that when FLAG_ACTIVITY_NEW_TASK gets raised, my
PendingIntent gets replaced by the standard MAIN/LAUNCHER intent,
which is used to activate the application.

What I think should happen is that startActivity gets called with the
Intent passed as a variable.

Mark, your suggestion with the you rang? option does not work in
this case since there is no way to tell if the app is being resumed
via the Status Bar item or other typical means.

Other suggestions or help super appreciated.

j

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



[android-beginners] Re: startActivity called from non-Activity context - help

2009-06-25 Thread Jason Van Anden

Thanks again Mark.  Great suggestions.  I guess I thought (or was
hoping) I was going down the wrong path.  I will give some of these a
try and get back.

re: Hijack the thread!?! ... Its reassuring to find out others are
perplexed by this.  I posted this question a few days ago, albeit a
little differently, and got no feedback.  Sometimes no response feels
like a collective no duh.  Its especially discouraging when even the
Google peeps don't have anything to say.

j

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



[android-beginners] Re: startActivity called from non-Activity context - help

2009-06-25 Thread Jason Van Anden

yup ... that's where I posted!  (actually posted under beginners
first, then developers, then here again).

j

On Thu, Jun 25, 2009 at 10:10 AM, Mark Murphymmur...@commonsware.com wrote:

 re: Hijack the thread!?! ... Its reassuring to find out others are
 perplexed by this.  I posted this question a few days ago, albeit a
 little differently, and got no feedback.  Sometimes no response feels
 like a collective no duh.  Its especially discouraging when even the
 Google peeps don't have anything to say.

 FWIW, the Google peeps tend to post on [android-developers] more than
 this list, AFAICT. How much I follow any of these lists depends on my
 schedule for the day. We need more answerers...

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html



 


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



[android-beginners] Re: Low performance using SurfaceView, touchMode and OptionMenu

2009-06-24 Thread Jason Van Anden

I highly recommend that you watch this:

http://www.youtube.com/watch?v=U4Bk5rmIpic

Jason Van Anden
http://www.smileproject.com

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



[android-beginners] startActivity called from non-Activity context - help

2009-06-24 Thread Jason Van Anden
This message appeared in logcat when selecting a notification ...

startActivity called from non-Activity context; forcing
Intent.FLAG_ACTIVITY_NEW_TASK for: Intent {
comp={com.blah.blahs/com.blah.blahs.Blahs} (has extras) }

It brings the Activity into focus which is half the battle ... thing is, I
have no idea what function to read the intent details from.  It does not
call onCreate ... or startActivity.

I have posted this several times ... feeling a bit stuck.  Help super
appreciated.

j

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



[android-beginners] Re: startActivity called from non-Activity context - help

2009-06-24 Thread Jason Van Anden

Hi Mark,

Thanks Mark ... still stuck tho.  The it is the pendingIntent that
is re-activating/restarting the Activity.

Basically, my main Activity starts a Service that continues to run
with or without it.  The Service occasionally updates the status bar.
When the user selects the status bar item, it is supposed to bring the
Activity to the foreground and do something based upon the extras sent
with the pendingIntent.  Selecting the status bar item works fine, the
Activity moves to the foreground ... the problem is the extras.  I
assumed when the Activity was activated it would call onCreate, or
startActivity ... or something else where I could retrieve the extras
from.  onResume gets called - but when it gets called, the intent has
changed via LogCat :

Starting activity: Intent { comp={com.blah.blahs/com.blah.blahs.Blahs}
(has extras) }

startActivity called from non-Activity context; forcing
Intent.FLAG_ACTIVITY_NEW_TASK for: Intent {
comp={com.blah.blahs/com.blah.blahs.Blahs} (has extras) }

RESUMED called here!!!
Intent { action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER} flags=0x1020
comp={com.blah.blahs/com.blah.blahs.Blahs} }

By the time onResume is called, the intent has changed - so there are
no more extras.  This is where either I am totally confused or my
paradigm needs some major shifting.

I really appreciate the help.

j


On Wed, Jun 24, 2009 at 8:57 PM, Mark Murphymmur...@commonsware.com wrote:

 Jason Van Anden wrote:
 thing is,
 I have no idea what function to read the intent details from.

 You can get the Intent that started your activity via getIntent().
 AFAIK, if you are brought forward off the stack via a Notification,
 getIntent() will return the Intent from the Notification.

 It does not call onCreate ... or startActivity.

 I'm not sure what it is in the above sentence.

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

 _Android Programming Tutorials_ Version 1.0 Available!

 


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



[android-beginners] Seeking good example ... Notification/PendingIntent

2009-06-16 Thread Jason Van Anden
Hi All,

I am having trouble tracking down a good example of a Notification that will
cause a specific activity to occur when triggered.  I am creating the
notification from a service which triggers the running Activity when
selected.  This happen - no sweat.  What I would like to do, is have the
activity receive the intent and do something specific based upon it.  I
would appreciate it if someone can point me in the right direction ... an
example would be incredibly helpful.

Thank You,
Jason

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



[android-beginners] Re: Multiple Instances of App Running When Home + Restart

2009-04-05 Thread Jason Van Anden
Sure ...

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=us.quadrant2.surfacelooptest
  android:versionCode=1
  android:versionName=1.0.0

   uses-permission android:name=android.permission.READ_PHONE_STATE /
application android:icon=@drawable/icon
android:label=@string/app_name android:theme=@style/Theme.NoBackground
activity android:name=.SurfaceLoopActivity
  android:label=@string/app_name
  
intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
service android:enabled=true android:name=.SurfaceLoopService
/service
/application

/manifest

What is also perplexing is that when onCreate is called (after restart via
app icon) its bundle is null (even though save the state).  Perhaps this is
a clue.

Thanks,
Jason Van Anden
www.smileproject.com


On Sun, Apr 5, 2009 at 10:57 AM, Mark Murphy mmur...@commonsware.comwrote:


 robotissues wrote:
  I am perplexed.  I created an app using LunarLander example as its
  basis.  It pauses and resumes in its correct state when the phone
  rings/hangs up or when leaving/returning via notification.  However,
  when I click the Home button and then click the app's icon, it
  starts another instance instead (I can tell via debug messages in the
  draw loop).  I suspect that the answer is obvious but somehow
  something is not clicking.  Advice appreciated.

 Could you post your AndroidManifest.xml file?

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

 Android App Developer Training: http://commonsware.com/training.html

 


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



[android-beginners] Re: Opening pdf and office file

2009-03-12 Thread Jason Van Anden
I still have not come across a descent pdf reader for Android.  I would like
to find one so I can read Mark's books on the subway (actually).  If anyone
has a good recommendation ... last I checked the ones in the market are not
ready for prime time.

i++

On Thu, Mar 12, 2009 at 8:00 AM, Mark Murphy mmur...@commonsware.comwrote:


 Pankaj Bisaria wrote:
  If in Android that component is not available then please tell me how we
  can open the pdf and MSOffice files.

 Buy programs that run on Android that open PDF and MS Office files. I
 know there are PDF viewers available, and I seem to recall DataVis was
 going to be releasing MS Office viewers at some point for Android.

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

 


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



[android-beginners] Re: Name that service ...

2009-01-26 Thread Jason Van Anden
I think I figured it out ... vibrate.  I thought that the vibration that
occurs when you click on a home icon had a different feel than the standard
issue vibrate ... but I guess its just the quickness of the pulse.  Hope
this helps someone else.

i++

On Sun, Jan 25, 2009 at 5:07 PM, robotissues jason.van.an...@gmail.comwrote:


 I would like to call the service that makes the phone jump when an
 icon is selected on the home screen (it does this on the G1 at any
 rate).  Part of the problem is that I have no idea what to call it so
 I do not know how to find it!  Does anyone know if this service is
 exposed and if so, what is its name?  Better yet ... is there a list
 of the currently available services?


 


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



[android-beginners] Re: Help with path syntax for reading file off SD card

2009-01-23 Thread Jason Van Anden
Thanks for the suggestions.  It is working.

i++

On Tue, Jan 20, 2009 at 10:18 PM, Dave Sparks davidspa...@android.comwrote:


 If you have UMS enabled, you won't be able to play the file. The G1 O/
 S cannot access the SD card at the same time as the host system.
 Disconnect the cable, or don't enable UMS when you connect USB.

 On Jan 18, 1:22 pm, robotissues jason.van.an...@gmail.com wrote:
  I am trying to create a very simple mp3 player with one button that
  plays one song.  I found misc code here and there as a start.  I am
  running the application via Eclipse onto  my G1 which is attached via
  USB.  The application runs fine on the phone, screen loads, button
  click event gets fired, etc ... the problem is that when mp.prepare()
  is called, it throws an error ... here is the code:
 
  mp.setDataSource(/sdcard/music/lonelydays.mp3);
  mp.prepare();
 
  I copied a file to  /music/lonelydays.mp3 on the sd card.
 
  Looking for feedback on what I am missing.
 
  Thank You.
 


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