[android-beginners] Load progressive ListView

2009-08-17 Thread arnouf

Hi all,

I've a ListActivity. Data are provided by a Thread calling a URL to
load data from a database. The URL returns data from position x to x
+5 . the x value is sent by my application indicating the position of
the last displayed item.

Now I would like to know, how can I detect when user is on the last
record displayed in my ListView. This can give information to recall
my URL with the new x.

I tried to implement it in my ArrayAdapter.getView() method, testing
the getPosition() and myArray length...It works well but everytime!

This should work like GMail app for example (you have 50 last
discussions loaded by default and if you go down after these 50, a new
loading is done).

What is the good solution?

Big thanks by advance for your help.

Arno

--~--~-~--~~~---~--~~
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] Simple Location Question

2009-08-17 Thread Jose Ayerdis
How can i get The country and city with a Location???

-- 
Atte

[[Jose Luis Ayerdis Espinoza]]
http://blognecronet.blogspot.com

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



[android-beginners] Re: Simple Location Question

2009-08-17 Thread Jose Ayerdis
Answring myself is with GeoCoder thanks

2009/8/17 Jose Ayerdis 

> How can i get The country and city with a Location???
>
> --
> Atte
>
> [[Jose Luis Ayerdis Espinoza]]
> http://blognecronet.blogspot.com
>



-- 
Atte

[[Jose Luis Ayerdis Espinoza]]
http://blognecronet.blogspot.com

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



[android-beginners] Re: Simple Google Maps App

2009-08-17 Thread Maxood

Is there any good book available on developing google map
applications. Or if i am able to access any excerpt from any book on
android development about google maps.

Thank you for the information,
Maqsood

On Aug 13, 8:09 pm, Jack Ha  wrote:
> You will find quite a few tutorials at this link as well:
>
>    http://www.anddev.org/viewforum.php?f=18
>
> --
> Jack Ha
> Open Source Development Center
> ・T・ ・ ・Mobile・ stick together
>
> The views, opinions and statements in this email are those of
> the author solely in their individual capacity, and do not
> necessarily represent those of T-Mobile USA, Inc.
>
> On Aug 12, 11:33 pm, Maxood  wrote:
>
>
>
> > I like to develop a simple Google maps application.
>
> > Please let me know any tutorial available
>
> > Thank you,
> > Maqsood
--~--~-~--~~~---~--~~
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: TabHost problem with designing Tabs

2009-08-17 Thread Stefan

Hi, now I have a new problem. My xml file looks like:


http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>








http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/ll">

http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/unten"
android:layout_alignParentBottom="true">












I want, that the picture is on the lift side of the TextView, but the
TextView is below the picture?? But the layout_width of the Text- and
ImageView is "wrap_content"!?! And if i try to change the LinearLayout
(ID: unten) in a RelativeLayout, i don't see the MapView. What can i
done??

Regards,
Stefan
--~--~-~--~~~---~--~~
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] Google calendar API still not available?

2009-08-17 Thread BGH

I am thinking of writing a widget that would create a calendar entry
in the users calendar.

>From what I have been reading it isn't possible to use the phone's
login authentication with the gdata APIs (which aren't even designed
to be used with Android anyway). I don't want to ask the user for
their password to create a calendar entry.

Am I correct in assuming 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] Re: Simple Google Maps App

2009-08-17 Thread Jose Ayerdis
you can also go here
http://www.anddev.org/simple_googlemaps_with_threads-t2943.html

2009/8/17 Maxood 

>
> Is there any good book available on developing google map
> applications. Or if i am able to access any excerpt from any book on
> android development about google maps.
>
> Thank you for the information,
> Maqsood
>
> On Aug 13, 8:09 pm, Jack Ha  wrote:
> > You will find quite a few tutorials at this link as well:
> >
> >http://www.anddev.org/viewforum.php?f=18
> >
> > --
> > Jack Ha
> > Open Source Development Center
> > ・T・ ・ ・Mobile・ stick together
> >
> > The views, opinions and statements in this email are those of
> > the author solely in their individual capacity, and do not
> > necessarily represent those of T-Mobile USA, Inc.
> >
> > On Aug 12, 11:33 pm, Maxood  wrote:
> >
> >
> >
> > > I like to develop a simple Google maps application.
> >
> > > Please let me know any tutorial available
> >
> > > Thank you,
> > > Maqsood
> >
>


-- 
Atte

[[Jose Luis Ayerdis Espinoza]]
http://blognecronet.blogspot.com

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



[android-beginners] Re: Load progressive ListView

2009-08-17 Thread Mark Murphy

arnouf wrote:
> Hi all,
> 
> I've a ListActivity. Data are provided by a Thread calling a URL to
> load data from a database. The URL returns data from position x to x
> +5 . the x value is sent by my application indicating the position of
> the last displayed item.
> 
> Now I would like to know, how can I detect when user is on the last
> record displayed in my ListView. This can give information to recall
> my URL with the new x.
> 
> I tried to implement it in my ArrayAdapter.getView() method, testing
> the getPosition() and myArray length...It works well but everytime!
> 
> This should work like GMail app for example (you have 50 last
> discussions loaded by default and if you go down after these 50, a new
> loading is done).
> 
> What is the good solution?

I do not know if it is "good", but this is what I wrote to handle this
situation:

https://github.com/commonsguy/cwac-endless/tree

One of these days, I will cobble together enough time to add more
documentation and a blog post about this...

-- 
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] Re: ExpandableList With ContextMenu

2009-08-17 Thread Steve

Check for the item that is selected (in onCreateContextMenu).  If it's
a group item, then don't make a context menu for it.  If it's a child
item, then make the context menu.


On Aug 16, 8:22 pm, Jose Ayerdis  wrote:
> How can i add a ContextMenu only to the child in the ExpandableList and not
> to the parent in each???
>
> --
> Atte
>
> [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: TabHost problem with designing Tabs

2009-08-17 Thread Steve
Have you tried using a TabActivity, then you don't have to use a
layout XML file for the tabhost.  Each tab calls its own intent, and
that activity can use its own layout file.

Not sure if that fixes your exact issue, but then you won't have to
worry that you are messing up your overall layout of the tabs, or the
other tab.  You can focus just on the one tab that is giving you
trouble.

On Aug 17, 2:44 am, Stefan  wrote:
> Hi, now I have a new problem. My xml file looks like:
>
> 
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >
>              android:layout_height="fill_parent"
>         android:layout_width="fill_parent">
>
>                          android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"/>
>
>                          android:layout_height="fill_parent"
>                 android:layout_width="fill_parent"
>                 android:paddingTop="62px">
>
>                                          android:id="@+id/list"
>                         android:layout_height="fill_parent"
>                         android:layout_width="fill_parent"
>                         android:text="List"/>
>
>                                          
> 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/ll">
>
>                                                          
> xmlns:android="http://schemas.android.com/apk/res/
> android"
>                                 android:orientation="vertical"
>                                 android:layout_width="fill_parent"
>                                 android:layout_height="wrap_content"
>                                 android:id="@+id/unten"
>                                 android:layout_alignParentBottom="true">
>
>                                                                          android:id="@+id/imagebutton"
>                                         android:src="@drawable/left"
>                                         android:layout_width="wrap_content"
>                                         android:layout_height="fill_parent"/>
>
>                                                                          android:id="@+id/name"
>                                         android:layout_height="fill_parent"
>                                         android:layout_width="wrap_content"
>                                         android:text="Text"
>                                         android:layout_marginLeft="5px"/>
>                                 
>
>                                                                          android:id="@+id/mapview"
>                                         android:layout_width="fill_parent"
>                                         android:layout_height="wrap_content"
>                                         android:enabled="true"
>                                         android:clickable="true"
>                                         android:apiKey="."
>                                         android:layout_above="@id/unten"
>
>                                 />
>                         
>                 
>         
> 
>
> I want, that the picture is on the lift side of the TextView, but the
> TextView is below the picture?? But the layout_width of the Text- and
> ImageView is "wrap_content"!?! And if i try to change the LinearLayout
> (ID: unten) in a RelativeLayout, i don't see the MapView. What can i
> done??
>
> Regards,
> Stefan
--~--~-~--~~~---~--~~
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] Google maps problem:

2009-08-17 Thread Liviu Ungureanu
hi all!
I have a problem with google maps.
I follow a tutorial to learn about google maps on android but when after the
activity start on screen can see just a grid...

On LogCat i receive an error: Couldn't get connection factory client..
i get a apikey,i insert it as attribute ao my mapview..but i get this
error..
can anyone help me?

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: ListView with addHeaderView Example?

2009-08-17 Thread Neil Chinniah
Just in case anyone is interested I found a thread in one of the other
groups that makes a reference to HeaderViewListAdapter:
http://groups.google.com/group/android-developers/browse_thread/thread/14617420938f6d70?pli=1

With this I created the following, its far from perfect but at least it
loads


http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>



public class HelloAddHeaderview extends Activity {
private ListView lv;
private TextView tv;

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

lv = (ListView) findViewById(R.id.lvEntries);
tv = new TextView(this);
tv.setText("Hello There!");

lv.addHeaderView(tv);

lv.setAdapter(new ArrayAdapter
(this, android.R.layout.simple_list_item_1, COUNTRIES));
}

static final String[] COUNTRIES = new String[] {
"Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra",
"Angola", "Anguilla", "Antarctica", "Antigua and Barbuda",
"Argentina",
"Armenia", "Aruba", "Australia", "Austria", "Azerbaijan"
};
}

2009/8/17 chinchin 

> Hello,
> I'm trying to modify the HelloListView example to use addHeaderView or
> addFooterView. Unfortunately I am unable to get this working. Is
> anyone able to provide any help?
> Here is my code, thanks in advance.
>
> 
> http://schemas.android.com/apk/res/
> android"
>android:orientation="vertical"
>android:layout_width="fill_parent"
>android:layout_height="fill_parent"
>>
>android:id="@+id/textDisplay"
>android:layout_width="fill_parent"
>android:layout_height="wrap_content"
>android:text="Hello!"
>/>
> 
>
> public class HelloListView extends ListActivity {
>private TextView test;
>
>/** Called when the activity is first created. */
>@Override
>public void onCreate(Bundle savedInstanceState) {
>  super.onCreate(savedInstanceState);
>
>  test = (TextView) findViewById(R.id.textDisplay);
>
>  getListView().addHeaderView(test);
>  setListAdapter(new ArrayAdapter(this,
>  android.R.layout.simple_list_item_1, COUNTRIES));
>  getListView().setTextFilterEnabled(true);
>}
>
>static final String[] COUNTRIES = new String[] {
>"Afghanistan", "Albania", "Algeria", "American Samoa",
> "Andorra",
>"Angola", "Anguilla", "Antarctica", "Antigua and Barbuda",
> "Argentina"
>  };
>
> }

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



[android-beginners] [android-beginners]How to change text in a XML-defined text view

2009-08-17 Thread Rafa Perfeito
Hey,
Lets say i define in the layout.main a text view but i want to change the
text during the execution of the application. How can i 'call' the view in
the code? Im guessing i can use R.java but i dont know how... Any ideas? An
example would be really cool...

Thanks

-- 
Cumprimentos,

Hugo Rafael Augusto

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



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

2009-08-17 Thread Tikoze

Here is the code that I am using to bring a "running" activity
to the foreground:

ActivityManager.RunningTaskInfo task = getTask(idx);
if (task != null)
{
Intent intent = new Intent();
intent.setClassName(task.topActivity.getPackageName(),
task.topActivity.getClassName());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

try
{
m_context.startActivity(intent);
}
catch (ActivityNotFoundException e)
{
Toast.makeText(m_context, "Unable to launch
activity...", Toast.LENGTH_SHORT).show();
}

}

- Crash Scenario 1:
Switching to any task in the list of running task that has started
another activity (i.e. task.topActivity and task.baseActivity are
different) causes a crash.  I have tried the code above using both
task.topActivity and task.baseActivity but the results are the same...
force close.

- Crash Scenario 2:
Switching to specific tasks always causes a force close.  For example,
when I try to switch to the Calendar Task when it is "running" my
program always crashes.  However, I can successfully switch to Google
Maps, Home, Browser, and most others.

I have been unable to find any information about these issue anywhere
in google groups or on the internet...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How do you center a TextView inside a layout?

2009-08-17 Thread Boxy


I tried posting this a few hours ago and it didn't show up.  Here is
my attempt at a repost.

I want to center a TextView inside of a layout.  I've been playing
with the XML code below and can't get it to work?
Please help!



http://schemas.android.com/apk/res/
android"
   android:orientation="horizontal"
   android:gravity="center"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent" >

   



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

2009-08-17 Thread Dolphin

I'm trying to align a button to the bottom of the frame and can't make
it happen.
I tried:
1.android:layout_alignBottom
or
2. android:layout_gravity="bottom"
(this is not a landscape view)

The button keeps  apearing on the Top margins of the main frame.

What do I miss ?
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] custom view like login form

2009-08-17 Thread MontyTech

Hi, i m new to android. I am trying to create custom component.
developer wil use this component just like any other component like
textview or editText in his layout.xml file. I want this component to
be created and rendered by java file only. No layout xml is used. i am
not sure whether to extend my class to View or ViewGroup or some
layout and then add say textview and/or edittext. i tried by extending
to View class but faced many problems in adding simple textVIew to it.

I am pasting following code. Problem with it is. I can see red square
(which i think is a viewgroup) on emulator but not able to see
textView added to it. Please help me. i have expressed my intentions
above, to create forms or a form like reusable component.

//My form impletation java file
public class Form extends ViewGroup
{
   AttributeSet attrSet;
   LinearLayout.LayoutParams layParams;
   Context moContext;
   public Form(Context context)
   {
   super(context);
   this.moContext = context;
   initForm();
   }

   public Form(Context context, AttributeSet attributeSet)
   {
   super(context,attributeSet);
   this.attrSet = attributeSet;
   this.moContext = context;
   initForm();
   }

   @Override
   protected void onDraw(Canvas canvas)
   {
   super.onDraw(canvas);
   setVisibility(VISIBLE);
   initForm();
   }

   public void initForm()
   {
   setVisibility(VISIBLE);
   layParams = new LinearLayout.LayoutParams
(LayoutParams.WRAP_CONTENT,
LayoutParams.FILL_PARENT);
   layParams.gravity = LinearLayout.HORIZONTAL;
   layParams.setMargins(5, 5, 5, 5);
   setLayoutParams(layParams);
   setBackgroundColor(Color.RED);
   TextView textView = new TextView(getContext(),
attrSet);
   textView.setText("A");
   textView.setBackgroundColor(Color.YELLOW);
   textView.bringToFront();
   invalidate();
   }
   @Override
   protected void onLayout(boolean changed, int l, int t, int r,
int b)
   {

   }

}

//layout.xml which will be used by some activity

http://schemas.android.com/apk/res/
android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >

 




Please guide me through.

--~--~-~--~~~---~--~~
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 application for CECT G1(Clone g1)?

2009-08-17 Thread Xu


The G1/G2/G2+ are neither produced nor branded by CECT and are not
Android phones. Sometimes the brand "Sciphone" is attributed
to these phones.

This link might be a bit more useful:

http://firmitas.org/Sciphone-N12.html

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



[android-beginners] Struggling -- Getting exception when clicked on HelloItemizedOverlay

2009-08-17 Thread Venki

Hi friends

I am Struggling a lot. Please help me.
I am showing some locations in the map, when i click on the particulat
overlay, i am planning to show a dialog box to show the details info
of that particular overlay.
The detailed info of overlay is there in my locations in
Mylocations.java .
So onTap, i am calling a method in Mylocations.java and starting a new
intent which will show a new layout with all detailed info.

I am getting below issue, can you please help me?

public class Mylocations extends MapActivity {

private static List locations;
@Override
public void onCreate(Bundle savedInstanceState) {
--
--
itemizedOverlay = new HelloItemizedOverlay(this, drawable);
--
--
}



public void showDetailedInfo(Context mContext, int index){
Intent intent = new Intent(mContext, ShowDetailedtInfo.class);
startActivity(intent);
}



}

public class HelloItemizedOverlay extends ItemizedOverlay {

public HelloItemizedOverlay(Context context, Drawable defaultMarker)
{
super(boundCenterBottom(defaultMarker));
mContext = context;
}
@Override
protected boolean onTap(int index) {
Mylocations mylocations = new Mylocations();
mylocations .showDetailedInfo(mContext,index);
}

}

When starting new activity @ startActivity(intent);, i am getting the
below error:

08-13 23:30:03.758: WARN/dalvikvm(1528): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-13 23:30:03.758: ERROR/AndroidRuntime(1528): Uncaught handler:
thread main exiting due to uncaught exception
08-13 23:30:03.878: ERROR/AndroidRuntime(1528):
java.lang.NullPointerException
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
android.app.Activity.startActivityForResult(Activity.java:2656)
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
android.app.Activity.startActivity(Activity.java:2700)
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
com.example.Mylocations.showDetailedInfo(Mylocations.java:284)
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
com.example.HelloItemizedOverlay$1.onClick(HelloItemizedOverlay.java:
83)


Can You please help me?

Thanks & Regards
Venkat

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



[android-beginners] About "ERROR: unknown virtual device name: 'myavd'"

2009-08-17 Thread Tony

Hi,guys
 I am a beginners to Android. When I do the helloworld by fellowing
the tutorial , I found this error below:
emulator: ERROR: unknown virtual device name: 'myavd'
 emulator: could not find virtual device named 'myavd'
How do I solve it?
And I found other terms of settlement,they all said that copy D:\Users
\\.android to C:\Users\\.android ,but I only have
a single  partition C on my disk.
Windows Vista is my OS.
Thank you


Best wishes!

--~--~-~--~~~---~--~~
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: Does the camera app work on the emulator?

2009-08-17 Thread bianconeri

Hi Mark,

I am pretty new to Android.

A question related to a real Android phone: I am keen to do some
development on Android and experiment with a real android phone. Here
in Australia, I am going to sign a HTC Magic (G2). What I am wondering
is that whether I will be able to build my own app and test it on the
real G2 straightaway once I do the purchase? Is there any app
distribution fee involved (Not Android market, just my own phone)?

Thanks very much for advice!

Alex

On Aug 15, 10:29 pm, Mark Murphy  wrote:
> jbrohan wrote:
> > On the emulator I've added a camera.
>
> I'm not sure what this means.
>
> > The camera app that comes already installed on the emulator
> > does not work, it just shows a blank screen, without a title. Is this
> > normal or am I doing something wrong.
>
> You should see a checkerboard with an animated ball.
>
> > can MY app work, or do I need to buy a real phone?
>
> I very strongly encourage you to get a real phone if you are going to
> make and distribute apps, particularly ones that involve things that
> cannot be completely emulated, like hardware (camera, sensors, GPS, etc.).
>
> For your own experimentation purposes, working completely off the
> emulator may be OK. But distributing an app without trying it on a real
> device is like building a car and never test-driving it before selling
> it because you didn't buy tires.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 Available!

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



[android-beginners] How to localize (translate) android core

2009-08-17 Thread Mattias

I found some internationalization documents, but none about how to
localize android core applications, where to send translated files and
how to test the brand new localization out in virtual machine. Maybe I
just overlooked something.

Also, would it be possible to test it out on a normal G1 or would one
need developer phone to test the translation.

Thanks in advance
Mattias

--~--~-~--~~~---~--~~
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] Video Streaming provided by Google Android???

2009-08-17 Thread Najeeb Mughal

Hi!
I want know that

" Does Google Android facilitate the Video Streaming in mobile? "

Is there any appiction of Google Android which provides Video
Streaming in any form. for esample in Browser or in any other form

--~--~-~--~~~---~--~~
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] New and need some help with a bluetooth AND SMS app

2009-08-17 Thread EL MOOSE

I'm New at making apps.Imagine you walk to your car and doors open
automatically/car starts/Windows roll down/up all via sms! i have a
Small device already wired in to my car that does all this via sms
commands. also if your alarm goes off you will get a sms! The device
also supports commands via bluetooth which does the same things like
sms commands but you have to be near the car..I would like to know a
few things.

1.(Bluetooth)Could i built app that automatically connects to  my car
via Bluetooth and send commands with out any user imput(i would just
sync 1 time and tell the the app what to trigger when i come with in
range ie. open doors,start car)

2.((SMS)A simple app with a few icons like a door/engine/locks/
windows..so it would work like this...i open the app i press the
"door" icon and the phone in the background send a sms to trigger that
command with out me having to do it manually.

Please let me know if its even possible
FYI i have a G1 and a G2

--~--~-~--~~~---~--~~
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] Unable to connect: Cookie Rejected:

2009-08-17 Thread Ashwin Neurgaonkar

The code is as follows: try {
URL link = new 
URL(apiUrl.toString().trim().replaceAll(" ",
"%20"));
Log.i(TAG, "-URL: 
"+link.toString());
getResponse(link.toString()); 
/*DISPLAYS THE HTTP RESPONSE ON
SCREEN AS DEBUG MESSAGES*/

URLConnection conn = 
link.openConnection();
conn.connect();
BufferedReader in = new 
BufferedReader(new InputStreamReader
(conn.getInputStream()));
String inputLine;
//  Log.i
Log.i(TAG, "-RESPONSE START-");
while ((inputLine = in.readLine()) != null) 
{
System.out.println(inputLine);
}
in.close();
Log.i(TAG, "-RESPONSE END-");
} catch (MalformedURLException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
}

The Logcat output is as below:

I/DELICIOUS ADApTER SERVICE( 1280): -URL: https://ashwin_loves_android%20:th
e2009nissan...@api.del.icio.us/v1/posts/add?url=http://www.google.com/
&descripti
on=Google&replace=no
D/InetAddress( 1280): api.del.icio.us: 76.13.6.208 (family 2, proto 6)
D/dalvikvm( 1280): GC freed 10180 objects / 636520 bytes in 165ms
I/dalvikvm( 1280): Uncaught exception thrown by finalizer (will be
discarded):
I/dalvikvm( 1280): Ljava/lang/IllegalStateException;: Finalizing
cursor android.
database.sqlite.sqlitecur...@430ff730 on bookmarks that has not been
deactivated
 or closed
I/dalvikvm( 1280):  at
android.database.sqlite.SQLiteCursor.finalize(SQLiteC
ursor.java:596)
I/dalvikvm( 1280):  at dalvik.system.NativeStart.run(Native
Method)
D/dalvikvm( 1280): GC freed 8351 objects / 592432 bytes in 216ms
D/dalvikvm(  706): GC freed 111 objects / 6128 bytes in 224ms
D/dalvikvm( 1280): GC freed 9159 objects / 478240 bytes in 148ms
D/OpenSSLSessionImpl( 1280): Freeing OpenSSL session
W/ResponseProcessCookies( 1280): Cookie rejected: "[version: 0][name:
delicious_
us_production][value:
0MYX_iTE_WJRglbnXQltmbcAVib9uQ9eKKlGb4iO3.Q7a8n6ymY4p8.P4f
DggPKOhJQHUtYBJLE0b8QhcwLdY_NZCg5jGHuKmMawRibf_owBHCjK4alYXZmkpJnJ4gUFnYjpj2NoXl
upfyK1F.rNL_yT1R_zaXuagaMUK1fBTjtIbNRcyTt3bb72eU4A6yhZaJ3UT_6zIP9v4po64cX3g1i_7o
z6yRMNbG5Mlo5CR6tpE9sh0Unv2uX.
8oUTTQTGlwEuxYx3getYGLP9l_ieTsgZD11bvulWVKs1bqnWeO
mnsh771_PgceCofgqISH.YTkVzEyghFrI-][domain: .delicious.com][path: /]
[expiry: Sat
 Aug 14 14:06:13 PDT 2010]". Illegal domain attribute "delicious.com".
Domain of
 origin: "api.del.icio.us"
I/HTTP GET RESPONSE: ( 1280):
org.apache.http.message.basichttprespo...@43199800

I/HTTP STREAM CONTENT: ( 1280):
org.apache.http.conn.eofsensorinputstr...@430cf9
b0
D/dalvikvm( 1280): GC freed 8024 objects / 523520 bytes in 147ms
D/dalvikvm( 1280): GC freed 8921 objects / 826880 bytes in 148ms
I/ActivityManager(   59): Start proc com.tni.TasKiller for broadcast
com.tni.Tas
Killer/.TaskBarWidget: pid=1474 uid=10029 gids={}
I/dalvikvm( 1474): Debugger thread not active, ignoring DDM send
(t=0x41504e4d l
=38)
I/dalvikvm( 1474): Debugger thread not active, ignoring DDM send
(t=0x41504e4d l
=38)
I/ActivityManager(   59): Process android.process.media (pid 1444) has
died.
W/System.err( 1280): java.lang.NullPointerException
W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.readln(HttpURLConnection.java:1181)
W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection$ChunkedInputStream.readChunkSize
(HttpURLConnection.java:394)

W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection$ChunkedInputStream.(HttpURLConnection.java:
346)
W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.getContentStream(HttpURLConnection.java:1077)
W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.doRequestInternal(HttpURLConnection.java:1652)
W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.doRequest(HttpURLConnection.java:1547)
W/System.err( 1280):at
org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.getInputStream(HttpU

[android-beginners] Program Dependant XML Values

2009-08-17 Thread Surge

Ok, so I'm not really sure how to ask this. I currently have two
Activities lets say one contains a ListView L and the other contains a
TextView, and both are defined in an XML file. how would I change the
contents of T to whatever object in L is selected? or in short, how do/
can I edit a value in strings.xml from my main java program or make it
equal to another value which may be changing?

--~--~-~--~~~---~--~~
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 draw a rectangle with four edges in different color?

2009-08-17 Thread Samuel

Hi, I am new to Android. Now I am trying to create a rectangle with
four edges of different color as my GriewView's selector. Here is my
codes. But I what I get is a rectangle with four edges in same color.
Anyone can help?


Path mPath = new Path();

ShapeDrawable mSelector = new ShapeDrawable(new PathShape(mPath,
100,100));
Paint mPaint = mSelector.getPaint();

mPaint.setColor(0x);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
mPaint.setStrokeCap(Paint.Cap.ROUND);
mPaint.setStrokeWidth(1);

mPath.moveTo(0, 0);
mPath.lineTo(100, 0);
mPaint.setColor(0x);
mPath.lineTo(100, 100);

mPaint.setColor(0xFF3079C4);
mPath.lineTo(0,100);
mPaint.setColor(0xF000);
mPath.lineTo(0, 0);

mGridview.setSelector(mSelector);


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



[android-beginners] How do you center a TextView inside a layout?

2009-08-17 Thread Boxy


I want to center a TextView inside of a layout.  I've been playing
with the XML code below and can't get it to work?
Please help!



http://schemas.android.com/apk/res/
android"
android:orientation="horizontal"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >





--~--~-~--~~~---~--~~
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] Regarding Master Clear from Code

2009-08-17 Thread amit



I am writing an application in which I need to call Master Clear under
a specific condition.
But I am getting permission error.

My Code:
===

AndroidManifest.xml
-
 



Calling Master Clear Code (similar to code present in Settings of
Android)
-

   ICheckinService service =
   ICheckinService.Stub.asInterface(ServiceManager.getService
("checkin"));
   if (service != null) {
   try {
   service.masterClear();
   } catch (android.os.RemoteException e) {
   Log.e("MasterClear", "Some Error Here !!");
   }
   }

Observation / Error / Output (in DDMS)
---
PermissionDenial : can't invoke masterClear from PID=965, uid = 10019



When I go to menu==>settings==>Application Settings==>Manage
Applications ==>  ==> permissions, I dont see any permissions
assigned to my app which means the app does not have the permissions.
But I have set the permission for master clear ( ) in the
AndroidManifest.xml but it does not seem to work. Can anyone 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] How To Delete An Item In ListView

2009-08-17 Thread Eric Belen
How do you insert a single item to a list view?
and how to delete an item In ListView
 
 
Eric Belen
 

--~--~-~--~~~---~--~~
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] 'm trying to align a button to the bottom of the frame

2009-08-17 Thread Dolphin

I'm trying to align a button to the bottom of the frame and can't make
it happen.
I tried:
1.android:layout_alignBottom
or
  2. android:layout_gravity="bottom"
(this is not a landscape view)

The button keeps  apearing on the Top margins of the main frame.

What do I miss ?
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: Q) Adjusting textView font size.

2009-08-17 Thread 陈增顺

Hi,

You can use the following member function in TextView Class to adjust
the font size.

public void setTextSize (float size)

Set the default text size to the given value, interpreted as "scaled
pixel" units. This size is adjusted based on the current density and
user font size preference.
Related XML Attributes
android:textSize
Parameters
sizeThe scaled pixel size.


2009/8/16 daum3...@yahoo.com :
>
> Hello all,
>
> I'm printing strings into a textView.
>
> It works well, but the font size is very small to read.
>
> Can I adjust the font size to be bigger?
>
> Thank you for you help 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] Can android support MIDP ?

2009-08-17 Thread conqueror

  Can any MIDP app such as a game run on android ( google 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] How to get started with Android programming from scratch? Is it worthwhile to buy a HTC Magic?

2009-08-17 Thread bianconeri

Hi all,

I've just downloaded Android SDK 1.5 and finished Eclipse
configuration with ADT. So you can say I am very new to this exciting
platform.

Could anybody please direct me to the correct path to get started to
code with Android?

I am going to buy a HTC Magic with Three (Melboourne, Australia). I
wonder if I can deploy my application on the real device for testing
straightaway? Is there anything I need to do before I can do that
apart from purchasing it, is the device open for development?

I am keen to do some development on Android but I can't actually
afford a HTC Magic if it just works as a common mobile phone and
cannot be used for development.

Appreciate any suggestion!!!

Alex

--~--~-~--~~~---~--~~
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] Struggling -- How to start a new intent in HelloItemizedOverlay?

2009-08-17 Thread Venki

Hi

I am showing a list of locations on map. When we click on a particular
location, onTap(), i am planning to show some text message and more
information link. and on click more information, i have to show the
detailed list about that location. May be by starting a new Intent.

Can someone please help me how to do that?

Please give me some example code.
Thanks in advance.

Thanks & Regards
Venkat

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

2009-08-17 Thread Venki

Hi

I am adding search suggestion in my application. When i ran only
AoiDemos/searchInvoke application, its worked fine. But when i am
added the same code in my application its giving below error when
starting application.

009-08-15 13:12:26 - MyApplication] Installing MyApplication.apk...
[2009-08-15 13:12:38 - MyApplication] Application already exists.
Attempting to re-install instead...
[2009-08-15 13:12:54 - MyApplication] Installation error:
INSTALL_FAILED_CONFLICTING_PROVIDER
[2009-08-15 13:12:54 - MyApplication] Please check logcat output for
more details.
[2009-08-15 13:12:55 - MyApplication] Launch canceled!

When i remove the below code from AndroidManifest.xml, application is
lannching fine.



Can someone please help me how to resolve this issue?
Thanks in advance.

Thanks & Regards
Venkat

--~--~-~--~~~---~--~~
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] Extremely LONG Emulator load time on Eclipse Galileo and Vista

2009-08-17 Thread bianconeri

Hi all,

I am pretty new to Android programming, but I am really keen to get
into it.

With Eclipse Galileo, the latest SDK 1.5_r3, ADT plugin and Vista OS,
I started with the Hello World sample from Android User Guide website.
What really disappointed me was it took forever to start up the
Emulator. Well, I never had it start up properly actually.

Eclipse Android Console displays:
[2009-08-17 16:33:22 - HelloAndroid] Android Launch!
[2009-08-17 16:33:22 - HelloAndroid] adb is running normally.
[2009-08-17 16:33:22 - HelloAndroid] Performing
edu.unimelb.helloandroid.HelloAndroid activity launch
[2009-08-17 16:33:22 - HelloAndroid] Automatic Target Mode: launching
new emulator with compatible AVD 'my_avd'
[2009-08-17 16:33:22 - HelloAndroid] Launching a new emulator with
Virtual Device 'my_avd'
[2009-08-17 16:33:23 - HelloAndroid] New emulator found: emulator-5554
[2009-08-17 16:33:23 - HelloAndroid] Waiting for HOME
('android.process.acore') to be launched...

On the Emulator page, it keeps showing "ANDROID_" and nothing
further...

I am just wondering if there is any step I was missing to make it
startup properly? I did just following the User Guide...

Could anybody give me a hint? Appreciate it!!

Alex

--~--~-~--~~~---~--~~
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] Linking with a custom View class

2009-08-17 Thread Shachar Shemesh
Hi all,

I have created a custom View class. I would now like to be able to 
create instances for it from other applications, so that they will use 
it as if it's one of the built in classes. In other words, I want to 
create the dalvik equivalent of a shared object. I want other 
applications to be able to write "import my.domain.and.class.name;". If 
I can even make them write it in the Layout resource file, even better.

What is the best way to go about doing it?

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.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] Program Dependant XML Values

2009-08-17 Thread Surge

Ok, so I'm not really sure how to ask this. I currently have two
Activities lets say one contains a ListView L and the other contains a
TextView, and both are defined in an XML file. how would I change the
contents of T to whatever object in L is selected? or in short, how do/
can I edit a value in strings.xml from my main java program or make it
equal to another value which may be changing?

--~--~-~--~~~---~--~~
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] Anyone from South Florida?

2009-08-17 Thread Tedd Fox

Would love to have a meetup in SoFL (fort lauderdale).  Let me know

--~--~-~--~~~---~--~~
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] Taking control of UI

2009-08-17 Thread hstdev

Hi

I am new to Android. Just started with Hello activity program(1.5 R3
SDK).

I am planning to write an application which can take complete control
of UI.
including:

Incoming Call indication, Incoming SMS indication,  etc. etc.

Is there any mechanism in Android to control the default UI
behaviour??

Like there must be some listener to track the incoming call, but then,
can I restrict the incoming call indication
and show my own screen? Similarly for other scenarios.


Thanks in advance.

Best Regards
hstdev

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

2009-08-17 Thread Rahul

Hi all

I have one proble i want to update UI when i click on DialogBox Button
i am creating new Activity for dialogBox but it,not workig plz tel me
how to 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] TableRow

2009-08-17 Thread Rahul

Hi All

I have one problem in TableLayout. i am using tableLayout and adding
Row Dynamically in the tableLayout i have Two buttons in each row when
i am clicking one buttoni am doing another button visible of that row
and all buttons are invisible using some Animation  but the problem is
when i click on one row button. only that row butons are visible ait
not affected to another row i want to do i clicked button of row just
show me that button and make all are invisible using some animation  i
didnt get any Specific row id so how can i do this plz 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] Updating a map intent

2009-08-17 Thread JD

Hi,
I have a basic Google Maps app within which I'd like to show some
dynamically generated KML from a server. So I use an intent and a Uri
like this:
 Intent mapIntent = new Intent(Intent.ACTION_VIEW);
 Uri uri = Uri.parse("geo:0,0?q=http://www.example.com/
dynamic.kml");
 mapIntent.setData(uri);
 startActivity(Intent.createChooser(mapIntent, "Sample
Map"));

And it works fine. But what I would like to do is to poll the server
at regular intervals to get the latest data. How do I go about
"refreshing" activity so it reconnects to the server?

I've created a thread that periodically calls the code above, but it
only updates the first time.

-JD

--~--~-~--~~~---~--~~
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: Linking with a custom View class

2009-08-17 Thread Mark Murphy

Shachar Shemesh wrote:
> I have created a custom View class. I would now like to be able to
> create instances for it from other applications, so that they will use
> it as if it's one of the built in classes. In other words, I want to
> create the dalvik equivalent of a shared object. I want other
> applications to be able to write "import my.domain.and.class.name;". If
> I can even make them write it in the Layout resource file, even better.
> 
> What is the best way to go about doing it?

Step #1: Set up a separate project for your reusable component, perhaps
with a sample or demo application.

Step #2: Create an API for your reusable component that accepts all
resources as parameters, since resources are tied to the APK.

Step #3: Create an Ant task, Eclipse...ummm...thingamajig, or shell
script/batch file to create a JAR file with just your compiled classes.

Step #4: Distribute the JAR file, or upload the whole thing to github.

You can take a look at some of my CWAC components for examples of this
process:

https://github.com/commonsguy

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

_Beginning Android_ from Apress Now 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] Re: startActivity() crash...

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

It might be helpful to see also the logcat trace of your crash.

Have you tried to use the debugger or debug prints to find out where
and when exactly your code crashes?

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Aug 17, 9:08 am, Tikoze  wrote:
> Here is the code that I am using to bring a "running" activity
> to the foreground:
>
> ActivityManager.RunningTaskInfo task = getTask(idx);
> if (task != null)
> {
>         Intent intent = new Intent();
>         intent.setClassName(task.topActivity.getPackageName(),
> task.topActivity.getClassName());
>         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>
>         try
>         {
>                 m_context.startActivity(intent);
>         }
>         catch (ActivityNotFoundException e)
>         {
>                 Toast.makeText(m_context, "Unable to launch
> activity...", Toast.LENGTH_SHORT).show();
>         }
>
> }
>
> - Crash Scenario 1:
> Switching to any task in the list of running task that has started
> another activity (i.e. task.topActivity and task.baseActivity are
> different) causes a crash.  I have tried the code above using both
> task.topActivity and task.baseActivity but the results are the same...
> force close.
>
> - Crash Scenario 2:
> Switching to specific tasks always causes a force close.  For example,
> when I try to switch to the Calendar Task when it is "running" my
> program always crashes.  However, I can successfully switch to Google
> Maps, Home, Browser, and most others.
>
> I have been unable to find any information about these issue anywhere
> in google groups or on the internet...
--~--~-~--~~~---~--~~
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: Linking with a custom View class

2009-08-17 Thread Shachar Shemesh
Mark Murphy wrote:
> Shachar Shemesh wrote:
>   
>> I have created a custom View class. I would now like to be able to
>> create instances for it from other applications, so that they will use
>> it as if it's one of the built in classes. In other words, I want to
>> create the dalvik equivalent of a shared object. I want other
>> applications to be able to write "import my.domain.and.class.name;". If
>> I can even make them write it in the Layout resource file, even better.
>>
>> What is the best way to go about doing it?
>> 
>
> Step #1: Set up a separate project for your reusable component, perhaps
> with a sample or demo application.
>
> Step #2: Create an API for your reusable component that accepts all
> resources as parameters, since resources are tied to the APK.
>
> Step #3: Create an Ant task, Eclipse...ummm...thingamajig, or shell
> script/batch file to create a JAR file with just your compiled classes.
>
> Step #4: Distribute the JAR file, or upload the whole thing to github.
>
>   
Totally confused.

I actually came across the "PlatformLibrary" sample and readme, as well 
as a lot of googling while waiting for the moderator to approve my first 
email to the list. I came up with "you need to place the JAR with a 
classes.dex in /system/framework and /etc/permissions" solution, which 
pretty much requires you to compile inside the android source tree. Now 
you are telling me I need to compile it completely outside the source 
tree. Like I said - confused.

Once the JAR is created, how do I link an application with it? How do I 
make sure it has access to the code during run time? A regular JAR has 
.class files, which need translation before they can run on Dalvik.
> You can take a look at some of my CWAC components for examples of this
> process:
>
> https://github.com/commonsguy
>
>   
Thanks,
Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.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: startActivity() crash...

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

It might be helpful to see also the logcat trace of your crash.

Have you tried to use the debugger or debug prints to find out where
and when exactly your code crashes?

I am assuming that you have defined the following permission in your
Manifest



--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Aug 17, 9:08 am, Tikoze  wrote:
> Here is the code that I am using to bring a "running" activity
> to the foreground:
>
> ActivityManager.RunningTaskInfo task = getTask(idx);
> if (task != null)
> {
>         Intent intent = new Intent();
>         intent.setClassName(task.topActivity.getPackageName(),
> task.topActivity.getClassName());
>         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>
>         try
>         {
>                 m_context.startActivity(intent);
>         }
>         catch (ActivityNotFoundException e)
>         {
>                 Toast.makeText(m_context, "Unable to launch
> activity...", Toast.LENGTH_SHORT).show();
>         }
>
> }
>
> - Crash Scenario 1:
> Switching to any task in the list of running task that has started
> another activity (i.e. task.topActivity and task.baseActivity are
> different) causes a crash.  I have tried the code above using both
> task.topActivity and task.baseActivity but the results are the same...
> force close.
>
> - Crash Scenario 2:
> Switching to specific tasks always causes a force close.  For example,
> when I try to switch to the Calendar Task when it is "running" my
> program always crashes.  However, I can successfully switch to Google
> Maps, Home, Browser, and most others.
>
> I have been unable to find any information about these issue anywhere
> in google groups or on the internet...
--~--~-~--~~~---~--~~
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 android support MIDP ?

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

MIDP is not supported on Android.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Aug 15, 8:41 pm, conqueror  wrote:
>   Can any MIDP app such as a game run on android ( google 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: Linking with a custom View class

2009-08-17 Thread Mark Murphy

Shachar Shemesh wrote:
> I actually came across the "PlatformLibrary" sample and readme, as well
> as a lot of googling while waiting for the moderator to approve my first
> email to the list. I came up with "you need to place the JAR with a
> classes.dex in /system/framework and /etc/permissions" solution, which
> pretty much requires you to compile inside the android source tree. Now
> you are telling me I need to compile it completely outside the source
> tree. Like I said - confused.

That is for modifying the firmware. If you are looking to create a
reusable component for Android SDK applications, that is not what you want.

> Once the JAR is created, how do I link an application with it?

For building from Ant, you drop the JAR in the libs/ directory of the
project.

For building from Eclipse, you drop the JAR in the libs/ directory of
the project, then do whatever it is you normally do in Eclipse to tell
it about another JAR to link to.

> How do I
> make sure it has access to the code during run time?

Android's build process handles this.

> A regular JAR has
> .class files, which need translation before they can run on Dalvik.

Android's build process handles this.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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: 'm trying to align a button to the bottom of the frame

2009-08-17 Thread Megha

Is this view inside a RelativeLayout or is it in a LinearLayout?
android:layout_alignBottom is used align the bottom edge of your view
with anchor view within RelativeLayout whereas android:layout_gravity
is used for LinearLayout. You could also use
android:layout_alignParentBottom within a RelativeLayout to align your
view at the bottom of the parent view.
Please see:
http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html
http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html

On Aug 14, 4:06 pm, Dolphin  wrote:
> I'm trying to align a button to the bottom of the frame and can't make
> it happen.
> I tried:
> 1.android:layout_alignBottom
> or
>       2. android:layout_gravity="bottom"
> (this is not a landscape view)
>
> The button keeps  apearing on the Top margins of the main frame.
>
> What do I miss ?
> 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: startActivity() crash...

2009-08-17 Thread Tikoze

Roman,

For most applications, my code works and will actually switch
applications.  I have tested it on both 3rd party apps and built-in
ones.  For example, it will switch to Maps, Browser, Camera, and
Home.  I should have mentioned that in my original post.

However, if I try to switch to Calendar, or any app that has started
another activity, I get a crash.

I have the following permissions defined in my Manifest:
- GET_TASKS
- REORDER_TASKS
- SET_PROCESS_FOREGROUND

I do not know how to get the logcat trace of the crash, but will
gladly post it if you can tell me how to get it.

However, I have run it in the debugger.  The crash always happens when
I step into m_context.startActivity(intent).  In Eclipse I a new tab
labeled "ViewRoot.handleMessage(Message) line:1583" opens up when it
crashes.  Inside the tab is a line in red that reads "Source not
found" and a button labeled "Edit Source Lookup Path..."

Hope this helps!

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



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

2009-08-17 Thread Mark Murphy

Tikoze wrote:
> I do not know how to get the logcat trace of the crash, but will
> gladly post it if you can tell me how to get it.

adb logcat, DDMS, or the DDMS perspective in Eclipse.

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

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

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



[android-beginners] help needed creating a AVD

2009-08-17 Thread automerc

I just got a new laptop with x64 vista and i'm following the
development on setting up my laptop for development but I keep getting
a error when I try to create my AVD.
When i tried to enter the android create avd --name  --
target 
command into the commandprompt it gives me a error
java is not recognized as an internal or external command, operable
program or batch file

I remember setting it up on a xp laptop (broken now) before and
everything worked but I can't remember if I went this step or not


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



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

2009-08-17 Thread Tikoze

Here is the logcat info.  For some reason it is saying I do not  have
permission to launch the Calendar activity...  What does it mean when
it says the process record "required null?"

Thanks,
Justin

-BEGIN LOGCAT INFO-

08-17 14:01:28.933: INFO/dalvikvm(1841): Debugger is active
08-17 14:01:29.123: INFO/System.out(1841): Debugger has connected
08-17 14:01:29.123: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:29.333: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:29.535: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:29.733: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:29.943: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:30.145: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:30.349: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:30.553: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:30.757: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:30.960: INFO/System.out(1841): waiting for debugger to
settle...
08-17 14:01:31.163: INFO/System.out(1841): debugger has settled (1371)
08-17 14:01:32.123: INFO/ActivityManager(56): Displayed activity
com.magouyaware.multitasker/.ActivityListView: 3535 ms
08-17 14:01:37.373: DEBUG/dalvikvm(106): GC freed 414 objects / 14432
bytes in 231ms
08-17 14:01:41.263: DEBUG/dalvikvm(56): GC freed 29402 objects /
1113080 bytes in 344ms
08-17 14:01:41.503: WARN/WindowManager(56): Key dispatching timed out
sending to com.magouyaware.multitasker/
com.magouyaware.multitasker.ActivityListView
08-17 14:01:41.513: WARN/WindowManager(56): Dispatch state: {{KeyEvent
{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to Window
{434cd6a0 com.android.launcher/com.android.launcher.Launcher
paused=false} @ 1250539004962 lw=Window{434cd6a0 com.android.launcher/
com.android.launcher.Launcher paused=false}
lb=android.os.binderpr...@43440c70 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{4348f9e8 com.magouyaware.multitasker/
com.magouyaware.multitasker.ActivityListView paused=false}}}
08-17 14:01:41.513: WARN/WindowManager(56): Current state:  {{null to
Window{4348f9e8 com.magouyaware.multitasker/
com.magouyaware.multitasker.ActivityListView paused=false} @
1250539301516 lw=Window{4348f9e8 com.magouyaware.multitasker/
com.magouyaware.multitasker.ActivityListView paused=false}
lb=android.os.binderpr...@4348f7e0 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{4348f9e8 com.magouyaware.multitasker/
com.magouyaware.multitasker.ActivityListView paused=false}}}
08-17 14:01:41.513: WARN/WindowManager(56): Continuing to wait for key
to be dispatched
08-17 14:01:43.643: INFO/ActivityManager(56): Starting activity:
Intent { flags=0x1000 comp={com.android.calendar/
com.android.calendar.MonthActivity} }
08-17 14:01:43.643: WARN/ActivityManager(56): Permission Denial:
starting Intent { flags=0x1000 comp={com.android.calendar/
com.android.calendar.MonthActivity} } from ProcessRecord{43480d28
1841:com.magouyaware.multitasker/10032} (pid=1841, uid=10032) requires
null
--~--~-~--~~~---~--~~
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 requestLocationUpdates to sample GPS based on time only?

2009-08-17 Thread Jean-Sebastien Stoezel

Hi,

I would like to use requestLocationUpdates to periodically get a GPS
fix, not based on the actual distance covered.

If I specify the following arguments:
- m_LocationManager.requestLocationUpdates("network", 6, 0, this):
requestLocationUpdates is called more than every 6ms. I believe
this is because the min distance covered is 0. This does not work for
me as I want to get updates every minute.
- m_LocationManager.requestLocationUpdates("network", 6, 100,
this): will not return every 6ms unless the subject has moved for
at least 100m.

How to use this function so I get updates only based on elapsed time,
not distance covered?

Thanks,
Jean

--~--~-~--~~~---~--~~
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] Can't locate com.android.settings activity

2009-08-17 Thread jstoezel

Hi,

I'm trying to open the system's window (GPS enable window) using the
following code. I get an exception saying the com.android.settings
activity cannot be located.

Any idea why this happens?

Thanks,
Jean


ComponentName c = new ComponentName
("com.android.settings","com.android.settings.SecuritySettings");
//
("com.android.settings","com.android.settings.SecuritySettings");

Intent i = new Intent
(Settings.ACTION_SECURITY_SETTINGS);
i.addCategory(Intent.CATEGORY_LAUNCHER);
i.setComponent(c);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
--~--~-~--~~~---~--~~
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 Delete An Item In ListView

2009-08-17 Thread MMC2
MessageHi Eric,

The documentation including the books, is so frustrating in the lack of 
help and explanation at times. What you need to do is insert and delete your 
items into the holder of your data and then display it in the listview. This 
might be an array, or as in my case a table in an SQLite database. I use a 
simplecursoradapter and call a cursor of all items and link this to the listview

myCursor = myAdapter.getAllItemsCursor(); 

String[] fromColumns = new String[] { myAdapter.field1, myAdapter.field2, 
myAdapter.KEY_ID };

int[] toMyLayout = new int[] { R.id.f1, R.id.f2, R.id.id_store };


final SimpleCursorAdapter   mySimpleCursorAdapter = new 
SimpleCursorAdapter(this, R.layout.mylayout, myCursor, fromColumns, toMyLayout);

myListView.setAdapter(mySimpleCursorAdapter );



Field1 is displayed in f1 and field2  in f2. I was putting KEY_ID into id_store 
hoping to retrieve it and use it in deleting an item later as required, but I 
cannot retrieve the text of the textview for the item that has been selected in 
the listview.  So I set up an array of ids with the index of the array being 
the same as the position of the item in the listview.

Then you can add an item to the database table and delete an item from the 
database table and update the listview to show the current contents.

Good luck and I hope that this has been of some help



Mike


--- Original Message - 
  From: Eric Belen 
  To: android-beginners@googlegroups.com 
  Sent: Saturday, August 15, 2009 3:19 AM
  Subject: [android-beginners] How To Delete An Item In ListView


  How do you insert a single item to a list view?
  and how to delete an item In ListView


  Eric Belen


  

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

2009-08-17 Thread Danny W. Pimienta

Are there any books available that cover Android 1.5 aka cupcake? I  
was going to get Hello Android but only the ebook covers cupcake.

Sent from my iPhone

--~--~-~--~~~---~--~~
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] 3 icons for one app

2009-08-17 Thread tinyang
I am developing an app and so far it has 3 complete acticities.  For some
reason, everytime I install it and run it in my emulator, it creates an icon
for each activity instead of creating only one activity for the app.  Is
this because I have intents in my manifest for each activity?  Can anyone
advise me as to why this is happening and how to fix it?  Thanks.
 
-- 
:-) 
P Please don't print this e-mail unless you really need to. 
 
  

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



[android-beginners] Re: help needed creating a AVD

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

Try to do a java -version to see whether you have access to your java
environment. If not your environment variables are not correctly
setup.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Aug 17, 12:55 pm, automerc  wrote:
> I just got a new laptop with x64 vista and i'm following the
> development on setting up my laptop for development but I keep getting
> a error when I try to create my AVD.
> When i tried to enter the android create avd --name  --
> target 
> command into the commandprompt it gives me a error
> java is not recognized as an internal or external command, operable
> program or batch file
>
> I remember setting it up on a xp laptop (broken now) before and
> everything worked but I can't remember if I went this step or not
--~--~-~--~~~---~--~~
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] Is it possible to change text color of all child TextViews ?

2009-08-17 Thread Atif

Is it possible to change text color of all child TextViews? Actually I
want
to change text color of all columns(TextViews) of a TableRow when it
is
clicked.

--
Best Regards,
Atif Gulzar

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



[android-beginners] Re: Is it possible to change text color of all child TextViews ?

2009-08-17 Thread tinyang

Have you looked into themes?
http://developer.android.com/guide/topics/ui/themes.html 

-Original Message-
From: android-beginners@googlegroups.com 
[mailto:android-beginn...@googlegroups.com] On Behalf Of Atif
Sent: Monday, August 17, 2009 10:34 PM
To: Android Beginners
Subject: [android-beginners] Is it possible to change text color of all child 
TextViews ?


Is it possible to change text color of all child TextViews? Actually I want to 
change text color of all columns(TextViews) of a TableRow when it is clicked.

--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ

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


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



[android-beginners] Re: Linking with a custom View class

2009-08-17 Thread Shachar Shemesh
Mark Murphy wrote:
> Shachar Shemesh wrote:
>   
>> I actually came across the "PlatformLibrary" sample and readme, as well
>> as a lot of googling while waiting for the moderator to approve my first
>> email to the list. I came up with "you need to place the JAR with a
>> classes.dex in /system/framework and /etc/permissions" solution, which
>> pretty much requires you to compile inside the android source tree. Now
>> you are telling me I need to compile it completely outside the source
>> tree. Like I said - confused.
>> 
>
> That is for modifying the firmware. If you are looking to create a
> reusable component for Android SDK applications, that is not what you want.
>
>   
>> Once the JAR is created, how do I link an application with it?
>> 
>
> For building from Ant, you drop the JAR in the libs/ directory of the
> project.
>
> For building from Eclipse, you drop the JAR in the libs/ directory of
> the project, then do whatever it is you normally do in Eclipse to tell
> it about another JAR to link to.
>
>   
>> How do I
>> make sure it has access to the code during run time?
>> 
>
> Android's build process handles this.
>
>   
>> A regular JAR has
>> .class files, which need translation before they can run on Dalvik.
>> 
>
> Android's build process handles this.
>
>   
I think I understand why the confusion. I believe you are talking about 
statically linking, while I'm talking about dynamically linking.

My library might grow quite big and will be used by several programs 
(distinct programs), and I do not want it to load multiple times. Your 
solution would link the library into the APK, which means that if I use 
it in two programs, it will be loaded into memory twice.

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.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] A Google Maps App

2009-08-17 Thread Maxood

I want to write an app involving Google Maps API. I want my user to
enter the name of a place where he is in a textbox and then enters the
name of his desired destination in another textbox. Once he clicks the
button after that, the required map gets displayed.

I have 2 questions here:

Is it possible to make such an app on android?

I guess the android can auto-detect where the user is..am i correct?

Thank you,
Maqsood


--~--~-~--~~~---~--~~
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] I am trying to log my gps location to a website.

2009-08-17 Thread cellurl

I am trying to log my gps location to a website.
This code runs, but I don't see any activity in my website log, so
anything could be wrong
The Log.d() looks good...
Thanks for any suggestions.
-jp

---http://www.wikispeedia.org/a/
process_submit_bb.php--

$mmlat=$_POST['mlat'];
$mmlon=$_POST['mlon'];
$mmmph=$_POST['mmph'];
$mmtag=$_POST['mtag'];
$mmcog=$_POST['mcog'];

$query="";
echo "";

$query = " INSERT INTO signs
(lat,lon,mph,cog,tag,hours,submittedOn,email)VALUES
('$mmlat','$mmlon','$mmmph','$mmcog','$mmtag','$mmhours',CURDATE
(),'$eemail')";

if ($query != ""){
 $results = mysql_query($query);
}

--android
code--

String latString = Double.toString(myLatitude);
String lonString = Double.toString(myLongitude);
String speed=  Double.toString(55);
String name=   "test-android";
String direction=  Double.toString(270);

Log.d("TAG", "latitude= "  + latString +  "   longitude= "
+ lonString);
Log.d("TAG", "speed= " + speed);

 try {
HttpClient httpclient = new DefaultHttpClient
();
List formparams = new
ArrayList();
formparams.add(new BasicNameValuePair("mlat",
latString));
formparams.add(new BasicNameValuePair("mlon",
lonString));
formparams.add(new BasicNameValuePair("mmph",
speed));
formparams.add(new BasicNameValuePair("mtag",
name));
formparams.add(new BasicNameValuePair("mcog",
direction));
formparams.add(new BasicNameValuePair
("mhours", hours));
formparams.add(new BasicNameValuePair
("memail", email));
UrlEncodedFormEntity entity = new
UrlEncodedFormEntity(formparams, "UTF-8");
HttpPost httppost = new HttpPost("http://
www.wikispeedia.org/a/process_submit_bb.php");
httppost.setEntity(entity);
httpclient.execute(httppost);
}catch (Exception e) {
e.printStackTrace();
}


--~--~-~--~~~---~--~~
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] API Demo's tests

2009-08-17 Thread raj.10788

Hi,

I am having the G1 Dev Device with me. I updated that device with the
Android 1.5 (As per the instructions given in the HTC support page).
After that I just installed the API demos in the Android 1.5 r3 SDK.
After that I am trying to run the instrumentation test cases in the
API Demos.

I am trying to exeute this command, But, I am not succed with that.
Here is the command and errors.


C:\Documents and Settings\rajendra>adb shell am instrument -w \ -e
class com.example.android.apis.os.MorseCodeConverterTest \
com.example.android.api
s.tests/android.test.InstrumentationTestRunner
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for:
ComponentInfo{com.example.android.apis.tests/
android.test.InstrumentationTestRu
nner}
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS_CODE: -1
INSTRUMENTATION_FAILED: com.example.android.apis.tests/
android.test.InstrumentationTestRunner
usage: am [start|broadcast|instrument|profile]
   am start -D INTENT
   am broadcast INTENT
   am instrument [-r] [-e  ] [-p ]
[-w] 
   am profile  [start |stop]

   INTENT is described with:
[-a ] [-d ] [-t ]
[-c  [-c ] ...]
[-e|--es   ...]
[--ez   ...]
[-e|--ei   ...]
[-n ] [-f ] []

This command I found in the AllTests.java file which is inside the
APIdemos project. Can anyone give me pointers or suggestions how to
begin witht he instrumations in Android 1.5 and how to run the
samples.

I was running these successful ni Android 1.1 and 1.0


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