Re: [android-beginners] Play video in resource path

2010-07-08 Thread Carmen Delessio
You can refer to video resource as a string and use it for the path.
If your package name is com.mypackagename, then the resource in the
raw directory will be:

android.resource://com.mypackagename/raw/myvideosample

Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto

On Thu, Jul 8, 2010 at 10:21 AM, Victor Hugo vhs...@gmail.com wrote:
 hi,

 how do i to play a video in format .3gp with VideoView

 R.raw.myvideosample

 the video from my resource path

 ty

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


-- 
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] Re: Force Close when trying to use getApplication()

2010-05-11 Thread Carmen Delessio
I  experienced something like this when following the example in the book.
The Author's have code and a comment on this here:
http://unlocking-android.googlecode.com/svn/chapter3/trunk/RestaurantFinder/src/com/msi/manning/restaurant/RestaurantFinderApplication.java

The key to this, I think, is the AndroidManifest.xml file:
http://unlocking-android.googlecode.com/svn/chapter3/trunk/RestaurantFinder/AndroidManifest.xml

application android:icon=@drawable/restaurant_icon
android:label=@string/app_short_name
android:name=RestaurantFinderApplication
android:allowClearUserData=true 
android:theme=@android:style/Theme.Black
...

When using this method, you *must* specify the android:name for the
application and it needs to be the name of the application class.

In the specific case described, check AndroidManifest.xml and, if it is not
there, add  android:name=BoardGamerFinderApplication

More info on this:
http://developer.android.com/intl/zh-CN/guide/appendix/faq/framework.html#3

Carmen
-- 
Carmen Delessio
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop


On Tue, May 11, 2010 at 11:13 AM, Jon Jacob jonjacobm...@gmail.com wrote:

 getApplication(), I believe, comes from the Application class that
 BoardGameFinderApplication is an extension of.   I did put the
 suspected section in a try - catch block and the error message
 referenced the android.app.Application as the error not very
 helpful since I pretty much know that is where the problem lies.   I
 just don't know the specific cause.

 On May 11, 7:46 am, Justin Anderson janderson@gmail.com wrote:
  Where is the getApplication() method defined?  My initial thought would
 be
  that it is returning null for some reason and you are not checking for
  that... perhaps with a try catch block or a simple null check... But I
 can't
  tell for sure without seeing this method.
 
  What does logcat say about the cause?
 
  Thanks,
  Justin
 
  --
  There are only 10 types of people in the world...
  Those who know binary and those who don't.
  --
 
 
 
  On Tue, May 11, 2010 at 8:02 AM, Jon Jacob jonjacobm...@gmail.com
 wrote:
   I am a newbie both to Java and Android and have been reading the book
   Unlocking Android and trying to learn by adapting their code to my
   ideas for a project to play with and learn Android.
 
   But, I have run into a brick wall that I need help with.   The
   following code gives me a force close when I click the submit button,
   and I don't know why.   (Good debugging tips would be nice too.)
 
   Its the line:
 
   BoardGameFinderApplication application = (BoardGameFinderApplication)
   getApplication();
 
   that seems to be causing the crash.  I just don't understand why?  All
   indications are that I am using it correctly.  What am I missing?
 
   Here is the code:
 
   From my main activity class:
 
   import java.util.ArrayList;
 
   import android.app.Activity;
   import android.content.Intent;
   import android.os.Bundle;
   import android.os.Debug;
   import android.view.View;
   import android.view.View.OnClickListener;
   import android.widget.Button;
   import android.widget.EditText;
   import android.widget.TextView;
 
   public class BoardgameCriteria1 extends Activity {
 
  private Button grabGames;
  private TextView introText;
  private EditText gameName;
  ArrayListString bglNames = new ArrayListString();
  private String s;
 
  @Override
  public void onCreate(Bundle icicle) {
  super.onCreate(icicle);
 
  setContentView(R.layout.main);
  this.introText = (TextView) findViewById(R.id.IntroText);
  this.gameName = (EditText) findViewById(R.id.GameName);
  this.grabGames = (Button) findViewById(R.id.Submit);
 
  // get the board game names when submit button hit
  this.grabGames.setOnClickListener(
  new OnClickListener() {
  public void onClick(View v) {
  handleGetReviews();
  }
  });
  }
 
  private void handleGetReviews() {
 
  BoardGameFinderApplication application =
   (BoardGameFinderApplication) getApplication();
 
  
 application.setBoardGameCriteriaName(this.gameName.getText().toString());
  Intent intent = new Intent(this.getApplicationContext(),
   GameList1.class);
  startActivity(intent);
  }
   }
 
    and the BoardGameFinderApplication class:
 
   public class BoardGameFinderApplication extends Application {
 
  private BoardGame currentBoardGame;
  private String gameCriteriaName;
 
  public BoardGameFinderApplication() {
  super

Re: [android-beginners] Re: XML Parser example problems

2010-04-07 Thread Carmen Delessio
You may want to look at using SAX parser.
This article compares SAX speed to other parsers on Android:
http://www.developer.com/xml/article.php/3824221/Android-XML-Parser-Performance.htm

This article gives a full example:
http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html

-carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop


On Wed, Apr 7, 2010 at 12:42 PM, Tereno ter...@gmail.com wrote:

 Not sure if this applies but does the Eclipse contain Java EE?

 On Apr 7, 9:20 am, MartinM martinandj...@gmail.com wrote:
  Hi, I need to create a simple app. to retrieve some XML, parse and
  display it. I'm using Eclipse Galileo on WinXP.
 
  I've triedhttp://
 www.warriorpoint.com/blog/2009/07/19/android-simplified-source...
 
  which I believe is derived from
 
  http://www.ibm.com/developerworks/opensource/library/x-android/index
 
  However, with the latter project I get the error 'Could not find
  AndroidXml.apk!'
 
  I was getting the same error with the first example, but ended up
  with :
 
  '[2010-04-07 14:17:55 - AndroidXmlSimple]
  trouble processing java/net/DatagramPacket.class:
  [2010-04-07 14:17:55 - AndroidXmlSimple]
  Attempt to include a core class (java.* or javax.*) in something other
  than a core library.
  
  
  ...
  [2010-04-07 14:17:55 - AndroidXmlSimple] 1 error; aborting
  [2010-04-07 14:17:55 - AndroidXmlSimple] Conversion to Dalvik format
  failed with error 1'
 
  As a beginner I was hoping that importing example projects would be
  painless, however... :)
 
  Any ideas folks?

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

 To unsubscribe, reply using remove me as the subject.


-- 
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] Re: Layout help, is it possible to wrap controls?

2010-03-30 Thread Carmen Delessio
Take a look at this.  I think it may solve part of the problem you are
looking at;
*Selecting, Highlighting, or Styling Portions of Text* *You can highlight or
style the formatting of strings or substrings of text in a TextView object.*
...
*the following code snippet demonstrates creating a string with a
highlighted section, italic section, and bold section, and adding it to an
EditText object.*
http://developer.android.com/intl/zh-CN/guide/appendix/faq/commontasks.html#selectingtext

Carmen

-- 
Carmen Delessio
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop


On Tue, Mar 30, 2010 at 8:00 PM, Stormtap Studios
r...@stormtapstudios.comwrote:

 BTW, due to the way messages are formatted when sent to this group,
 the part where the letters go down in a column should have a bunch of
 spaces in front of them so they're lined up with the a at the end of
 the first line (i.e. they are all against the right edge of the
 screen).

 On Mar 30, 4:58 pm, Stormtap Studios r...@stormtapstudios.com wrote:
  Hi guys,
 
  I'm trying to build a custom TextView solution.  I want to be able to
  create text views with some tagged text, e.g. iThis text is
  italic/iband this text is bold/b, and since you can only set
  one style for all the text in the textview I need to come up with
  something custom.  I've written a class that will parse the string and
  generate an array of pairs (text paired with style to apply to the
  text).
 
  What I am trying to figure out is how to get a series of TextView
  objects arranged on the screen such that they wrap around the width of
  their container.
 
  I tried this:
 
  LinearLayout
  xmlns:android=
 http://schemas.android.com/apk/res/android;
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:orientation=horizontal
  android:id=@+id/TestLayout
  /LinearLayout
 
  And then I tried having my class take a LinearLayout object, and add
  TextView objects to it, one for each pair (with the styles applied to
  each individual TextView object).  This doesn't work.  The content
  doesn't wrap to a new line when it hits the edge of the screen.  So
  for example for this string:  iThis is a long italic string./i
  and this is normal text band this is bold/b, the output looks
  like this:
 
  This is a long italic string, and this is normal text, a
 
  n
 
  d
 
  t
 
  h
 
  i
 
  s
 
  i
 
  s
 
  b
 
  o
 
  l
 
  d
 
  Whereas I would like it to look like this:
 
  This is a long italic string, and this is normal text,
  and this is bold
 
  I've tried all kinds of combinations for layout settings to try to get
  it to work, and haven't had any luck.  Does anyone have any advice for
  how I might get the labels to wrap nicely?
 
  I've been thinking that instead I could just use a WebView, and pass
  it the text to render, but I am worried about the overhead and speed
  of doing this.  These custom labels will appear in a fullscreen
  ListView with many rows.  I'm worried having a webview in each row for
  a large set would be extremely slow.
 
  Thanks in advance for reading and any advice,
 
  Rob

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

 To unsubscribe, reply using remove me as the subject.


-- 
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] Facebook API for Android

2010-03-22 Thread Carmen Delessio
I do not know of an eclipse plugin.

There are several libraries mentioned on the facebook wiki:
http://wiki.developers.facebook.com/index.php/User:Android

- http://me.sylvek.net/index.php?2009/02/11/434-api-facebook-with-android
- http://xeomax.net/fbrocket/
- http://code.google.com/p/fbconnect-android/

I created my own library for BFF Photo an app that shows Facebook Photos
and uploads photos and videos.
I am cleaning up the library now and will ultimately release it.

The main issues seems to be authorization.  I originally used Facebook's
simplified Desktop authorization:
http://developers.facebook.com/news.php?blog=1story=289

But I have switched to authorizing mobile apps method:
http://wiki.developers.facebook.com/index.php/Authentication_and_Authorization_for_Facebook_for_Mobile_Applications

Carmen
-- 
Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop


On Mon, Mar 22, 2010 at 8:34 PM, peaceinmind say...@gmail.com wrote:

 Can any one suggest if there is any FB Api for integrating with
 Android? I am looking for Eclipse plugin for facebook api that i could
 use with android.

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

 To unsubscribe from this group, send email to android-beginners+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


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

To unsubscribe from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-beginners] Re: ImageView.VISIBLE/INVISIBLE

2009-09-25 Thread Carmen Delessio
I've got a example with a TextView and EditView where I do this
successfully.
See
http://developer.android.com/reference/android/view/View.html#setVisibility(int)that
is where View.VISIBLE is defined.
Just noticed View.GONE.  that could be helpful.

Define TextView and EditText:
TextView adminLabel;
EditText admin;

Assign from Layout:
adminLabel = (TextView)findViewById(R.id.AdminLabel);
admin = (EditText)findViewById(R.id.Admin);

Set to invisible:
admin.setVisibility(View.INVISIBLE);
adminLabel.setVisibility(View.INVISIBLE);

Set to visible:
admin.setVisibility(View.VISIBLE);
adminLabel.setVisibility(View.VISIBLE);


-- 
Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop


On Fri, Sep 25, 2009 at 3:49 PM, Kingcrowley kingcrow...@gmail.com wrote:


 I was wondering how this works,

 I can set ImageViews VISIBLE or INVISIBLE in OnCreate, but i can't
 seem to do it anywhere else properly?
 using code like imgView.setVisibility(ImageView.VISIBLE);
 any pointers/advice?

 Thanks,

 David
 


--~--~-~--~~~---~--~~
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: ImageView.VISIBLE/INVISIBLE

2009-09-25 Thread Carmen Delessio
The snippets were taken from my code.  I can't post the whole thing.

Are you using View.INVISIBLE and View.VISIBLE as the parameter to
setVisibility?

-- 
Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop



On Fri, Sep 25, 2009 at 5:30 PM, Kingcrowley kingcrow...@gmail.com wrote:


 HI,

 my code seems similar to yours..but doesn't work..could you copy/paste
 in yours if it isn't too long?

 Thanks a lot

 David

 On Sep 25, 9:01 pm, Carmen Delessio carmendeles...@gmail.com wrote:
  I've got a example with a TextView and EditView where I do this
  successfully.
  Seehttp://
 developer.android.com/reference/android/view/View.html#setVisi...
  is where View.VISIBLE is defined.
  Just noticed View.GONE.  that could be helpful.
 
  Define TextView and EditText:
  TextView adminLabel;
  EditText admin;
 
  Assign from Layout:
  adminLabel = (TextView)findViewById(R.id.AdminLabel);
  admin = (EditText)findViewById(R.id.Admin);
 
  Set to invisible:
  admin.setVisibility(View.INVISIBLE);
  adminLabel.setVisibility(View.INVISIBLE);
 
  Set to visible:
  admin.setVisibility(View.VISIBLE);
  adminLabel.setVisibility(View.VISIBLE);
 
  --
  Carmenhttp://
 www.twitter.com/CarmenDelessiohttp://www.talkingandroid.comhttp://www.facebook.com/BFFPhotohttp://www.twitter.com/DroidDrop
 
  On Fri, Sep 25, 2009 at 3:49 PM, Kingcrowley kingcrow...@gmail.com
 wrote:
 
   I was wondering how this works,
 
   I can set ImageViews VISIBLE or INVISIBLE in OnCreate, but i can't
   seem to do it anywhere else properly?
   using code like imgView.setVisibility(ImageView.VISIBLE);
   any pointers/advice?
 
   Thanks,
 
   David
 


--~--~-~--~~~---~--~~
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: Publishing Updates for my application

2009-08-27 Thread Carmen Delessio
No do not unpublish.  The market will take care of it.
I just like to be sure that the new APK will install properly.  My goal was
to test the install without having to publish in the market, that is where
APKatcher helps.

The uninstall on the phone is done command line:
tools/adb uninstall com.yourpackagename


On Thu, Aug 27, 2009 at 2:54 PM, Georgy georgearna...@gmail.com wrote:


 but I have to unpublish then publish the newer version? won't the
 market take it as if the application has just been released? what will
 happen to all the ratings and feed backs... that's my only concern.

 On Aug 27, 12:39 am, Carmen Delessio carmendeles...@gmail.com wrote:
  I just did a version upgrade.  Here are some things I do.
  1. Make sure to build after upping version number.  I got caught by this
  dumb mistake.
  2. I delete the existing dev version of the app from my phone
  3. I use eclipse to create an unsigned APK
  4. I sign the APK following instructions on Android site
  5. I send myself the new APK via gmail
  6. I have APKatcher app installed, that lets me test the new APK install
  7. upload to market
 
  Today I did steps 2-6 several times because I skipped step 1 ;-)
  Good Luck,
  Carmenhttp://www.talkingandroid.com
 
 
 
  On Wed, Aug 26, 2009 at 4:31 PM, Nick nick.vers...@gmail.com wrote:
 
   See
  
 http://developer.android.com/guide/publishing/versioning.html#appversion
 
   For the Google Market to alert all your users that there is an update
   you will need to set the Version Code to a higher number than in your
   previous version. This is set in your Manifest file.  I assume you
   probably set this to 1.  I would set the Version Code to 2.
 
   You can then set the Version Name to 1.1 like you mentioned above.
 
   Read the link above it clearly explains this in greater detail.
 
   Nick
 
   On Aug 26, 3:10 pm, Georgy georgearna...@gmail.com wrote:
this might sound as a really silly question but I published my
application and would like to release some updates:
1- how can I do it?
2- should I version my app as 1.1 now?
Thanks
 


--~--~-~--~~~---~--~~
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: Publishing Updates for my application

2009-08-26 Thread Carmen Delessio
I just did a version upgrade.  Here are some things I do.
1. Make sure to build after upping version number.  I got caught by this
dumb mistake.
2. I delete the existing dev version of the app from my phone
3. I use eclipse to create an unsigned APK
4. I sign the APK following instructions on Android site
5. I send myself the new APK via gmail
6. I have APKatcher app installed, that lets me test the new APK install
7. upload to market

Today I did steps 2-6 several times because I skipped step 1 ;-)
Good Luck,
Carmen
http://www.talkingandroid.com

On Wed, Aug 26, 2009 at 4:31 PM, Nick nick.vers...@gmail.com wrote:


 See
 http://developer.android.com/guide/publishing/versioning.html#appversion

 For the Google Market to alert all your users that there is an update
 you will need to set the Version Code to a higher number than in your
 previous version. This is set in your Manifest file.  I assume you
 probably set this to 1.  I would set the Version Code to 2.

 You can then set the Version Name to 1.1 like you mentioned above.

 Read the link above it clearly explains this in greater detail.

 Nick

 On Aug 26, 3:10 pm, Georgy georgearna...@gmail.com wrote:
  this might sound as a really silly question but I published my
  application and would like to release some updates:
  1- how can I do it?
  2- should I version my app as 1.1 now?
  Thanks
 


--~--~-~--~~~---~--~~
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: Install app on a device?

2009-08-25 Thread Carmen Delessio
Apkatcher also works. Send your APK to gmail  open with apkatcher
Carmen

On Aug 25, 2009, at 9:02 PM, Michael Leung michaelchi...@gmail.com  
wrote:

 Yes, that is an  app calls AppsInstaller in the Android Market. It  
 can do the job you want.
 I have written some instructions about this issue in my blog.
 http://www.itblogs.info/index.php/2009/07/23/install-android-apps-from-sd-card?blog=6

 On Wed, Aug 26, 2009 at 10:08 AM, Yasser yassersiddi...@gmail.com  
 wrote:

 Hi,

 I have HTC Magic and I want to install an android app (APK) on it.
 I did the following:
 1. connected phone to PC and then used HTC sync to synchronize with
 windows
 2. run adb install command

 For this I had to install and setup android SDK and HTC sync. Is there
 any simple way of installing an app for a normal user, like copying it
 to SD card and then selecting it to install?

 Thanks
 Yasser




 -- 
 Regards,
 Michael Leung
 http://www.itblogs.info
 http://www.michaelleung.info

 

--~--~-~--~~~---~--~~
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: Getting Error package file was not signed correctly using Eclipse ADT

2009-07-14 Thread Carmen Delessio
Beth,
Thanks a lot for the info.  At one point I tried installing from Gmail.  I'm
sure I was reading the thread you mentioned.

I fixed this, but I am not sure which actions corrected the problem.
Here are some of the things I did.


   - Removed app from phone using adb: adb uninstall package name
   - Update these values in Android Manifest file android:versionCode=4
   android:versionName=1.02
   - Removed an icon in drawable that was not being used
   - Created APK with same key, but new filename from myapp.apk to
   myapp3.apk
   - Updated app in marketplace (upload/update)


Someone suggested that I hit this bug:
http://code.google.com/p/android/issues/detail?id=830

The bug refers to issues with multiple icons in the manifest file.  Since
one of my actions was to remove an unused icon, I think this might have been
the issue.

Carmen
http://twitter.com/CarmenDelessio
http://www.talkingandroid.com


On Mon, Jul 13, 2009 at 2:33 PM, Beth emez...@gmail.com wrote:


 Hi Carmen,

 How are you getting the signed package onto the phone, if not through
 Eclipse?  I started a recent 'beginners' thread about trying to
 install an app from Gmail.  It throws this same error and doesn't
 work.  You need to use the adb command line or Eclipse.

 The alternative suggested to me in that thread (which I did not test)
 is to open the attachment using browser GMAIL (not the bundled Android
 app), download the file attachment, then open it with Linda file
 manager, or some other file management app you have installed.  Do you
 see the error in some other user scenario?

 Good luck,
 Beth

 On Jul 8, 7:16 am, Carmen Delessio carmendeles...@gmail.com wrote:
  This message comes up when debugger is on:
  07-08 10:04:00.873: WARN/PackageInstaller(2957): Parse error when parsing
  manifest. Discontinuing installation
  The AndroidManifest.xml has no errors based on review in eclipse. The app
  runs in emulator.
  I've tried manually signing app and using jarsigner with same result.
 
  I've seen similar issues posted, but no steps to resolution.  Any help
 would
  be great.
  Carmen
 
  On Wed, Jul 8, 2009 at 8:05 AM, Carmen Delessio 
 carmendeles...@gmail.comwrote:
 
 
 
   Are there any previous versions of MyApp on the emulator/phone ?
 
   There was when I initially tried the install. I received a message
 about
   overwriting it  and continued.
   I have subsequently removed the app from the phone and tried again.  It
   fails with same error.
 
   Carmen
 
   On Wed, Jul 8, 2009 at 1:37 AM, Balwinder Kaur (T-Mobile) 
   balwinder.k...@t-mobile.com wrote:
 
   Are there any previous versions of MyApp on the emulator/phone ?
 
   Balwinder Kaur
   Open Source Development Center
   ·T· · ·Mobile· stick together
 
   The views, opinions and statements in this email are those of the
   author solely in their individual capacity, and do not necessarily
   represent those of T-Mobile USA, Inc.
 
   On Jul 7, 10:23 pm, Carmen carmendeles...@gmail.com wrote:
Any suggestions on what to look for?
It would be great to determine a list of things to check for in this
scenario.
 
This is the situation:
App works successfully on emulator and phone when launched through
Eclipse.
 
Created Signed APK File created Using Eclipse ADT as described here:
  http://developer.android.com/guide/publishing/app-signing.html#Export.
 ..
 
It says:
To create a signed .apk, right-click the project in the Package
Explorer and select Android Tools  Export Signed Application
 Package.
 
When I check apk file using jar signer it says the jar is verified.
jarsigner -verify -verbose -certs  MyApp.apk
 
When I try to install signed APK, I get the package file not signed
correctly error.
 
I would love to find out I am making a dumb mistake.
 
Carmen
 


--~--~-~--~~~---~--~~
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: How to pass User created object between two Activity in same Application?

2009-07-14 Thread Carmen Delessio
This concept comes from the book* Unlocking Android*.
http://www.manning.com/ableson/
Create an object for your your application that extends the
android.app.Application class

*import android.app.Application;
public class MyApplication extends Application {
...
}
*
Provide access to ClassA in the MyApplication class.
Set and Get ClassA from your activities.

*   MyApplication  application = (MyApplication) getApplication();
   ClassA local=application.getClassA();*


From the FAQ: http://developer.android.com/guide/appendix/faq/framework.html
The android.app.Application class

The android.app.Application is a base class for those who need to maintain
global application state. It can be accessed via getApplication() from any
Activity or Service. It has a couple of life-cycle methods and will be
instantiated by Android automatically if your register it in
AndroidManifest.xml.

Carmen

http://twitter.com/CarmenDelessio

http://www.talkingandroid.com

On Tue, Jul 14, 2009 at 9:22 PM, Mapara,Harshit Nitinkumar 
hnmap...@gmail.com wrote:


 Hi All,

 Let say I have one class :

 Class A {
int id; String name;
public A(int id, String name) { this.id = id; this.name = name;}
  }

 How do I pass object of A between two Activity classes in a same
 application ?
 I came across the Parcelable interface, but I couldn't find good
 example.

 Thanks
 Harshit

 


--~--~-~--~~~---~--~~
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: Getting Error package file was not signed correctly using Eclipse ADT

2009-07-08 Thread Carmen Delessio
Are there any previous versions of MyApp on the emulator/phone ?

There was when I initially tried the install. I received a message about
overwriting it  and continued.
I have subsequently removed the app from the phone and tried again.  It
fails with same error.

Carmen

On Wed, Jul 8, 2009 at 1:37 AM, Balwinder Kaur (T-Mobile) 
balwinder.k...@t-mobile.com wrote:


 Are there any previous versions of MyApp on the emulator/phone ?

 Balwinder Kaur
 Open Source Development Center
 ·T· · ·Mobile· stick together

 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.


 On Jul 7, 10:23 pm, Carmen carmendeles...@gmail.com wrote:
  Any suggestions on what to look for?
  It would be great to determine a list of things to check for in this
  scenario.
 
  This is the situation:
  App works successfully on emulator and phone when launched through
  Eclipse.
 
  Created Signed APK File created Using Eclipse ADT as described here:
 http://developer.android.com/guide/publishing/app-signing.html#Export...
 
  It says:
  To create a signed .apk, right-click the project in the Package
  Explorer and select Android Tools  Export Signed Application Package.
 
  When I check apk file using jar signer it says the jar is verified.
  jarsigner -verify -verbose -certs  MyApp.apk
 
  When I try to install signed APK, I get the package file not signed
  correctly error.
 
  I would love to find out I am making a dumb mistake.
 
  Carmen
 


--~--~-~--~~~---~--~~
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: Getting Error package file was not signed correctly using Eclipse ADT

2009-07-08 Thread Carmen Delessio
This message comes up when debugger is on:
07-08 10:04:00.873: WARN/PackageInstaller(2957): Parse error when parsing
manifest. Discontinuing installation
The AndroidManifest.xml has no errors based on review in eclipse. The app
runs in emulator.
I've tried manually signing app and using jarsigner with same result.

I've seen similar issues posted, but no steps to resolution.  Any help would
be great.
Carmen

On Wed, Jul 8, 2009 at 8:05 AM, Carmen Delessio carmendeles...@gmail.comwrote:

 Are there any previous versions of MyApp on the emulator/phone ?

 There was when I initially tried the install. I received a message about
 overwriting it  and continued.
 I have subsequently removed the app from the phone and tried again.  It
 fails with same error.

 Carmen


 On Wed, Jul 8, 2009 at 1:37 AM, Balwinder Kaur (T-Mobile) 
 balwinder.k...@t-mobile.com wrote:


 Are there any previous versions of MyApp on the emulator/phone ?

 Balwinder Kaur
 Open Source Development Center
 ·T· · ·Mobile· stick together

 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.


 On Jul 7, 10:23 pm, Carmen carmendeles...@gmail.com wrote:
  Any suggestions on what to look for?
  It would be great to determine a list of things to check for in this
  scenario.
 
  This is the situation:
  App works successfully on emulator and phone when launched through
  Eclipse.
 
  Created Signed APK File created Using Eclipse ADT as described here:
 http://developer.android.com/guide/publishing/app-signing.html#Export...
 
  It says:
  To create a signed .apk, right-click the project in the Package
  Explorer and select Android Tools  Export Signed Application Package.
 
  When I check apk file using jar signer it says the jar is verified.
  jarsigner -verify -verbose -certs  MyApp.apk
 
  When I try to install signed APK, I get the package file not signed
  correctly error.
 
  I would love to find out I am making a dumb mistake.
 
  Carmen
 



--~--~-~--~~~---~--~~
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: Using AsyncTask

2009-06-30 Thread Carmen Delessio

 It took me the better part of 9 pages to explain it with an example in
 the released-but-not-announced Version 2.1 of _The Busy Coder's Guide to
 Android Development_. But, it may be I'm just wordy.

 You can grab the source for that from:

 http://commonsware.com/Android/

 Look for the Threads/Asyncer sample project.

 The canonical example is on the Android Developers blog:

 http://android-developers.blogspot.com/2009/05/painless-threading.html

 Note that the current implementation of AsyncTask limits you to a single
 background thread. It is fairly easy to pull the source for it into your
 own project and tinker with the java.util.concurrent objects to add
 threads, change the queue semantics, etc.

 --
 Mark Murphy (a Commons Guy)


Thanks for the example.  I'm not surprised it took 9 pages, I don't think
this is trivial to understand.
I want to understand this better:
 the current implementation of AsyncTask limits you to a single
 background thread.

Im my case, I've extended a ListActivity.  I want to populate the list when
it is created and when the user scrolls to the end.
I'm using onCreate and onScrollStateChanged.
Today I am using a Thread in each of those methods.
There is a Handler in the ListActivity class to handle messages from the
threads.
I can't make the connection on how to do that with an AsyncTask.

Is it not a match or am I missing it?

Carmen

--~--~-~--~~~---~--~~
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: Simple GridView that displays text in the grids

2009-06-12 Thread Carmen Delessio
There is an example in The Busy Coder's Guide to Android Development by
Mark Murphy.
I haven't tried it yet, but preview is online:
http://books.google.com/books?id=lrf4xxsgmd8Cpg=PA74

Carmen

On Thu, Jun 11, 2009 at 3:01 AM, Fei jianfeil...@gmail.com wrote:


 i'm following the example on the tutorial about the GridView, but
 instead of showing image, i want to just simple show some text using a
 TextView. it turns out seems to be harder than i thought. it might
 seems like this is totally unnecessary and it doesn't have a valid use
 case, but i'm trying this out to just get myself familiar with the
 sdk.

 so my code is pretty much the same as the GridView example in
 http://developer.android.com/guide/tutorials/views/hello-gridview.html,
 but instead of using a ImageAdapter, i created a dummy adapter like
 following:

 class MyAdapter extends BaseAdapter {
private Context context;
private String[] texts = {aaa, bbb, ccc, ddd, eee,
 fff, eee, hhh, iii};

public MyAdapter(Context context) {
this.context = context;
}

public int getCount() {
return 9;
}

public Object getItem(int position) {
return null;
}

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

public View getView(int position, View convertView, ViewGroup
 parent) {
TextView tv;
if (convertView == null) {
tv = new TextView(context);
tv.setLayoutParams(new GridView.LayoutParams(85, 85));
}
else {
tv = (TextView) convertView;
}

tv.setText(texts[position]);
return tv;
}


 it all seems valid to me, but running this gives me nothing on the
 screen. there's some selectable/clickable block if i click them, but
 the text is obvious not shown. i wonder is my layout doesn't have the
 android:text causing this problem? or anything else?

 any feedback will be appreciated and thanks for your help!

 


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