[android-beginners] Cannot select a row in SimpleCursorAdapter with custom layout

2009-10-14 Thread jax

When I use the following layout in a SimpleCursorAdapter I cannot
select any rows.  In face the setOnItemClickListener methods does not
even run at all.

?xml version=1.0 encoding=utf-8?
LinearLayout
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content
android:padding=4dp xmlns:android=http://
schemas.android.com/apk/res/android android:focusable=false
LinearLayout
android:orientation=vertical
android:layout_width=wrap_content
android:layout_height=wrap_content
android:padding=2dp android:focusable=false
android:clickable=false
TextView
android:textSize=18sp
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=name android:id=@+id/
row_item_name
android:focusable=false
/TextView
TextView
android:textSize=12sp
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Check to mark as known
android:id=@+id/row_item_extra_info
android:focusable=false
/TextView
/LinearLayout
LinearLayout
android:orientation=vertical
android:gravity=right
android:layout_gravity=right
android:layout_width=fill_parent
android:layout_height=wrap_content
android:padding=2dp android:focusable=true
android:clickable=true

CheckBox android:layout_width=wrap_content
android:layout_height=wrap_content
android:id=@+id/row_item_checkbox
android:focusable=false
android:clickable=true
/CheckBox

/LinearLayout
/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] YouTube Android

2009-10-14 Thread Maxood

Does android support youtube videos? If yes then, can someone provide
me an example code
Thanks,
Maxood
--~--~-~--~~~---~--~~
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 make a child activity?

2009-10-14 Thread vchris80

thank for your reply, but I still have some troubles:

now I have my main activiy been a ActivityGroup and the child activity
been a simple Activity.

I start the child with this code:

Intent startIntent = new Intent(MyMainActivity.this,
ChildActivity.class);
getLocalActivityManager().startActivity(and.mypackage.ChildActivity,
startIntent);

this way, in the onCreate of the child activity, I can get the parent
and the activity results child of something by calling isChild()
method. Fine. But the screen actually doesn't appear. The
documentation of startActivity of LocalActivityManager says that The
caller needs to take care of adding this window to a view hierarchy,
but I can't figure out how to do that. I watched the WindowManager for
a suitable method but with no luck.

On 13 Ott, 19:09, James Yum j...@google.com wrote:
 Hi,
 Those are meant for an ActivityGroup and its embedded activities, for
 example a TabActivity.

 What you might want to look into, is this introduction on opening screens
 (activities):

 http://developer.android.com/guide/appendix/faq/commontasks.html#open...

 Cheers,
 James

 On Tue, Oct 13, 2009 at 7:25 AM, vchris80 vuc...@gmail.com wrote:

  Hi all, I have a simple question: how I make an activity that is child
  of another?

  I use this code to start an activity from another:

  Intent startIntent = new Intent(MyMainActivity.this,
  ChildActivity.class);
  startActivity(startIntent);

  but on the onCreate method of ChildActivity, if I watch for getParent
  () I get null, and if I ask for isChild() I get false,... so what I
  miss?

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



[android-beginners] Re: using servlet in mobile with Android platform

2009-10-14 Thread Anais

Sorry, but I don't understand exactly this class. I think that it
could be use when you want to display existent web pages.
My purpose is to build an application on the mobile which will call
the servlet to retrieve the informations (on our Database for login,
password etc... or on the IMAP server to retrieve mails) . But there
will be only the view which will be deploy on the phone.

--~--~-~--~~~---~--~~
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 add a view to application layout programmatically

2009-10-14 Thread Sven

Hi Justin,

my main.xml looks as follows:

?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

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:gravity=center_horizontal
android:text=@string/text_a
/
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:gravity=center_horizontal
android:text=@string/text_b
/
Button
android:id=@+id/flag_button
android:text=@string/button_string1
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=center
/
/LinearLayout

I'd really like to get around having to declare a separate imageView
in the XML layout. Isn't there a way of instantiating such an object
by hand and adding it to the application's layout at runtime?

Best,

Sven

On Oct 13, 5:28 am, Justin Anderson janderson@gmail.com wrote:
 What does the XML for your res/layout/main.xml look like?

 Thanks,
 Justin

 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --

 On Mon, Oct 12, 2009 at 9:28 AM, Sven koff...@gmail.com wrote:

  Hi,

  I want to add an ImageView to my layout when a button has been
  pressed. Sadly, I cannot get a handle to the main application's
  linearlayout, I always get a null pointer error when trying to
  retrieve the layout using findViewByID.

  Here's the code that ought to display the image when button b has been
  pressed, but I think I have missed something obious:

  package com.foo.bar;

  import android.app.*;
  import android.os.Bundle;
  import android.view.*;
  import android.view.ViewGroup.LayoutParams;
  import android.widget.*;
  import android.content.*;
  import android.util.Log;

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

      // assign flag.png to the button, loading correct flag image for
  current locale
         Button b;
         b = (Button)findViewById
  (R.id.flag_button) ;//.setBackgroundDrawable(this.getResources
  ().getDrawable(R.drawable.developers));

         // build dialog box to display when user clicks the flag
         AlertDialog.Builder builder = new AlertDialog.Builder(this);
         builder.setMessage(R.string.dialog_text)
             .setCancelable(false)
             .setTitle(R.string.dialog_title)
             .setPositiveButton(Done, new
  DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog, int id) {
                 dialog.dismiss();
                 }
             });
         final AlertDialog alert = builder.create();

         // set click listener on the flag to show the dialog box
         b.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 // alert.show();
                 ImageView image;
                 image = new ImageView(v.getContext());
                 image.setImageDrawable(v.getResources().getDrawable
  (R.drawable.developers));

                 LinearLayout main = (LinearLayout)
  AndroidTest.this.findViewById(R.layout.main);
                 // some debug code
                 if (main == null)
                 {
                         Log.v(abc, Main is null);
                         }
                 else
                 {
                 main.addView(image, 200, 200);
                 }
             }
             });

     }
  }
--~--~-~--~~~---~--~~
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: Question about app widgets

2009-10-14 Thread Vapor Trail
Thanks you Mark,
It worked.

Regards

Carl

On Wed, Oct 14, 2009 at 8:27 AM, Mark Murphy mmur...@commonsware.comwrote:


 Carl wrote:
  I would like to ask if it is possible to put 2 widgets in the same
  application. In other words, having one project, with one manifest.xml
  file and making 2 different widgets in the the same project.

 AFAIK, yes.

  In the case that it is possible, when there is an intent
  android.appwidget.action.APPWIDGET_UPDATE, how does the application
  know which widget to choose?

 Use different AppWidgetProviders, one for each class of widget.

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

 _Android Programming Tutorials_ Version 1.0 In Print!

 


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



[android-beginners] How to clean intermediary build files

2009-10-14 Thread Carl

Hello all,

When I was building some source code there was an error with resource
files. I fixed the problem, but when I try to build again the source
code using the command line, the same error shows up.

I presume the builder is using the same intermediary files, made in
the previous build, so I would like to ask how I can either clean the
module in question (without cleaning all the modules) or, where can I
find and delete the intermediary files generated by a previous build.

Thank you.

Regards

Carl
--~--~-~--~~~---~--~~
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: R.java sometimes doen not refresh itself in eclipse

2009-10-14 Thread Smelly Eddie

I may be mistaken, but if you run a clean on the project it should
regenerate all the generated java files, namely R.



On Oct 13, 11:57 pm, jax jackma...@gmail.com wrote:
 I have notices that R.java sometimes noes not refresh when I edit (and
 save) an XML file.  The only way I have been able to get around this
 is to attempt to run the project, this seems to fix it.  This is
 however kind of annoying, does anyone know a better way around this
 problem?  An eclipse shortcut key etc.
--~--~-~--~~~---~--~~
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: R.java sometimes doen not refresh itself in eclipse

2009-10-14 Thread jax

how to you run a clean?

On Oct 14, 6:41 pm, Smelly Eddie ollit...@gmail.com wrote:
 I may be mistaken, but if you run a clean on the project it should
 regenerate all the generated java files, namely R.

 On Oct 13, 11:57 pm, jax jackma...@gmail.com wrote:

  I have notices that R.java sometimes noes not refresh when I edit (and
  save) an XML file.  The only way I have been able to get around this
  is to attempt to run the project, this seems to fix it.  This is
  however kind of annoying, does anyone know a better way around this
  problem?  An eclipse shortcut key etc.
--~--~-~--~~~---~--~~
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: Intent-Filter for custom protocols

2009-10-14 Thread Konstantin Burov

Hello, I have the same problem. Did you figure out how to deal with
it?

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] Configuring widgets

2009-10-14 Thread android learner

Hello,
I have 2 questions related to configuring widgets. I'd really
appreciate any help/pointers.

1) I use AppWidget Configuration Activity to get the user preferences
and when the user clicks 'Done', I add the widget on to the home
screen. Now when the user clicks on the widget, I want to take the
user back to the configuration screen. Is that possible? Currently, I'
trying to send an intent from the widget class to the the
configuration activity but the configuration screen does not come up.

2) In the configuration step, I take a timezone value from the user
and I want to add a clock widget (I have a custom class for the clock)
that displays the time for this timezone. My clock class is very
similar to android AnalogClock class except that, this has an
additional setTimeZone method. I use this clock class in the layout
file, from which the RemoteView is created. As far as I understand
there is no way to configure the timezone through RemoteViews
(RemoteViews supports only very few methods like setting text, image
etc).
If I send an intent to the clock class to configure the timezone,
would it be possible to configure each instance of the widget to a
different timezone? Or is there a way to achieve this, through
RemoteView itself? Any pointers will be of great 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: How to add a view to application layout programmatically

2009-10-14 Thread Alan Cassar
Title: Alan Cassar, Software Developer | Tel: +356 21334457 | Fax: +356
21
334156





The mistake is in the following lines of code: 

LinearLayout main = (LinearLayout)
AndroidTest.this.findViewById(R.layout.main);


Your layout is not called R.layout.main, that is a reference to the
whole layout file. Give the layout an id like so: 

LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layout_main"			-- add this line




Then call:
LinearLayout main = (LinearLayout)
AndroidTest.this.findViewById(R.id.layout_main);














Alan Cassar,Software
Engineer | Tel: +356 21334457| Fax:+356 21 334156
ricston Ltd.,Northfields Suite 4, Independence Avenue,
Mosta MST9026 - MALTA
email:alan.cas...@ricston.com
| web:ricston.com

--
Disclaimer
- This email and any files transmitted with it are confidential and
contain
privileged or copyright information. You must not present this message
to
another party without first gaining permission from the sender. If you
are not
the intended recipient you must not copy, distribute or use this email
or the
information contained in it for any purpose other than to notify us. If
you
have received this message in error, please notify the sender
immediately and
delete this email from your system. We do not guarantee that this
material is
free from viruses or any other defects although due care has been taken
to minimise
the risk. Any views stated in this communication are those of the
actual sender
and not necessarily those of Ricston Ltd.
or its
subsidiaries.





Sven wrote:

  Hi Justin,

my main.xml looks as follows:

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

TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_a"
/
TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_b"
/
Button
android:id="@+id/flag_button"
android:text="@string/button_string1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
/
/LinearLayout

I'd really like to get around having to declare a separate imageView
in the XML layout. Isn't there a way of instantiating such an object
by hand and adding it to the application's layout at runtime?

Best,

Sven

On Oct 13, 5:28am, Justin Anderson janderson@gmail.com wrote:
  
  
What does the XML for your res/layout/main.xml look like?

Thanks,
Justin

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--

On Mon, Oct 12, 2009 at 9:28 AM, Sven koff...@gmail.com wrote:



  Hi,
  


  I want to add an ImageView to my layout when a button has been
pressed. Sadly, I cannot get a handle to the main application's
linearlayout, I always get a null pointer error when trying to
retrieve the layout using findViewByID.
  


  Here's the code that ought to display the image when button b has been
pressed, but I think I have missed something obious:
  


  package com.foo.bar;
  


  import android.app.*;
import android.os.Bundle;
import android.view.*;
import android.view.ViewGroup.LayoutParams;
import android.widget.*;
import android.content.*;
import android.util.Log;
  


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


// assign flag.png to the button, loading correct flag image for
current locale
   Button b;
   b = (Button)findViewById
(R.id.flag_button) ;//.setBackgroundDrawable(this.getResources
().getDrawable(R.drawable.developers));
  


 // build dialog box to display when user clicks the flag
   AlertDialog.Builder builder = new AlertDialog.Builder(this);
   builder.setMessage(R.string.dialog_text)
 .setCancelable(false)
 .setTitle(R.string.dialog_title)
 .setPositiveButton("Done", new
DialogInterface.OnClickListener() {
   public void onClick(DialogInterface dialog, int id) {
   dialog.dismiss();
   }
 });
   final AlertDialog alert = builder.create();
  


 // set click listener on the flag to show the dialog box
   b.setOnClickListener(new View.OnClickListener() {
 

[android-beginners] why use onCreateDialog?

2009-10-14 Thread Jeffrey Blattman




i've been wondering this. why would i implement
Activity.onCreateDialog()? why wouldn't i just create a new instance of
the dialog i want, and call .show() on it? usually a dialog will close
itself, but if i doesn't, i just keep a handle to it in a member field
and call .dismiss().

-- 





[android-beginners] Re: Intent is not sending extras data when using getIntent()

2009-10-14 Thread jax

Solved, had to use getLongExtra instead of getIntExtra

On Oct 14, 6:53 pm, jax jackma...@gmail.com wrote:
 I am having a problem with an intent.  I open an activity using the
 following on a ListView.

         public static final String LIST_ID =
 com.example.myprogram.ListId;

         //onClick listener
         localListView.setOnItemClickListener(new OnItemClickListener()
 {

                         @Override
                         public void onItemClick(AdapterView? adapter, View 
 view, int
 position,
                                         long id) {
                                 //open the list
                                 localClickIntent = new 
 Intent(ListManagement.this,
 ListStatistics.class);
                                 
 localClickIntent.putExtra(ListManagement.LIST_ID, id);

                                 startActivity(localClickIntent);

                         }
                 });

 I then retrieve that LIST_ID in ListStatistics like this

                 Intent receivedIntent = getIntent();
                 listId = receivedIntent.getIntExtra(ListManagement.LIST_ID, 
 1);

 The problem is that the listId is always the default (1), and
 inspecting the extras on receivedIntent in eclipse shows not extras
 data.
--~--~-~--~~~---~--~~
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: Reading/Decoding bar code stored in resources

2009-10-14 Thread Abhishek

Wahib.. sorry for the mistake in your name. Thanks for pointing out.
3 phases of my app
1) Scan picture(bar code) from camera  store
2) Decode the barcode
3.) Search the product information and display.

I am done with Part 2.. I think you are also working on same
application if I am not wrong.
Now I will concentrate on  Part 1. Where are you stuck in Part1? What
is the error if any?
Please let me know. I will also keep you posted.

Thanks,
Abhishek

On Oct 9, 10:36 pm, wahib haq wahib.t...@gmail.com wrote:
 You are welcome. Btw my name is wahib :) How do u intend to use this
 barcode code with camera thing? are you using your own camera preview
 code or calling built in camera app intent?? I am just stuck with this
 phase .. i hope its the last thing.

 Regards,
 wahib

 On 10/10/09,Abhishekabhishek.moh...@gmail.com wrote:





  Hey Wahid,

  Same code worked for me. Multiformatreader can read QR codes.

  Thanks a lot for help.
 Abhishek

  On Oct 9, 9:11 am,Abhishekabhishek.moh...@gmail.com wrote:
  Wahid,

  Thanks a lot brother. Is it possible for you to send you activity file
  to me onabhishek.moh...@gmail.com?
  I will keep you posted about my progress on this application.

 Abhishek

  On Oct 7, 7:42 pm, wahib haq wahib.t...@gmail.com wrote:

   hiabhishek!! I am a newbie and my first initiative is also building
   a simple barcode decoding module.  I dont have a android phone so i
   have to go on a different path to do this barcode app thing. :S

   can you plz guide me what to be on right side of BufferedImage myImage =
   ... ??
   I am using this code 

   I have imported these ...

   import android.graphics.Bitmap;

   import android.graphics.BitmapFactory;
   import android.widget.TextView;
   import com.google.zxing.MonochromeBitmapSource;
   import com.google.zxing.MultiFormatReader;
   import com.google.zxing.Reader;
   import com.google.zxing.ReaderException;
   import com.google.zxing.client.androidtest.*;
   import com.google.zxing.common.BaseMonochromeBitmapSource;

   Bitmap bitmap =
   BitmapFactory.decodeResource(getResources(),R.drawable.bar5);

   Bitmap bitmap1 =
   BitmapFactory.decodeFile(file://sdcard/DCIM/Camera/2009-10-04
   21.31.02.jpg);

             MultiFormatReader reader1=new MultiFormatReader();//For all
   barcode formats

            try
             {

                result=reader1.decode(new
   RGBMonochromeBitmapSource(bitmap));
                tv.setText(result.getText());
                 }
             catch (Exception e)
             {
                 tv.setText(Error occured !!);
              }
           }

   //

   I have tried it with reading bmp and jpeg image from pasting in
   res/drawable folder and it works fine with 1D barcode. Its not working
   with 2D and i dont know how to do it though multiformat i guess means
   it shud support 2D as well. Well this will solve ur problem. I also
   tried to read it with a sdcard image coz after all it has to fetch
   from the image taken by camera. but i dont have a camera and unable to
   push image in gallery after lots of tries so it still undone.
   Share anything else you cum to know abt barcode decoding task.

   Regards,
   wahib

   On 10/6/09,Abhishekabhishek.moh...@gmail.com wrote:

Hello All,

I am writing an application to scan a bar code.
As a small module of it I am trying to decode the bar code form the
image file stored as resource. (R.raw.bc02) where bc02.jpg is my bar
code image file.

I am usinghttp://code.google.com/p/zxing/wiki/DeveloperNotestowrite
a program for decoding.
I am stuck up at following step: i.e. reading the image as
bufferedImage

BufferedImage myImage = ...;
MonochromeBitmapSource source = new
BufferedImageMonochromeBitmapSource
(myImage);

I have written following code to read the image which works fine
InputStream is= this.getApplicationContext().getResources
().openRawResource(R.raw.bc02);
The run time object is of class android.content.res.AssetManager
$AssetInputStream

Can any help me in reading the file and decoding? Please let me know
if I am doing correct or not.

Thank you,
   Abhishek

   --
   Wahib-ul-haq

   Communications Engineering Student,
   NUST, Pakistan.www.sizzlotech.com

 --
 Wahib-ul-haq

 Communications Engineering Student,
 NUST, Pakistan.www.sizzlotech.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: why use onCreateDialog?

2009-10-14 Thread Balwinder Kaur (T-Mobile USA)

The answer to your question is part of the documentation :)
Read under the topic Showing a Dialog
http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog

Balwinder Kaur
Mobile.Software.Development
·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 Oct 14, 7:22 am, Jeffrey Blattman jeffrey.blatt...@gmail.com
wrote:
 i've been wondering this. why would i implement
 Activity.onCreateDialog()? why wouldn't i just create a new instance of
 the dialog i want, and call .show() on it? usually a dialog will close
 itself, but if i doesn't, i just keep a handle to it in a member field
 and call .dismiss().

 --
--~--~-~--~~~---~--~~
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: R.java sometimes doen not refresh itself in eclipse

2009-10-14 Thread Balwinder Kaur (T-Mobile USA)

In Eclipse, under the Project menu, is an option build automatically.
That would help you build the R.java file everytime modifications are
made. The Clean... option is also there under Project.

Balwinder Kaur
Mobile.Software.Development
·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 Oct 14, 4:43 am, jax jackma...@gmail.com wrote:
 how to you run a clean?

 On Oct 14, 6:41 pm, Smelly Eddie ollit...@gmail.com wrote:

  I may be mistaken, but if you run a clean on the project it should
  regenerate all the generated java files, namely R.

  On Oct 13, 11:57 pm, jax jackma...@gmail.com wrote:

   I have notices that R.java sometimes noes not refresh when I edit (and
   save) an XML file.  The only way I have been able to get around this
   is to attempt to run the project, this seems to fix it.  This is
   however kind of annoying, does anyone know a better way around this
   problem?  An eclipse shortcut key etc.
--~--~-~--~~~---~--~~
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] Binding data to a View object

2009-10-14 Thread andy17null

Hi, I have an instance variable declared at the top of my Activity:
MtgCounter counterOne;

MtgCounter has a method getLife that returns an int. I want to display
the current value of counterOne.getLife() on a clickable button. This
value will change sometimes, including when you click the button.

In my main.xml layout file, I have a Button with ID property @+id/
p1button. (First off, the ID of this button is p1button, correct?)

What's the best way to display this integer on my button?

--~--~-~--~~~---~--~~
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: Can't get the altitude from Location.getAltitude()

2009-10-14 Thread cedcox

Same issue. does android manage altitude information ?

did someone try on a real phone ?

thx

Cédric

On 12 sep, 22:48, Ken Bradshaw kbrad...@gmail.com wrote:
 Hi,
   Any clue as to the solution on this?  I am having the same issue,
 though my method of sending the location information is different.  I
 am loading a gpx file which contains elevation information into
 eclipse.  When I play the gpx file in eclipse, latitude, longitude and
 time definitely change in the new Location, but calls to getAltitude()
 always = 0.0.  I have added the permissions ACCESS_COARSE_LOCATION and
 ACCESS_FINE_LOCATION but it didn't make any difference.  I assume this
 mechanism is broken in the emulator or in eclipse, can anyone at least
 verify that calls to getAltitude() works correctly on the actual
 phone?  If it works on the phone, then I won't worry about testing
 this.

 On Aug 5, 4:33 am, Horse ckma0...@gmail.com wrote:



  Hi,

  I use the geo command in the emulator console, and input geo fix
  -121.45356 46.51119 4392.
  Using Location.getAltitude() to get thealtitude, but always return
  zero.
  How to get thealtitude, when I use the geo command and getAltitude
  () method?
  Thanks for your help.

  BR,
  Horse- Masquer le texte des messages précédents -

 - Afficher le texte des messages précédents -

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

2009-10-14 Thread frederic glouzon

hello,
I am looking for

--~--~-~--~~~---~--~~
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] Best Hello World Map Tutorial/Application?

2009-10-14 Thread Kent Borg

Still stuck in the mud with trying to do a map application, but I am not
very invested so far.  I am willing to start over from scratch...

Any suggestions for the best tutorial and sample code for doing a map
application?  Looking around I see
http://www.devx.com/wireless/Article/39101/0/page/1 looks good, but it
is a year old.  Should I be looking for something newer?


What is the cleanest way for a newbie to get going?


Thanks,

-kb


--~--~-~--~~~---~--~~
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] GridView Problems.

2009-10-14 Thread seabook

Hi all guys,

I tried to get the pics from internet and display all the results in
the Gridview with a dynamic updated. However it doesn't work properly.
I did some research on the internet and using AsyncTask class to avoid
the block of the UI Thread. But I just can't get the Gridview
Dynamiclly updated well.

Here is the code snippet:

public class GridViewMultiThread extends Activity {
Button button = null;
GridView gridView = null;
Context context = null;
ImageAdapter imageAdapter;
private View mSearchPanel;
DownloadPhotosTask downloadPhotosTask;

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

gridView = (GridView) findViewById(R.id.showPhotoGridView);

imageAdapter = new ImageAdapter(this);
gridView.setAdapter(imageAdapter);
downloadPhotosTask = (DownloadPhotosTask) new DownloadPhotosTask
().execute();
//  button.setOnClickListener(new OnClickListener() {
//  @Override
//  public void onClick(View v) {
//  button.setEnabled(false);
//  downloadPhotosTask = (DownloadPhotosTask) new 
DownloadPhotosTask
()
//  .execute();
//  }
//  });
}

class DownloadPhotosTask extends AsyncTaskVoid, Photo, Void
implements
PhotoDownloadListener {

//  @Override
//  protected void onPreExecute() {
//  if (mSearchPanel == null) {
//  mSearchPanel = ((ViewStub) 
findViewById(R.id.stub_search))
//  .inflate();
//
//  ProgressBar progress = (ProgressBar) 
mSearchPanel
//  .findViewById(R.id.progress);
//  progress.setIndeterminate(true);
//
//  ((TextView) 
mSearchPanel.findViewById(R.id.label_loading))
//  .setText(loading);
//
//  final View cancelButton = mSearchPanel
//  
.findViewById(R.id.button_cancel);
//  cancelButton.setOnClickListener(new 
View.OnClickListener() {
//  public void onClick(View v) {
//  onCancelSearch();
//  }
//  });
//  }
//  }

//  private void onCancelSearch() {
//  if (downloadPhotosTask != null
//   downloadPhotosTask.getStatus() == 
AsyncTask.Status.RUNNING)
{
//  downloadPhotosTask.cancel(true);
//  downloadPhotosTask = null;
//  }
//  }

@Override
protected Void doInBackground(Void... params) {
DownLoader.getInstance().downLoadImage(this);
return null;
}

@Override
public void onPhotoDownloadListener(Photo photo) {
if (photo != null  !isCancelled()) {
publishProgress(photo);
}
}

@Override
public void onProgressUpdate(Photo... photos) {
for (Photo photo : photos) {
imageAdapter.addPhoto(photo);
gridView.invalidateViews();
//  imageAdapter.registerDataSetObserver(observer)
}
}

}

}

class ImageAdapter extends BaseAdapter {

private Context mContext;
private ListPhoto photos = new ArrayListPhoto();

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

public void addPhoto(Photo photo) {
photos.add(photo);
}

@Override
public int getCount() {
return photos.size();
}

@Override
public Object getItem(int position) {
return photos.get(position);
}

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

@Override
public View getView(int position, View convertView, ViewGroup parent)
{
final ImageView imageView;
if (convertView == null) {
imageView = new 

[android-beginners] listview

2009-10-14 Thread frederic glouzon

hello,
I am looking for a way to display the 200+ images of the countries of
my listview. The problem is that my listview datas come from a sqlite
database with the name of the countries and the name of the images
files of the countries flags. I have an issue to get the ressources
for the images files as the names i get from the database are strings
and the setImageResource require an int.

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] Stuck in Mud Over GWT?

2009-10-14 Thread Kent Borg

Newbie here... 

I have used Eclipse to get a HelloAndroid to work and now I am trying to
get a most basic MapActivity to work.  In my source file I have a:

  import com.google.android.maps.MapActivity;

And Eclipse complains Import com.google cannot be resolved. 

OK, so I Google around and it seems I need to edit my .gwt.xml file, and
I don't seem to have one. 

Another hit suggests:
 Go to your Eclipse preferences, then Google - GWT on the side bar,
 and then
 add another entry to the list box pointed to your GWT 1.4 SDK. [...]

Except I can't find that in the Eclipse preferences. 

I think another hit said to right click on the project and do something
with a Google sub-menu, but I don't have that either.

I think I have something basic missing with my Eclipse setup.  I am
running Eclipse IDE for Java Developers Build id: 20090920-1017, for
plugins I have among the listed Android Development Toolkit
0.9.3v200909031112-12945.


Have I given enough information for someone to explain where I went wrong?


Thanks,

-kb, the Kent who wants to get out of the mud.


--~--~-~--~~~---~--~~
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] headphone intent receiving

2009-10-14 Thread Richard Thompson
Hi there,

I've been working on an application to detect when the headset is plugged
in.  My application can successfully receive broadcast intents such as
airplane mode but when I plug my headphones in nothing happens with my app.
If I triger the headset plugged intent in another app then my application
runs correctly.  My phone is also aware of the headset being plugged and
unplugged in 99.% of the time.

Does anybody have any ideas.  Are there any permissions I'm missing?  How
would I go about debugging the problem?

Thanks for the 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] Listening for key press of incoming call

2009-10-14 Thread Ernesto Vance

Hello all,
I want to write an application where my application can call a number
and have someone on the other end press a sequence of numbers on the
keypad of their phone and validate the numbers that where entered from
my phone.

Basically, my application will call a number, someone pushes some keys
(ie, 1234), and have my application receives those numbers for
processing.

Thanks
E

--~--~-~--~~~---~--~~
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 customize the Android

2009-10-14 Thread Freeman Zhang

HI,

I wanna use Android on PMP device, is there has some resource to teach
me how to customize the Android System?

Such as, cut off the GSM/WCDMA support, cut off camera, etc., to
develop the driver to fit the new hardware?
How to disable the original Android interface?
And how to run my application automatically on the startup?

Thank you 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: Can we develop android apps in C or C++?

2009-10-14 Thread jaffachief

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I believe all apps have to be written in Java.

- From the dev guide:
All applications are written using the Java programming language.

Regards,
Magnus Morton
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (MingW32)

iQEcBAEBAgAGBQJK1OQpAAoJEGquKC+k5ys+BS4H/jWcmqtGZV783RDg9kddCNua
dPP8Dw0LB2w4OPekfQww6Q35GvjLMZdFcFrj0oz04+6Ar+5wwuleUN8hVB70z0L9
9D2oxHUaj1gmyq7jaGHSzJlsW0S2aLTyg79Yjv65yiFQWMWY7I26ESc2VViYiYua
r9UkTlfK77xGxV/7nuGTGANObcaa3GaQ2nq7D6Tx1UE9R3Vn3XKnjyTlxsDXTj34
uyi00UVjVnFR0y4I1LMqBR7Mic6yk/SWABAAJ56DGvYlDWydRRzR7lj9nX9Eh4mo
FQ7hc5cHsuM5ULFDXqUQ15xkh22q9BVobLsrQB4AtDt8Fa3SZQc25YEXoaO0Ryo=
=zXC6
-END PGP SIGNATURE-


On Oct 13, 12:52 pm, SSuman185 aluvala.su...@gmail.com wrote:
 Hi All,

 I am very new to android and also for JAVA. Untill now i am working on
 C.
 Is there any way to develop the Android apps on C or C++.
 Please let me know, whether it is possible or not.

 Thanking you all,

 Regards,
 SSuman#SS185

--~--~-~--~~~---~--~~
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] seriously, how can I unsubscribe?

2009-10-14 Thread David Meyer
android-beginners-unsubscr...@googlegroups.com bounces and the list owners
aren't responding.

Thnx,

Dave

--~--~-~--~~~---~--~~
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: seriously, how can I unsubscribe?

2009-10-14 Thread Mark Murphy

David Meyer wrote:
 android-beginners-unsubscr...@googlegroups.com
 mailto:android-beginners-unsubscr...@googlegroups.com bounces and the
 list owners aren't responding.

From every email's sig:

 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

There, you can unsubscribe, change your email preferences (e.g., digest
vs. individual messages, etc.).

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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 clean intermediary build files

2009-10-14 Thread Mark Murphy

Carl wrote:
 Hello all,
 
 When I was building some source code there was an error with resource
 files. I fixed the problem, but when I try to build again the source
 code using the command line, the same error shows up.
 
 I presume the builder is using the same intermediary files, made in
 the previous build, so I would like to ask how I can either clean the
 module in question (without cleaning all the modules) or, where can I
 find and delete the intermediary files generated by a previous build.

Project  Clean in Eclipse, or delete the contents of bin/ and gen/ in
your project, such as via this Ant target:

target name=clean
delete includeemptydirs=true
fileset dir=bin includes=**/*/
/delete
delete includeemptydirs=true
fileset dir=gen includes=**/*/
/delete
/target

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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] linked text view?

2009-10-14 Thread Jeffrey Blattman




i would like to have a textview that is hyperlinked, but not to web
resources. i would like the link click to invoke an "on click". is this
possible?

it strikes me that i could style the text to look hyperlink (color,
underline), and then just add an on click listener, but i was hoping
there is some standard way to accomplish this. all i can find in the
docs is how to linkify text for URLs.

or perhaps this violates the style guidelines ...

thanks.

-- 





[android-beginners] Re: linked text view?

2009-10-14 Thread Jeffrey Blattman




continuing on my possible solution ... it appears that android won't
let me underline text (hint, hint: maybe i shouldn't be doing this). it
looks like i can set the link mask to everything, get the associated
URL spans, and set the on click listeners for those. 

On 10/14/09 10:53 AM, Jeffrey Blattman wrote:

  
i would like to have a textview that is hyperlinked, but not to web
resources. i would like the link click to invoke an "on click". is this
possible?
  
it strikes me that i could style the text to look hyperlink (color,
underline), and then just add an on click listener, but i was hoping
there is some standard way to accomplish this. all i can find in the
docs is how to linkify text for URLs.
  
or perhaps this violates the style guidelines ...
  
thanks.
  
  -- 
  


-- 





[android-beginners] Re: Stuck in Mud Over GWT?

2009-10-14 Thread Lance Nanek

A cannot be resolved error for those classes usually means you have
the wrong build target set for the project. Right-click on the project
in Eclipse, choose the Properties option, then the Android option from
the list on the left of the Properties dialog, then make sure the
checked build target says Google APIs. The Android 1.x build
targets will not work.

You can see instructions about using the Maps API on Android here:
http://code.google.com/android/add-ons/google-apis/maps-overview.html

Watch out searching for the term GWT. In my experience that refers to
Google Web Toolkit, which has nothing to do with Android.

On Oct 13, 4:24 pm, Kent Borg kentb...@borg.org wrote:
 Newbie here...

 I have used Eclipse to get a HelloAndroid to work and now I am trying to
 get a most basic MapActivity to work.  In my source file I have a:

   import com.google.android.maps.MapActivity;

 And Eclipse complains Import com.google cannot be resolved.

 OK, so I Google around and it seems I need to edit my .gwt.xml file, and
 I don't seem to have one.

 Another hit suggests:

  Go to your Eclipse preferences, then Google - GWT on the side bar,
  and then
  add another entry to the list box pointed to your GWT 1.4 SDK. [...]

 Except I can't find that in the Eclipse preferences.

 I think another hit said to right click on the project and do something
 with a Google sub-menu, but I don't have that either.

 I think I have something basic missing with my Eclipse setup.  I am
 running Eclipse IDE for Java Developers Build id: 20090920-1017, for
 plugins I have among the listed Android Development Toolkit
 0.9.3v200909031112-12945.

 Have I given enough information for someone to explain where I went wrong?

 Thanks,

 -kb, the Kent who wants to get out of the mud.
--~--~-~--~~~---~--~~
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: listview

2009-10-14 Thread James Yum
Hi,
You can try getIdentifier:

http://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String,
java.lang.String, java.lang.String)

However, note this note:

Note: use of this function is discouraged. It is much more efficient to
retrieve resources by identifier than by name.

If you still think this will be the best way to go about it, you should
probably cache the resources ints after they've been determined

Cheers,
James


On Wed, Oct 14, 2009 at 9:11 AM, frederic glouzon 
frederic.glou...@gmail.com wrote:


 hello,
 I am looking for a way to display the 200+ images of the countries of
 my listview. The problem is that my listview datas come from a sqlite
 database with the name of the countries and the name of the images
 files of the countries flags. I have an issue to get the ressources
 for the images files as the names i get from the database are strings
 and the setImageResource require an int.

 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: why use onCreateDialog?

2009-10-14 Thread James Yum
Hi,

Use those if you want the activity to manage the saving and restoring
dialogs for you, even after an orientation change.

Cheers,
James

On Wed, Oct 14, 2009 at 7:22 AM, Jeffrey Blattman 
jeffrey.blatt...@gmail.com wrote:

  i've been wondering this. why would i implement Activity.onCreateDialog()?
 why wouldn't i just create a new instance of the dialog i want, and call
 .show() on it? usually a dialog will close itself, but if i doesn't, i just
 keep a handle to it in a member field and call .dismiss().

 --


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

inline: qr-gmail.png

[android-beginners] Re: How to make a child activity?

2009-10-14 Thread James Yum
Hi,
I'm still not sure what you're trying to achieve. Are you really trying to
embed an activity within another? You can look at the TabActivity source for
a pretty clean example:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/TabActivity.java;h=033fa0c8bf87b50f9400e457f64141d7ebad221a;hb=HEAD

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/TabActivity.java;h=033fa0c8bf87b50f9400e457f64141d7ebad221a;hb=HEAD
Cheers,
James

On Wed, Oct 14, 2009 at 1:31 AM, vchris80 vuc...@gmail.com wrote:


 thank for your reply, but I still have some troubles:

 now I have my main activiy been a ActivityGroup and the child activity
 been a simple Activity.

 I start the child with this code:

 Intent startIntent = new Intent(MyMainActivity.this,
 ChildActivity.class);
 getLocalActivityManager().startActivity(and.mypackage.ChildActivity,
 startIntent);

 this way, in the onCreate of the child activity, I can get the parent
 and the activity results child of something by calling isChild()
 method. Fine. But the screen actually doesn't appear. The
 documentation of startActivity of LocalActivityManager says that The
 caller needs to take care of adding this window to a view hierarchy,
 but I can't figure out how to do that. I watched the WindowManager for
 a suitable method but with no luck.

 On 13 Ott, 19:09, James Yum j...@google.com wrote:
  Hi,
  Those are meant for an ActivityGroup and its embedded activities, for
  example a TabActivity.
 
  What you might want to look into, is this introduction on opening screens
  (activities):
 
  http://developer.android.com/guide/appendix/faq/commontasks.html#open...
 
  Cheers,
  James
 
  On Tue, Oct 13, 2009 at 7:25 AM, vchris80 vuc...@gmail.com wrote:
 
   Hi all, I have a simple question: how I make an activity that is child
   of another?
 
   I use this code to start an activity from another:
 
   Intent startIntent = new Intent(MyMainActivity.this,
   ChildActivity.class);
   startActivity(startIntent);
 
   but on the onCreate method of ChildActivity, if I watch for getParent
   () I get null, and if I ask for isChild() I get false,... so what I
   miss?
 
   thank you
 


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



[android-beginners]

2009-10-14 Thread saurabh sinha
difference between intent and pending intent

--~--~-~--~~~---~--~~
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-10-14 Thread saurabh sinha
what is intent -filter 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] parcelable encountered class not found?

2009-10-14 Thread Jeffrey Blattman




i have an activity and an intent service. i create a pending intent to
call the intent service, and put a serializable object as extra data.
when i get the alarm manage, and call setRepeating(), i see the trace
below.

any ideas? everything is in the same process and the same app, so i'm
at a loss for how to debug this.

10-14 13:43:56.292: WARN/Intent(571): Failure filling in extras
10-14 13:43:56.292: WARN/Intent(571): java.lang.RuntimeException:
Parcelable encounteredClassNotFoundException reading a Serializable
object (name = org.jtb.httpmon.model.Monitor)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Parcel.readSerializable(Parcel.java:1890)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Parcel.readValue(Parcel.java:1761)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Parcel.readMapInternal(Parcel.java:1947)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Bundle.unparcel(Bundle.java:169)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Bundle.putAll(Bundle.java:242)
10-14 13:43:56.292: WARN/Intent(571): at
android.content.Intent.fillIn(Intent.java:4530)
10-14 13:43:56.292: WARN/Intent(571): at
com.android.server.am.PendingIntentRecord.send(PendingIntentRecord.java:185)
10-14 13:43:56.292: WARN/Intent(571): at
android.app.PendingIntent.send(PendingIntent.java:400)
10-14 13:43:56.292: WARN/Intent(571): at
com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:636)

-- 





[android-beginners] Re: Best Hello World Map Tutorial/Application?

2009-10-14 Thread Wayne Wenthin
http://developer.android.com/guide/tutorials/views/hello-mapview.html
would be a good start.   It is what finally gelled all the other knowledge
together for me.

On Wed, Oct 14, 2009 at 7:02 AM, Kent Borg kentb...@borg.org wrote:


 Still stuck in the mud with trying to do a map application, but I am not
 very invested so far.  I am willing to start over from scratch...

 Any suggestions for the best tutorial and sample code for doing a map
 application?  Looking around I see
 http://www.devx.com/wireless/Article/39101/0/page/1 looks good, but it
 is a year old.  Should I be looking for something newer?


 What is the cleanest way for a newbie to get going?


 Thanks,

 -kb


 



-- 
Writing code is one of few things
that teaches me I don't know everything.

http://www.fuligin.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: [android-beginners]

2009-10-14 Thread James Yum
http://developer.android.com/guide/topics/intents/intents-filters.html
http://developer.android.com/guide/topics/intents/intents-filters.html
Cheers,
James

On Wed, Oct 14, 2009 at 12:23 PM, saurabh sinha saurso...@gmail.com wrote:

 what is intent -filter 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: R.java sometimes doen not refresh itself in eclipse

2009-10-14 Thread Xavier Ducrohet
Did you uncheck Project  Build Automatically?
Launching the project forces a compile so that may be what is happening.

Xav

On Tue, Oct 13, 2009 at 8:57 PM, jax jackma...@gmail.com wrote:


 I have notices that R.java sometimes noes not refresh when I edit (and
 save) an XML file.  The only way I have been able to get around this
 is to attempt to run the project, this seems to fix it.  This is
 however kind of annoying, does anyone know a better way around this
 problem?  An eclipse shortcut key etc.
 



-- 
Xavier Ducrohet
Android SDK Tech Lead
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: Can't get the altitude from Location.getAltitude()

2009-10-14 Thread RichardC

public void onGpsStatusChanged(int event)
{
  double altitude = 0.0;

  switch (event)
  {
case GpsStatus.GPS_EVENT_FIRST_FIX:
{
  Location location = locationManager.getLastKnownLocation
(locationManager.GPS_PROVIDER);
  altitude = location.getAltitude();
}
break;
.
.
.

Just dropped the above code in my Gps test program and I am 228.0
meters above sea level.

--
RichardC

On Oct 14, 12:02 pm, cedcox ced...@gmail.com wrote:
 Same issue. does android manage altitude information ?

 did someone try on a real phone ?

 thx

 Cédric

 On 12 sep, 22:48, Ken Bradshaw kbrad...@gmail.com wrote:

  Hi,
    Any clue as to the solution on this?  I am having the same issue,
  though my method of sending the location information is different.  I
  am loading a gpx file which contains elevation information into
  eclipse.  When I play the gpx file in eclipse, latitude, longitude and
  time definitely change in the new Location, but calls to getAltitude()
  always = 0.0.  I have added the permissions ACCESS_COARSE_LOCATION and
  ACCESS_FINE_LOCATION but it didn't make any difference.  I assume this
  mechanism is broken in the emulator or in eclipse, can anyone at least
  verify that calls to getAltitude() works correctly on the actual
  phone?  If it works on the phone, then I won't worry about testing
  this.

  On Aug 5, 4:33 am, Horse ckma0...@gmail.com wrote:

   Hi,

   I use the geo command in the emulator console, and input geo fix
   -121.45356 46.51119 4392.
   Using Location.getAltitude() to get thealtitude, but always return
   zero.
   How to get thealtitude, when I use the geo command and getAltitude
   () method?
   Thanks for your help.

   BR,
   Horse- Masquer le texte des messages précédents -

  - Afficher le texte des messages précédents -


--~--~-~--~~~---~--~~
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: Stuck in Mud Over GWT?

2009-10-14 Thread Kent Borg

Lance Nanek wrote:
 You can see instructions about using the Maps API on Android here:
 http://code.google.com/android/add-ons/google-apis/maps-overview.html
   

I think I have seen that page in my travels...but I am going to keep
this page handy at least until I get out the other side on this.

Thanks,

-kb


--~--~-~--~~~---~--~~
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: Reading/Decoding bar code stored in resources

2009-10-14 Thread wahib haq

feels good to see your reply. Its just an assignment for me. yes i am
stuck with part 1. In the start i tried a lot with camera stuff and
searched for source codes to display camera preview and take snap. I
was successful with getting camera preview but either the image was
not saved or the image taken was of very small size like thumbnail. so
then i thought about using the built-in camera app. Then after few
days of research i able to call the camera app as i click a button in
my custom app. but now the issue is after taking snap i want to run my
decode function.But i dont know how to exit the camera preview and
call my decode() function:S

so its here i am stuck with. I have posted it and i'll post it again.
it wud be great if you could help me.

Regards,
wahib

On 10/14/09, Abhishek abhishek.moh...@gmail.com wrote:

 Wahib.. sorry for the mistake in your name. Thanks for pointing out.
 3 phases of my app
 1) Scan picture(bar code) from camera  store
 2) Decode the barcode
 3.) Search the product information and display.

 I am done with Part 2.. I think you are also working on same
 application if I am not wrong.
 Now I will concentrate on  Part 1. Where are you stuck in Part1? What
 is the error if any?
 Please let me know. I will also keep you posted.

 Thanks,
 Abhishek

 On Oct 9, 10:36 pm, wahib haq wahib.t...@gmail.com wrote:
 You are welcome. Btw my name is wahib :) How do u intend to use this
 barcode code with camera thing? are you using your own camera preview
 code or calling built in camera app intent?? I am just stuck with this
 phase .. i hope its the last thing.

 Regards,
 wahib

 On 10/10/09,Abhishekabhishek.moh...@gmail.com wrote:





  Hey Wahid,

  Same code worked for me. Multiformatreader can read QR codes.

  Thanks a lot for help.
 Abhishek

  On Oct 9, 9:11 am,Abhishekabhishek.moh...@gmail.com wrote:
  Wahid,

  Thanks a lot brother. Is it possible for you to send you activity file
  to me onabhishek.moh...@gmail.com?
  I will keep you posted about my progress on this application.

 Abhishek

  On Oct 7, 7:42 pm, wahib haq wahib.t...@gmail.com wrote:

   hiabhishek!! I am a newbie and my first initiative is also building
   a simple barcode decoding module.  I dont have a android phone so i
   have to go on a different path to do this barcode app thing. :S

   can you plz guide me what to be on right side of BufferedImage
   myImage =
   ... ??
   I am using this code 

   I have imported these ...

   import android.graphics.Bitmap;

   import android.graphics.BitmapFactory;
   import android.widget.TextView;
   import com.google.zxing.MonochromeBitmapSource;
   import com.google.zxing.MultiFormatReader;
   import com.google.zxing.Reader;
   import com.google.zxing.ReaderException;
   import com.google.zxing.client.androidtest.*;
   import com.google.zxing.common.BaseMonochromeBitmapSource;

   Bitmap bitmap =
   BitmapFactory.decodeResource(getResources(),R.drawable.bar5);

   Bitmap bitmap1 =
   BitmapFactory.decodeFile(file://sdcard/DCIM/Camera/2009-10-04
   21.31.02.jpg);

             MultiFormatReader reader1=new MultiFormatReader();//For all
   barcode formats

            try
             {

                result=reader1.decode(new
   RGBMonochromeBitmapSource(bitmap));
                tv.setText(result.getText());
                 }
             catch (Exception e)
             {
                 tv.setText(Error occured !!);
              }
           }

   //

   I have tried it with reading bmp and jpeg image from pasting in
   res/drawable folder and it works fine with 1D barcode. Its not
   working
   with 2D and i dont know how to do it though multiformat i guess means
   it shud support 2D as well. Well this will solve ur problem. I also
   tried to read it with a sdcard image coz after all it has to fetch
   from the image taken by camera. but i dont have a camera and unable
   to
   push image in gallery after lots of tries so it still undone.
   Share anything else you cum to know abt barcode decoding task.

   Regards,
   wahib

   On 10/6/09,Abhishekabhishek.moh...@gmail.com wrote:

Hello All,

I am writing an application to scan a bar code.
As a small module of it I am trying to decode the bar code form the
image file stored as resource. (R.raw.bc02) where bc02.jpg is my
bar
code image file.

I am usinghttp://code.google.com/p/zxing/wiki/DeveloperNotestowrite
a program for decoding.
I am stuck up at following step: i.e. reading the image as
bufferedImage

BufferedImage myImage = ...;
MonochromeBitmapSource source = new
BufferedImageMonochromeBitmapSource
(myImage);

I have written following code to read the image which works fine
InputStream is= this.getApplicationContext().getResources
().openRawResource(R.raw.bc02);
The run time object is of class android.content.res.AssetManager
$AssetInputStream

Can any help me in reading the file and decoding? Please let me
   

[android-beginners] how to call a function after taking snap from camera?? plz help

2009-10-14 Thread wahib

Hi!! I am stuck with this issue. When i press a button in my custom
app the built-in camera app executes but after taking snap i want to
run my code on the image taken but the camera preview doesnt
vanishes:S I just want to exit the preview and run my code. Being a
newbie i am really confused how to do it.

This is the code in onclick() function for button -

Intent intent = new Intent();
intent.setClassName
(com.android.camera,  com.android.camera.Camera);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

myfunction() ;   ///what i want to call
--~--~-~--~~~---~--~~
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: Can we develop android apps in C or C++?

2009-10-14 Thread Indicator Veritatis

And pay special attention to the line at that link that says:

The NDK will not benefit most applications. 

So the implication is that trying to use the NDK as a means to write
your entire application in C/C++ instead of Java should not be
expected to work well, if it works at all.

On Oct 13, 1:53 pm, Yusuf Saib (T-Mobile USA) yusuf.s...@t-
Mobile.com wrote:
 http://developer.android.com/sdk/ndk/1.5_r1/index.html#overview

 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 Oct 13, 4:52 am, SSuman185 aluvala.su...@gmail.com wrote:

  Hi All,

  I am very new to android and also for JAVA. Untill now i am working on
  C.
  Is there any way to develop the Android apps on C or C++.
  Please let me know, whether it is possible or not.

  Thanking you all,

  Regards,
  SSuman#SS185
--~--~-~--~~~---~--~~
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: R.java sometimes doen not refresh itself in eclipse

2009-10-14 Thread jax

Brilliant

I Build Automatically was unchecked.

On Oct 15, 5:07 am, Xavier Ducrohet x...@android.com wrote:
 Did you uncheck Project  Build Automatically?
 Launching the project forces a compile so that may be what is happening.

 Xav

 On Tue, Oct 13, 2009 at 8:57 PM, jax jackma...@gmail.com wrote:

  I have notices that R.java sometimes noes not refresh when I edit (and
  save) an XML file.  The only way I have been able to get around this
  is to attempt to run the project, this seems to fix it.  This is
  however kind of annoying, does anyone know a better way around this
  problem?  An eclipse shortcut key etc.

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 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: Cannot select a row in SimpleCursorAdapter with custom layout

2009-10-14 Thread jax

solved

Had to set Clickable and Focussable to false for all items including
layouts.

On Oct 14, 1:29 pm, jax jackma...@gmail.com wrote:
 When I use the following layout in a SimpleCursorAdapter I cannot
 select any rows.  In face the setOnItemClickListener methods does not
 even run at all.

 ?xml version=1.0 encoding=utf-8?
 LinearLayout
         android:orientation=horizontal
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:padding=4dp xmlns:android=http://
 schemas.android.com/apk/res/android android:focusable=false
         LinearLayout
                 android:orientation=vertical
                 android:layout_width=wrap_content
                 android:layout_height=wrap_content
                 android:padding=2dp android:focusable=false
 android:clickable=false
                 TextView
                         android:textSize=18sp
                         android:layout_width=wrap_content
                         android:layout_height=wrap_content
                         android:text=name android:id=@+id/
 row_item_name
                         android:focusable=false
                 /TextView
                 TextView
                         android:textSize=12sp
                         android:layout_width=wrap_content
                         android:layout_height=wrap_content
                         android:text=Check to mark as known
                         android:id=@+id/row_item_extra_info
                         android:focusable=false
                 /TextView
         /LinearLayout
         LinearLayout
                 android:orientation=vertical
                 android:gravity=right
                 android:layout_gravity=right
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content
                 android:padding=2dp android:focusable=true
                 android:clickable=true

                 CheckBox android:layout_width=wrap_content
                         android:layout_height=wrap_content
                         android:id=@+id/row_item_checkbox
                         android:focusable=false
                         android:clickable=true
                 /CheckBox

         /LinearLayout
 /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] happy diwali

2009-10-14 Thread saurabh sinha
Wish u very happy diwali to android developer

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