[android-beginners] Re: Get arguments from another activity

2009-08-26 Thread Roman ( T-Mobile USA)

The usage of intents is a little bit more complex and there are
different options available how to communicate between your two
activities.

Try to understand the basics of intents (action, data, ...)

Basics:
 - http://developer.android.com/reference/android/content/Intent.html

When you start another Activity you have to decide how you want to
communicate back to the calling activity. Please, get familiar with


Start other activities:startActivity(Intent)  and
startActivityForResult
- http://developer.android.com/reference/android/app/Activity.html)

Also get some understanding how to write your Manifest to use intents
correctly. Check out the following link:

- http://developer.android.com/guide/topics/manifest/intent-filter-element.html

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·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 Aug 25, 12:48 am, Sebeto seb...@gmail.com wrote:
 Hi,

 I try to get the value of a parameter from another activity, but can't
 succeed in doing that. I found things about putExtra/getExtra, but
 couldn't get it to work unfortunately.

 Problem:
 I've got a TabActivity called methodes, which has a TabHost. The
 contents of the Tabs are activities, and I need to retrieve in these
 activities the value of maValeur (which is actually a
 ArrayListString). My application is net.sebeto.android.essai.

 public class Methodes extends TabActivity
 {
         public static ArrayListString maValeur;
         public void onCreate(Bundle savedInstanceState)
         {

               // I initialize maValeur, ...
               (...)

              // MethTab2 will be the content of the second tab
              Intent Tab2 = new Intent(this, MethTab2.class);
              Tab2.putStringArrayListExtra
 (net.sebeto.android.essai.Methodes.maValeur, maValeur);

              TabHost host = getTabHost();
              (...)
              host.addTab(host.newTabSpec(two).setIndicator
 (Valeur).setContent(Tab2));
         }

 }

 Now:

 public class MethTab2 extends Activity
 {
         private ArrayListString maValeurBis;

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

             // How to get the value of maValeur??
             // I found no way to use getStringArrayList?
             //  maValeurBis = savedInstanceState.getStringArrayList
 (net.sebeto.android.cuisine.Methodes.maValeur); crashes, ...
            // I can get the value with maValeurBis =
 Methodes.maValeur; but I'm not sure that it's
            // a good way to do it, is it? It works, but... do you
 think it's a good method?

             maValeurAdapter = new ArrayAdapterString(this,
 R.layout.methtab2,maValeurBis);
             ListView list = new ListView(this);
             list.setAdapter(maValeurAdapter);
             list.setSelector(android.R.color.transparent);
             setContentView(list);
         }

 }

 Thank you for your answers, I'm a perfect beginner in java and in
 android... If someone could give me a code which would work it would
 be great! I know that it's probably very simple but...
--~--~-~--~~~---~--~~
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] Why does using People._COUNT cause IllegalArgumentException to be thrown?

2009-08-26 Thread Pankaj Godbole
Hello,

I am learning about Content Providers, and tried the example from the
official Android tutorial on the topic. Please see the code below:


 

package com.example.devguide;

import android.app.Activity;
import android.content.ContentUris;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.util.Log;


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

/* Use the ContentUris method to produce the base URI
 * for the contact with _ID == 23. */
Uri myPerson = ContentUris.withAppendedId( People.CONTENT_URI, 23 );

/* Alternatively, use the Uri method to produce the base URI. */
myPerson = Uri.withAppendedPath( People.CONTENT_URI, 23 );

/* Query this particular record. */
Cursor c = managedQuery( myPerson, null, null, null, null );

/* Form an array specifying which columns to return. */
String[] projection = new String[] { People._ID,
 //People._COUNT, //throws
IllegalArgumentException
 People.NAME,
 People.NUMBER };
Log.i( CPE, projection[] =  + projection );

/* Get the base URI for the People table in the Contacts content
provider. */
Uri contacts = People.CONTENT_URI;

/* Construct the query. */
Cursor managedCursor = managedQuery( contacts,
 projection,
 null,
 null,
 People.NAME +  ASC );

showColumnData( managedCursor );

Log.i( CPE, End of current code );

}

private void showColumnData( Cursor c ) {
if ( c.moveToFirst() ) {
String name;
String phoneNumber;
String imagePath;
int nameColumn = c.getColumnIndex( People.NAME );
int phoneColumn = c.getColumnIndex( People.NUMBER );

do {
/* Obtain the field values. */
name = c.getString( nameColumn );
phoneNumber = c.getString( phoneColumn );
Log.d( CPE, name =  + name + , phone =  + phoneNumber
);

} while ( c.moveToNext() );
}
}
}

However, the example given did not work, because calling managedQuery with
the array projection as one of the arguments resulted in a
IllegalArgumentException (java.lang.IllegalArgumentException). Android says
that the column _count which is the value of the element People._COUNT in
array projection is invalid. Can anyone explain to me the reason for this
exception, even though the names of all the columns are as per the API
specification?

Please see the output of LogCat below:

08-26 12:06:20.330: ERROR/AndroidRuntime(1112): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.example.devguide/com.example.devguide.ContentProviderExamples}:
java.lang.IllegalArgumentException: Invalid column _count

Thanks,
Pankaj Godbole,

--~--~-~--~~~---~--~~
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] failed to locate packages - Eclipse IDE

2009-08-26 Thread Belik77

Hi,

I am developing an application and i have importaed a JAVA file that
uses several packages that my Eclipse does not recognize:

import javax.xml.transform.*;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.dom.DOMSource;

this is the code, that is not compiled:
//Transform and write the Document to the stream
TransformerFactory tf = TransformerFactory.newInstance();
Transformer tr = tf.newTransformer();
Source input = new DOMSource(xmlDoc);
Result output = new StreamResult(out);
tr.transform(input, output);
out.flush();
out.close();

what should i need to install and how, so my SDK will be compatible?

Thanks allot for your help.
Eli.
--~--~-~--~~~---~--~~
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: unexpected error in sms application

2009-08-26 Thread Belik77

Can you please add the errors that eclipse gives you?
also, sometimes you need to close the AVD (emulator) and run again. I
am sure you did but just to verify.

Thanks.
Eli P.

On Aug 26, 7:48 am, kapil.k kapnk...@gmail.com wrote:
 i have trying sms example.in first few times it was running verry well
 in eclips.then i tried some modification so its showing error
 unexpectedally closed.then i removed that application n imprted pre
 one which was running but now that is also not running n showing the
 same error.what should i suppose to do?
--~--~-~--~~~---~--~~
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] Change the color of the EditBox hint

2009-08-26 Thread manigault

How can i change the color of the EditBox hint text. 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: Change the color of the EditBox hint

2009-08-26 Thread Martin Obreshkov

android:textColorHint=# sry for the post

On Wed, Aug 26, 2009 at 12:21 PM, manigaultmanig...@gmail.com wrote:
 How can i change the color of the EditBox hint text. Thanks :)



-- 
When I raise my flashing sword, and my hand takes hold on judgment, I
will take vengeance upon mine enemies, and I will repay those who haze
me. Oh, Lord, raise me to Thy right hand and count me among Thy
saints.

--~--~-~--~~~---~--~~
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] problem with service

2009-08-26 Thread Imran

Hey All,

  I have a service which should download files in background, i am
calling this service form another activity,
  the problem is when i am calling this service form another
Activity the present Activity is getting Freezed( i.e not able to get
control back ) until the all files in service are downloaded.

  once all the files in the service are downloaded the activity is
getting the control back.

what i want is the the service should download all the files in
background with effecting the Activity which called the service.

Help me Guys..!!

Thanks,
Imran

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

2009-08-26 Thread saurabh sinha

I am looking for social networking application using location in mapview
does any body have this application

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

2009-08-26 Thread saurabh sinha

hello
I am looking for upload photo in 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] Re: About ERROR: unknown virtual device name: 'myavd'

2009-08-26 Thread Phoenix

On Aug 25, 4:41 pm, Xavier Ducrohet x...@android.com wrote:
 I see that you have changed the location of the user folders (in S:
 instead of C:)

There are user folders on both S: and C:.  Only the Desktop and My
Documents special folders are on S:.  Everything else (including App
Data) is on C:.  [The documents are shared between operating systems
on different partitions]

Android (or Eclipse?) has been the only thing to use S:.

 When the user location is not the default one, we have seen some cases
 where windows reports the location of the user folder differently
 depending on which API you use (the command line tool and Eclipse use
 a Java API, while the emulator use a windows C++ API).

That would explain why the command line tools and Eclipse could see
my_avd just fine, but the emulator could not find it.

But, shouldn't Android be set up to use HOMEDRIVE/HOMEPATH?  Standard
environment variables.

 You can override the behavior of both by declaring an environment
 variable called ANDROID_SDK_HOME
 Make it point to your HOME folder (S:\Documents and Settings\Phoenix\
 in this case) and both the emulator and the java based tools will read
 and write into the same folder.

 Xav

How did Android end up using S: in the first place?  At that time,
couldn't it set up it's own ANDROID_SDK_HOME variable to explicitly
say which directory it would be using?  (Of course, if it used
HOMEDRIVE/HOMEPATH this would be unnecessary.)

Also, a single line in the installation instructions could have
prevented this confusion.  When Android can see the AVD from the
command line and the Eclipse gui, but not from the emulator, and no
explanation is given (especially on the first test project), it's ...
disheartening.

In any event, with the ANDROID_SDK_HOME variable set to the S:
home (which is not the real home directory, that is on C:), the
emulator now works.

Thank you, Xav.  Hopefully if other people experience this odd
problem, they will find this solution.

(I'm still not sure why it isn't working for Tony)
--~--~-~--~~~---~--~~
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: Additional Contact Information

2009-08-26 Thread King of Camelot

Sorry, could you be a bit more specific? By 'modify the current
contacts app' do you mean duplicate the code in my application? If so,
that sounds kind of like option three. If you mean modify the contacts
app by itself, then I'm not sure how this would work in the case of my
application. I'm under the assumption that the application which users
will download comes as a single APK, and as such couldn't really
modify the contacts app, unless it re-directed it to the APK for my
application?

Unless I'm missing something?

Thanks! Sorry if I'm missing something.

On Aug 25, 4:36 pm, tinyang tiny...@earthlink.net wrote:
 Hello Sire :)

 I'm new to Android too, but it sounds like the first option is certainly
 do-able.  Just modify the current contacts app (assuming it's open source)
 and replace one of the current spinners (drop down menus) with the Favorite
 food item spinner you wish to add.  Modify the contacts database to add a
 field for your fav food, link it to your spinner, and you're good to go.



 -Original Message-
 From: android-beginners@googlegroups.com

 [mailto:android-beginn...@googlegroups.com] On Behalf Of King of Camelot
 Sent: Tuesday, August 25, 2009 12:52 PM
 To: Android Beginners
 Subject: [android-beginners] Additional Contact Information

 Hi all. New to Android, so I'm just trying to get a grasp of what's possible
 for an application and what's not.

 Let's say for example I wanted to add a 'Favorite Food Type' drop-down box
 to the contact view UI. This way when you add new contacts, or modify old
 ones, you can select a favorite food type for that individual, that the
 application I'm making would then use to display all individuals who like
 the food type you're currently craving. (Just an example application)

 And just to clarify, by the contact view UI, I mean the interface you see
 when you go to contacts and select an individual. In other words, the screen
 that lets you modify their contact information.

 Now, would it be possible for an application to insert this drop-down box
 into the default contact view UI? Or would the application need to show all
 contacts itself and force the user to do the food type selections in the
 application?

 The first options is preferable. If that isn't possible, there's also a
 third potential option where the application overrides the default contact
 view UI with it's own.

 Anybody know which of these is possible, and how to implement?
 (Although the in-application version need not explanation)

 Thanks!

 No virus found in this incoming message.
 Checked by AVG -http://www.avg.com
 Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/25/2009
 6:07 PM
--~--~-~--~~~---~--~~
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: Trouble passing a KML file to the DDMS Location Emulator

2009-08-26 Thread AKA

I was able to get some KML files working by manually changing the KML
tag hierarchy. Google Earth appears not to natively export KML files
in a DDMS-readable form.

On Aug 20, 2:44 pm, AKA nfee...@gmail.com wrote:
 I'm sure this must be a simple/dumb thing I'm doing wrong, as I'm
 unable to find anyone else posting about this problem...so, my
 apologies in advance if this is a stupid question.

 Basically, I'm trying to send mock location data to the Android
 Emulator via the DDMS application. I can successfully send locations
 one by one, using the Manual Location tab in DDMS. However, I can't
 get *any* KML files to even show up in DDMS when I load them...I have
 tried many different KML files, including the simple example files
 provided by Google.

 I am pretty sure I am doing something wrong, as I am quite new to
 Android. For example, I can't even get the DDMS window built in to
 Eclipse to show me the location-spoofing screen. I am running DDMS
 from the console.

 Thanks in advance for any help you might be able to offer!

 Best,

 AKA
--~--~-~--~~~---~--~~
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: App just for Android beginners

2009-08-26 Thread Jens Vegeby
Great app.

On 8 24, 2009 7:30 PM, Andrei gml...@gmail.com wrote:


Guys,

I wrote app for Android phone that can help you to learn Android /
plan your next App.
It is FREE and searchable app for all Android API documentation.
It works off-line, no need for connection.
Give it a try.
Search for DroiDoc on Market on your phone
Thanks

--~--~-~--~~~---~--~~ You received this
message because you are sub...

--~--~-~--~~~---~--~~
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: Trouble passing a KML file to the DDMS Location Emulator

2009-08-26 Thread Jose Ayerdis
i-ve been working with kml exported from google maps what do  are yu trying
to do?

2009/8/26 AKA nfee...@gmail.com


 I was able to get some KML files working by manually changing the KML
 tag hierarchy. Google Earth appears not to natively export KML files
 in a DDMS-readable form.

 On Aug 20, 2:44 pm, AKA nfee...@gmail.com wrote:
  I'm sure this must be a simple/dumb thing I'm doing wrong, as I'm
  unable to find anyone else posting about this problem...so, my
  apologies in advance if this is a stupid question.
 
  Basically, I'm trying to send mock location data to the Android
  Emulator via the DDMS application. I can successfully send locations
  one by one, using the Manual Location tab in DDMS. However, I can't
  get *any* KML files to even show up in DDMS when I load them...I have
  tried many different KML files, including the simple example files
  provided by Google.
 
  I am pretty sure I am doing something wrong, as I am quite new to
  Android. For example, I can't even get the DDMS window built in to
  Eclipse to show me the location-spoofing screen. I am running DDMS
  from the console.
 
  Thanks in advance for any help you might be able to offer!
 
  Best,
 
  AKA
 



-- 
Atte

[[Jose Luis Ayerdis Espinoza]]
http://blognecronet.blogspot.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: Additional Contact Information

2009-08-26 Thread tinyang

Sorry for not being specific enough.  I meant to duplicate the code of the
existing contacts app and modify it to fit your needs.  What you are hitting
on here is one of the many wonderful, groundbreaking ideas about Android.
Because Android is so Open, 3rd party apps developed by non-google
developers are treated exactly the same as apps created by Google.  All
Android 3rd party apps have access to all the same apis and system resources
that the Android Apps created by Google have access to.  Android 3rd party
apps are treated with the same priority as Android apps created by Google.
Then when your modified Contacts app is finished and loaded on your Android
phone, you can specify within Android that you want your Contacts app
instead of the google contacts app to be used as the default contacts app on
the phone through intent receivers.  If you choose, you could also remove
the default contacts app from the phone after testing yours and making sure
it works properly.

In comparison, the iPhone for example, it has 3rd party apps, but these 3rd
party apps are hobbled in the manner of they are sandboxed away from many of
the system resources and apis that are available to Apple developer iPhone
apps.  They are also treated with a lower priority than the Apple developer
iPhone apps.

I hope this helps make it clearer.

-Original Message-
From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of King of Camelot
Sent: Wednesday, August 26, 2009 6:31 AM
To: Android Beginners
Subject: [android-beginners] Re: Additional Contact Information


Sorry, could you be a bit more specific? By 'modify the current contacts
app' do you mean duplicate the code in my application? If so, that sounds
kind of like option three. If you mean modify the contacts app by itself,
then I'm not sure how this would work in the case of my application. I'm
under the assumption that the application which users will download comes as
a single APK, and as such couldn't really modify the contacts app, unless it
re-directed it to the APK for my application?

Unless I'm missing something?

Thanks! Sorry if I'm missing something.

On Aug 25, 4:36 pm, tinyang tiny...@earthlink.net wrote:
 Hello Sire :)

 I'm new to Android too, but it sounds like the first option is 
 certainly do-able.  Just modify the current contacts app (assuming 
 it's open source) and replace one of the current spinners (drop down 
 menus) with the Favorite food item spinner you wish to add.  Modify 
 the contacts database to add a field for your fav food, link it to your
spinner, and you're good to go.



 -Original Message-
 From: android-beginners@googlegroups.com

 [mailto:android-beginn...@googlegroups.com] On Behalf Of King of 
 Camelot
 Sent: Tuesday, August 25, 2009 12:52 PM
 To: Android Beginners
 Subject: [android-beginners] Additional Contact Information

 Hi all. New to Android, so I'm just trying to get a grasp of what's 
 possible for an application and what's not.

 Let's say for example I wanted to add a 'Favorite Food Type' drop-down 
 box to the contact view UI. This way when you add new contacts, or 
 modify old ones, you can select a favorite food type for that 
 individual, that the application I'm making would then use to display 
 all individuals who like the food type you're currently craving. (Just 
 an example application)

 And just to clarify, by the contact view UI, I mean the interface you 
 see when you go to contacts and select an individual. In other words, 
 the screen that lets you modify their contact information.

 Now, would it be possible for an application to insert this drop-down 
 box into the default contact view UI? Or would the application need to 
 show all contacts itself and force the user to do the food type 
 selections in the application?

 The first options is preferable. If that isn't possible, there's also 
 a third potential option where the application overrides the default 
 contact view UI with it's own.

 Anybody know which of these is possible, and how to implement?
 (Although the in-application version need not explanation)

 Thanks!

 No virus found in this incoming message.
 Checked by AVG -http://www.avg.com
 Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 
 8/25/2009
 6:07 PM

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/25/2009
6:07 PM


--~--~-~--~~~---~--~~
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() crash...

2009-08-26 Thread Tikoze

Wow... it has been over a week since anyone other than me has
responded to this post.  No one has any ideas on what is wrong?
--~--~-~--~~~---~--~~
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: Add one butten in a tab

2009-08-26 Thread Jack Ha

Take a look at this link:

http://jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/

--
Jack Ha
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 Aug 25, 3:39 am, Chri chr_0...@yahoo.de wrote:
 hi!

 I just started with android and now i have a problem!
 I want to add a button in a tab. In time I just can show text and i don
 ´t know how i add this button!

 my code is:
 in the .xml file:

 ?xml version=1.0 encoding=utf-8?
 TabHost xmlns:android=http://schemas.android.com/apk/res/android;
     android:id=@android:id/tabhost
     android:layout_width=fill_parent
     android:layout_height=fill_parent
     
     LinearLayout
         android:orientation=vertical
         android:layout_width=fill_parent
         android:layout_height=fill_parent
         TabWidget
             android:id=@android:id/tabs
             android:layout_width=fill_parent
             android:layout_height=wrap_content /
         FrameLayout
             android:id=@android:id/tabcontent
             android:layout_width=fill_parent
             android:layout_height=fill_parent
             TextView
                 android:id=@+id/textview1
                 android:layout_width=fill_parent
                 android:layout_height=fill_parent
                 android:text=Tickets /
             TextView
                 android:id=@+id/textview2
                 android:layout_width=fill_parent
                 android:layout_height=fill_parent
                 android:text=Tasks /
             TextView
                 android:id=@+id/textview3
                 android:layout_width=fill_parent
                 android:layout_height=fill_parent
                 android:text=Settings /
         /FrameLayout
     /LinearLayout
 /TabHost

 and my .java file:

 package com.example.workingcodes;

 import android.app.TabActivity;
 import android.os.Bundle;
 import android.widget.TabHost;

 public class WorkingCodes extends TabActivity {
     /** Called when the activity is first created. */

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

         TabHost mTabHost = getTabHost();

         mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator
 (Tickets).setContent(R.id.textview1));
         mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator
 (Tasks).setContent(R.id.textview2));
         mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator
 (Settings).setContent(R.id.textview3));

         mTabHost.setCurrentTab(2);

     }

 }

 I want a button in the third tab! How i do this?! plz help!

 wkr chri
--~--~-~--~~~---~--~~
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: failed to locate packages - Eclipse IDE

2009-08-26 Thread Jack Ha

In Eclipse, go to your project properties and select Java Build Path.
Then select the Libraries tab and you can add your external jar file
there.

--
Jack Ha
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 Aug 26, 1:47 am, Belik77 beli...@walla.co.il wrote:
 Hi,

 I am developing an application and i have importaed a JAVA file that
 uses several packages that my Eclipse does not recognize:

 import javax.xml.transform.*;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.dom.DOMSource;

 this is the code, that is not compiled:
 //Transform and write the Document to the stream
             TransformerFactory tf = TransformerFactory.newInstance();
             Transformer tr = tf.newTransformer();
             Source input = new DOMSource(xmlDoc);
             Result output = new StreamResult(out);
             tr.transform(input, output);
             out.flush();
             out.close();

 what should i need to install and how, so my SDK will be compatible?

 Thanks allot for your help.
 Eli.
--~--~-~--~~~---~--~~
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] Detect running in Android and access to Command Line parameters

2009-08-26 Thread roschler

Hello,

Two questions

1) How can I tell if my Java code is running in the Android
environment?  I have some code that is shared by Android and non-
Android applications and I want to be able to adjust to either
environment dynamically.

2) Is there a way to get access to the Command Line arguments that
were used to launch the application my Activity (or Service, etc.) is
running under? Since our code does not appear to have a main(String
args[]) function that gets called, I was wondering if it were possible
to still get access to the command line parameters.

Thanks,
Robert

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

2009-08-26 Thread Harold

Hi,
i want to develop an application which checks periodically for new
data on a server over a http-connection.
Should i do this in a Thread or is it better to do this in a service?
The checking should also continue when the user is going back to the
Android-Main-Menu, that means the user is exiting the Activity, and
when he starts the Activity again it can work with the collected data.
As far as i read, is this feature only possible with remote-Services,
so that i must use Inter-Process-Communication?

With kind regards,
harold

--~--~-~--~~~---~--~~
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] Android REST XML implementation

2009-08-26 Thread smnirven

Hey folks,

In my own frustration at finding a good example for a REST XML
implementation for android, I clawed my way through rolling my own
using the apache http libraries.  I have a bit of example code on my
blog if anyone is looking for doing a REST implementation on android.

http://www.smnirven.com/?p=15


--~--~-~--~~~---~--~~
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] About web browser

2009-08-26 Thread ni

I want to get data whatever user search on browsers .Can I use only
intent actions to get these data?Please reply me

ni

--~--~-~--~~~---~--~~
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: About ERROR: unknown virtual device name: 'myavd'

2009-08-26 Thread bubillyang

still doesn't work why 

On Aug 26, 7:41 am, Xavier Ducrohet x...@android.com wrote:
 I see that you have changed the location of the user folders (in S:
 instead of C:)

 When the user location is not the default one, we have seen some cases
 where windows reports the location of the user folder differently
 depending on which API you use (the command line tool and Eclipse use
 a Java API, while the emulator use a windows C++ API).

 You can override the behavior of both by declaring an environment
 variable called ANDROID_SDK_HOME
 Make it point to your HOME folder (S:\Documents and Settings\Phoenix\
 in this case) and both the emulator and the java based tools will read
 and write into the same folder.

 Xav





 On Tue, Aug 25, 2009 at 6:21 AM, Phoenixphoenixsen...@gmail.com wrote:

  I also have the same error.

  I've tried creating the AVD on the command line and via the gui in the
  Eclipse plugin.  Both created the AVD with no problems, but the
  emulator still cannot find it.

  I've tried running with the configuration set to Automatic, and to
  Manual and manually selecting Launch a new Android Virtual Device and
  checking the box next to 'my_avd', and the emulator still cannot find
  it.  I know it exists, I can see it in S:Documents and Settings
  \Phoenix\.android\avd\my_avd.avd

  I've tried stopping and re-starting the ADB server, stopping and re-
  starting Eclipse... nothing has fixed it.

  This is on a new setup, just set up today.  Eclipse Galileo, Android
  SDK 1.5_r3 for Windows, on XP.

  The complete console:
  [2009-08-25 06:11:11 - HelloAndroid] --
  [2009-08-25 06:11:11 - HelloAndroid] Android Launch!
  [2009-08-25 06:11:11 - HelloAndroid] adb is running normally.
  [2009-08-25 06:11:11 - HelloAndroid] Performing
  com.example.helloandroid.HelloAndroid activity launch
  [2009-08-25 06:11:11 - HelloAndroid] Automatic Target Mode: Preferred
  AVD 'my_avd' is not available. Launching new emulator.
  [2009-08-25 06:11:11 - HelloAndroid] Launching a new emulator with
  Virtual Device 'my_avd'
  [2009-08-25 06:11:12 - Emulator] emulator: ERROR: unknown virtual
  device name: 'my_avd'
  [2009-08-25 06:11:12 - Emulator] emulator: could not find virtual
  device named 'my_avd'

 --
 Xavier Ducrohet
 Android Developer Tools Engineer
 Google Inc.- Hide quoted text -

 - Show quoted text -

--~--~-~--~~~---~--~~
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] Contact Sync between Phone and Gmail

2009-08-26 Thread Justin

Hi Group,

I can't seem to get the contacts on my phone to sync with my online
google account.

Has any one else had this problem? What is the solution?

Thanks

Justin

--~--~-~--~~~---~--~~
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: App just for Android beginners

2009-08-26 Thread Jack Ha

Useful app...Thanks!

--
Jack Ha
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 Aug 21, 12:47 pm, Andrei gml...@gmail.com wrote:
 Guys,

 I wrote app for Android phone that can help you to learn Android /
 plan your next App.
 It is FREE and searchable app for all Android API documentation.
 It works off-line, no need for connection.
 Give it a try.
 Search for DroiDoc on Market on your phone
 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: Ant build error : package R does not exist

2009-08-26 Thread Mike Wolfson

Delete the R.class, then rebuild.

On Aug 25, 10:36 pm, sagar sagar.india...@gmail.com wrote:
 Hello everyone,

 I am trying to build my project using ant. I first generate build.xml
 file using android update project command. Now i want to run it
 using ant. When i type ant debug commnad it generates error saying
 that package R does not exist while it has already been generated in
 gen folder by the android update project command.

 Plz help.
 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: what is the fast way to save/load string from/in an array?

2009-08-26 Thread Roman ( T-Mobile USA)

Instead of using Strings, try to use StringBuffer. Normally the usage
of StringBuffer's is more efficient than normal Strings.

By the way for analyzing your code to find out where you spend most of
the time, use the traceview tool.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·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 Aug 25, 11:25 am, Liviu Ungureanu smartli...@gmail.com wrote:
 Thank you for reply,,

 I want to save the history for my application in a file on sdcard.

 First i tried to save it as xml and parse it to load...but these actions
 take a lot of time..(almost 8 seconds for 20 strings on a HTC Hero device);

 this is the code:

 package com.app.lookitup2;

 import java.io.BufferedInputStream;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;

 import org.apache.http.util.ByteArrayBuffer;

 import android.content.Context;
 import android.os.Environment;
 import android.util.Log;

 public class HistoryManager
 {

     private ArrayListHistoryItem history_items;
     private Context      context;
     private final String WHAT_TAG_START  = what;
     private final String WHAT_TAG_END    = /what;
     private final String WHERE_TAG_START = where;
     private final String WHERE_TAG_END   = /where;
     private final String DATE_TAG_START  = date;
     private final String DATE_TAG_END    = /date;
     private final String ITEM_TAG_START  = item;
     private final String ITEM_TAG_END    = /item;

     public  HistoryManager(Context ctx)
     {
         context = ctx;

         history_items = new ArrayListHistoryItem();
     }

     public void addHistoryItem(HistoryItem h_item)
     {
         history_items.add(h_item);
     }

     public HistoryItem getHistoryItem(int position)
     {
         return history_items.get(position);
     }

     public boolean saveHistory()
     {

         String data;
         int i;

         File root = Environment.getExternalStorageDirectory();
         File history_file = new File(root,history_lookitup.xml);
         if(history_file.length() = 1048576)
         {
             Log.e(SAVE_HISTORY,History is full!Please empty!);
             return false;
         }

         data =  new String();

         for(i = 0; i  history_items.size(); i++)
         {
             data = data + ITEM_TAG_START +
                             WHAT_TAG_START +
 history_items.get(i).getWhat().getText().toString() + WHAT_TAG_END +
                             WHERE_TAG_START +
 history_items.get(i).getWhere().getText().toString() + WHERE_TAG_END +
                             DATE_TAG_START +
 history_items.get(i).getDate().toString() + DATE_TAG_END +
                         ITEM_TAG_END;
         }

         try
         {
             if(root.canWrite())
             {
                 FileWriter history_writer = new
 FileWriter(history_file,true);
                 BufferedWriter out = new BufferedWriter(history_writer);

                 out.write(data);
                 out.close();
                 Log.e(SAVE HISTORY,History is saved);
                 return true;
             }
             else
             {
                 Log.e(SAVE HISTORY,no sd card or no permission to write
 on it);
                 return false;
             }
         } catch (IOException e)
         {
             Log.e(WRITE FILE,Could not write file  + e.getMessage());
             return false;
         }

     }

     public boolean loadHistory() throws IOException
     {
         String myString =  ;
         ArrayListHistoryItem items;

         FileInputStream is;
         try {

             is = new FileInputStream(/sdcard/history_lookitup.xml);
             BufferedInputStream bis = new BufferedInputStream(is);

             ByteArrayBuffer baf = new ByteArrayBuffer(50);
             int current = 0;
             while((current = bis.read()) != -1)
                baf.append((byte)current);

             myString = new String(baf.toByteArray());

             if(myString.equals( ) == false)
             {
                 HistoryParser parser = new HistoryParser(?xml
 version='1.0' encoding='UTF-8'?main + myString + /main,context);

                 items = new ArrayListHistoryItem();
                 items = parser.getItemList();
                 Log.e(FIRST_HISTORY, items.get(0).getDate().toString());
                 Log.e(DATA,myString);

                 history_items = items;
                 Log.e(history_items =
 ,Integer.toString(history_items.size()));
                 return true;
             }
             else
                 return false;

         } catch (FileNotFoundException e)
         {
             e.printStackTrace();
             return 

[android-beginners] Re: startActivity() crash...

2009-08-26 Thread Roman ( T-Mobile USA)

Justin,

I verified your latest remark about the usage of the hard-coded
example which causes an exception. Sorry, for the misleading
information.

I only guess that you are not allowed to start some of the systems
applications in the way how you want to do it. For sure someone from
the Android team should be able to give some more insight information
on this.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·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 Aug 26, 8:02 am, Tikoze janderson@gmail.com wrote:
 Wow... it has been over a week since anyone other than me has
 responded to this post.  No one has any ideas on what is wrong?
--~--~-~--~~~---~--~~
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] 来自zyy571137的邮 件

2009-08-26 Thread zyy571137



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

2009-08-26 Thread Mark Murphy


 i want to develop an application which checks periodically for new
 data on a server over a http-connection.
 Should i do this in a Thread or is it better to do this in a service?

Both. Use a service that does the work in an AsyncTask or other form of
background thread.

 The checking should also continue when the user is going back to the
 Android-Main-Menu, that means the user is exiting the Activity, and
 when he starts the Activity again it can work with the collected data.
 As far as i read, is this feature only possible with remote-Services,
 so that i must use Inter-Process-Communication?

No. Have your activity call startService() to start up the service to do
the HTTP operation. Then, when the service is done with the HTTP, have it
call stopSelf() to shut itself down.

-- 
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: Development Phone

2009-08-26 Thread Yusuf Saib (T-Mobile USA)

Right, Zonakusu. Rafa, think of it like buying a Linux PC. Some people
might be interested in modifying Linux itself, but most developers
will want to just write an application to run on top of Linux.


Yusuf Saib
Android
·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 Aug 25, 6:25 am, Zonakusu zonak...@gmail.com wrote:
 He means that you can create and install your own software packages
 (.apk files) on your phone, but you won't be able to rewrite parts of
 the actual operating system.

 On 25 aug, 12:06, Rafa Perfeito rafa.perfe...@gmail.com wrote:



  Yusuf,
  Does that means that i can, for example, install new Android versions for
  myself in the device? What do you mean by 'modify the OS on the phone'?

  On Mon, Aug 24, 2009 at 6:20 PM, Yusuf Saib (T-Mobile USA) 

  yusuf.s...@t-mobile.com wrote:

   If you just want to write applications and run them on your phone, any
   Android phone will do. If you want to modify the OS on the phone, then
   you need either an official development phone or hack a non-dev phone
   to be a dev phone.

   Yusuf Saib
   Android
   ·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 Aug 24, 6:09 am, Ran dahan...@gmail.com wrote:
Hi everyone,

I'm new to Android and I want to start developing and deploying my
apps to a real phone.
My question is what is the big difference between the official ADP1
and other Android phones ?
What is the benefit of working with ADP1 over the other Android
phones ?
I want to buy some Andriod phone, I thought of the new Samsung i7500
with Andriod OS or HTC Hero, will I be able to develop regularly or I
will need to hack them in some manner to activate some features ?

Thanks in advance
Ran

  --
  Cumprimentos,

  Hugo Rafael Augusto
--~--~-~--~~~---~--~~
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 I can't use movieview to play the movie came from the internet?

2009-08-26 Thread Balwinder Kaur (T-Mobile USA)

It may not be a good idea to use Classes from the com.android.camera
package since that is not part of the SDK. The MovieView is an
internal class are classes used by the Camera app.

Did you try using the VideoView class, with the setVideoURI
(rtsp://... ) method?

http://developer.android.com/reference/android/widget/VideoView.html#setVideoURI(android.net.Uri)

You can check out sample code for the VideoView at
http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.html.

If problems still persist, please post your code here.

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 Aug 25, 8:05 pm, yjshi shiyaju...@gmail.com wrote:
 The code is in the following.
                     Uri uri=Uri.parse(url);
                     Intent intent =new Intent();
                     intent.setDataAndType(uri, video/*);
                     intent.setClassName(com.android.camera,
 com.android.camera.MovieView);
                     intent.setAction(Intent.ACTION_VIEW);
                     startActivity(intent);
 url is a internet address begin with http://; orrtsp://.
 _

 On Aug 25, 11:26 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t-

 mobile.com wrote:
  You have not setup the MediaPlayer properly that is why you have an
  error. Could you please post your code ?
  Also, I guess you mean VideoView not MovieView (although I do some
  references to a MovieView in the documentation for MediaStore)

  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 Aug 25, 3:57 am, yjshi shiyaju...@gmail.com wrote:

   I use the movieview.java to playback the movie comes from the
   internet.In a activity ,I wrote a Intent that jump to the movieview
   and pass the movieview a url.But after several seconds,It  is closed
   because something is wrong.

   
   W/InputManagerService( 1075): Starting input on non-focused client
   com.android.internal.view.iinputmethodclient$stub$pr...@437bc7f0
   (uid=10003 pid=1305)
   W/IInputConnectionWrapper( 1305): showStatusIcon on inactive
   InputConnection
   I/ActivityManager( 1075): Displayed activity
   com.android.stk/.StkDialogActivity: 439 ms (total 439 ms)
   V/VideoView( 1305): reset duration to -1 in openVideo
   W/IInputConnectionWrapper( 1119): showStatusIcon on inactive
   InputConnection
   E/PlayerDriver( 1030): Command PLAYER_PREPARE completed with an error
   or info PVMFFailure
   W/PlayerDriver( 1030): PVMFInfoErrorHandlingComplete
   E/MediaPlayer( 1305): error (1, -1)
   E/MediaPlayer( 1305): Error (1,-1)
   D/VideoView( 1305): Error: 1,-1
   E/MediaPlayer( 1305): stop called in state 0
   E/MediaPlayer( 1305): error (-38, 0)
   W/MediaPlayer( 1305): mediaplayer went away with unhandled events


--~--~-~--~~~---~--~~
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] Equivalent of MS Windows PostMessage?

2009-08-26 Thread roschler

What is the accepted/common practice for code to post messages between
objects in the Android environment?  In Windows I do a lot of inter-
object communication via the operating system PostMessage() facility
which can post messages to Windows and even non-Windowed objects (if
they have allocated a windows message queue and procedure to
themselves).  Is there an equivalent mechanism in Android?  If there
is please post the keywords I can use for searching to read about it
or URLs to explanatory web pages if you have them.

If this is more of a Java language or Linux kernel question then just
point me in the right direction to start my investigations.

Thanks,
Robert
--~--~-~--~~~---~--~~
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] invalid apk file

2009-08-26 Thread sawyer zhu

I use the Eclipse android wizard to build a HelloWorld app, But When I
install this app, the console  print out the following error
installation failed due to the invalid apk file. When I use the
winrar to unzip the HelloWorld.apk file, It also report a error
unexception end, It also verify the apk file is invalid.

The development envirmonent is:
Eclipse 3.5 + ADT 0.9.1 + Android win SDK 1.5r3 + JDK 1.5.

How can I to solve this Problem? Thanks very much!

--~--~-~--~~~---~--~~
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: Equivalent of MS Windows PostMessage?

2009-08-26 Thread Donn Felker
You can also broadcast an intent and many receivers can pick it up.
Essentially its the pub/sub pattern in a service bus.

On Wed, Aug 26, 2009 at 12:24 PM, roschler robert.osch...@gmail.com wrote:


 What is the accepted/common practice for code to post messages between
 objects in the Android environment?  In Windows I do a lot of inter-
 object communication via the operating system PostMessage() facility
 which can post messages to Windows and even non-Windowed objects (if
 they have allocated a windows message queue and procedure to
 themselves).  Is there an equivalent mechanism in Android?  If there
 is please post the keywords I can use for searching to read about it
 or URLs to explanatory web pages if you have them.

 If this is more of a Java language or Linux kernel question then just
 point me in the right direction to start my investigations.

 Thanks,
 Robert
 



-- 
Donn
http://blog.donnfelker.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: Placement of camera preview

2009-08-26 Thread tinyang
Anyone have any instie on this please?  If not, maybe I will try the
developers group.  Thanks.

  _  

From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of tinyang
Sent: Saturday, August 22, 2009 4:07 PM
To: android-beginners@googlegroups.com
Subject: [android-beginners] Placement of camera preview


Hello.
 
I just got my camera preview working for my app, but it is not appearing
where I want it to appear, and I'm not sure how to get it there.  Instead of
using the entire screen for the preview, I would like to put it inside a
surfaceview in an activity xml gui.  What do I need to change?  Here is my
code:
 
public class TakePic extends Activity {

SurfaceView camSurface;

Preview camPreview;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);//hide window title

camPreview = new Preview(this); //create preview

setContentView(R.layout.takepic);

setContentView(camPreview); //set preview as activity content

camSurface = (SurfaceView) findViewById(R.id.camsurface);

}

 
-- 
:-) 
P Please don't print this e-mail unless you really need to. 
 




No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/21/2009
6:06 PM



--~--~-~--~~~---~--~~
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: Detect running in Android and access to Command Line parameters

2009-08-26 Thread Mark Murphy

 1) How can I tell if my Java code is running in the Android
 environment?  I have some code that is shared by Android and non-
 Android applications and I want to be able to adjust to either
 environment dynamically.

One possibility would be to use reflection to look up a class in an
android.* namespace.

 2) Is there a way to get access to the Command Line arguments that
 were used to launch the application my Activity (or Service, etc.) is
 running under?

AFAIK, there are no command line arguments, because there is no command
line. Even if there are, you should not use them, let alone rely upon
them, as they are undocumented and subject to change in future Android
releases.

-- 
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: Unable to run the application even once.

2009-08-26 Thread Sonja_android

Also check your Run Configurations.  In Eclipse, Run  Run
Configurations.  Select your project from the list on the left, then
in the Target tab check if there are any invalid command-line
parameters in the Additional Emulator Command Line Options box.

-Sonja

On Aug 25, 9:26 am, nitin ni...@infocratsweb.com wrote:
 Hello, when I am trying to run the application for the first time, it
 is giving error in console as:

 [2009-08-25 12:47:24 - temp] --
 [2009-08-25 12:47:24 - temp] Android Launch!
 [2009-08-25 12:47:24 - temp] adb is running normally.
 [2009-08-25 12:47:24 - temp] Launching: info.temp.temp
 [2009-08-25 12:47:24 - temp] Automatic Target Mode: launching new
 emulator.
 [2009-08-25 12:47:24 - temp] Launching a new emulator.
 [2009-08-25 12:47:24 - Emulator] invalid command-line parameter:
 SDAndroid
 [2009-08-25 12:47:24 - Emulator] Android Emulator usage: emulator
 [options] [-qemu args]
 .
 .
 .
 .
 .
 [2009-08-25 12:47:24 - Emulator]      -help-keyset-file       key
 bindings configuration file
 [2009-08-25 12:47:24 - Emulator]      -help-all               prints
 all help content
 [2009-08-25 12:47:24 - Emulator]

 I tried clearing windows/preferences/Android/Launch/Default Emulator
 Option textbox, but no luck. Earlier 'SDAndroid' was written in this
 box.

 pls help.is some setting to do?

 thanks
 Nitin
--~--~-~--~~~---~--~~
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: App just for Android beginners

2009-08-26 Thread tinyang

 Is there a way to add this app to my emulator?  Just to check it out?

-Original Message-
From: android-beginners@googlegroups.com 
[mailto:android-beginn...@googlegroups.com] On Behalf Of Jack Ha
Sent: Wednesday, August 26, 2009 10:44 AM
To: Android Beginners
Subject: [android-beginners] Re: App just for Android beginners


Useful app...Thanks!

--
Jack Ha
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 Aug 21, 12:47 pm, Andrei gml...@gmail.com wrote:
 Guys,

 I wrote app for Android phone that can help you to learn Android / 
 plan your next App.
 It is FREE and searchable app for all Android API documentation.
 It works off-line, no need for connection.
 Give it a try.
 Search for DroiDoc on Market on your phone Thanks

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/25/2009 
6:07 PM


--~--~-~--~~~---~--~~
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: Get arguments from another activity

2009-08-26 Thread Sebeto

Thank you very much for these links. I got it to work with maValeurBis
= getIntent().getStringArrayListExtra
(net.sebeto.android.cuisine.Methodes.maValeur); , I will study your
links carefully to see if I do things the right way!

On Aug 26, 8:07 am, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:
 The usage of intents is a little bit more complex and there are
 different options available how to communicate between your two
 activities.

 Try to understand the basics of intents (action, data, ...)

 Basics:
  -http://developer.android.com/reference/android/content/Intent.html

 When you start another Activity you have to decide how you want to
 communicate back to the calling activity. Please, get familiar with

 Start other activities:startActivity(Intent)  and
 startActivityForResult
 -http://developer.android.com/reference/android/app/Activity.html)

 Also get some understanding how to write your Manifest to use intents
 correctly. Check out the following link:

 -http://developer.android.com/guide/topics/manifest/intent-filter-elem...

 --
 Roman Baumgaertner
 Sr. SW Engineer-OSDC
 ·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 Aug 25, 12:48 am, Sebeto seb...@gmail.com wrote:

  Hi,

  I try to get the value of a parameter from another activity, but can't
  succeed in doing that. I found things about putExtra/getExtra, but
  couldn't get it to work unfortunately.

  Problem:
  I've got a TabActivity called methodes, which has a TabHost. The
  contents of the Tabs are activities, and I need to retrieve in these
  activities the value of maValeur (which is actually a
  ArrayListString). My application is net.sebeto.android.essai.

  public class Methodes extends TabActivity
  {
          public static ArrayListString maValeur;
          public void onCreate(Bundle savedInstanceState)
          {

                // I initialize maValeur, ...
                (...)

               // MethTab2 will be the content of the second tab
               Intent Tab2 = new Intent(this, MethTab2.class);
               Tab2.putStringArrayListExtra
  (net.sebeto.android.essai.Methodes.maValeur, maValeur);

               TabHost host = getTabHost();
               (...)
               host.addTab(host.newTabSpec(two).setIndicator
  (Valeur).setContent(Tab2));
          }

  }

  Now:

  public class MethTab2 extends Activity
  {
          private ArrayListString maValeurBis;

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

              // How to get the value of maValeur??
              // I found no way to use getStringArrayList?
              //  maValeurBis = savedInstanceState.getStringArrayList
  (net.sebeto.android.cuisine.Methodes.maValeur); crashes, ...
             // I can get the value with maValeurBis =
  Methodes.maValeur; but I'm not sure that it's
             // a good way to do it, is it? It works, but... do you
  think it's a good method?

              maValeurAdapter = new ArrayAdapterString(this,
  R.layout.methtab2,maValeurBis);
              ListView list = new ListView(this);
              list.setAdapter(maValeurAdapter);
              list.setSelector(android.R.color.transparent);
              setContentView(list);
          }

  }

  Thank you for your answers, I'm a perfect beginner in java and in
  android... If someone could give me a code which would work it would
  be great! I know that it's probably very simple but...
--~--~-~--~~~---~--~~
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: what is the fast way to save/load string from/in an array?

2009-08-26 Thread Liviu Ungureanu
Thank you very much!i will try tonight..

Thanks!

On Aug 26, 2009 7:31 PM, Roman ( T-Mobile USA) 
roman.baumgaert...@t-mobile.com wrote:


Instead of using Strings, try to use StringBuffer. Normally the usage
of StringBuffer's is more efficient than normal Strings.

By the way for analyzing your code to find out where you spend most of
the time, use the traceview tool.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC

·T· · ·Mobile· stick together The views, opinions and statements in this
email are those of the auth...

On Aug 25, 11:25 am, Liviu Ungureanu smartli...@gmail.com wrote:  Thank
you for reply,,   I wan...

--~--~-~--~~~---~--~~ You received this
message because you are subs...

--~--~-~--~~~---~--~~
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() crash...

2009-08-26 Thread Roman ( T-Mobile USA)

Justin,

With the following line of code you should be able to start up the
calendar app

calendarIntent.setClassName
(com.android.calendar,com.android.calendar.LaunchActivity);

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·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 Aug 26, 9:00 am, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:
 Justin,

 I verified your latest remark about the usage of the hard-coded
 example which causes an exception. Sorry, for the misleading
 information.

 I only guess that you are not allowed to start some of the systems
 applications in the way how you want to do it. For sure someone from
 the Android team should be able to give some more insight information
 on this.

 --
 Roman Baumgaertner
 Sr. SW Engineer-OSDC
 ·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 Aug 26, 8:02 am, Tikoze janderson@gmail.com wrote:

  Wow... it has been over a week since anyone other than me has
  responded to this post.  No one has any ideas on what is wrong?


--~--~-~--~~~---~--~~
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! adding an activity of my application to another application

2009-08-26 Thread jbrohan

Hello
This is very interesting. Do I need to have the source code of the
Camera app in order to do this? Or is there some way to make it use my
menu rather than the one already in Camera?

On Aug 10, 7:56 pm, Roman roman.baumgaert...@t-mobile.com wrote:
 You are already giving the answer ... In your application you add the
 Upload pic button in your menu. When you implement the
 onOptionsItemSelect method trigger from there your new activity which
 is handling the uploading of yourpicture.

 Something like

 public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.uploadPic:
                 Start your new Activity
                 return true;
             case ..
         }
         return false;

 }

 On Aug 10, 12:17 pm, moazzamk moazz...@gmail.com wrote:



  Hi Guys,

  After apictureis taken in Android, you get a menu to save it, etc.
  Is it possible to add a menu item in it saying Upload pic to xyz.com
  and then have it launch an activity of my app ?

  Thanks,

  Moazzam
--~--~-~--~~~---~--~~
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: Equivalent of MS Windows PostMessage?

2009-08-26 Thread Mark Murphy

 What is the accepted/common practice for code to post messages between
 objects in the Android environment?

Um, there is not really an analogue of PostMessage() in Java.

View has post() and postDelayed(), but those are designed to simply
arrange for a Runnable to be executed on the UI thread.

Can we back up a step or two and discuss what your actual objective is?
PostMessage() is a means to an end -- if you can describe the end, we may
be better able to give you an Android-flavored means.

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

2009-08-26 Thread Georgy

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: How do I implement onClick for a DialogPreference?

2009-08-26 Thread Nick

I have already done this.  I do find that a lot of my answers get
solved by searching through API Demos.  However in the API Demos, they
just show how to show the Dialog and that is it.  They never show how
to return which button was pressed.

Nick

On Aug 21, 3:33 pm, Donn Felker donnfel...@gmail.com wrote:
 I dont have an IDE in front of me, but I think this exact example is
 available in the API Demos. Add it to your Eclipse workspace and poke around
 in the preference area. I advise you to install the ApiDemos on your
 emulator or test phone (or G1 if you have one). It makes life alot easier
 when you see what you want, then the task is just finding it in the demos
 (which is easy).



 On Fri, Aug 21, 2009 at 1:54 PM, Nick nick.vers...@gmail.com wrote:

  Looking around the source I think I found what I was looking for.  I
  assume that I need to implement onDialogClosed from
  DialogPreference.java.  But to do this do I need to create a new class
  say MyDialogPreference or is there a way to just implement that method
  in the class below?

  On Aug 20, 3:55 pm, Nick nick.vers...@gmail.com wrote:
   I have a DialogPreference in my Preference Activity and would like to
   know which button was pressed. I have implemented the
   OnSharedPreferenceChangeListener which does not seem to get triggered
   when the DialogPreference is selected.   I have also tried
   OnPreferenceClickListener but this gets triggered as soon as the
   DialogPreference is clicked from the main screen and not when one of
   the actual dialog buttons was pressed.  was.

   So I think I need to implement onClick for this dialog but I am not
   sure where to do this.

   public class Preferences extends PreferenceActivity implements
   OnSharedPreferenceChangeListener {

           private static final String LOG = test;
           private DialogPreference mfactory;

           @Override
           protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);

           // Load the preferences from an XML resource
           addPreferencesFromResource(R.xml.preferences);

           mfactory = (DialogPreference)findPreference(pref_factory);
           mfactory.setOnPreferenceClickListener(new
   DialogPreference.OnPreferenceClickListener() {

                           @Override
                           public boolean onPreferenceClick(Preference
  preference) {
                                   Log.i(LOG, onPreferenceClick1 entered);

                                   // TODO Auto-generated method stub
                                   return false;
                           }});
       }

           @Override
           protected void onResume() {
                   super.onResume();
                   Log.i(LOG, onResume entered);

                   // Add a Listener
                   getPreferenceScreen().getSharedPreferences
   ().registerOnSharedPreferenceChangeListener(this);
           }

           @Override
           protected void onPause() {
                   super.onPause();
                   Log.i(LOG, onPause entered);

                   // Remove the Listener
                   getPreferenceScreen().getSharedPreferences
   ().unregisterOnSharedPreferenceChangeListener(this);
           }

           public void onSharedPreferenceChanged(SharedPreferences
   sharedPreferences, String key) {
                   Log.i(LOG, onSharedPreferenceChanged entered);
                       if (key.contains(seekbar)) {
                       }
                   }
           }

   }

 --
 Donnhttp://blog.donnfelker.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: Publishing Updates for my application

2009-08-26 Thread Nick

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: Equivalent of MS Windows PostMessage?

2009-08-26 Thread roschler



On Aug 26, 2:37 pm, Mark Murphy mmur...@commonsware.com wrote:

 Can we back up a step or two and discuss what your actual objective is?
 PostMessage() is a means to an end -- if you can describe the end, we may
 be better able to give you an Android-flavored means.


Hello Mark,

Lots of different uses but if I had to choose one I'd say
notifications, especially event notifications with the ability to pass
a reference to an object to be used by the receiver of the
notification along with the notice (LParam stuffing for the Windows
types out there).  In Windows the two main paradigms I've seen for
doing that are Windows PostMessage() message passing and function
callbacks.  I lean towards they PostMessage() paradigm because it gets
you out of the call chain that a function callback can place you in
when your callback is invoked and there can be some fair degree of
nuisance that comes with that condition.  For example, in many windows
callbacks it's a known practice to avoid doing any time consuming work
in the callback or you can crash/disrupt the mechanism that is driving
the callback, so you delay the processing and move it out of the
callback call context by posting a notifcation to some other code
you've written with a reference to a data object you created that has
all the necessary information to do what you need to do.  Or you can
post the a notification to another thread and let it handle the time
consuming task.  But mostly it's straightforward event notifications.
I know you know all of this, I'm just using these examples as a way to
indicate my area of focus.

Another example.  One of the areas I know I'm going to have to read
deeply about, especially since I intend to be streaming audio from a
server to the handset, is how to do asynchrounous socket processing
which I assume Android has some standardized notification message
mechanism for..

Thanks,
Robert
--~--~-~--~~~---~--~~
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 Nick

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: Proxy issue in emulator 1.5 on Ubuntu(VM)

2009-08-26 Thread speedooo

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



[android-beginners] Samsung Galaxy fullscreen performance

2009-08-26 Thread Nikola

In my application adding fullscreen to my application results in a 50%
performance loss.


fullscreen call:
this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE |
WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
| WindowManager.LayoutParams.FLAG_FULLSCREEN);


Why is this so?


Is it because android is changing into another colorformat?

I don't think it is because of the additional pixels to be drawn in
the SurfaceView.

--~--~-~--~~~---~--~~
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] Blog Tabs not working

2009-08-26 Thread mikech

At http://android-developers.blogspot.com/?hl=en getting error 404
when I click on the tabs.

--~--~-~--~~~---~--~~
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] Issue with using fill_parent on Donut

2009-08-26 Thread m

Here is the XML of a camera test application that worked on the
cupcake
branch. The preview size spans the entire screen on cupcake. However
the
same app does not work on the Donut branch without explicitly setting
the width and height to 800 and 400 dp respectively?

Why doesn't fill_parent work on the Donut branch?

Example XML


?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:gravity=center_horizontal
  
  SurfaceView android:id=@+id/preview_surface
  android:layout_width=800dp--
These lines HAVE to be added for donut
  android:layout_height=480dp   --
but not for cupcake to get full screen preview
  android:layout_alignParentLeft=true
  android:layout_alignParentTop=true

  /SurfaceView
/LinearLayout

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] How do I download ADT 0.9.2 or latest?

2009-08-26 Thread slw

Hi all,
I am trying to investigate the new search feature in donut branch. To
run donut with Eclipse it prompts me for the ADT 0.9.2 or latest. How
do I download the latest?

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: About ERROR: unknown virtual device name: 'myavd'

2009-08-26 Thread Xavier Ducrohet

On Wed, Aug 26, 2009 at 4:21 AM, Phoenixphoenixsen...@gmail.com wrote:

 On Aug 25, 4:41 pm, Xavier Ducrohet x...@android.com wrote:
 I see that you have changed the location of the user folders (in S:
 instead of C:)

 There are user folders on both S: and C:.  Only the Desktop and My
 Documents special folders are on S:.  Everything else (including App
 Data) is on C:.  [The documents are shared between operating systems
 on different partitions]

 Android (or Eclipse?) has been the only thing to use S:.

 When the user location is not the default one, we have seen some cases
 where windows reports the location of the user folder differently
 depending on which API you use (the command line tool and Eclipse use
 a Java API, while the emulator use a windows C++ API).

 That would explain why the command line tools and Eclipse could see
 my_avd just fine, but the emulator could not find it.

 But, shouldn't Android be set up to use HOMEDRIVE/HOMEPATH?  Standard
 environment variables.

I think there are difference on XP/Vista which makes using those hard
to use (back in the previous SDK we were using LOCALAPPDATA but we
ended up having the same problem).

What we use on java is the user.home property setup by the VM. Looks
like the Java VM thinks your home is in S:\...
I look again into these 2 env variables and see if they could be used.

 Also, a single line in the installation instructions could have
 prevented this confusion.  When Android can see the AVD from the
 command line and the Eclipse gui, but not from the emulator, and no
 explanation is given (especially on the first test project), it's ...
 disheartening.

I agree. We should at least have the emulator output a message saying
where it's looking for the AVD and how to fix the problem if it's not
where the AVDs are created.

 In any event, with the ANDROID_SDK_HOME variable set to the S:
 home (which is not the real home directory, that is on C:), the
 emulator now works.

Well we don't want to go and set a permanent env on your machine. I
guess we could but relying on existing standard env variables should
be better. I mean, what happens if the user removes it or change the
location of his/her home folder but doesn't update this?

In any case we do need to find a solution.

Xav
-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
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 I can't use movieview to play the movie came from the internet?

2009-08-26 Thread yjshi

I set a path in the VideoViewDemo.

code
 public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.videoview);
mVideoView = (VideoView) findViewById(R.id.surface_view);
path=rtsp://125.76.233.38/h263.3gp;
mVideoView.setVideoPath(path);
mVideoView.setMediaController(new MediaController(this));
mVideoView.requestFocus();

}

log
I/ActivityManager(  582): Starting activity: Intent { comp=
{com.example.android.apis/
com.example.android.apis.media.VideoViewDemo} }
V/VideoView(  801): reset duration to -1 in openVideo
I/ActivityManager(  582): Displayed activity
com.example.android.apis/.media.VideoViewDemo: 1462 ms
E/PlayerDriver(  554): Command PLAYER_INIT completed with an error or
info PVMFFailure
E/MediaPlayer(  801): error (1, -1)
E/MediaPlayer(  801): Error (1,-1)
D/VideoView(  801): Error: 1,-1
D/dalvikvm(  625): GC freed 249 objects / 11504 bytes in 406ms
W/InputManagerService(  582): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$Stub
$pr...@43730bf8
D/dalvikvm(  622): GC freed 5462 objects / 295464 bytes in 155ms
D/dalvikvm(  675): GC freed 862 objects / 45728 bytes in 123ms

I don't konw why these could happen. I find that if the emulator or
mobile could not connect to the internet,these errors also could be
happened.

On Aug 27, 12:35 am, Balwinder Kaur (T-Mobile USA) balwinder.k...@t-
mobile.com wrote:
 It may not be a good idea to use Classes from the com.android.camera
 package since that is not part of the SDK. The MovieView is an
 internal class are classes used by the Camera app.

 Did you try using the VideoView class, with the setVideoURI
 (rtsp://... ) method?

 http://developer.android.com/reference/android/widget/VideoView.html#...)

 You can check out sample code for the VideoView 
 athttp://developer.android.com/guide/samples/ApiDemos/src/com/example/a

 If problems still persist, please post your code here.

 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 Aug 25, 8:05 pm, yjshi shiyaju...@gmail.com wrote:

  The code is in the following.
                      Uri uri=Uri.parse(url);
                      Intent intent =new Intent();
                      intent.setDataAndType(uri, video/*);
                      intent.setClassName(com.android.camera,
  com.android.camera.MovieView);
                      intent.setAction(Intent.ACTION_VIEW);
                      startActivity(intent);
  url is a internet address begin with http://; orrtsp://.
  _

  On Aug 25, 11:26 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t-

  mobile.com wrote:
   You have not setup the MediaPlayer properly that is why you have an
   error. Could you please post your code ?
   Also, I guess you mean VideoView not MovieView (although I do some
   references to a MovieView in the documentation for MediaStore)

   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 Aug 25, 3:57 am, yjshi shiyaju...@gmail.com wrote:

I use the movieview.java to playback the movie comes from the
internet.In a activity ,I wrote a Intent that jump to the movieview
and pass the movieview a url.But after several seconds,It  is closed
because something is wrong.


W/InputManagerService( 1075): Starting input on non-focused client
com.android.internal.view.iinputmethodclient$stub$pr...@437bc7f0
(uid=10003 pid=1305)
W/IInputConnectionWrapper( 1305): showStatusIcon on inactive
InputConnection
I/ActivityManager( 1075): Displayed activity
com.android.stk/.StkDialogActivity: 439 ms (total 439 ms)
V/VideoView( 1305): reset duration to -1 in openVideo
W/IInputConnectionWrapper( 1119): showStatusIcon on inactive
InputConnection
E/PlayerDriver( 1030): Command PLAYER_PREPARE completed with an error
or info PVMFFailure
W/PlayerDriver( 1030): PVMFInfoErrorHandlingComplete
E/MediaPlayer( 1305): error (1, -1)
E/MediaPlayer( 1305): Error (1,-1)
D/VideoView( 1305): Error: 1,-1
E/MediaPlayer( 1305): stop called in state 0
E/MediaPlayer( 1305): error (-38, 0)
W/MediaPlayer( 1305): mediaplayer went away with unhandled events


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

[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] How to set a TextView to look like the home screen icon text

2009-08-26 Thread Beth Mezias
Hi all,

On the Android Home screen, the label set in the manifest on the application
appears under the icon with a gray background.  Does anyone know how to
style a TextView or some other View Widget to look like the text showing
under an application icon?  I would like to know.

Thanks and regards,
Beth

--~--~-~--~~~---~--~~
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 set a TextView to look like the home screen icon text

2009-08-26 Thread Romain Guy

http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=src/com/android/launcher/BubbleTextView.java;h=37824545e9f5bfe5ee5ad7c6acba767a3d816836;hb=master

On Wed, Aug 26, 2009 at 10:51 PM, Beth Meziasemez...@gmail.com wrote:
 Hi all,

 On the Android Home screen, the label set in the manifest on the application
 appears under the icon with a gray background.  Does anyone know how to
 style a TextView or some other View Widget to look like the text showing
 under an application icon?  I would like to know.

 Thanks and regards,
 Beth

 




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