[android-beginners] Parcelable Class parameter input (1) unknown type

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

Hello,

I tried to create a simple custom object that I can use as a
Parcelable class for my bound service.
I did everything as described in the documentation. Maybe you can help
me solving this problem.

My code is constructed as follows:

src
--de.test.samples
  --DialogActivty.java
  --Person.java
  --RemoteService.java
  --IRemoteService.aidl
  --Person.aidl

gen
--de.test.samples
  --IRemoteService.java
  --R.java




Person.java:


package de.test.samples;

import android.os.Parcel;
import android.os.Parcelable;

public class Person implements Parcelable {

private int mAge;
private String mSurName;


public static final Parcelable.Creator CREATOR = new
Parcelable.Creator() {
public Person createFromParcel(Parcel in) {
return new Person(in);
}

public Person[] newArray(int size) {
return new Person[size];
}
};

public Person() {
this.setMAge(0);
this.setMSurName("");
}

public Person(int age, String surname) {
this.setMAge(age);
this.setMSurName(surname);
}

private Person(Parcel in) {
setMAge(in.readInt());
setMSurName(in.readString());
}



@Override
public int describeContents() {
// TODO Auto-generated method stub
return 0;
}

@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(getMAge());
dest.writeString(getMSurName());
}

// ...getter & setter...



}






Person.aidl
---
package de.test.samples;

parcelable Person;





RemoteService.java
--

package de.test.samples;

//imports


public class RemoteService extends Service {

Person p = new Person();

private final IRemoteService.Stub binder = new IRemoteService.Stub()
{

@Override
public int giveMeAnAge() throws RemoteException {

Random generator = new Random();
return generator.nextInt(100);
}

@Override
public String determineStatus(Person input) throws 
RemoteException {
if(input.getMAge() > 50)
return "The person is old.";
else
return "The person is young.";
}

};

@Override
public IBinder onBind(Intent intent) {
return this.binder;
}

}




IRemoteService.aidl
---
package de.test.samples;

interface IRemoteService {
int giveMeAnAge();
String determineStatus(in Person input);
}



DialogActivity.java
---

package de.test.samples;

//imports


public class DialogActivity extends Activity {

private IRemoteService myServ;

//...


@Override
public void onCreate(Bundle savedInstanceState) {

//...

int tempAge = myServ.giveMeAnAge();

Person myPerson = new Person();
myPerson.setMAge(tempAge);
myPerson.setMSurName("Johnson");





mStatus.setText(myServ.determineStatus(myPerson));





//
}

//...
}





In IRemoteService.aidl
I can not define the method String determineStatus(in Person input);
because the type Person is unknown.

What did I wrong ?
Can please anyone 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] Re: startActivity called from non-Activity context - help

2009-06-25 Thread Mark Murphy

Wayne Wenthin wrote:
> Not to hijack the thread but ... Mark do you know any books that cover
> this stuff because it makes my head hurt also and seems to be one of my
> main stumbling blocks.

I'm afraid I don't. On the other hand, I've only bought one, and some of
the others aren't searchable on Amazon or Google Books or anything, so
there might be one that covers it.

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

Android Development Wiki: http://wiki.andmob.org

--~--~-~--~~~---~--~~
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: Sense UI

2009-06-25 Thread Michael Leung
I don't think. Sense UI, that is closed source application. Moreover, that
seems to be design for touch phone.

On Thu, Jun 25, 2009 at 3:37 AM, Romain Guy  wrote:

>
> That's question you should ask HTC :)
>
> On Wed, Jun 24, 2009 at 9:38 AM, johnny wrote:
> >
> > Sorry if this is a duplicate post (can't find my old one). I was
> > wondering if anyone knew wether or not the new HTC Sense UI would be
> > made available for developers to run on the developme G1?
> >
> > thanks.
> >
> > >
> >
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> >
>


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

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



[android-beginners] Re: Problem when trying to run the emulator

2009-06-25 Thread jbrohan

The error you are getting is because the command processor cannot
recognize the java command inside the android.bat file. If you type
xxxhzzz or similar you will get the same result. You have a problem
with a path somewhere.
good luck
John

On Jun 24, 7:36 am, ники тончев  wrote:
> when i run the emulator either from the cmd with the emulator command
> or the exe file it says that i need to create avd but when i try to
> create one it says
> C:\Users\D.N.E.A>android create avd --target 2 --name my_avd
> 'java' is not recognized as an internal or external command,
> operable program or batch file.
>
> i have the latest java version installed and i still get this errror
--~--~-~--~~~---~--~~
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: Problem when trying to run the emulator

2009-06-25 Thread Michael Leung
Have you set path to your Java SDK bin directory?

2009/6/25 jbrohan 

>
> The error you are getting is because the command processor cannot
> recognize the java command inside the android.bat file. If you type
> xxxhzzz or similar you will get the same result. You have a problem
> with a path somewhere.
> good luck
> John
>
> On Jun 24, 7:36 am, ники тончев  wrote:
> > when i run the emulator either from the cmd with the emulator command
> > or the exe file it says that i need to create avd but when i try to
> > create one it says
> > C:\Users\D.N.E.A>android create avd --target 2 --name my_avd
> > 'java' is not recognized as an internal or external command,
> > operable program or batch file.
> >
> > i have the latest java version installed and i still get this errror
> >
>


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

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



[android-beginners] Re: Sense UI

2009-06-25 Thread johnny

Gotcha. 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 called from non-Activity context - help

2009-06-25 Thread Jason Van Anden

Thanks again Mark.  Great suggestions.  I guess I thought (or was
hoping) I was going down the wrong path.  I will give some of these a
try and get back.

re: Hijack the thread!?! ... Its reassuring to find out others are
perplexed by this.  I posted this question a few days ago, albeit a
little differently, and got no feedback.  Sometimes no response feels
like a collective "no duh".  Its especially discouraging when even the
Google peeps don't have anything to say.

j

--~--~-~--~~~---~--~~
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 stop sound notification/let it only play once?

2009-06-25 Thread polzifer

OK. And i have to ad, that hte virbation is only vibrating once,
because it isn't a notification.vibrate(), but a "private Vibrator
vibrator;"
As the Flag "FLAG_ONLY_ALERT_ONCE" seemed to be not working.


Is the Flag "FLAG_ONLY_ALERT_ONCE" not working?

On 25 Jun., 03:34, polzifer  wrote:
> of course when copying and pasteing I accidentally erased the
> "soundNotification();"
>
> from the notifyClient method.
>
> Just nobody gets confused...
>
> Regards, chris!
>
> On 25 Jun., 03:11, polzifer  wrote:
>
> > Hi,
>
> > while my
>
> > notification.sound = uri
>
> > isn't stopping from looping the sound, the vibration does only vibrate
> > once.
> > So I assume the i flagged the notification ok?
>
> > The ringtone for the app is chosen via a ringtone preference dialog:
>
> > 
> >  >                         android:id="@+id/ringtone"
> >                         android:key="ringtone"
> >                         android:title="@string/ringtone_title"
> >                         android:ringtoneType="notification"
> >                         android:showDefault="true"
> >                         android:showSilent="true"
> >                         android:summary="@string/ringtone_summ"
> >                 />
> > 
>
> > ...and the code for the service looks like that:
>
> > 
>
> > protected void notifyClient(String from, String message) {
>
> >                 notifyCounter++;
> >                 String title = "Message from " + from;
> >                 notification = new Notification(R.drawable.icon, APP_NAME + 
> > ": "
> >                                 + title, System.currentTimeMillis());
> >                 Uri userNameUri = Uri.parse(from);
> >                 notificationIntent.setData(userNameUri);
> >                 PendingIntent pendingIntent = 
> > PendingIntent.getActivity(this, 0,
> > notificationIntent,
> >                                 0);
>
> >                 notification.setLatestEventInfo(this, title, message,
> > pendingIntent);
> >                 notification.number = notifyCounter;
> >                 notification.flags = Notification.FLAG_AUTO_CANCEL
> >                                 | Notification.FLAG_ONLY_ALERT_ONCE;
>
> >                 vibraNotififaction();
>
> >                 if (isLEDNotify) {
> >                         notification.flags |= Notification.DEFAULT_LIGHTS;
> >                         notification.ledARGB = Color.MAGENTA;
> >                         notification.ledOnMS = 300;
> >                         notification.ledOffMS = 1000;
> >                         notification.flags |= Notification.FLAG_SHOW_LIGHTS;
> >                 }
>
> >                 notificationMGR.notify(NOTIFY_ID, notification);
> >         }
>
> >         private void vibraNotififaction() {
> >                 if (isVibraNotify) {
> >                         vibrator.vibrate(500);
> >                 }
> >         }
> >         private void soundNotification(){
> >                 notification.sound = null;
> >                 Uri soundUri = TextUtils.isEmpty(ringNotify) ? null : 
> > Uri.parse
> > (ringNotify);
> >                 notification.sound =  soundUri;
> >         }
>
> >         protected void getPreferences(SharedPreferences prefs) {
> >                 this.isLEDNotify = 
> > prefs.getBoolean(PreferenceConstants.LEDNOTIFY,
> > false);
> >                 this.isVibraNotify = prefs.getBoolean
> > (PreferenceConstants.VIBRATIONNOTIFY, false);
> >                 this.ringNotify = prefs.getString
> > (PreferenceConstants.RINGTONENOTIFY, 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] Signing Tool

2009-06-25 Thread bear123434238
I recently switched to a new computer to do my development.  I was using Ubuntu 
Linux, and was familiar with the tool to sign the applications.  What tools are 
available for Windows XP Home Edition? 



--~--~-~--~~~---~--~~
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 called from non-Activity context - help

2009-06-25 Thread Mark Murphy

> re: Hijack the thread!?! ... Its reassuring to find out others are
> perplexed by this.  I posted this question a few days ago, albeit a
> little differently, and got no feedback.  Sometimes no response feels
> like a collective "no duh".  Its especially discouraging when even the
> Google peeps don't have anything to say.

FWIW, the "Google peeps" tend to post on [android-developers] more than
this list, AFAICT. How much I follow any of these lists depends on my
schedule for the day. We need more answerers...

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-beginners] Re: startActivity called from non-Activity context - help

2009-06-25 Thread Jason Van Anden

yup ... that's where I posted!  (actually posted under beginners
first, then developers, then here again).

j

On Thu, Jun 25, 2009 at 10:10 AM, Mark Murphy wrote:
>
>> re: Hijack the thread!?! ... Its reassuring to find out others are
>> perplexed by this.  I posted this question a few days ago, albeit a
>> little differently, and got no feedback.  Sometimes no response feels
>> like a collective "no duh".  Its especially discouraging when even the
>> Google peeps don't have anything to say.
>
> FWIW, the "Google peeps" tend to post on [android-developers] more than
> this list, AFAICT. How much I follow any of these lists depends on my
> schedule for the day. We need more answerers...
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
> >
>

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



[android-beginners] Re: Basic Layout

2009-06-25 Thread schwiz

instead of saying wrap_content you can actually give it a hardcoaded
value although im not sure if that will resize the pic or just cut it
off.

On Jun 24, 5:19 pm, Christian Polzer 
wrote:
> Have you tried an Relative Layout yet?
>
> I think you can specify the left and right Item in the Xml for that?
>
> Regards,,
>
> Christian Polzer
>
> christian.pol...@googlemail.com
>
> On 24.06.2009, at 23:51, Carl wrote:
>
>
>
> > thanks. I tried that but unfortunately I then get an
> > arithmeticException.
> > It also seems pretty complicated to add Views to it.
>
> > On Jun 24, 3:36 pm, schwiz  wrote:
> >> try using 1 linear layout with a TableLayout tag inside then TableRow
> >> inside of that.  Make sure  your TableLayout has the attribute
> >> android:stretchColumns="*"
> >> this should do it!
>
> >> On Jun 23, 10:16 pm, ayush  wrote:
>
> >>> its hard to figure out without looking at your XML content. my guess
> >>> is that you are using the "fill_parent" value for the layout_width  
> >>> of
> >>> your linear layouts and the ImageView. replace this by  
> >>> "wrap_content"
> >>> or alternatively specify the exact width in pixels that you want  
> >>> each
> >>> of the 3 linear layouts to be. you will also have to use the same
> >>> value on the ImageView.
>
> >>> On Jun 23, 5:13 am, Carl  wrote:
>
>  Why has it got to be s difficult?  For a week now I’ve been
>  reading and playing around with code and have still not found the
>  answer
>
>  I want a simple 3 column layout, with images going from bottom to  
>  top
>  in each.
>  Whenever I put 3 LinearLayouts next to each other in the  
>  Activity, the
>  first one takes up all the space.
>  That is if I add an ImageView to it in the XML. If I don’t then all
>  none of the Layouts appear.
>
>  Very frustrated and about to quit Android altogether. Please  
>  help!- Hide quoted text -
>
> >> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Sense UI

2009-06-25 Thread johnny

Guess I was a little pre-mature:

http://gizmodo.com/5302323/htc-ceo-says-the-sexy-sense-android-interface-coming-to-existing-phones

On Jun 25, 9:38 am, johnny  wrote:
> Gotcha. 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: Signing Tool

2009-06-25 Thread Balwinder Kaur (T-Mobile)

Instructions for signing an apk can be found at

http://developer.android.com/guide/publishing/app-signing.html

Instructions for using the Keytool and the jarsigner on Windows can be
found at http://java.sun.com/j2se/1.5.0/docs/tooldocs/#security

Hope this helps,
Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

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

On Jun 25, 7:02 am, bear123434...@comcast.net wrote:
> I recently switched to a new computer to do my development.  I was using 
> Ubuntu Linux, and was familiar with the tool to sign the applications.  What 
> tools are available for Windows XP Home Edition?
--~--~-~--~~~---~--~~
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]Default browser

2009-06-25 Thread Rafa Perfeito
Hey droiders and droid users,
Coming to you from Portugal so unfortunately only now the first Android
device is preview to release, the HTC Magic. So my question is this: what is
Android's default browser? Does it depends on the device and/or carrier? If
so, what was such browser for G1?

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] HD Family -- download HD Movies torrent 100% free

2009-06-25 Thread Huynh Nhu Thuy

HD Family  -- Hot movies and download HD Hot Movies via torrent 100%
free
Trailer and Analysis for hot Movies.


Home page: http://hd-family.blogspot.com/

Transformers 2 Revenge of The Fallen (hot of 2009)
http://hd-family.blogspot.com/2009/06/transformers-revenge-of-fallen.html

KNOWING 2009
http://hd-family.blogspot.com/2009/06/knowing-dvdrip-xvid-diamond.html

Quantum of Solace 1080p BluRay x264
http://hd-family.blogspot.com/2009/06/quantum-of-solace-1080p-bluray-007.html

Final Fantasy Advent Children Complete (2009) (HOT HOT HOT)
http://hd-family.blogspot.com/2009/06/final-fantasy-advent-children-complete.html

More and more here:
http://hd-family.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] Persisting app data (not preferences)

2009-06-25 Thread ReubenH

Hi,


How may I read and write some ordinary data - strings, ints, etc -  to
and from a config file?


Having found that the Bundle parameter for Activity.onCreate() etc is
usually null (a feature that's IMHO extremely counter-intuitive) I am
therefore obliged to directly read/write non-trivial app data to a
file in the private data dir. Indeed the FAQ seems to recommend
exactly this.

And here's where I start to feel I'm missing something obvious... how
on earth do you do it?

I can create a nice Bundle, or a Parcel, stuffed with the arrays of
ints and strings that I want to write but how does it get to and
from the disk? I was expecting a writeToFile(FileOutputStream),method
on Bundle or Parcel but neither exist.

I see Bundle at least implements toString(), but sadly there is no
fromString() to match it.


Thanks,


Reuben

--~--~-~--~~~---~--~~
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 on FPGA, feasibility issue

2009-06-25 Thread Ashish

Hi all,

We are doing our masters project at IITD, our supervisor has asked us
to consider getting the Andoid OS working on FPGA.

This project is very important for us as it has 18 credits out of
total 61. So we want to be very sure that we would get this done.

These are the questions we'll like to ask.

Has someone already ported Android on FPGA? Is there a project people
are working on with this as their aim?

Android works on Linux with Java running on top of it. To get this to
work we would first need Linux to work on FPGA with Graphics and also
have Java running on top of it. How is this supposed to be done? Has
it been done?

If I download the Android OS and build on linux 32 bit. Will it work
on x86 architecture (for testing purposes)?

On the webpage http://source.android.com/download this line is written
To build the Android files in a Mac OS environment, you need an Intel/
x86 machine. The Android build system and tools do not support the
obsolete PowerPC architecture.
Is the same statement valid even if build in ubuntu linux environment?

How much time/effort you people think would be required? There are 2
people (Tapas and Ashish) doing the same project which will go on for
about an year?

Can we get some papers published for our work?

Thanks and Regards,
Tapas Kundu
Ashish Srivastava

--~--~-~--~~~---~--~~
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] bring the activity to front

2009-06-25 Thread Rim

I am new to android development.

I am using onKeyDown() Method to trap all the keys.
But HOME & ENDCALL key are not working ,with this method.
When above keys are pressed , activity goes in onPause mode.
Is there a way to bring the activity to front?

--~--~-~--~~~---~--~~
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] Bug in Notepadv3 Tutorial

2009-06-25 Thread Hongster

Hi, I have found a bug in the NoteEdit class. The bug lies in the
"outState.putLong(NotesDbAdapter.KEY_ROWID, mRowId);" statement in
onSaveInstanceState() method.

When a new note is created the mRowId is null. If the application is
terminated while user is editing a new note, an uncaught
NullPointerException will be thrown because an null parameter is
passed into outStat.putLong().

To reproduce the bug:
1. Launch Notepadv3 application.
2. Press the "Menu" key.
3. Select "Add Note".
4. Press the "Home" key to terminate application.


I think it can be solved by replacing the statement with saveState().

--~--~-~--~~~---~--~~
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] Parallel arrays or Array of objects?

2009-06-25 Thread jhoffman

Hello, and my apologies if this topic has been covered (I didn't find
anything from a handful of searches on Android Beginners!). I read in
the "Designing for Performance" guide that:
"An array of ints is a much better than an array of Integers, but this
also generalizes to the fact that two parallel arrays of ints are also
a lot more efficient than an array of (int,int) objects. The same goes
for any combination of primitive types."

Which makes sense to me. However, in my particular project, I receive
a JSON object (hash) of data from the web, and need to display this
data on an Android phone in key-sorted order. In this case, I can't
think of an easy way to maintain parallelism between the two arrays
while sorting the keys alphabetically. I could reinvent the wheel and
write a search which modifies both arrays at once I guess, but that
sets off red flags for me that there must be a better way.

Should I just take the hit and implement this as a single array of
(String, int) (aka key, value) objects? Is there a way that I can
somehow sort the keys prior to building my array from the JSON hash
object?

Any ideas or input would be much appreciated!

--~--~-~--~~~---~--~~
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 connect external webcam

2009-06-25 Thread wwsean08

I don't think you could, i doubt the g1 could go into host mode, and
even if you did, you would need to make a custom driver for it

On Jun 24, 1:01 pm, Shivanand  wrote:
> Hi,
>
> I am beginner to android development. I want know how to connect
> external usb webcam to android device..
>
> Thanks,
> Shiv.
--~--~-~--~~~---~--~~
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: Default browser

2009-06-25 Thread schwiz

default browser is called browser. I use steel www.kolbysoft.com

On Jun 25, 11:24 am, Rafa Perfeito  wrote:
> Hey droiders and droid users,
> Coming to you from Portugal so unfortunately only now the first Android
> device is preview to release, the HTC Magic. So my question is this: what is
> Android's default browser? Does it depends on the device and/or carrier? If
> so, what was such browser for G1?
>
> 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] Re: How to connect external webcam

2009-06-25 Thread Ivan Soto
I recall reading that one of the things that needs to be done before Android
can be seen as a solution for netbooks is the USB host, so I guess you can't
connect anything to it.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Thu, Jun 25, 2009 at 12:39 PM, wwsean08  wrote:

>
> I don't think you could, i doubt the g1 could go into host mode, and
> even if you did, you would need to make a custom driver for it
>
> On Jun 24, 1:01 pm, Shivanand  wrote:
> > Hi,
> >
> > I am beginner to android development. I want know how to connect
> > external usb webcam to android device..
> >
> > Thanks,
> > Shiv.
> >
>

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



[android-beginners] Using google's "my maps" functionality

2009-06-25 Thread Theo K

Hi fellow Androids,
I was experimenting with creating a google map on my home pc.  Then i
thought how great it would be if i could load the map inside of an
Android app using mapview.  So after i created my map, i obtained the
url for it:

http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=102756143133832946606.00046a429454dfe5bb393&z=17

This works just fine if i load it within a browser, but my question is
how can i load a pre-created google map within a mapview?  What would
be the process involved?  I was kinda hoping there'd be a parameter in
the mapview viewgroup which would take a google map URL, but no such
luck.  I'm beginning to suspect that i'd need to programmatically hit
the googlemaps api, load up my pre-created map, find out all the
placeholders, lines etc, and then manually add them into my mapview
myself.  Is this the case?

Any help is greatly appreciated.
Theo


--~--~-~--~~~---~--~~
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: Parallel arrays or Array of objects?

2009-06-25 Thread jhoffman

As it turns out, there definitely was something really simple that I
was overlooking.

Rather than mess with parallel arrays, or a String, int datatype, I
can just String together the String and the int from my hash to begin
with! In hindsight it ended up being embarrassingly simple, but I
figured I'd leave record of my mistake in case it helps somebody else
out!

On Jun 24, 5:15 pm, jhoffman  wrote:
> Hello, and my apologies if this topic has been covered (I didn't find
> anything from a handful of searches on Android Beginners!). I read in
> the "Designing for Performance" guide that:
> "An array of ints is a much better than an array of Integers, but this
> also generalizes to the fact that two parallel arrays of ints are also
> a lot more efficient than an array of (int,int) objects. The same goes
> for any combination of primitive types."
>
> Which makes sense to me. However, in my particular project, I receive
> a JSON object (hash) of data from the web, and need to display this
> data on an Android phone in key-sorted order. In this case, I can't
> think of an easy way to maintain parallelism between the two arrays
> while sorting the keys alphabetically. I could reinvent the wheel and
> write a search which modifies both arrays at once I guess, but that
> sets off red flags for me that there must be a better way.
>
> Should I just take the hit and implement this as a single array of
> (String, int) (aka key, value) objects? Is there a way that I can
> somehow sort the keys prior to building my array from the JSON hash
> object?
>
> Any ideas or input would be much appreciated!
--~--~-~--~~~---~--~~
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: Problem when trying to run the emulator

2009-06-25 Thread Mike Wolfson

Just run the emulator with the G1 avd (which I think is shipped with
the SDK), you shouldn't need to create your own (unless you have a
specific need for something special).

>emulator -avd g1

On Jun 24, 4:36 am, ники тончев  wrote:
> when i run the emulator either from the cmd with the emulator command
> or the exe file it says that i need to create avd but when i try to
> create one it says
> C:\Users\D.N.E.A>android create avd --target 2 --name my_avd
> 'java' is not recognized as an internal or external command,
> operable program or batch file.
>
> i have the latest java version installed and i still get this errror
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Best practice for polling a remote resource periodically

2009-06-25 Thread Dave Bordoley

Hi All,

I'm starting to write an app that will periodically poll an HTTP
resource and use the data to update a View. My initial thought process
on how this will work is that on application startup, my activity will
spawn a worker thread that will maintain an object model of the data
and update it as necessary. Ideally this thread would publish back to
the UI thread that the data has changed and the UI thread would read
the object model and update the view. I'm not too familiar with
Android's architecture to support threading and messaging between
threads, so I was wondering if there was a good up to date tutorial
etc. that someone could point me to.

Thanks,

Dave

ps. In the past I've used AsyncTask but i don't think it will meet my
requirements as the UI thread would need to maintain a timer to kick
off an AsyncTask. Ideally I'd like to isolate these two parts of the
application as much as possible.

--~--~-~--~~~---~--~~
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: Best practice for polling a remote resource periodically

2009-06-25 Thread Mark Murphy

Dave Bordoley wrote:
> I'm starting to write an app that will periodically poll an HTTP
> resource and use the data to update a View. My initial thought process
> on how this will work is that on application startup, my activity will
> spawn a worker thread that will maintain an object model of the data
> and update it as necessary.

Use AsyncTask.

> Ideally this thread would publish back to
> the UI thread that the data has changed and the UI thread would read
> the object model and update the view.

Use AsyncTask!

> I'm not too familiar with
> Android's architecture to support threading and messaging between
> threads, so I was wondering if there was a good up to date tutorial
> etc. that someone could point me to.

Use AsyncTask!!!

> ps. In the past I've used AsyncTask but i don't think it will meet my
> requirements as the UI thread would need to maintain a timer to kick
> off an AsyncTask. Ideally I'd like to isolate these two parts of the
> application as much as possible.

IMHO, that's not a good justification to skip AsyncTask.

First, threads aren't usually really objects, insofar as "threads" don't
manage models -- objects do. The object that manages your local copy of
the remote data can have its timer (TimerTask, AlarmManager with a
service, Handler#postDelayed, etc.) and use AsyncTask for the actual
work once the timer triggers. You can use encapsulation to maintain your
isolation between the UI and the timer/thread object.

If you're fairly certain you will have a single activity, I would:

-- Create a class to handle your timer/thread work, plus the AsyncTask
implementation

-- Put a Handler object in your activity

-- Pass the Handler to the timer/thread object in its constructor, along
with whatever sorts of listeners you're going to use to notify the UI of
changed data

-- Call postDelayed() on the Handler, where the Runnable supplied to
postDelayed() schedules the next timer tick (via another call to
postDelayed()) and kicks off an AsyncTask to do the heavy lifting

-- 
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] [system crash : wifi and bluetooth]

2009-06-25 Thread Morris

Hi All:

When I open wifi and bluetooth, the system is workable. But when I
reboot the system and don't turn off either wifi or bluetooth before
rebooting, I find the system would be crash in the rebooting process.
However, It only happens on both wifi and bluetooth to be open.
Does somebody have any idea? The below is my error log.

*
02-07 22:59:47.160: DEBUG/BluetoothDeviceService(1309): found 0 bonded
devices
02-07 22:59:47.160: ERROR/ActivityManager(1309): Attempt to launch
receivers of broadcast intent Intent
{ action=android.bluetooth.intent.action.SCAN_MODE_CHANGED (has
extras) } before boot completion
02-07 22:59:47.160: WARN/dalvikvm(1309): threadid=43: thread exiting
with uncaught exception (group=0x4000fe70)
02-07 22:59:47.160: ERROR/AndroidRuntime(1309): Uncaught handler:
thread Thread-23 exiting due to uncaught exception
02-07 22:59:47.160: ERROR/AndroidRuntime(1309): *** EXCEPTION IN
SYSTEM PROCESS.  System will crash.
02-07 22:59:47.170: ERROR/AndroidRuntime(1309):
java.lang.IllegalStateException: Cannot broadcast before boot
completed
02-07 22:59:47.170: ERROR/AndroidRuntime(1309): at
com.android.server.am.ActivityManagerService.broadcastIntent
(ActivityManagerService.java:10224)
02-07 22:59:47.170: ERROR/AndroidRuntime(1309): at
android.app.ApplicationContext.sendBroadcast(ApplicationContext.java:
648)
02-07 22:59:47.170: ERROR/AndroidRuntime(1309): at
android.server.BluetoothEventLoop.onModeChanged
(BluetoothEventLoop.java:173)
02-07 22:59:47.170: ERROR/AndroidRuntime(1309): at
android.server.BluetoothDeviceService$EnableThread.run
(BluetoothDeviceService.java:285)
02-07 22:59:47.170: ERROR/AndroidRuntime(1309): Crash logging skipped,
no checkin service

--~--~-~--~~~---~--~~
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 the Xml response from the nusoap PHp web services

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

HI

i need to \get the response from the nusoap php web services (my
response is in XML format)

how can i do this any suggestions

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