[android-beginners] ,myedittext.getText().toString() is giving null pointer exception

2009-06-15 Thread sheshi

/**  can some one tell me why it is not working .here is my code
*/
package com.arka.CallLogDemo;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
//import android.text.Editable;
//import android.text.InputFilter;
import android.text.Editable;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
//import android.widget.EditText;

public class TestSearch extends Activity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
//callDialog(in search);
setContentView(R.layout.search);
final EditText myedittext=(EditText)findViewById(R.layout.search);
final Button button=(Button) findViewById(R.id.callButton);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v ) {
// Perform action on click
//int length=0;
Intent search=new Intent();
   //   callDialog(just);


search.putExtra(NUMBER_ENTERED,myedittext.getText().toString
());
setResult(Activity.RESULT_OK,search);
finish();

}
});

}//end of onCreate()



//customized alertDialog
public  void callDialog(CharSequence message )
{
final AlertDialog.Builder a=new AlertDialog.Builder(this);
a.setMessage(message);
a.setTitle(TestSearch);
//a.wait(2000);
a.setPositiveButton(close, new
DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog,int whichButton)
{

//a.setCancelable(true);

}
});


a.show();
}
















}

--~--~-~--~~~---~--~~
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: Porting C project in android

2009-06-15 Thread janardhan

Hi Murphy,
i am janardhan.
i am also new to android.
i am able to write  and understand small applications.
But i am not aware of how to create apk files just like our jar and
jad files in j2me.
For example,i written a small application(just like hello android)
I am able to run in my system.
how can i install and run my application in android mobile.
Can u explain r guide me.

ok bye


On Jun 15, 4:15 am, Mark Murphy mmur...@commonsware.com wrote:
     I am new to android,I had downloaded Android SDK and Eclipse in
  windows,android source code in ubuntu. I created a C project in ubuntu
  and generated shared library of my project using the Android.mk,arm
  compiler that comes with the android source files and make .Now i have
  to integrate/port this .so(shared library) c project in the android
  SDK in windows using Eclipse.If any one came with this kindly suggest
  me how to load/call this .so(shared library of my project) into
  android and execute as an application in the Android phone.

 That is not readily possible today. There will (soon?) be a Native
 Developer Kit (NDK) which will allow for C code in Android SDK projects.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] OnItemClick does not work

2009-06-15 Thread joare...@googlemail.com

Hello,

I have implemented the following Adapter class which also implements
onitemclicklistener.
My problem is, that when I click on one item in the list, the
onItemClick function is not invoked.

What is wrong ?




public class MovieListAdapter implements ListAdapter,
OnItemClickListener  {

private Context mContext;
private ArrayListMovieCatPackage mMovPackArray = new
ArrayListMovieCatPackage();

private HashSetDataSetObserver observers = new
HashSetDataSetObserver();

public MovieListAdapter(final Context context) {
this.mContext = context;
}

public MovieListAdapter(final Context context,
ArrayListMovieCatPackage packageArray) {
this.mContext = context;
this.mMovPackArray = packageArray;
}





@Override
// usual functions for listadapter






@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v;

if (convertView == null)
v = View.inflate(mContext,
who.cares.R.layout.Movieitempackage, null);
else
v = convertView;

MovieCatPackage movPack = this.mMovPackArray.get(position);

TextView category = (TextView) v.findViewById
(who.cares.R.id.Movieitempackage_Category);
category.setText(movPack.getCategory());


ListView details = (ListView) v.findViewById
(who.cares.R.id.Movieitempackage_Details);








details.setOnItemClickListener(this);








MovieItemAdapter movItemAdapter = new MovieItemAdapter(mContext,
movPack.getdetails());
details.setAdapter(movItemAdapter);



return v;
}



@Override
public void onItemClick(AdapterView? arg0, View arg1, int arg2,
long arg3) {
Log.d(TEST, TEST);
}



}




Movieitempackage.xml:


?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
 android:orientation=vertical
 android:layout_width=fill_parent
 android:layout_height=fill_parent


LinearLayout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=wrap_content
android:background=#99
android:layout_weight=0

TextView android:id=@+id/Movieitempackage_Category
android:textColor=#FF
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=_category/
/LinearLayout



ListView android:id=@+id/Movieitempackage_Details
android:layout_width=fill_parent
android:layout_height=fill_parent
android:layout_weight=1/


/LinearLayout




--~--~-~--~~~---~--~~
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: Upgrading my G1

2009-06-15 Thread Urizev

Cool! It was the perfect help.

On 12 jun, 19:51, Balwinder Kaur (T-Mobile) balwinder.k...@t-
mobile.com wrote:
 You may  use the official HTC Website instructions and Image files

 http://www.htc.com/www/support/android/adp.html

 Hope this helps,

 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 Jun 12, 2:17 am, Urizev uri...@gmail.com wrote:

  Hi,

   I want to develop an aplication 1.5 compatible for my G1. I received
  a Devel G1 Phone and it has 1.0 firmware. How can I upgrade it? I
  found some update in some forums, but I do not trust these kind of
  update. I am looking for something more official. I found the SDK
  upgrades but not the firmware ones.

   I live in Spain and my phone does not depends on any mobile operator.

   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: Invokation Exception

2009-06-15 Thread Urizev

Ok. I forgot the permissions. I wrote the code like yours and,
however, it throws the following exception when startPreview is
called:

   java.io.IOException: startPreview failed

I have no more information and I do not know how to get more.

Regards

On 14 jun, 21:06, sm1 sergemas...@gmail.com wrote:
 As MrChaz wrote, you'll definitively need the Camera permission and
 for checking if you are still getting exceptions, try this:

 Camera cam = null;
 try{
   cam = Camera.open();}catch(Exception ex){

   Log.e(Camera.open(),+ex);}

 if(cam==null){
   return;}

 //it is very important that the camera be released by the app that
 opens it.
 try{//try-finally block to ensure that the camera is released
   try{
     cam.startPreview();
   }catch(Exception ex){
     Log.e(Camera.startPreview(),+ex);
     return;
   }

   //other work here

 }finally{

   try{
     cam.release();
   }catch(Exception ex){
     Log.e(Camera. release(),+ex);
   }

 }

 serge

 On Jun 13, 9:51 am, MrChaz mrchazmob...@googlemail.com wrote:

  Have you added the Camera permission to the manifest?

  On Jun 12, 11:32 am, Urizev uri...@gmail.com wrote:

   I am developing an application which uses the camera of my G2. The
   code using the camera is showed below:

                   Camera cam = Camera.open();
                   if (cam == null) {
                           return;
                   }

                   cam.startPreview();

   It throws and  Exception and I do not know why. Someone has any
   idea?

   com.sun.jdi.InvocationException occurred invoking

   Regards
--~--~-~--~~~---~--~~
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: Choosing the Right Book

2009-06-15 Thread golem

Hi Mahou,

I have the Hello, Android book and I'm very happy with it.
It got me up and running quickly and I still use it every now and
again to refresh on some concepts that I don't use often.
Good for beginners!

I can't say anything about the other book though.

On Jun 15, 5:54 am, Mahou mahou...@hotmail.com wrote:
 Hi, I have enough for one book and wanted to know your opion on which
 on to get. The choices are:

 Hello Android

 http://www.amazon.com/Hello-Android-Introducing-Development-Platform/...

 or

 Unlocking Android

 http://www.amazon.com/Unlocking-Android-Frank-Ableson/dp/1933988673/r...

 Any tips?
--~--~-~--~~~---~--~~
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 create apk file in android ,like in j2me we create jar and jad files

2009-06-15 Thread ayush

assuming ur using eclipse with ADT, simply right-click on the project
in the left panel, choose Android Tools = Export unsigned Application
Package

this will create the (unsigned) apk at the destination you specify.
before loading this apk, it must be signed with your private key. you
can consult the documentation in the Android Developer Guide under the
section Publishing your Application for details on how to do this.



On Jun 15, 9:50 am, janardhan vuruvakilina...@gmail.com wrote:
 hi,
 i am new to android .
 i done some sample applications.
 how to create apk files for that one.
--~--~-~--~~~---~--~~
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 create apk file in android ,like in j2me we create jar and jad files

2009-06-15 Thread ayush

oops ... instead of section on Publishing your Application, read
Signing your Applications

On Jun 15, 3:32 pm, ayush ayushv2...@gmail.com wrote:
 assuming ur using eclipse with ADT, simply right-click on the project
 in the left panel, choose Android Tools = Export unsigned Application
 Package

 this will create the (unsigned) apk at the destination you specify.
 before loading this apk, it must be signed with your private key. you
 can consult the documentation in the Android Developer Guide under the
 section Publishing your Application for details on how to do this.

 On Jun 15, 9:50 am, janardhan vuruvakilina...@gmail.com wrote:

  hi,
  i am new to android .
  i done some sample applications.
  how to create apk files for that one.
--~--~-~--~~~---~--~~
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] Invoking shared libraries

2009-06-15 Thread subram

Hi there
 I am having an shared library named librecord.so, i have to
invoke this library inside the android project and make it to call by
the sdk,if any one came across with this invoking kindly suggest me

Thanks in advance
Subram
--~--~-~--~~~---~--~~
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: Invoking shared libraries

2009-06-15 Thread arunjith g
you will have to use JNI methods to invoke a call in shared library
what u do is


1. Create a java class includes myfunC()
2. Create a jni header file from this class
3. It will have a jni_blahblah_myfunc call
4. create a c/c++ file giving implementation to this function by calling ur
required shared library function



On Mon, Jun 15, 2009 at 4:08 PM, subram subram...@gmail.com wrote:


 Hi there
 I am having an shared library named librecord.so, i have to
 invoke this library inside the android project and make it to call by
 the sdk,if any one came across with this invoking kindly suggest me

 Thanks in advance
 Subram
 


--~--~-~--~~~---~--~~
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 create apk file in android ,like in j2me we create jar and jad files

2009-06-15 Thread arunjith g
you can use eclipse

1. download android plugin
2. Create a android application ( once u download u ll get
newproject-android application)
3. import some sample sources
4. this will output u a apk file

On Mon, Jun 15, 2009 at 10:20 AM, janardhan vuruvakilina...@gmail.comwrote:


 hi,
 i am new to android .
 i done some sample applications.
 how to create apk files for that one.
 


--~--~-~--~~~---~--~~
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: Upgrading my G1

2009-06-15 Thread arunjith g
you can get the latest firmwaers from htc site

htc site -  product - G1 phone

On Fri, Jun 12, 2009 at 2:47 PM, Urizev uri...@gmail.com wrote:


 Hi,

  I want to develop an aplication 1.5 compatible for my G1. I received
 a Devel G1 Phone and it has 1.0 firmware. How can I upgrade it? I
 found some update in some forums, but I do not trust these kind of
 update. I am looking for something more official. I found the SDK
 upgrades but not the firmware ones.

  I live in Spain and my phone does not depends on any mobile operator.

  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: Invoking shared libraries

2009-06-15 Thread subram

Hi thanks for you reply
i don't know java/JNI is there any simple code in that i can modify Or
any explanations for the steps above mentioned,how to do each step

Thanks  Regards
Subram

On Jun 15, 3:42 pm, arunjith g arunj...@gmail.com wrote:
 you will have to use JNI methods to invoke a call in shared library
 what u do is

 1. Create a java class includes myfunC()
 2. Create a jni header file from this class
 3. It will have a jni_blahblah_myfunc call
 4. create a c/c++ file giving implementation to this function by calling ur
 required shared library function

 On Mon, Jun 15, 2009 at 4:08 PM, subram subram...@gmail.com wrote:

  Hi there
      I am having an shared library named librecord.so, i have to
  invoke this library inside the android project and make it to call by
  the sdk,if any one came across with this invoking kindly suggest me

  Thanks in advance
  Subram
--~--~-~--~~~---~--~~
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: ,myedittext.getText().toString() is giving null pointer exception

2009-06-15 Thread Odessa Silverberg

Obviously becuase you're trying to find a TextView but are using an ID
of a layout file and this is why findViewById can't find any textview
with this id.

You got:
setContentView(R.layout.search);
final EditText myedittext=(EditText)findViewById(R.layout.search); //
- You're using a layout id, instead of an element id. Probably you
meant to use R.id.search instead?)


On Jun 15, 9:27 am, sheshi prashanth...@gmail.com wrote:
 /**      can some one tell me why it is not working .here is my code
 */
 package com.arka.CallLogDemo;

 import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.os.Bundle;
 //import android.text.Editable;
 //import android.text.InputFilter;
 import android.text.Editable;
 import android.view.View;
 import android.widget.Button;
 import android.widget.EditText;
 //import android.widget.EditText;

 public class TestSearch extends Activity {
         @Override
         public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
         setContentView(R.layout.main);
         //callDialog(in search);
         setContentView(R.layout.search);
         final EditText myedittext=(EditText)findViewById(R.layout.search);
         final Button button=(Button) findViewById(R.id.callButton);
         button.setOnClickListener(new View.OnClickListener() {
     public void onClick(View v ) {
             // Perform action on click
         //int length=0;
         Intent search=new Intent();
    //   callDialog(just);

         search.putExtra(NUMBER_ENTERED,myedittext.getText().toString
 ());
         setResult(Activity.RESULT_OK,search);
         finish();

         }
     });

         }//end of onCreate()

         //customized alertDialog
         public  void callDialog(CharSequence message )
     {
         final AlertDialog.Builder a=new AlertDialog.Builder(this);
         a.setMessage(message);
         a.setTitle(TestSearch);
         //a.wait(2000);
         a.setPositiveButton(close, new
 DialogInterface.OnClickListener(){
                 public void onClick(DialogInterface dialog,int whichButton)
                 {

                         //a.setCancelable(true);

                 }
         });

         a.show();
     }



 }
--~--~-~--~~~---~--~~
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: EditText

2009-06-15 Thread Tseng

http://developer.android.com/reference/android/view/View.OnLongClickListener.html

Implement an View.OnLongClickListener and set it to your EditText
via
EditText txt = (EditText)findViewById(R.id.your_edittext_id);
...
txt.setOnLongClickListener(...)

Check out
http://tseng-blog.nge-web.net/blog/2009/02/14/implementing-listeners-in-your-android-java-application/
and
http://tseng-blog.nge-web.net/blog/2009/02/17/how-implement-your-own-listener-android-java/

If you want to know more about listeners and how to implement them.


On Jun 14, 6:36 pm, Synapse franzi...@gmail.com wrote:
 How can I change choise from contextual menu of EditText ( Menu that
 includes copy/paste funcionality ) ?
 Anyone has some piece of code?

 Synapse
--~--~-~--~~~---~--~~
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: Choosing the Right Book

2009-06-15 Thread Mahou

Alright thanks Golem, I will be sure to check out the book. I just
didnt know which one to get, all but these two had reallt poor
reviews.

On Jun 15, 6:30 am, golem haemmerl...@gmail.com wrote:
 Hi Mahou,

 I have the Hello, Android book and I'm very happy with it.
 It got me up and running quickly and I still use it every now and
 again to refresh on some concepts that I don't use often.
 Good for beginners!

 I can't say anything about the other book though.

 On Jun 15, 5:54 am, Mahou mahou...@hotmail.com wrote:

  Hi, I have enough for one book and wanted to know your opion on which
  on to get. The choices are:

  Hello Android

 http://www.amazon.com/Hello-Android-Introducing-Development-Platform/...

  or

  Unlocking Android

 http://www.amazon.com/Unlocking-Android-Frank-Ableson/dp/1933988673/r...

  Any tips?
--~--~-~--~~~---~--~~
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: XML Layout Language

2009-06-15 Thread Tseng



On Jun 13, 12:01 am, Mitch besse...@gmail.com wrote:
 Does anyone know a link to the specification for the XML Layout?  I'm
 looking for a description of the tags etc.  Since I'm new and just
 learning, a simplified version would be nice, focusing on the most
 common tags.  Everything I read now is vague.
There are no common tags in XML (unlike in HTML or X-HTML which are
subclasses of XML). In case of android every subclass of View can be
an Element. You can even create your own subclasses of View and use
them in the layout XML files.

You can check for some very basics at
http://tseng-blog.nge-web.net/blog/2009/01/30/android-creating-xml-uis/

 - What does xmlns mean?
 - What does the http://schemas.android.com/apk/res/android; do?
xmlns means Extended Markup Language (XML) namespace (NS)

It's a unique identifier/namespace. The http:// part is just the name
of this namespace. Theoretically it could also have been called
ljkjasd09kalsdj092, as long as it's unique. Most developers who
create some schemas usually chose a URL as name. For example if you
want to use X-HTML transitional (also a subform of XML) the xmlns
would be http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd, so
(in this case) the browser knows that this document is an X-HTML 1.0
transitional file and can parse it correctly. For android keep it at
http://schemas.android.com/apk/res/android and don't change it

 - What is the android: sytnax all about?
Android is the namespace you defined above with
xmlns:android=http://schemas.android.com/apk/res/android;. It tells
the compiler that it's related to android

 - Can you create your own Layouts like the LinearLayout?
Yes, but you have to do it in code first. You create your own class
which expands ViewGroup or one of the existing Layout classes, for
example:
class MyLayout expands LinearLayout {... }

Once you did it in code, you can use it in the XML files too, but you
have to use full qualified name of the class, like:
org.mypackage.myproject.widgets.MyLayout ../
org.mypackage.myproject.widgets.MyLayout
instead of
MyLayout.../MyLayout

 - Is there a list of available components like Button, TextView?
Basically all subclasses of View
http://developer.android.com/reference/android/view/View.html

 - What does the @ symbol do?
http://developer.android.com/guide/topics/resources/available-resources.html

It tells the compiler that you want to access a resource. Here are two
differences:
If you're using android:icon=@android:drawable/someicon then you can
access android resources (which are part of the android OS/SDK). If
you use android:icon=@drawable/someicon (notice that the android: is
missing after the @) then you're accessing resources of your
application.

 - Can I edit this directly in Eclipse with a graphical editor rather
 than manipulating text?
Yea, you can. If you have the ADT tools installed (Android Developer
Tools). But the editor mess up with the formating so it's harder to
read it in text after it has been edited by the Editor.

 I'm sure these are probably simple questions answered somewhere, but I
 just can't find the specification and I'm so new I don't seem to be
 able to find the info.

Some Guide:
http://developer.android.com/guide/index.html

Documentation/References:
http://developer.android.com/reference/packages.html

P.S.
One thing you haven't asked, which may be important: Every Element has
different attributes (that android:text etc. inside the elements). You
can find them in the documentation of that class you're using. For
example for a TextView ... you have to look at the TextView class
at
http://developer.android.com/reference/android/widget/TextView.html

It will have a section called XML Attributes and Inherited XML
Attributes where you can find all valid attributes for that element.
--~--~-~--~~~---~--~~
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 find out the screen orientation used at a point of time?

2009-06-15 Thread RTX

an activity can be used on a
- port mode
- land mode

land mode can be showed when the keyboard is open or orientation is
land

how do i find out what is the currant orientation used by the device
from the code ?


Cheers
--~--~-~--~~~---~--~~
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] activity dosnt show on the app menu

2009-06-15 Thread RTX

i have a widget project
im adding an activity to the project that i want to be available from
the app menu
it is registerd on the manifest as well as intentfilter and category

but it refuses to add the activity to the menu

what am i doing wrong or is there any thing im missing ?





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

2009-06-15 Thread deepdr...@googlemail.com

SMS is a communication channel of the mobile GSM network.
Sockets are used for communication using the IP Internet Protocol.
These are two separate, different topics.

--
http://www.deepdroid.com


On 15 Jun., 06:56, Siva siva...@gmail.com wrote:
 Im new for this android how to communicate to each other via sms .
 using socket .Is there related example pls help me.
--~--~-~--~~~---~--~~
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 search an application on Android Market?

2009-06-15 Thread yves

Hi,

Is it possible to search the Android Market on http://www.android.com/market/?
There is no search field??? I mean what if I know the name of an
application and don't want to search for an hour?

--~--~-~--~~~---~--~~
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] File Browser on Android Phone

2009-06-15 Thread yves

Hi,

how can I browse the contents on my android phone without hooking it
up to a computer. I mean an File Browser Android application

Thanks in advance
Yves

--~--~-~--~~~---~--~~
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 search an application on Android Market?

2009-06-15 Thread deepdr...@googlemail.com

On the device itself you can search within the market application.
On the web you can search on http://www.cyrket.com .
As you already found out, android.com/market does not offer a search
function for apps in the market.

--
http://www.deepdroid.com



On 15 Jun., 14:57, yves yves5...@googlemail.com wrote:
 Hi,

 Is it possible to search the Android Market onhttp://www.android.com/market/?
 There is no search field??? I mean what if I know the name of an
 application and don't want to search for an hour?
--~--~-~--~~~---~--~~
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: File Browser on Android Phone

2009-06-15 Thread deepdr...@googlemail.com

You can downlaod a file manager application from the Android market
like for example Astro.
Be aware though that as long as your phone is not rooted you do not
have file access rights on some areas of the file system.

--
http://www.deepdroid.com


On 15 Jun., 14:58, yves yves5...@googlemail.com wrote:
 Hi,

 how can I browse the contents on my android phone without hooking it
 up to a computer. I mean an File Browser Android application

 Thanks in advance
 Yves
--~--~-~--~~~---~--~~
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 use the aidl by the eclipse step by step?

2009-06-15 Thread Alex Lv

Hi,everyone!
My develop environment: eclipse, ADT0.9, SDK1.5, Windows XP.
How to use the aidl form creating an aidl-file to using the service?
Step by step.
Need your help!
In the sdk document, it descripe as AIDL generates an interface file
for you with the same name as your .aidl file. If you are using the
Eclipse plugin, AIDL will automatically be run as part of the build
process (you don't need to run AIDL first and then build your
project). If you are not using the plugin, you should run AIDL first.

But I can not find how to do this step!
Even I download an aidl-example, and import to the eclipse, there is
some errors

--~--~-~--~~~---~--~~
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] Upgrade logic for Apps

2009-06-15 Thread KFB

I've been developing my app for some time and will need to do some
upgrade logic next time I publish a version.  I know there's a way to
write upgrade logic for the database, but most of my information is
stored as preferences, since it's only user settings.

I've been toying with the idea of writing my own upgrade manager, but
was wondering if anyone knew of a better way to handle this.  Is there
anything built into the sdk so I can catch it when a user starts up
the app immediately after upgrading?

Thanks,

--keith.

--~--~-~--~~~---~--~~
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: HTC Magic - Can't install driver on development PCs

2009-06-15 Thread Wysie

Hi,

I was having the same problem as tienwai here. Instead of having
vid_0bb4pid_0c02, my entries are vid_0bb4pid_0c03, and I think
that's why it's not working. I tried editing the android_usb.inf file
and replaced all occurrences of vid_0bb4pid_0c02 with
vid_0bb4pid_0c03, and it installed. Did a adb shell and it
connected :). Hope it helps you.

On Jun 9, 5:20 pm, tienwai ltien...@gmail.com wrote:
 I had a similar problem and had tried all the methods mentioned above
 and it still did not work. However, I noticed that my registry entries
 are starting with vid_0bb4pid_0c03 instead of vid_0bb4pid_0c02.
 It seems to me that my product id is different from the one in the SDK
 and that could be why it did not work.  Can anyone advise on this?

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

2009-06-15 Thread benmayed

i have HTC Majic android 1.5 and no arabic i need help how can i add
arabic to it?

--~--~-~--~~~---~--~~
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] Using different version of Android SDK in Eclipse in parallel

2009-06-15 Thread AndroidM


Hi,

I am using Eclipse Ganymede under Ubuntu Intrepid. I have successfully
installed the ADT and got a Hello world running in the simulator
using Android SDK 1.5 r2.

Now I would like to compile an application that was built for Android
SDK 1.0. I added it from a svn tree. The build.xml does not work with
Android SDK 1.5 as some paths are different.
Is it possible to installed two SDKs in parallel. Where do I tell the
project which SDK to use?

Thanks for any help,

Andy

--~--~-~--~~~---~--~~
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: Choosing the Right Book

2009-06-15 Thread Yusuf T. Mobile

Whatever book you get, make sure that it covers 1.5 (Cupcake), as the
APIs changed enough that it matters.



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 Jun 15, 4:32 am, Mahou mahou...@hotmail.com wrote:
 Alright thanks Golem, I will be sure to check out the book. I just
 didnt know which one to get, all but these two had reallt poor
 reviews.

 On Jun 15, 6:30 am, golem haemmerl...@gmail.com wrote:



  Hi Mahou,

  I have the Hello, Android book and I'm very happy with it.
  It got me up and running quickly and I still use it every now and
  again to refresh on some concepts that I don't use often.
  Good for beginners!

  I can't say anything about the other book though.

  On Jun 15, 5:54 am, Mahou mahou...@hotmail.com wrote:

   Hi, I have enough for one book and wanted to know your opion on which
   on to get. The choices are:

   Hello Android

  http://www.amazon.com/Hello-Android-Introducing-Development-Platform/...

   or

   Unlocking Android

  http://www.amazon.com/Unlocking-Android-Frank-Ableson/dp/1933988673/r...

   Any tips?
--~--~-~--~~~---~--~~
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 can I style a button widget.

2009-06-15 Thread Josh

Is it possible to add a border to a button or do i need to use
drawables?

On Jun 13, 5:38 pm, Josh joshdo...@gmail.com wrote:
 I want to create a style to apply to all of my buttons. I want to know
 how to style a button with a green border and red background. how
 would i do this?
--~--~-~--~~~---~--~~
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] My First Custom View

2009-06-15 Thread Dave Smith

Hi all -

I'm trying to get a custom view example running out of the
Professional Android Application Development book (the
CompassView).  I have checked over my code numerous times, and still
the same problem occurs...whenever I run the application I only see a
black screen and the view never pops up.

I have stepped through the debugger a few times and I have two
theories:
1. I have a problem with onMeasure()...my code is currently calling
setMeasuredDimension with 0,0
2. The view might be invisible...I read back the value of
CompassView.isShown() and it read false

Here is the measure code that is being used:
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
// The compass is a circle that fills as much screen as 
possible.
// Set the measured dimensions to the shortest screen boundary.
int measuredWidth = measure(widthMeasureSpec);
int measuredHeight = measure(heightMeasureSpec);

int d = Math.min(measuredWidth, measuredHeight);

//setMeasuredDimension must be called by onMeasure
setMeasuredDimension(d, d);
}

private int measure(int measureSpec){
int result = 0;

//Decode the spec value
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(specMode);

if(specMode == MeasureSpec.UNSPECIFIED){
//Return a default value
result = 200;
} else {
//Return full bounds since we are filling available 
space
result = specSize;
}

measure() is returning MeasureSpec.EXACTLY for mode and 0 for size
from both width and height.  How is that possible?  I can attach more
code if necessary, because my other problem is that onDraw() never
gets called...but I thought that might have something to do with
having no size.

If it matters, I ran this under Android 1.1 and 1.5 to be sure I
didn't miss something in a version update.

Thanks in advance!
--~--~-~--~~~---~--~~
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] Any reason why Data connection stays open?

2009-06-15 Thread Tony Su
I read about this recently as a common reason for battery drain, once the data 
network is accessed, it doesn't time out and stays on forever (of course 
unless either forcibly terminated or the system is powered off).
 
Is there a known reason for this? It's curious because this is the first data 
capable mobile device which behaves this way.
 
TIA,
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] LED Alerts

2009-06-15 Thread Beth Mezias
Hello good people,
Has anybody got an LED notification from the notification manager working?
 I tried using a custom setup as well as using the DEFAULT_LIGHTS setting
but I see nothing in the emulator nor on the device.  The log shows the
method is executing the code inside my if.  Here's some code I tried:
 if (prefs.getBoolean(ctxt.getString(R.string.led), false)) {

 //notification.defaults |= Notification.DEFAULT_LIGHTS;
// when default did not work I tried these settings
 notification.ledARGB = 0xff00ff00;
 notification.ledOnMS = 3000;
 notification.ledOffMS = 1000;
 notification.flags |= Notification.FLAG_SHOW_LIGHTS;
}


If you have it going can you send me a snippet with your working settings?

Thanks and regards,
Beth

-- 

W. C. Fields http://www.brainyquote.com/quotes/authors/w/w_c_fields.html
- If I had to live my life over, I'd live over a saloon.

--~--~-~--~~~---~--~~
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 obtain the view object under MotionEvent.ACTION_UP

2009-06-15 Thread Chandru


Hello

I have a table layout with multiple ImageButton. When user drag-n-
drops an image from source button to target button, I'd like to redraw
the target view image with the content of the source button. Using the
MotionEvent, I can identify the source button, but how do I get the
target view based on the current x,y coordinates in MotionEvent?


Thanks
Chandru
--~--~-~--~~~---~--~~
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: Invoking shared libraries

2009-06-15 Thread subram


Hi There
How to write a simple JNI that will print a message in the android
screen/do the operation specified in the shared library

Thanks in advance
Subram
On Jun 15, 3:42 pm, arunjith g arunj...@gmail.com wrote:
 you will have to use JNI methods to invoke a call in shared library
 what u do is

 1. Create a java class includes myfunC()
 2. Create a jni header file from this class
 3. It will have a jni_blahblah_myfunc call
 4. create a c/c++ file giving implementation to this function by calling ur
 required shared library function

 On Mon, Jun 15, 2009 at 4:08 PM, subram subram...@gmail.com wrote:

  Hi there
      I am having an shared library named librecord.so, i have to
  invoke this library inside the android project and make it to call by
  the sdk,if any one came across with this invoking kindly suggest me

  Thanks in advance
  Subram
--~--~-~--~~~---~--~~
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 can I retrieve the list from the PHP DataBase

2009-06-15 Thread vinny.s...@gmail.com

Hi Every One

Is there any Method To retrive the list from the Php Database

I need to retrice the 20 names fron the php server

how can i get that server
can any body help me regarding this ...

thanks in advance
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---