[android-developers] Re: Dynamic insert code into an existing .apk

2008-10-01 Thread Shraddha

The code would be in the dex file in the apk.
If we can get a way to extract the classes out of dex or decompile
the .dex in an apk, we would probably be able to modify the code
inserted there.

I dont have information on decompiling or extracting classes out of
dex.

On Oct 1, 9:29 am, wiki <[EMAIL PROTECTED]> wrote:
> HI,
> I would like to know if we can add our own piece of code into any .apk
> dynamically?
> like we have JavaAssist tool to do that.
> does it work in this scenario as well.
> kindly suggest.
> -Wiki
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Maximum size of database

2008-10-01 Thread Yaseen

As far as my knowledge goes , the max size that can be set or used for
creating a database is 256mb.

On Oct 1, 1:06 am, Shraddha <[EMAIL PROTECTED]> wrote:
> I am considering two options of creating database and interested in
> knowing the maximum size that can be given to a database.
> 1. I see that SQLlite allows us to set the maximum size allowable for
> the database. Can this be set to the maximum available on the
> device  ?
> 2. What would be the maximum allowable size of database if I use
> content provider ?
>
> In other words, What is the max size a db can grow on thee Android
> device, can it cover the total available memory space of the app, or
> it has its own limit?
>
> Thanks for ur time.

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



[android-developers] What is google's official position on JNI ?

2008-10-01 Thread Ranjeet

Dear Android Dev Team,

My apologies if I am asking a question that's already been answered.
Unfortunately I haven't been able to find any documentation within
Android's reference that officially states Google's position on usage
of JNI/SharedObjects (written in C++ and compiled via a cross
compiler) from within Java ui code.  To clarify what I am trying to
accomplish, we are building an application with the user interface
completely written using the java/android classes/controls and it
would use the shared library thats written in C++. There is just so
much effort gone in to making that library that it would be a LOT of
effort on our side rewriting it in Java. The library connects to our
backend web server to fetch XML files over HTTP, stores some of the
information from it on disk in files, and exposes the features via
methods.

Is this currently "officially supported" in Android(I have seen hello
world C++ apps that run on the emulator with some security/chmod
tweaks).
Any information is sincerely appreciated.

Thanks,
-Ranjeet

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



[android-developers] Application for turning off mobile ?

2008-10-01 Thread Baonq86

Does anyone help me to built the application to turn off the Android
mobile or switch to silent mode in mobile? I don't see it in the
library android.os ! Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is google's official position on JNI ?

2008-10-01 Thread Volker Gropp

Hi Ranjeet,

although I'm not the Android Dev Team i can tell you what ive been
told last weeks about this topic: JNI is currently not supported in
SDK 1.0. The reason is not quite clear, some say cause it may not work
at all, or may break in the (near) future. Plus your app wont be
portable and needs special versions for every hw platform. Actually i
bet Android Dev Team will just tell you: "native libs and JNI is not
supported!".

On the other hand JNI is working and Android uses it internally a lot
[google talks]. But you may have problems to link against the stripped
down libc they are using, or may run into other problems you cannot
resolve. Plus please keep in mind there is no real solution to deploy
your app on real phones, because /system/lib is read only. You might
add your .so into the apk as a raw resource and extract it into your
app writable directory under /data. Loading the .so works for me using
System.load(). But this way the .so is stored on your phone in 2
locations, using a lot unnecessary space.

Currently for a real world app on real phones i would'nt use JNI and
native libs at all due to those problems. Either wait for JNI support
in future SDK versions or port your library to Java.

Regards
Volker

On Oct 1, 4:02 am, Ranjeet <[EMAIL PROTECTED]> wrote:
> Dear Android Dev Team,
>
> My apologies if I am asking a question that's already been answered.
> Unfortunately I haven't been able to find any documentation within
> Android's reference that officially states Google's position on usage
> of JNI/SharedObjects (written in C++ and compiled via a cross
> compiler) from within Java ui code.  To clarify what I am trying to
> accomplish, we are building an application with the user interface
> completely written using the java/android classes/controls and it
> would use the shared library thats written in C++. There is just so
> much effort gone in to making that library that it would be a LOT of
> effort on our side rewriting it in Java. The library connects to our
> backend web server to fetch XML files over HTTP, stores some of the
> information from it on disk in files, and exposes the features via
> methods.
>
> Is this currently "officially supported" in Android(I have seen hello
> world C++ apps that run on the emulator with some security/chmod
> tweaks).
> Any information is sincerely appreciated.
>
> Thanks,
> -Ranjeet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Call the default mediaplayer program in Android OS

2008-10-01 Thread Baonq86

Does anyone know to built an application to call the default
mediaplayer program in Android OS ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Alignment issue related to ListView

2008-10-01 Thread Sudha

thnaks
but no change !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is google's official position on JNI ?

2008-10-01 Thread Tauno T

Isn't it a little .. how do I say it.. unfair to tell us that JNI is
not supported at all and then use it in their own apps to make them
better and give them more features than are available to the rest of
the developers?

On Oct 1, 11:49 am, Volker Gropp <[EMAIL PROTECTED]> wrote:
> Hi Ranjeet,
>
> although I'm not the Android Dev Team i can tell you what ive been
> told last weeks about this topic: JNI is currently not supported in
> SDK 1.0. The reason is not quite clear, some say cause it may not work
> at all, or may break in the (near) future. Plus your app wont be
> portable and needs special versions for every hw platform. Actually i
> bet Android Dev Team will just tell you: "native libs and JNI is not
> supported!".
>
> On the other hand JNI is working and Android uses it internally a lot
> [google talks]. But you may have problems to link against the stripped
> down libc they are using, or may run into other problems you cannot
> resolve. Plus please keep in mind there is no real solution to deploy
> your app on real phones, because /system/lib is read only. You might
> add your .so into the apk as a raw resource and extract it into your
> app writable directory under /data. Loading the .so works for me using
> System.load(). But this way the .so is stored on your phone in 2
> locations, using a lot unnecessary space.
>
> Currently for a real world app on real phones i would'nt use JNI and
> native libs at all due to those problems. Either wait for JNI support
> in future SDK versions or port your library to Java.
>
> Regards
> Volker
>
> On Oct 1, 4:02 am, Ranjeet <[EMAIL PROTECTED]> wrote:
>
> > Dear Android Dev Team,
>
> > My apologies if I am asking a question that's already been answered.
> > Unfortunately I haven't been able to find any documentation within
> > Android's reference that officially states Google's position on usage
> > of JNI/SharedObjects (written in C++ and compiled via a cross
> > compiler) from within Java ui code.  To clarify what I am trying to
> > accomplish, we are building an application with the user interface
> > completely written using the java/android classes/controls and it
> > would use the shared library thats written in C++. There is just so
> > much effort gone in to making that library that it would be a LOT of
> > effort on our side rewriting it in Java. The library connects to our
> > backend web server to fetch XML files over HTTP, stores some of the
> > information from it on disk in files, and exposes the features via
> > methods.
>
> > Is this currently "officially supported" in Android(I have seen hello
> > world C++ apps that run on the emulator with some security/chmod
> > tweaks).
> > Any information is sincerely appreciated.
>
> > Thanks,
> > -Ranjeet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: I want to know a button's width before it is drawn on the screen! possible?

2008-10-01 Thread erkenbrandroid

Did it! Thanks Romain! :)

For other people having the same trouble, the trick is to use the
onWindowFocusChanged(boolean hasWindowFocus) class like in this
example :

public void onWindowFocusChanged(boolean hasWindowFocus) {

int maxButton; // I save the biggest button width in this variable

Button testButton = (Button)findViewById(R.id.test); // button 1
Button testButton2 = (Button)findViewById(R.id.test2); // button 2
Button testButton3 = (Button)findViewById(R.id.test3); // button 3

maxButton=testButton.getWidth(); // I put button 1's width into
maxButton
if(testButton2.getWidth() > maxButton) { // If button 2's width is
bigger
maxButton = testButton2.getWidth(); // maxButton gets button 2's width
testButton3.setText("Button 2 is bigger than button 1!");
}

else
testButton3.setText("Button 1 is bigger than button 2!");

}


On Sep 27, 12:12 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> You can use a ViewTreeObserver. Look at the documentation of the
> android.view.View class for more information.
>
> On Sep 26, 2008 10:42 AM, "erkenbrandroid" <[EMAIL PROTECTED]> wrote:
>
> Hello everyone!
>
> I need a bit of help for an app I am trying to develop.
>
> I've got a main screen with a couple of buttons on it.
>
> What I would like to do is get the width of those buttons before they
> are actually drawn on the screen. Their width is variable, as theyr
> are defined as "wrap_content" in my main.xml
>
> I tried to get the buttons' width in the methods onCreate() and
> onStart() but all I get is a 0 measure, obviously because their width
> can't be measured yet.
>
> Do you know a way to do that?
>
> this is an example of the code at the moment :
>
> public void onCreate(Bundle savedInstanceState) {
>
> int maxButton; // I save the biggest button width in this variable
>
> Button testButton = (Button)findViewById(R.id.test); // button 1
> Button testButton2 = (Button)findViewById(R.id.test2); // button 2
> Button testButton3 = (Button)findViewById(R.id.test3); // button 3
>
> maxButton=testButton.getWidth(); // I put button 1's width into
> maxButton
> if(testButton2.getWidth() > maxButton) { // If button 2's width is
> bigger
> maxButton = testButton2.getWidth(); // maxButton gets button 2's width
> testButton3.setText("Button 2 is bigger than button 1!");}
>
> else
> testButton3.setText("Button 1 is bigger than button 2!");
>
> }
>
> Thanks a lot,
> Erken
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is google's official position on JNI ?

2008-10-01 Thread Volker Gropp

Hi,

you may call it unfair of course. But please keep in mind, they did
not tell us that they use it in their apps. But they use it in their
API to delegate calls to native libs.

Regards
Volker

On Oct 1, 11:18 am, Tauno T <[EMAIL PROTECTED]> wrote:
> Isn't it a little .. how do I say it.. unfair to tell us that JNI is
> not supported at all and then use it in their own apps to make them
> better and give them more features than are available to the rest of
> the developers?
>
> On Oct 1, 11:49 am, Volker Gropp <[EMAIL PROTECTED]> wrote:
>
> > Hi Ranjeet,
>
> > although I'm not the Android Dev Team i can tell you what ive been
> > told last weeks about this topic: JNI is currently not supported in
> > SDK 1.0. The reason is not quite clear, some say cause it may not work
> > at all, or may break in the (near) future. Plus your app wont be
> > portable and needs special versions for every hw platform. Actually i
> > bet Android Dev Team will just tell you: "native libs and JNI is not
> > supported!".
>
> > On the other hand JNI is working and Android uses it internally a lot
> > [google talks]. But you may have problems to link against the stripped
> > down libc they are using, or may run into other problems you cannot
> > resolve. Plus please keep in mind there is no real solution to deploy
> > your app on real phones, because /system/lib is read only. You might
> > add your .so into the apk as a raw resource and extract it into your
> > app writable directory under /data. Loading the .so works for me using
> > System.load(). But this way the .so is stored on your phone in 2
> > locations, using a lot unnecessary space.
>
> > Currently for a real world app on real phones i would'nt use JNI and
> > native libs at all due to those problems. Either wait for JNI support
> > in future SDK versions or port your library to Java.
>
> > Regards
> > Volker
>
> > On Oct 1, 4:02 am, Ranjeet <[EMAIL PROTECTED]> wrote:
>
> > > Dear Android Dev Team,
>
> > > My apologies if I am asking a question that's already been answered.
> > > Unfortunately I haven't been able to find any documentation within
> > > Android's reference that officially states Google's position on usage
> > > of JNI/SharedObjects (written in C++ and compiled via a cross
> > > compiler) from within Java ui code.  To clarify what I am trying to
> > > accomplish, we are building an application with the user interface
> > > completely written using the java/android classes/controls and it
> > > would use the shared library thats written in C++. There is just so
> > > much effort gone in to making that library that it would be a LOT of
> > > effort on our side rewriting it in Java. The library connects to our
> > > backend web server to fetch XML files over HTTP, stores some of the
> > > information from it on disk in files, and exposes the features via
> > > methods.
>
> > > Is this currently "officially supported" in Android(I have seen hello
> > > world C++ apps that run on the emulator with some security/chmod
> > > tweaks).
> > > Any information is sincerely appreciated.
>
> > > Thanks,
> > > -Ranjeet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: I need help in http connection???

2008-10-01 Thread Charlie Collins

Pretty standard there too - see the java.net package:
http://code.google.com/android/reference/java/net/package-summary.html.

One thing to keep in mind is, if you are trying to connect to your
localhost for testing, say another process running locally - you have
to keep in mind that the emulator is running there too, so you can't
use "localhost" or "127.0.0.1."  Use the non loopback IP of your host
for that type testing.

Here is an older example I used in an Android app on m5 - probably
still works the same, nothing Android specific really in it, but I
haven't tried it in 0.9 or 1.0 lately:

private void callSocket(final String socketData) {

String address = "192.168.0.12";
int port = 8889;

Socket socket = null;
BufferedWriter writer = null;
BufferedReader reader = null;

try {
socket = new Socket(address, port);
writer = new BufferedWriter(new 
OutputStreamWriter(socket
.getOutputStream()));
reader = new BufferedReader(new InputStreamReader(socket
.getInputStream()));

// send input terminated with \n
String input = socketData;
writer.write(input + "\n", 0, input.length() + 1);
writer.flush();

// read back output
String output = reader.readLine();
Log.d(Constants.LOGTAG, " " + CLASSTAG + " output - " + 
output);
socketOutput.setText(output);

// send EXIT and close
writer.write("EXIT\n", 0, 5);
writer.flush();

} catch (IOException e) {
Log.e(Constants.LOGTAG, " " + CLASSTAG
+ " IOException calling socket", e);
} finally {
try {
writer.close();
} catch (IOException e) {
// swallow
}
try {
reader.close();
} catch (IOException e) {
// swallow
}
try {
socket.close();
} catch (IOException e) {
// swallow
}
}
}


On Sep 30, 12:16 pm, Wesley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> thanks for d reply.
>
> I have one more questions...
> Did anyone know how to make socket connection using androird
>
> wesley.
>
> On 9/30/08, Charlie Collins <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I replied with some info on this over at Anddev where it was also
> > asked - before I noticed this.
>
> >http://www.anddev.org/viewtopic.php?p=10646#10646
>
> > HTH
>
> > On Sep 30, 4:23 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> >> hi all,
>
> >> I not quite familiar with android... hoping I can get some answer
> >> here... thanks...
> >> I have two questions here...
>
> >> 1st Question
> >> ---
> >> How can I use android to call a url and get the inputStream to get the
> >> content of the pages???
>
> >> Code in J2me:-
> >> ---
> >>  connection = (HttpConnection) Connector.open(Info.DeviceInfo.URL + "?
> >> cmd=gses&userid=" + userSession);
> >>  connection.setRequestMethod(HttpConnection.GET);
>
> >> if (connection.getHeaderField("Set-Cookie") != null) {
> >>          cookie = connection.getHeaderField("Set-Cookie");
> >>   }
>
> >> DataInputStream dis = connection.openDataInputStream();
>
> >> int ch;
> >> String str = "";
>
> >> while ((ch = dis.read()) != -1) {
> >>          str += (char) ch;
>
> >> }
>
> >> 2nd Question
> >> 
> >> How can I get Stream Connection from a server using Android??
>
> >> Coding in J2me
> >> --
> >> connection=(StreamConnection)Connector.open(DeviceInfo.URL_CONNECTION);
>
> >> inpStream = connection.openInputStream();
> >> outStream = connection.openOutputStream();
>
> >> anyone have any example can show me???
>
> >> wesley.
>
> --
> Sent from Gmail for mobile | mobile.google.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is google's official position on JNI ?

2008-10-01 Thread Tauno T

Oh, sorry, I misunderstood you there :)

On Oct 1, 12:37 pm, Volker Gropp <[EMAIL PROTECTED]> wrote:
> Hi,
>
> you may call it unfair of course. But please keep in mind, they did
> not tell us that they use it in their apps. But they use it in their
> API to delegate calls to native libs.
>
> Regards
> Volker
>
> On Oct 1, 11:18 am, Tauno T <[EMAIL PROTECTED]> wrote:
>
> > Isn't it a little .. how do I say it.. unfair to tell us that JNI is
> > not supported at all and then use it in their own apps to make them
> > better and give them more features than are available to the rest of
> > the developers?
>
> > On Oct 1, 11:49 am, Volker Gropp <[EMAIL PROTECTED]> wrote:
>
> > > Hi Ranjeet,
>
> > > although I'm not the Android Dev Team i can tell you what ive been
> > > told last weeks about this topic: JNI is currently not supported in
> > > SDK 1.0. The reason is not quite clear, some say cause it may not work
> > > at all, or may break in the (near) future. Plus your app wont be
> > > portable and needs special versions for every hw platform. Actually i
> > > bet Android Dev Team will just tell you: "native libs and JNI is not
> > > supported!".
>
> > > On the other hand JNI is working and Android uses it internally a lot
> > > [google talks]. But you may have problems to link against the stripped
> > > down libc they are using, or may run into other problems you cannot
> > > resolve. Plus please keep in mind there is no real solution to deploy
> > > your app on real phones, because /system/lib is read only. You might
> > > add your .so into the apk as a raw resource and extract it into your
> > > app writable directory under /data. Loading the .so works for me using
> > > System.load(). But this way the .so is stored on your phone in 2
> > > locations, using a lot unnecessary space.
>
> > > Currently for a real world app on real phones i would'nt use JNI and
> > > native libs at all due to those problems. Either wait for JNI support
> > > in future SDK versions or port your library to Java.
>
> > > Regards
> > > Volker
>
> > > On Oct 1, 4:02 am, Ranjeet <[EMAIL PROTECTED]> wrote:
>
> > > > Dear Android Dev Team,
>
> > > > My apologies if I am asking a question that's already been answered.
> > > > Unfortunately I haven't been able to find any documentation within
> > > > Android's reference that officially states Google's position on usage
> > > > of JNI/SharedObjects (written in C++ and compiled via a cross
> > > > compiler) from within Java ui code.  To clarify what I am trying to
> > > > accomplish, we are building an application with the user interface
> > > > completely written using the java/android classes/controls and it
> > > > would use the shared library thats written in C++. There is just so
> > > > much effort gone in to making that library that it would be a LOT of
> > > > effort on our side rewriting it in Java. The library connects to our
> > > > backend web server to fetch XML files over HTTP, stores some of the
> > > > information from it on disk in files, and exposes the features via
> > > > methods.
>
> > > > Is this currently "officially supported" in Android(I have seen hello
> > > > world C++ apps that run on the emulator with some security/chmod
> > > > tweaks).
> > > > Any information is sincerely appreciated.
>
> > > > Thanks,
> > > > -Ranjeet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is google's official position on JNI ?

2008-10-01 Thread MrSnowflake

I believe JNI is not supported for developers, because 1: It would
require developers to build libs for every different android platform
out and 2: While Google (probably) uses JNI, they can just change the
JNI interface and fix their code, but say if you JNI able program
works on SDK 1.0r1 and then suddenly, when r2 gets released (and
Google changed the JNI) your program wouldn't work anymore. This is
something google really wants to avoid.

On 1 okt, 11:42, Tauno T <[EMAIL PROTECTED]> wrote:
> Oh, sorry, I misunderstood you there :)
>
> On Oct 1, 12:37 pm, Volker Gropp <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > you may call it unfair of course. But please keep in mind, they did
> > not tell us that they use it in their apps. But they use it in their
> > API to delegate calls to native libs.
>
> > Regards
> > Volker
>
> > On Oct 1, 11:18 am, Tauno T <[EMAIL PROTECTED]> wrote:
>
> > > Isn't it a little .. how do I say it.. unfair to tell us that JNI is
> > > not supported at all and then use it in their own apps to make them
> > > better and give them more features than are available to the rest of
> > > the developers?
>
> > > On Oct 1, 11:49 am, Volker Gropp <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Ranjeet,
>
> > > > although I'm not the Android Dev Team i can tell you what ive been
> > > > told last weeks about this topic: JNI is currently not supported in
> > > > SDK 1.0. The reason is not quite clear, some say cause it may not work
> > > > at all, or may break in the (near) future. Plus your app wont be
> > > > portable and needs special versions for every hw platform. Actually i
> > > > bet Android Dev Team will just tell you: "native libs and JNI is not
> > > > supported!".
>
> > > > On the other hand JNI is working and Android uses it internally a lot
> > > > [google talks]. But you may have problems to link against the stripped
> > > > down libc they are using, or may run into other problems you cannot
> > > > resolve. Plus please keep in mind there is no real solution to deploy
> > > > your app on real phones, because /system/lib is read only. You might
> > > > add your .so into the apk as a raw resource and extract it into your
> > > > app writable directory under /data. Loading the .so works for me using
> > > > System.load(). But this way the .so is stored on your phone in 2
> > > > locations, using a lot unnecessary space.
>
> > > > Currently for a real world app on real phones i would'nt use JNI and
> > > > native libs at all due to those problems. Either wait for JNI support
> > > > in future SDK versions or port your library to Java.
>
> > > > Regards
> > > > Volker
>
> > > > On Oct 1, 4:02 am, Ranjeet <[EMAIL PROTECTED]> wrote:
>
> > > > > Dear Android Dev Team,
>
> > > > > My apologies if I am asking a question that's already been answered.
> > > > > Unfortunately I haven't been able to find any documentation within
> > > > > Android's reference that officially states Google's position on usage
> > > > > of JNI/SharedObjects (written in C++ and compiled via a cross
> > > > > compiler) from within Java ui code.  To clarify what I am trying to
> > > > > accomplish, we are building an application with the user interface
> > > > > completely written using the java/android classes/controls and it
> > > > > would use the shared library thats written in C++. There is just so
> > > > > much effort gone in to making that library that it would be a LOT of
> > > > > effort on our side rewriting it in Java. The library connects to our
> > > > > backend web server to fetch XML files over HTTP, stores some of the
> > > > > information from it on disk in files, and exposes the features via
> > > > > methods.
>
> > > > > Is this currently "officially supported" in Android(I have seen hello
> > > > > world C++ apps that run on the emulator with some security/chmod
> > > > > tweaks).
> > > > > Any information is sincerely appreciated.
>
> > > > > Thanks,
> > > > > -Ranjeet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Call the default mediaplayer program in Android OS

2008-10-01 Thread MrSnowflake

I recon your could fire an Intent with VIEW and set the mime type to
your video file.

On 1 okt, 11:03, Baonq86 <[EMAIL PROTECTED]> wrote:
> Does anyone know to built an application to call the default
> mediaplayer program in Android OS ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application for turning off mobile ?

2008-10-01 Thread MrSnowflake

What is your aim? I've written a simple service and config tool which
switches your device to silent when you put it upside down in your
pants:
http://code.google.com/p/snowservices/wiki/GravityRinger

To silence your device use:
[code]
AudioManager audioMgr =
(AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioMgr.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
[/code]
actually this puts the phone in Vibrate, but there is a silent const
in AudioManager.

On 1 okt, 10:27, Baonq86 <[EMAIL PROTECTED]> wrote:
> Does anyone help me to built the application to turn off the Android
> mobile or switch to silent mode in mobile? I don't see it in the
> library android.os ! Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to disable the "back " key for the phone

2008-10-01 Thread MrSnowflake



On 1 okt, 04:06, hackbod <[EMAIL PROTECTED]> wrote:
> But keep in mind that the user can still get out of your application
> with the HOME key, and there is absolutely no way for you to prevent
> that.
That seems to be true, but there is const: KeyEvent.KEYCODE_HOME. I
have tried anything with this yet, but why is it there if it isn't
doing anything? Just to make it possible to find out the user pressed
home to finish() the activity?
>
> On Sep 30, 1:01 pm, plusminus <[EMAIL PROTECTED]> wrote:
>
> > overwrite onKeyDown of your Activity and put a case
> > KeyEvent.KEYCODE_BACK to a switch for the keycode-parameter. Return
> > true in that case.
>
> > Regards, plusminus
> > # anddev.org | Worlds largest Android Community
>
> > On Sep 30, 1:58 pm, april <[EMAIL PROTECTED]> wrote:
>
> > > My application needs to send several request to server. I don't want
> > > user to click "back" key of the phone during  sending process.
>
> > > Is there any way I can block it ?
>
> > > If application is doing something, user click "back", what is the life
> > > cycle of activity it would be?
>
> > > Thanks!
>
> > > April
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: when will android support/have Speech Recognition System??

2008-10-01 Thread MrSnowflake

I believe someone was working on such a library, but I've read it a
couple months ago, so I'm not sure how it was called.

On 30 sep, 03:51, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> hi,
>
> when will android support/have Speech Recognition System??
> anyone have any ideas???
>
> Wesley.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Maximum size of database

2008-10-01 Thread Shraddha

Thanks.
Additionally, what if the size of my database grows beyond the memory
specified? Will it automatically increase to accommodate increased
space requirement ?


On Oct 1, 11:50 am, hackbod <[EMAIL PROTECTED]> wrote:
> There is no limit on the size of the database, except for available
> storage.
>
> On Sep 30, 11:06 pm, Shraddha <[EMAIL PROTECTED]> wrote:
>
> > I am considering two options of creating database and interested in
> > knowing the maximum size that can be given to a database.
> > 1. I see that SQLlite allows us to set the maximum size allowable for
> > the database. Can this be set to the maximum available on the
> > device  ?
> > 2. What would be the maximum allowable size of database if I use
> > content provider ?
>
> > In other words, What is the max size a db can grow on thee Android
> > device, can it cover the total available memory space of the app, or
> > it has its own limit?
>
> > Thanks for ur time.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Download image from server

2008-10-01 Thread Nemat

Hi,

I have to download an image from server.But I got an error "D/skia
( 197): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x
0x%02x"

I have to perform two continues Http connection.First is used to get
server response and second to get image from the server.First task is
performed correctly but while downloading image I got the given
eror.So the problem in getting image from server.

My code is:
Code:

public ImageView getView(String myImageURL) {
   Log.i("TAG","downloadFile00"+myImageURL);
ImageView i = new ImageView(this);

try {
/* Open a new URL and get the InputStream to load data
from it. */
URL aURL = new URL(myImageURL);
URLConnection conn = aURL.openConnection();
 
Log.i("TAG","downloadFile111"+myImageURL);
conn.connect();
InputStream is = conn.getInputStream();
 
Log.i("TAG","downloadFile22"+is.read());
/* Buffered is always good for a performance plus. */
BufferedInputStream bis = new BufferedInputStream(is);
 
Log.i("TAG","downloadFile="+bis.read());
/* Decode url-data to a bitmap. */
   // Bitmap bm = BitmapFactory.decodeStream(bis);
Bitmap bm = BitmapFactory.decodeStream(is);
   //
Log.i("TAG","downloadFile444"+bm.getHeight());
   // bis.close();
is.close();
/* Apply the Bitmap to the ImageView that will be
returned. */
i.setImageBitmap(bm);
Log.i("TAG","downloadFile5");
   } catch (IOException e) {
  Log.i("TAG","downloadFile");
Log.e("DEBUGTAG", "Remtoe Image Exception", e);
   }

/* Image should be scaled as width/height are set. */
   // i.setScaleType(ImageView.ScaleType.FIT_CENTER);
/* Set the Width/Height of the ImageView. */

return i;
}


This code works fine when I performed this task alone in another
project.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Maximum size of database

2008-10-01 Thread Ludwig
The call to setMaximumSize(size) restricts the DB to that size, it is not a
function to preallocate or reserve that space. If you get to the maximum
size you will get an error that the DB is full.In the course of normal
action you do not need to set the maximum size, it will just grow with the
data.

However, while the theoretical limits of SQLite should be in the region of
2/4 GB, in practice you will have problems processing that size of data on a
mobile device. Even on real computers people tend to use real DB systems for
anything larger than, say, 100MB, and most users would not be happy if you
chomped away on a million rows in a table.

Ludwig

2008/10/1 Shraddha <[EMAIL PROTECTED]>

>
> Thanks.
> Additionally, what if the size of my database grows beyond the memory
> specified? Will it automatically increase to accommodate increased
> space requirement ?
>
>
> On Oct 1, 11:50 am, hackbod <[EMAIL PROTECTED]> wrote:
> > There is no limit on the size of the database, except for available
> > storage.
> >
> > On Sep 30, 11:06 pm, Shraddha <[EMAIL PROTECTED]> wrote:
> >
> > > I am considering two options of creating database and interested in
> > > knowing the maximum size that can be given to a database.
> > > 1. I see that SQLlite allows us to set the maximum size allowable for
> > > the database. Can this be set to the maximum available on the
> > > device  ?
> > > 2. What would be the maximum allowable size of database if I use
> > > content provider ?
> >
> > > In other words, What is the max size a db can grow on thee Android
> > > device, can it cover the total available memory space of the app, or
> > > it has its own limit?
> >
> > > Thanks for ur time.
> >
>

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



[android-developers] Re: Bitmap on sdcard & decodestream

2008-10-01 Thread Guillaume Perrot

No comment :p

On Sep 30, 6:48 pm, Matteo Crippa <[EMAIL PROTECTED]> wrote:
> Thanks Romain, you are right!
> I totally forgot to init it... and it was driving me crazy :(
>
> On 30 Set, 18:24, "Romain Guy" <[EMAIL PROTECTED]> wrote:
>
> > The fix is simple, initialize you array photos. In the bug report you
> > filed, the array itself is null. The Bitmap returned by BitmapFactory
> > is not.
>
> > On Tue, Sep 30, 2008 at 2:17 AM, Matteo Crippa <[EMAIL PROTECTED]> wrote:
>
> > > Easy i was playing with a little app i'm developing but i've just
> > > found a little problem... let's explain me it...
>
> > > I created a sdcard and inside it I placed some jpg files.
>
> > > So my data path is something like:
>
> > > /sdcard/app/img/1.jpg
> > > /sdcard/app/img/2.jpg
> > > /sdcard/app/img/3.jpg
> > > /sdcard/app/img/4.jpg
> > > [...]
> > > /sdcard/app/img/n.jpg
>
> > > Now I want to create a gallery app to show out these files, I looked
> > > at demo srcs by android sdk, but they always use imgs from
> > > resources...
>
> > > I decided to try using Bitmapfactory.decodeFile and also
> > > Bitmapfactory.decodestream but both seems not to work fine returning a
> > > NullPointerException
>
> > > Here you are a little snippet of my app:
>
> > > Java:
>
> > > for(int i=0;i > >               {
> > >                    Log.d(""+i,"/sdcard/app/img/"+imgsTokens[i]
> > > +".jpg");
> > >                    try
> > >                    {
> > >                         FileInputStream is = new FileInputStream(new
> > > File("/sdcard/app/img/"+imgsTokens[i]+".jpg"));
> > >                         BufferedInputStream bis = new
> > > BufferedInputStream(is);
> > >                         photos[i] = BitmapFactory.decodeStream(is);
> > >                         bis.close();
> > >                         is.close();
>
> > >                         //photos[i] = BitmapFactory.decodeFile("/
> > > sdcard/app/img/"+imgsTokens[i]+".jpg");
> > >                    }
> > >                    catch(Exception e)
> > >                    {
> > >                         e.printStackTrace();
> > >                    }
> > >               }
>
> > > any idea how to fix?
>
> > --
> > Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to disable the "back " key for the phone

2008-10-01 Thread Guillaume Perrot

If you want to finish an activity when pressing HOME, you can achieve
this with the manifest flag: finishOnTaskLaunch = true (you should
also look at allowTaskReparenting if you use task affinities).

On Oct 1, 12:01 pm, MrSnowflake <[EMAIL PROTECTED]> wrote:
> On 1 okt, 04:06, hackbod <[EMAIL PROTECTED]> wrote:> But keep in mind that 
> the user can still get out of your application
> > with the HOME key, and there is absolutely no way for you to prevent
> > that.
>
> That seems to be true, but there is const: KeyEvent.KEYCODE_HOME. I
> have tried anything with this yet, but why is it there if it isn't
> doing anything? Just to make it possible to find out the user pressed
> home to finish() the activity?
>
>
>
> > On Sep 30, 1:01 pm, plusminus <[EMAIL PROTECTED]> wrote:
>
> > > overwrite onKeyDown of your Activity and put a case
> > > KeyEvent.KEYCODE_BACK to a switch for the keycode-parameter. Return
> > > true in that case.
>
> > > Regards, plusminus
> > > # anddev.org | Worlds largest Android Community
>
> > > On Sep 30, 1:58 pm, april <[EMAIL PROTECTED]> wrote:
>
> > > > My application needs to send several request to server. I don't want
> > > > user to click "back" key of the phone during  sending process.
>
> > > > Is there any way I can block it ?
>
> > > > If application is doing something, user click "back", what is the life
> > > > cycle of activity it would be?
>
> > > > Thanks!
>
> > > > April
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mock Location Providers in 1.0

2008-10-01 Thread Sidhartha

Hi Cristina,

I could not get the code you have used working for my case.
Could you also share the manifest file?

Cheers,
Sidhartha

On Sep 26, 12:25 pm, Cristina <[EMAIL PROTECTED]> wrote:
> Just one thing I forgot...KML still does not work for me, but GPX and
> Manual work OK...and by now that is enough for me to do some tests...
>
> On Sep 26, 9:19 am, Cristina <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yes, I have just found the problem!
>
> > The problem is the regional configuration, I mean the configuration of
> > the language, date format and so on (Sorry, but I do not know if that
> > is the name in english... but I hope you understand me)
>
> > I am from Spain, so my XP was configured with "es_ES" properties...
> > (for example,locationnumbers was written with "," instead of "."...)
> > I have changed my regional configuration into us_US and nowDDMS
> >locationtools work for me ...
>
> > So the problem is thatDDMStool works only for english (us)
> > configuration...
>
> > On Sep 26, 1:06 am, xtrawurst <[EMAIL PROTECTED]> wrote:
>
> > > Could that issue be solved yet? I could not receive anything fromDDMS
> > > as well.
>
> > > On Sep 25, 9:22 am, Cristina <[EMAIL PROTECTED]> wrote:
>
> > > > I have downloaded some gpx files from this 
> > > > webhttp://tramper.co.nz/?view=browsegpxFiles
>
> > > > So.DDMSlocationtool loads them ok..I am able to se both the points
> > > > and the track...and when I pressed the button "play" it seems that is
> > > > processing the file...but my test application doesnotreceive
> > > > anything.
>
> > > > Ludwig, can you please write in this thread a brief example of a GPX
> > > > file that works for you? Maybe the problem is related with the gpx I
> > > > have downloaded
>
> > > > I include also some of my test code, maybe there is somthing I have
> > > > misssed
>
> > > > By the way, I am running on Windows XP SP2 ...
>
> > > > Thanks in advance
>
> > > > public class LocationTest extends MapActivity implements
> > > > LocationListener {
>
> > > >         private LocationManager mLocationManager= null;
> > > >         private LocationProvider mLocationProvider = null;
> > > >         private MapView mMapView = null;
>
> > > >     /** Called when the activity is first created. */
> > > >     @Override
> > > >     public void onCreate(Bundle savedInstanceState) {
> > > >         super.onCreate(savedInstanceState);
>
> > > >         mLocationManager =
> > > > (LocationManager)getSystemService(Context.LOCATION_SERVICE);
> > > >         Criteria criteria = new Criteria ();
> > > >         criteria.setAccuracy(Criteria.ACCURACY_FINE);
> > > >         List providerIds
> > > > =mLocationManager.getProviders(criteria, true);
> > > >         if (!providerIds.isEmpty()) {
> > > >                 mLocationProvider =
> > > > mLocationManager.getProvider(providerIds.get(0));
> > > >         }
>
> > > >         mMapView = new MapView(this, "tid");
> > > >         mMapView.getController().setZoom(20);
> > > >         setContentView(mMapView);
>
> > > >         MyLocationOverlay myLocationOverlay = new MyLocationOverlay
> > > > (this, mMapView);
> > > >         mMapView.getOverlays().add (myLocationOverlay);
> > > >         myLocationOverlay.enableMyLocation();
>
> > > >         // Para que si me muevo mire constantemente la localizacion
>
> > > > mLocationManager.requestLocationUpdates(mLocationProvider.getName(),
> > > > 0, 0, this);
> > > >     }
>
> > > >     [EMAIL PROTECTED]
> > > >     protected boolean isRouteDisplayed() {
> > > >            return false;
> > > >     }
>
> > > >      public void  onLocationChanged(Locationlocation) {
> > > >             updateView(location);
> > > >      }
>
> > > >      public void  onProviderDisabled(String provider) {
> > > >      }
> > > >      public void  onProviderEnabled(String provider) {
> > > >      }
> > > >      public void  onStatusChanged(String provider, int status, Bundle
> > > > extras) {
> > > >      }
> > > >      private void updateView (Locationlocation) {
> > > >           Double lat =location.getLatitude()*1E6;
> > > >           Double lng =location.getLongitude()*1E6;
> > > >           GeoPoint point = new GeoPoint(lat.intValue(),
> > > > lng.intValue());
> > > >           mMapView.getController().setCenter(point);
> > > >     }
>
> > > > }
>
> > > > On 24 sep, 18:06, Ludwig <[EMAIL PROTECTED]> wrote:
>
> > > > > I donothave a problem playing GPX files fromDDMSand my code continues 
> > > > > to
> > > > > work ok with 1.0.
> > > > > The only change required was to remove the calls to the two methods 
> > > > > you
> > > > > mention when subscribing tolocationupdates.
>
> > > > > (I am running on Vista, just in case this is a platform issue)
>
> > > > > Ludwig
>
> > > > > 2008/9/24 Cristina <[EMAIL PROTECTED]>
>
> > > > > > Hi!
>
> > > > > > I have downloaded SDK 1.0 this morning, so I have tried to migrate
> > > > > > some code I have to this version.
> > > > > > When trying to migrate MockLocationProvider Ifoundthat som

[android-developers] Issue with plotting my location on Maps

2008-10-01 Thread Sidhartha

Hi Android Champs!!!

I am currently facing an issue with my android application. The
application when executed displays a static map of north and south
america. I have created a menu option for displaying my current
location. When someone clicks on the menu "My Location" it executes a
method to display the current location. I have modified nader's NMaps2
application to handle this situation. I have written the
implementation for handling locations in the method
"displayMyLocation". I using the DDMS to manually set the location
coordinates. But when i pass the location and click at the menu, it
goes into an infinite loop. I would appreciate your help in fixing up
this code. The code i am using is as follows :


package com.android.ibsp.gps_isu;

import java.lang.ref.WeakReference;
import java.util.List;

import android.content.Context;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.net.NetworkConnectivityListener;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.google.android.maps.MapActivity;
import com.google.common.android.AndroidConfig;
import com.google.googlenav.map.Map;
import com.google.googlenav.map.TrafficService;
import com.google.map.MapPoint;

public class IBSPApplication extends MapActivity implements
LocationListener
{
private LocationManager mLocationManager= null;
private LocationProvider mLocationProvider = null;


public IBSPApplication()
{
mMap = null;
}

void setupMapView(com.android.ibsp.gps_isu.MapView mapView)
{
if(mMapView != null)
{
throw new IllegalStateException("You are only allowed to
have a single MapView in a MapActivity");
} else
{
mDataRequestDispatcher.setProperty("key", mapView.mKey);
mMapView = mapView;
mMapView.setup(mMap, mTrafficService,
mDataRequestDispatcher);
return;
}
}

protected void onCreate(android.os.Bundle icicle)
{
super.onCreate(icicle);
mNetworkWatcher = new NetworkConnectivityListener();
mNetworkWatcher.registerHandler(mNetworkHandler, 0);
mConfig = new AndroidConfig(this);
com.google.common.Config.setConfig(mConfig);
com.google.common.graphics.android.AndroidImage.mapResource("/
loading_tile.png", 0x108015f);
com.google.common.graphics.android.AndroidImage.mapResource("/
blank_tile.png", 0x10800a2);
com.google.common.graphics.android.AndroidImage.mapResource("/
no_tile_128.png", 0x108016f);
createMap();

LinearLayout zoomLayout = new LinearLayout(this);

mMapView = new MapView(this, "IBSP");
mMapView.setClickable(true);
mMapView.setEnabled(true);

mMapView.addView(zoomLayout, new
ViewGroup.LayoutParams(com.android.ibsp.gps_isu.MapView.LayoutParams.FILL_PARENT,
 
com.android.ibsp.gps_isu.MapView.LayoutParams.WRAP_CONTENT));
zoomLayout.addView(mMapView.getZoomControls(),
new
ViewGroup.LayoutParams(com.android.ibsp.gps_isu.MapView.LayoutParams.WRAP_CONTENT,
 
com.android.ibsp.gps_isu.MapView.LayoutParams.WRAP_CONTENT));

setContentView(mMapView);
}

protected void onResume()
{
super.onResume();
mTrafficService.start();
mDataRequestDispatcher.start();
mNetworkWatcher.startListening(this);
mMap.resume();
}

protected void onPause()
{
super.onPause();
if(sActivityReference.get() == this)
{
mTrafficService.stop();
mMap.pause();
mDataRequestDispatcher.stop();
mNetworkWatcher.stopListening();
mMap.saveState();
mConfig.getPersistentStore().savePreferences();
} else
{
android.util.Log.d("IBSP Application: ", (new
StringBuilder()).append("onPause leaving the lights on for
").append(sActivityReference.get()).toString());
}
}

protected void onDestroy()
{
super.onDestroy();
if(sActivityReference.get() == this)
{
mNetworkWatcher.unregisterHandler(mNetworkHandler);
mNetworkWatcher = null;
mTrafficService.close();
mMap.close(false);
} else
{
android.util.Log.d("IBSP Application: ", (new
StringBuilder()).append("onDestroy leaving the lights on for
").append(sActivityReference.get()).toString());
}
mConfig.getConnectionFactory().close();
}

private void createMap()
{
mDataRequestDispatcher =
com.google.common.DataRequestDispatcher.getInstance();
if(mDataRequestDispatcher != null)
{
android.util.Log.w("IBSP Applica

[android-developers] Re: How to use my custom library apk file in other applications.

2008-10-01 Thread Guillaume Perrot

There is maybe some workarounds though:
* You can provide intents which will be caught by some
BroadcastReceiver which will set the result that you can retrieve if
you used Activity.sendOrderedBroadcast, though I never tested this
function.
* You can provide a service with an aidl interface file you'll have to
share. The trick is that if your function paremeters are not
primitive, you'll have to convert them to remote interfaces as well.
Parcelable parameters will not be possible unless you share the java
files for these classes

On Oct 1, 4:07 am, hackbod <[EMAIL PROTECTED]> wrote:
> Sorry, third party shared libraries are not supported in 1.0.
>
> On Sep 30, 9:06 am, Ashutosh <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have my own custom library apk file (say lib.apk) & i want make it
> > available to other applications.
> > How to provide the uses-library in the android manifest.xml file in
> > other apps so as to use my custom library.
>
> > Kindly suggest if any one has worked on this topic.
>
> > Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ServiceState

2008-10-01 Thread e

hi all,
can anyone tel me how to use ServiceState???


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



[android-developers] Re: Barcodes

2008-10-01 Thread MrSnowflake

I do not have any experience with other barcode reading libraries, but
I suppose the zxing is one of the most robust and open source
libraries around. With a lot of supported platforms.

On 30 sep, 16:41, Peli <[EMAIL PROTECTED]> wrote:
> > zxing is a barcode (amongst others) reader.
>
> Actually there are not so many barcode readers for Android. The top-50
> winning apps that read barcode were all using the ZXing library made
> by Google employees.
>
> The only independent barcode reader for Android that I know
> (Moseycode:http://www.tomgibara.com/android/moseycode/releases/0.2.1/
> ) didn't make it into the top 50, although it really had cool features
> (like finding the 3D position of a Moseycode in space in real time).
>
> Peli
>
> On Sep 30, 4:10 pm, MrSnowflake <[EMAIL PROTECTED]> wrote:
>
> >http://code.google.com/p/zxing/isa barcode (amongst others) reader.
> > It is opensource and has a android client.
>
> > On 30 sep, 01:50, Peli <[EMAIL PROTECTED]> wrote:
>
> > > If you look at the OpenIntents list of 
> > > applicationshttp://www.openintents.org/en/applications
> > > you will find ZXing which is a multi-format 1D/2D barcode reader.
>
> > > You can simply start it as an intents, and get the read-out values
> > > back.
>
> > > Peliwww.openintents.org
>
> > > On 29 Sep., 21:02, "Brad Gies" <[EMAIL PROTECTED]> wrote:
>
> > > > I know other people have been working on reading barcodes from Android.
> > > > Specifically, reading a barcode from an image taken from the phone's 
> > > > camera.
>
> > > > Does anyone know if someone has released their code as open source? I 
> > > > know
> > > > there are several Java libraries that have the code, and I can write it/
> > > > port it to Android, but don't see the need to do it if someone else has
> > > > already done and released the code.
>
> > > > Anyone know of any links they can pass to me?
>
> > > > Sincerely,
>
> > > > Brad Gies
>
> > > > -
>
> > > > Brad Gies
>
> > > > 27415 Greenfield Rd, # 2,
>
> > > > Southfield, MI, USA
>
> > > > 48076
>
> > > > -
>
> > > > Moderation in everything, including abstinence
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Call the default mediaplayer program in Android OS

2008-10-01 Thread Baonq86

I can built my own mediaplayer but I want call the default mediaplayer
program in Android OS. Can anyone help me ?

On Oct 1, 4:58 pm, MrSnowflake <[EMAIL PROTECTED]> wrote:
> I recon your could fire an Intent with VIEW and set the mime type to
> your video file.
>
> On 1 okt, 11:03, Baonq86 <[EMAIL PROTECTED]> wrote:
>
> > Does anyone know to built an application to call the default
> > mediaplayer program in Android OS ?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SAXParser reports different name on SDK 0.9 from SDK 1.0

2008-10-01 Thread Charlie Collins

I think you guys are both saying the same thing, maybe?  Unless I
misunderstand, Chris says he is using & which is the ESCAPED
ampersand, and Brad is saying to make sure you use the entities to
escape special chars. I think we all agree you should use valid XML,
or it will cause issues - but the real problem is more the parser
behaving differently from 0.9 to 1.0 and the fact that you can't seem
to set the namespace/namespace-prefix features (so that qName and
localName end up meaning what they are supposed to mean).

Now if you are using the correct entity in your XML and it blows up,
then that's a different/separate issue?

On Sep 30, 11:51 pm, "Brad Gies" <[EMAIL PROTECTED]> wrote:
> Chris,
>
> What you described doesn't seem like the proper behavior even for the XML
> special characters. But, I have to admit that I'm just getting into Unicode,
> so I don't know exactly what should happen. It does seem to me that if you
> are using the ampersand character and it's not in one of the sections it's
> allowed in, it should fail if it's not escaped.
>
> Did it work when the ampersand was escaped? If so, then that's the solution.
> I send a lot of XML files and I know I have to parse a lot of the data to
> remove any special characters but I don't use Unicode.
>
> Sorry I can't be of more help :(
>
> Sincerely,
>
> Brad Gies
>
> -
> Brad Gies
> 27415 Greenfield Rd, # 2,
> Southfield, MI, USA
> 48076www.bgies.com www.truckerphone.comwww.EDI-Easy.com www.pricebunny.com
> -
>
> Moderation in everything, including abstinence
>
> -Original Message-
> From: android-developers@googlegroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Chris Cicc
> Sent: Tuesday, September 30, 2008 10:10 AM
> To: Android Developers
> Subject: [android-developers] Re: SAXParser reports diffeernt qName on SDK
> 0.9 from SDK 1.0
>
> Hey Brad,
> Just to be sure I tested it out and manually typed in "&" into the
> source for the web service. I didn't expect this to work, because even
> manually typing it in still leads to each character being encoded.
>
> In the quote you provided it says "they MUST be escaped using either
> numeric character references...". UTF-8 (and all unicode) encoding
> does just that :) The '&' is number 38.
>
> On the other hand, I also tested the bracket characters < and >. Both
> cause the same issue as the & character. Other brackets such as [ and
> { and ( do not cause issue.
>
> So clearly this does have something to do with the SAXParser in
> Android handling the special XML characters. I have never used
> SAXParser outside of Android so I cannot say whether or not it is any
> different. But I can confirm that this did not happen in 0.9 and I am
> 99% confident it should not be happening at all.
>
> Thanks,
> Chris
>
> On Sep 29, 9:10 pm, "Brad Gies" <[EMAIL PROTECTED]> wrote:
> > Chris,
>
> > Well sure... UTF-8 can represent the ampersand character, but the
> > ampersand is a Reserved character in XML.
>
> > Below is a paragraph from the XML spec :
>
> >http://www.w3.org/TR/REC-xml/
>
> > "The ampersand character (&) and the left angle bracket (<) MUST NOT
> appear
> > in their literal form, except when used as markup delimiters, or within a
> > comment, a processing instruction, or a CDATA section. If they are needed
> > elsewhere, they MUST be escaped using either numeric character references
> or
> > the strings "&" and "<" respectively. The right angle bracket (>)
> may
> > be represented using the string ">", and MUST, for compatibility, be
> > escaped using either ">" or a character reference when it appears in
> the
> > string "]]>" in content, when that string is not marking the end of a
> CDATA
> > section."
>
> > Sincerely,
>
> > Brad Gies
>
> > -
> > Brad Gies
> > 27415 Greenfield Rd, # 2,
> > Southfield, MI, USA
> > 48076www.bgies.com www.truckerphone.comwww.EDI-Easy.com www.EDI-Simple.com
> > -
>
> > Moderation in everything, including abstinence
>
> > -Original Message-
> > From: android-developers@googlegroups.com
>
> > [mailto:[EMAIL PROTECTED] On Behalf Of Chris Cicc
> > Sent: Monday, September 29, 2008 8:47 PM
> > To: Android Developers
> > Subject: [android-developers] Re: SAXParser reports diffeernt qName on SDK
> > 0.9 from SDK 1.0
>
> > Hey Brad,
> > As far as I know it doesn't have to be escaped if it's unicode
> > encoded. In this case, the XML is coming from a .Net Web Service,
> > which is encoded in UTF-8.
>
> > Also, we aren't comparing two different parsers, but rather the old
> > and new version of the SAXParser with unmodified code.
>
> > -chris
>
> > On Sep 29, 5:30 pm, "Brad Gies" <[EMAIL PROTECTED]> wrote:
> > > Shouldn't the '&' character be escaped if you are going to use it in
> XML?
>
> > > The SAX 

[android-developers] Re: WebView loadData limitations

2008-10-01 Thread Mark Murphy

schmielson wrote:
> As it turns out, the android:layout_height="wrap_content" used along
> with android:layout_weight="1" of the WebView was preventing the
> WebView from properly receiving events!  After changing the WebView's
> layout_height attribute to "0px" instead of "wrap_content",
> shouldOverrideUrlLoading is being called and things work like a
> charm.  This bug was particularly insidious, however, since I never
> would have expected that these attributes would have altered the
> view's ability to process clicks/touches in this way.

That is definitely strange. There might be a method to the madness 
there, but off the cuff, I don't see it.

> Do you think this is an SDK bug or a documentation bug?

Ummm...yes. ;-)

In other words, it depends a little on why it's not working. The fact 
that you not only see the WebView, but can interact with it, suggests to 
me it's an SDK bug. However, one man's SDK bug can be an Android team 
member's documentation bug, if this is somehow expected behavior.

I do recommend filing a bug, though, just to get this in the queue to 
get looked at.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] SoundRecordingDemo in v1.0

2008-10-01 Thread Guillaume Perrot

I found SoundRecordingDemo in the mailing list files.
I tried this because I try to record a sound in one of my
activities...
First I had to add the RECORD_AUDIO permission in order not to have an
error message.
Regarding the code, the media scanner should be launched after
recording, but I had to do this myself (in dev tools application) in
order to see the new file in the music application.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Activities Refactoring

2008-10-01 Thread skink

hi,

some time ago i made design error asigning each view to separate
Activity.
now i want to use ViewAnimator that will contain three views. that way
i'll add one Activity but remove three ones. the question is: should i
move their code to new Activity or is there a way to use some 'fake'
Activity so that i wouldn't need to change anything but replace
'extends Activity' to 'extends someFakeActivityClass'?

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



[android-developers] Re: KeyListener doesn't see enter key?

2008-10-01 Thread MrSnowflake

I haven't met your problem myself, but a possible sollution is
extending EditText and handle the ENTER/RETURN in the onKeyDown/Up

On 30 sep, 15:46, Christine <[EMAIL PROTECTED]> wrote:
> I have a KeyListener on an EditText. The only key I want to catch is
> the enter key, but that seems to be the only key the KeyListener
> doesn't see. What am I missing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Working with Images

2008-10-01 Thread Mike Reed

True. If you have the large image already decoded, calling

 canvas.drawBitmap(bitmap, srcRect, dstRect, paint);

allows you to draw just a section of it (specified by srcRect). The  
above call does all the clipping etc. for you (and more efficiently  
than if you did the clipping yourself).

On Sep 30, 2008, at 10:07 PM, Steve Oldmeadow wrote:


If I understand your question correctly you just want:

Bitmap.createBitmap(Bitmap source, int x, int y, int width, int
height)

where source will be your 1500x1500 bitmap, x and y are the top left
of the sub image and width and height are the width and height of the
sub image.

Memory could be an issue though particularly if you are going to keep
a lot of sub images in memory.  Don't forget that you can draw sub
sections of an image to a canvas using clipping so maybe you don't
need to create a new sub image.




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



[android-developers] Re: when will android support/have Speech Recognition System??

2008-10-01 Thread Wesley

Are u mean android not going to support speech recognition???
But I saw a folder call speech inside android.jar wo???
Others is working on???
Means I should ask...
Anyone is working on this system???
Can anyone share out??? Or open sources???

but if android have this system... I believe it will b very great new
to all the developer... Including me...

may I know... when can we have this system on hand inside android???

your attention is much appreciated... Thanks...

wesley.

On 10/1/08, MrSnowflake <[EMAIL PROTECTED]> wrote:
>
> I believe someone was working on such a library, but I've read it a
> couple months ago, so I'm not sure how it was called.
>
> On 30 sep, 03:51, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
>> hi,
>>
>> when will android support/have Speech Recognition System??
>> anyone have any ideas???
>>
>> Wesley.
> >
>

-- 
Sent from Gmail for mobile | mobile.google.com

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



[android-developers] Re: Download image from server

2008-10-01 Thread Mark Hansen

I followed this short tutorial a while back for downloading an image
via http, maybe it can point you in the right direction...

http://www.anddev.org/gallery_with_remote_images-t769.html


On Oct 1, 6:51 am, Nemat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have to download an image from server.But I got an error "D/skia
> ( 197): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x
> 0x%02x"
>
> I have to perform two continues Http connection.First is used to get
> server response and second to get image from the server.First task is
> performed correctly but while downloading image I got the given
> eror.So the problem in getting image from server.
>
> My code is:
> Code:
>
> public ImageView getView(String myImageURL) {
>        Log.i("TAG","downloadFile00"+myImageURL);
>         ImageView i = new ImageView(this);
>
>         try {
>                 /* Open a new URL and get the InputStream to load data
> from it. */
>                 URL aURL = new URL(myImageURL);
>                 URLConnection conn = aURL.openConnection();
>
> Log.i("TAG","downloadFile111"+myImageURL);
>                 conn.connect();
>                 InputStream is = conn.getInputStream();
>
> Log.i("TAG","downloadFile22"+is.read());
>                 /* Buffered is always good for a performance plus. */
>                 BufferedInputStream bis = new BufferedInputStream(is);
>
> Log.i("TAG","downloadFile="+bis.read());
>                 /* Decode url-data to a bitmap. */
>                // Bitmap bm = BitmapFactory.decodeStream(bis);
>                 Bitmap bm = BitmapFactory.decodeStream(is);
>                //
> Log.i("TAG","downloadFile444"+bm.getHeight());
>                // bis.close();
>                 is.close();
>                 /* Apply the Bitmap to the ImageView that will be
> returned. */
>                 i.setImageBitmap(bm);
>                 Log.i("TAG","downloadFile5");
>            } catch (IOException e) {
>               Log.i("TAG","downloadFile");
>                 Log.e("DEBUGTAG", "Remtoe Image Exception", e);
>            }
>
>         /* Image should be scaled as width/height are set. */
>        // i.setScaleType(ImageView.ScaleType.FIT_CENTER);
>         /* Set the Width/Height of the ImageView. */
>
>         return i;
>     }
>
> This code works fine when I performed this task alone in another
> project.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Getting Value from Spinner

2008-10-01 Thread Lonzo1968

How do I get the displayed value from a Spinner that is bound to a
Cursor. I created and Populated a Spinner using the following, Now I
can't figure out how to get the selected Item from the list..

Spinner s1 = (Spinner) findViewById(R.id.client_id);
String[] cMap = new
String[ClientDataProvider.sClientsSpinnerProjectionMap
.size()];

ClientDataProvider.sClientsSpinnerProjectionMap.keySet().toArray(cMap);
Uri uClients = Client.Clients.CONTENT_URI;
Cursor cur = managedQuery(uClients, cMap, null, null, null);
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_dropdown_item, cur, new String[]
{Project.Projects.NAME}, new int[] {android.R.id.text1});

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
s1.setAdapter(adapter);

Where the ProjectionMap looks like this.

  sClientsSpinnerProjectionMap = new HashMap();
sClientsSpinnerProjectionMap.put(Clients._ID, Clients._ID);
sClientsSpinnerProjectionMap.put(Clients.NAME, Clients.NAME);

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



[android-developers] Re: KeyListener doesn't see enter key?

2008-10-01 Thread Wesley

Hi,

I have some problem to get the enter key oso...

the scenario is...
It seem like have a problem to get the enter key, after invoke
touchEvent... Unless before I press others enter key once.. Only I can
get the enter key... I dunno what is actually happen... But I saw wake
lock thing if I can't get the enter key...

did anyone having this kind of issue also??

wesley.

On 10/1/08, MrSnowflake <[EMAIL PROTECTED]> wrote:
>
> I haven't met your problem myself, but a possible sollution is
> extending EditText and handle the ENTER/RETURN in the onKeyDown/Up
>
> On 30 sep, 15:46, Christine <[EMAIL PROTECTED]> wrote:
>> I have a KeyListener on an EditText. The only key I want to catch is
>> the enter key, but that seems to be the only key the KeyListener
>> doesn't see. What am I missing?
> >
>

-- 
Sent from Gmail for mobile | mobile.google.com

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



[android-developers] Re: SAXParser reports different name on SDK 0.9 from SDK 1.0

2008-10-01 Thread Chris Cicc

Hey Brad and Charlie,
I thought I'd submit my source code for everyone's reference. At this
point I'm very confident this is a bug. If it isn't I clearly don't
know nearly as much about XML and text encoding as I think I do :-)

The XML doc being passed in looks something like this:



   
  {282CE5E0-50C0-46B7-8996-176A3F12808D}
  Category & Name
   
   
  ...
   
   ...


Note this is coming from a .Net web service and and all characters are
encoded.

The code to parse it is here:
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = null;
try {
sp = spf.newSAXParser();
} catch (ParserConfigurationException e1) {
e1.printStackTrace();
} catch (SAXException e1) {
e1.printStackTrace();
}
XMLReader xr = null;
try {
xr = sp.getXMLReader();
} catch (SAXException e1) {
e1.printStackTrace();
}
CatListResponse catListHandler = new CatListResponse(ctx);
xr.setContentHandler(catListHandler);

Reader rd = null;
try {
rd = new
StringReader(EntityUtils.toString(httpResponse.getEntity()));
} catch (ParseException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}

try {
xr.parse(new InputSource(rd));
} catch (IOException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
}

And the handler code is here:

public class appCatListResponse extends DefaultHandler{

private boolean in_cat = false;
private boolean in_id = false;
private boolean in_catName = false;
private String id;
private String catName;
private Context ctx;
private AppCatListLA lla = new AppCatListLA(ctx);

public appCatListResponse(Context _ctx) {
ctx = _ctx;
}
public CatListLA getParsedData() {
return this.lla;
}

@Override
public void startDocument() throws SAXException {
 this.lla = new CatListLA(ctx);
}

@Override
public void endDocument() throws SAXException {
// Nothing to do
}

@Override
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
if (localName.equals("cat")) {
in_cat = true;
}
else if (localName.equals("id"))
{
in_cat = false;
in_id = true;
}
else if (localName.equals("catName"))
{
in_cat = false;
in_catName = true;
}
}

@Override
public void endElement(String namespaceURI, String localName,
String qName)
throws SAXException {
if (localName.equals("cat")) {
in_cat = false;
}
else if (localName.equals("id"))
{
in_id = false;
}
else if (localName.equals("catName"))
{
in_catName = false;
}
}

@Override
public void characters(char ch[], int start, int length) {
if(this.in_cat){
id = null;
catName = null;
}
else if (in_id)
{
id = new String(ch, start, length);
}
else if (in_catName)
{
catName = new String(ch, start, length);
id = null;
catName = null;
}
}
}


Charlie, you hit it on the money though, why has this behavior changed
between SDK versions without documentation? Again it leads me to
believe this is a bug...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is google's official position on JNI ?

2008-10-01 Thread Romain Guy

First of all, JNI is not used in our apps. Only in the framework.
Then, we are working on a native SDK that will provide official and
correct support for JNI. Just be patient :)

On Wed, Oct 1, 2008 at 2:53 AM, MrSnowflake <[EMAIL PROTECTED]> wrote:
>
> I believe JNI is not supported for developers, because 1: It would
> require developers to build libs for every different android platform
> out and 2: While Google (probably) uses JNI, they can just change the
> JNI interface and fix their code, but say if you JNI able program
> works on SDK 1.0r1 and then suddenly, when r2 gets released (and
> Google changed the JNI) your program wouldn't work anymore. This is
> something google really wants to avoid.
>
> On 1 okt, 11:42, Tauno T <[EMAIL PROTECTED]> wrote:
>> Oh, sorry, I misunderstood you there :)
>>
>> On Oct 1, 12:37 pm, Volker Gropp <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > you may call it unfair of course. But please keep in mind, they did
>> > not tell us that they use it in their apps. But they use it in their
>> > API to delegate calls to native libs.
>>
>> > Regards
>> > Volker
>>
>> > On Oct 1, 11:18 am, Tauno T <[EMAIL PROTECTED]> wrote:
>>
>> > > Isn't it a little .. how do I say it.. unfair to tell us that JNI is
>> > > not supported at all and then use it in their own apps to make them
>> > > better and give them more features than are available to the rest of
>> > > the developers?
>>
>> > > On Oct 1, 11:49 am, Volker Gropp <[EMAIL PROTECTED]> wrote:
>>
>> > > > Hi Ranjeet,
>>
>> > > > although I'm not the Android Dev Team i can tell you what ive been
>> > > > told last weeks about this topic: JNI is currently not supported in
>> > > > SDK 1.0. The reason is not quite clear, some say cause it may not work
>> > > > at all, or may break in the (near) future. Plus your app wont be
>> > > > portable and needs special versions for every hw platform. Actually i
>> > > > bet Android Dev Team will just tell you: "native libs and JNI is not
>> > > > supported!".
>>
>> > > > On the other hand JNI is working and Android uses it internally a lot
>> > > > [google talks]. But you may have problems to link against the stripped
>> > > > down libc they are using, or may run into other problems you cannot
>> > > > resolve. Plus please keep in mind there is no real solution to deploy
>> > > > your app on real phones, because /system/lib is read only. You might
>> > > > add your .so into the apk as a raw resource and extract it into your
>> > > > app writable directory under /data. Loading the .so works for me using
>> > > > System.load(). But this way the .so is stored on your phone in 2
>> > > > locations, using a lot unnecessary space.
>>
>> > > > Currently for a real world app on real phones i would'nt use JNI and
>> > > > native libs at all due to those problems. Either wait for JNI support
>> > > > in future SDK versions or port your library to Java.
>>
>> > > > Regards
>> > > > Volker
>>
>> > > > On Oct 1, 4:02 am, Ranjeet <[EMAIL PROTECTED]> wrote:
>>
>> > > > > Dear Android Dev Team,
>>
>> > > > > My apologies if I am asking a question that's already been answered.
>> > > > > Unfortunately I haven't been able to find any documentation within
>> > > > > Android's reference that officially states Google's position on usage
>> > > > > of JNI/SharedObjects (written in C++ and compiled via a cross
>> > > > > compiler) from within Java ui code.  To clarify what I am trying to
>> > > > > accomplish, we are building an application with the user interface
>> > > > > completely written using the java/android classes/controls and it
>> > > > > would use the shared library thats written in C++. There is just so
>> > > > > much effort gone in to making that library that it would be a LOT of
>> > > > > effort on our side rewriting it in Java. The library connects to our
>> > > > > backend web server to fetch XML files over HTTP, stores some of the
>> > > > > information from it on disk in files, and exposes the features via
>> > > > > methods.
>>
>> > > > > Is this currently "officially supported" in Android(I have seen hello
>> > > > > world C++ apps that run on the emulator with some security/chmod
>> > > > > tweaks).
>> > > > > Any information is sincerely appreciated.
>>
>> > > > > Thanks,
>> > > > > -Ranjeet
> >
>



-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: I want to know a button's width before it is drawn on the screen! possible?

2008-10-01 Thread Romain Guy

onWindowFocusedChange works but its pure chance. As I said, you should
use the ViewTreeObserver, that's what it's meant for.

On Wed, Oct 1, 2008 at 2:32 AM, erkenbrandroid <[EMAIL PROTECTED]> wrote:
>
> Did it! Thanks Romain! :)
>
> For other people having the same trouble, the trick is to use the
> onWindowFocusChanged(boolean hasWindowFocus) class like in this
> example :
>
> public void onWindowFocusChanged(boolean hasWindowFocus) {
>
> int maxButton; // I save the biggest button width in this variable
>
> Button testButton = (Button)findViewById(R.id.test); // button 1
> Button testButton2 = (Button)findViewById(R.id.test2); // button 2
> Button testButton3 = (Button)findViewById(R.id.test3); // button 3
>
> maxButton=testButton.getWidth(); // I put button 1's width into
> maxButton
> if(testButton2.getWidth() > maxButton) { // If button 2's width is
> bigger
> maxButton = testButton2.getWidth(); // maxButton gets button 2's width
> testButton3.setText("Button 2 is bigger than button 1!");
> }
>
> else
> testButton3.setText("Button 1 is bigger than button 2!");
>
> }
>
>
> On Sep 27, 12:12 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> You can use a ViewTreeObserver. Look at the documentation of the
>> android.view.View class for more information.
>>
>> On Sep 26, 2008 10:42 AM, "erkenbrandroid" <[EMAIL PROTECTED]> wrote:
>>
>> Hello everyone!
>>
>> I need a bit of help for an app I am trying to develop.
>>
>> I've got a main screen with a couple of buttons on it.
>>
>> What I would like to do is get the width of those buttons before they
>> are actually drawn on the screen. Their width is variable, as theyr
>> are defined as "wrap_content" in my main.xml
>>
>> I tried to get the buttons' width in the methods onCreate() and
>> onStart() but all I get is a 0 measure, obviously because their width
>> can't be measured yet.
>>
>> Do you know a way to do that?
>>
>> this is an example of the code at the moment :
>>
>> public void onCreate(Bundle savedInstanceState) {
>>
>> int maxButton; // I save the biggest button width in this variable
>>
>> Button testButton = (Button)findViewById(R.id.test); // button 1
>> Button testButton2 = (Button)findViewById(R.id.test2); // button 2
>> Button testButton3 = (Button)findViewById(R.id.test3); // button 3
>>
>> maxButton=testButton.getWidth(); // I put button 1's width into
>> maxButton
>> if(testButton2.getWidth() > maxButton) { // If button 2's width is
>> bigger
>> maxButton = testButton2.getWidth(); // maxButton gets button 2's width
>> testButton3.setText("Button 2 is bigger than button 1!");}
>>
>> else
>> testButton3.setText("Button 1 is bigger than button 2!");
>>
>> }
>>
>> Thanks a lot,
>> Erken
> >
>



-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: Activities Refactoring

2008-10-01 Thread Zach Hobbs

You may want to consider using an ActivityGroup or TabActivity.  That way your 
Activities have separate logic, but can still be animated in/out.

-- 

Zach Hobbs 
HelloAndroid.com 
Android OS news, tutorials, downloads



On Wednesday 01 October 2008 9:18:35 am skink wrote:
> hi,
>
> some time ago i made design error asigning each view to separate
> Activity.
> now i want to use ViewAnimator that will contain three views. that way
> i'll add one Activity but remove three ones. the question is: should i
> move their code to new Activity or is there a way to use some 'fake'
> Activity so that i wouldn't need to change anything but replace
> 'extends Activity' to 'extends someFakeActivityClass'?
>
> skink
> 


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



[android-developers] Keyboard confusion

2008-10-01 Thread Rmac

Since there is no on-screen virtual keyboard built into Android, I am
confused about how to plan for text entry.  Let's assume there is a
screen with a EditText field requiring user input.  On the iPhone it
works simply by a virtual keyboard popping up when the field has
focus.  How should an Android app handle this?  With the HTC G1 phone
I assume the user would have to rotate the phone and open the keyboard
to type (cumbersome for minor text entry).  Now, does the rotation and
screen going into landscape mode mean the app is forced into the
onCreate/onResume cycle requiring a complex saving/restoring of app
state just to enter information?  Or is the orientation flip handled
by Android transparently without the app having to do anything... the
screen dimension is just changed and redrawn accordingly?

Really confused about this and haven't found any definitive
explanation yet.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Activities Refactoring

2008-10-01 Thread skink



On 1 Paź, 15:26, Zach Hobbs <[EMAIL PROTECTED]> wrote:
> You may want to consider using an ActivityGroup or TabActivity.  That way your
> Activities have separate logic, but can still be animated in/out.
>

ActivityGroup seems to be ok but... it's docs are worse than poor: 'A
screen that contains and runs multiple embedded activities' period.
And it seems to be only Activities container, but what about ui? i
cannot see any setIn/OutAnimation() methods.

thanks
skink
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How & When we use "KeyguardLock" or "KeyguardManager"

2008-10-01 Thread barrie

Please help me about this.

I am trying to lock and unlock the keyboard but doesn't work for me.

Is there anyone have experience about this class or any other useful
solution.

Please kindly help me out.

Thanks

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



[android-developers] Working with Images

2008-10-01 Thread xMemphisx

Hello,

What i'm currently trying to do, is load a large image... lets say the
dimensions are 1500x1500... but then i want to create other images
FROM that loaded image, but in smaller portions... so for instance...
i want to use just the pixels from [250,0] to [500,250] to make a new
image (on the fly). How can this be accomplished?

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



[android-developers] Starting an instrumentation with an intent

2008-10-01 Thread Carl H.

Hello all,
I am trying to test my activities. I have been using
ActivityInstrumentationTestCase however, I can not see any way to
start the activity with an intent. From what I understand the activity
is started in the setup() via super.launchActivity(pkg, activityCls,
extras). Is there any way to set the intent before starting the
activity?

The reason I am asking is because I have the following in my onCreate
in the activity:

if (intent.getData() == null) {
Log.e(TAG, "Can not display single route without a 
URI");
finish();
} else {
Cursor cursor = managedQuery(intent.getData(), 
PROJECTION, null,
null, null);
}

As you can see, without the intent'data , I can not start the
activity.

Any comments are much appreciated.

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



[android-developers] Re: ImageButton caching images when using Uri

2008-10-01 Thread Joe Erickson

No one else has seen anything like this?  Is there a way to enter this
as a bug against the Android codebase?  I haven't actually seen the
open source part of this yet (I'd actually try and fix it if it was
out there already).



On Sep 29, 11:09 am, Joe Erickson <[EMAIL PROTECTED]> wrote:
> I'm seeing some caching problems when using anImageButtonwith a Uri
> and I'm not sure if there's a flag that needs set somewhere or not.
>
> I'm using the button to add an icon to an item in one of my
> applications, exactly like it's being used for the Contact application
> (which I don't think the source is available for).  I'm using the CROP
> trick seen in this 
> application:http://code.google.com/p/apps-for-android/source/browse/trunk/Photost...
>
> Specifically, I'm calling the image picker and then the crop like so:
>
> protected OnClickListener cmdIconListener = new OnClickListener() {
>     // @Override
>         public void onClick(View arg0) {
>             Intent i = new
> Intent("android.intent.action.GET_CONTENT");
>             i.setType("image/*");
>             startActivityForResult(i, AddTea.ADD_ICON);
>         }
>
> };
>
> protected void onActivityResult(int requestCode, int resultCode,
> Intent data){
>     // See which child activity is calling us back.
>     switch (requestCode) {
>     case AddTea.ADD_ICON:
>         // This is the standard resultCode that is sent back if the
>         // activity crashed or didn't doesn't supply an explicit
> result.
>         if (resultCode != RESULT_CANCELED){
>              Intent i = new Intent("com.android.camera.action.CROP");
>              i.setClassName("com.android.camera",
> "com.android.camera.CropImage");
>              i.setData(data.getData());
>              Log.d(TAG, "path: " + data.getData().getPath());
>              i.putExtra("noFaceDetection", true);
>              i.putExtra("outputX", iconWidth);
>              i.putExtra("outputY", iconHeight);
>              i.putExtra("aspectX", iconWidth);
>              i.putExtra("aspectY", iconHeight);
>              i.putExtra("scale", true);
>
>              if(iconUri == null){
>                  ContentValues values = new ContentValues();
>
> values.put(android.provider.MediaStore.Images.Media.TITLE, name + "
> Icon");
>
> values.put(android.provider.MediaStore.Images.Media.BUCKET_ID,
> "STeaP_Tea_Timer_Icons");
>
> values.put(android.provider.MediaStore.Images.Media.BUCKET_DISPLAY_NAME,
> "STeaP Tea Timer Icons");
>                  iconUri =
> getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
> values).toString();
>               }
>               i.putExtra("output", Uri.parse(iconUri));
>               startActivityForResult(i, CROP_ICON);
>         }
>         break;
>     case AddTea.CROP_ICON:
>         if (resultCode != RESULT_CANCELED){
>         Log.d(TAG, "Data String: " + iconUri);
>         showIconButton(iconUri);
>     }
>     default:
>         break;
>     }
>
> }
>
> protected void showIconButton(String iconUri){
>     if(iconUri != null){
>        ImageButtoniconField = (ImageButton)
> findViewById(R.id.iconButton);
>         Log.d(TAG, "iconUri: " + iconUri);
>         iconField.setImageURI(Uri.parse(iconUri));
>         iconField.invalidate();
>     }
>
> }
>
> So if the item doesn't have an icon, set one in the ContentProvider
> and save the iconUri.  If it does, just overwrite it with the new
> cropped image.
>
> This works fine if the item never had an icon.  It shows in 
> theImageButtonwhen the Activity returns.  However, if the item already
> had an icon, my Activity still shows the old icon, even though it was
> overwritten.  It seems that if theImageButtongets the same Uri back,
> even if I wrote a new image to it, it doesn't redraw, even if I tell
> it to invalidate().  If I relaunch my Activity, the new image shows up
> just like I expected.  Funny enough, the Pictures application doesn't
> see any images I created until I restart the emulator, which also
> doesn't seem ideal!
>
> So, is there anyway to handle this caching of the Uri?  I seems like
> the ContentProvider should be doing this when I write a new image to
> it, but it doesn't seem to be.  Also, before anyone suggests, I tried
> deleteing the entry in the ContentProvider and making a new one and
> that seems to partially work.  It partilly works because, if the Uri
> we get back it new, the view does refresh with this new Uri.  However,
> if the icon was the last picture to be saved to the ContentProvider,
> say item 10, then the ContentProvider will delete item 10 and the
> reuses 10 as the next id!  So I'm back where I started and 
> theImageButtonshows the old icon.
>
> Any help in kicking the ContentProvider ofImageButtoninto shape
> would be appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android

[android-developers] Re: Intercept incoming call

2008-10-01 Thread Trey Ethridge

I'd like to expand the logic of when to send a call directly to
voicemail.  I believe that there would need to be a hook somewhere to
"intercept the incoming call" and determine whether or not to accept
it.

An example use case would be to prevent "drunk dialing".  There could
be a setting in Android that would allow the user to set the device to
send all calls to voicemail if the the caller is not in the "family"
contact list and it is between 11:00 PM and 7:00 AM.

We have a checkbox to allow users to send all calls to voicemail from
a given contact, so I don't see why this should be a problem.  Is this
going to be possible?

-- Trey

On Sep 27, 4:27 pm, Eric B <[EMAIL PROTECTED]> wrote:
> One of the best apps I've every bought for my Treo 600/650 is an app
> that lets you assign specific ring tones (really mp3 files) to
> specific contacts or groups of contacts.  I especially like the
> ability to turn off the ringer and vibrator for calls with no caller
> id.
>
> I don't think this kind of app would be possible without being able 
> tointerceptacall.
>
> Thanks,
> Eric
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SoundRecordingDemo in v1.0

2008-10-01 Thread Guillaume Perrot

Eventually I used a "hidden" default intent to capture a sound and
retrieve the audio file: new
Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);

On 1 oct, 15:12, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> I found SoundRecordingDemo in the mailing list files.
> I tried this because I try to record a sound in one of my
> activities...
> First I had to add the RECORD_AUDIO permission in order not to have an
> error message.
> Regarding the code, the media scanner should be launched after
> recording, but I had to do this myself (in dev tools application) in
> order to see the new file in the music application.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: when will android support/have Speech Recognition System??

2008-10-01 Thread hackbod

No speech recognition in 1.0.

On Oct 1, 7:02 am, Wesley <[EMAIL PROTECTED]> wrote:
> Are u mean android not going to support speech recognition???
> But I saw a folder call speech inside android.jar wo???
> Others is working on???
> Means I should ask...
> Anyone is working on this system???
> Can anyone share out??? Or open sources???
>
> but if android have this system... I believe it will b very great new
> to all the developer... Including me...
>
> may I know... when can we have this system on hand inside android???
>
> your attention is much appreciated... Thanks...
>
> wesley.
>
> On 10/1/08, MrSnowflake <[EMAIL PROTECTED]> wrote:
>
>
>
> > I believe someone was working on such a library, but I've read it a
> > couple months ago, so I'm not sure how it was called.
>
> > On 30 sep, 03:51, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> >> hi,
>
> >> when will android support/have Speech Recognition System??
> >> anyone have any ideas???
>
> >> Wesley.
>
> --
> Sent from Gmail for mobile | mobile.google.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Intercept incoming call

2008-10-01 Thread hackbod

Sorry, intercepting incoming calls is not supported in 1.0.

On Oct 1, 9:20 am, Trey  Ethridge <[EMAIL PROTECTED]> wrote:
> I'd like to expand the logic of when to send a call directly to
> voicemail.  I believe that there would need to be a hook somewhere to
> "intercept the incoming call" and determine whether or not to accept
> it.
>
> An example use case would be to prevent "drunk dialing".  There could
> be a setting in Android that would allow the user to set the device to
> send all calls to voicemail if the the caller is not in the "family"
> contact list and it is between 11:00 PM and 7:00 AM.
>
> We have a checkbox to allow users to send all calls to voicemail from
> a given contact, so I don't see why this should be a problem.  Is this
> going to be possible?
>
> -- Trey
>
> On Sep 27, 4:27 pm, Eric B <[EMAIL PROTECTED]> wrote:
>
> > One of the best apps I've every bought for my Treo 600/650 is an app
> > that lets you assign specific ring tones (really mp3 files) to
> > specific contacts or groups of contacts.  I especially like the
> > ability to turn off the ringer and vibrator for calls with no caller
> > id.
>
> > I don't think this kind of app would be possible without being able 
> > tointerceptacall.
>
> > Thanks,
> > Eric
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Intercept incoming call

2008-10-01 Thread hackbod

On Sep 27, 1:27 pm, Eric B <[EMAIL PROTECTED]> wrote:
> One of the best apps I've every bought for my Treo 600/650 is an app
> that lets you assign specific ring tones (really mp3 files) to
> specific contacts or groups of contacts.  I especially like the
> ability to turn off the ringer and vibrator for calls with no caller
> id.

You can already assign custom ring tones to specific contacts in 1.0.

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



[android-developers] Re: ImageButton caching images when using Uri

2008-10-01 Thread Joe Erickson

Found the link to the bug tracker.  So, nevermind.  It was on the
front page. :)

On Oct 1, 12:16 pm, Joe Erickson <[EMAIL PROTECTED]> wrote:
> No one else has seen anything like this?  Is there a way to enter this
> as a bug against the Android codebase?  I haven't actually seen the
> open source part of this yet (I'd actually try and fix it if it was
> out there already).
>
> On Sep 29, 11:09 am, Joe Erickson <[EMAIL PROTECTED]> wrote:
>
> > I'm seeing some caching problems when using anImageButtonwith a Uri
> > and I'm not sure if there's a flag that needs set somewhere or not.
>
> > I'm using the button to add an icon to an item in one of my
> > applications, exactly like it's being used for the Contact application
> > (which I don't think the source is available for).  I'm using the CROP
> > trick seen in this 
> > application:http://code.google.com/p/apps-for-android/source/browse/trunk/Photost...
>
> > Specifically, I'm calling the image picker and then the crop like so:
>
> > protected OnClickListener cmdIconListener = new OnClickListener() {
> >     // @Override
> >         public void onClick(View arg0) {
> >             Intent i = new
> > Intent("android.intent.action.GET_CONTENT");
> >             i.setType("image/*");
> >             startActivityForResult(i, AddTea.ADD_ICON);
> >         }
>
> > };
>
> > protected void onActivityResult(int requestCode, int resultCode,
> > Intent data){
> >     // See which child activity is calling us back.
> >     switch (requestCode) {
> >     case AddTea.ADD_ICON:
> >         // This is the standard resultCode that is sent back if the
> >         // activity crashed or didn't doesn't supply an explicit
> > result.
> >         if (resultCode != RESULT_CANCELED){
> >              Intent i = new Intent("com.android.camera.action.CROP");
> >              i.setClassName("com.android.camera",
> > "com.android.camera.CropImage");
> >              i.setData(data.getData());
> >              Log.d(TAG, "path: " + data.getData().getPath());
> >              i.putExtra("noFaceDetection", true);
> >              i.putExtra("outputX", iconWidth);
> >              i.putExtra("outputY", iconHeight);
> >              i.putExtra("aspectX", iconWidth);
> >              i.putExtra("aspectY", iconHeight);
> >              i.putExtra("scale", true);
>
> >              if(iconUri == null){
> >                  ContentValues values = new ContentValues();
>
> > values.put(android.provider.MediaStore.Images.Media.TITLE, name + "
> > Icon");
>
> > values.put(android.provider.MediaStore.Images.Media.BUCKET_ID,
> > "STeaP_Tea_Timer_Icons");
>
> > values.put(android.provider.MediaStore.Images.Media.BUCKET_DISPLAY_NAME,
> > "STeaP Tea Timer Icons");
> >                  iconUri =
> > getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
> > values).toString();
> >               }
> >               i.putExtra("output", Uri.parse(iconUri));
> >               startActivityForResult(i, CROP_ICON);
> >         }
> >         break;
> >     case AddTea.CROP_ICON:
> >         if (resultCode != RESULT_CANCELED){
> >         Log.d(TAG, "Data String: " + iconUri);
> >         showIconButton(iconUri);
> >     }
> >     default:
> >         break;
> >     }
>
> > }
>
> > protected void showIconButton(String iconUri){
> >     if(iconUri != null){
> >        ImageButtoniconField = (ImageButton)
> > findViewById(R.id.iconButton);
> >         Log.d(TAG, "iconUri: " + iconUri);
> >         iconField.setImageURI(Uri.parse(iconUri));
> >         iconField.invalidate();
> >     }
>
> > }
>
> > So if the item doesn't have an icon, set one in the ContentProvider
> > and save the iconUri.  If it does, just overwrite it with the new
> > cropped image.
>
> > This works fine if the item never had an icon.  It shows in 
> > theImageButtonwhen the Activity returns.  However, if the item already
> > had an icon, my Activity still shows the old icon, even though it was
> > overwritten.  It seems that if theImageButtongets the same Uri back,
> > even if I wrote a new image to it, it doesn't redraw, even if I tell
> > it to invalidate().  If I relaunch my Activity, the new image shows up
> > just like I expected.  Funny enough, the Pictures application doesn't
> > see any images I created until I restart the emulator, which also
> > doesn't seem ideal!
>
> > So, is there anyway to handle this caching of the Uri?  I seems like
> > the ContentProvider should be doing this when I write a new image to
> > it, but it doesn't seem to be.  Also, before anyone suggests, I tried
> > deleteing the entry in the ContentProvider and making a new one and
> > that seems to partially work.  It partilly works because, if the Uri
> > we get back it new, the view does refresh with this new Uri.  However,
> > if the icon was the last picture to be saved to the ContentProvider,
> > say item 10, then the ContentProvider will delete item 10 and the
> > reuses 10 as the next id!  So I'm back where I star

[android-developers] Re: SoundRecordingDemo in v1.0

2008-10-01 Thread april

How do you test the code without real phone? Can you record from
emulator? what is the format of sound?

Thank!

On Oct 1, 9:25 am, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> Eventually I used a "hidden" default intent to capture a sound and
> retrieve the audio file: new
> Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
>
> On 1 oct, 15:12, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
>
> > I found SoundRecordingDemo in the mailing list files.
> > I tried this because I try to record a sound in one of my
> > activities...
> > First I had to add the RECORD_AUDIO permission in order not to have an
> > error message.
> > Regarding the code, the media scanner should be launched after
> > recording, but I had to do this myself (in dev tools application) in
> > order to see the new file in the music application.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SoundRecordingDemo in v1.0

2008-10-01 Thread De San Nicolas Jean Philippe
yes you can. the format is  .amr and you can read it with the mediaplayer.
-:)

2008/10/1 april <[EMAIL PROTECTED]>

>
> How do you test the code without real phone? Can you record from
> emulator? what is the format of sound?
>
> Thank!
>
> On Oct 1, 9:25 am, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> > Eventually I used a "hidden" default intent to capture a sound and
> > retrieve the audio file: new
> > Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
> >
> > On 1 oct, 15:12, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> >
> > > I found SoundRecordingDemo in the mailing list files.
> > > I tried this because I try to record a sound in one of my
> > > activities...
> > > First I had to add the RECORD_AUDIO permission in order not to have an
> > > error message.
> > > Regarding the code, the media scanner should be launched after
> > > recording, but I had to do this myself (in dev tools application) in
> > > order to see the new file in the music application.
> >
>

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



[android-developers] is the order value of Menu.CATEGORY_SECONDARY a property of the menu item or the group?

2008-10-01 Thread [EMAIL PROTECTED]

For example

menu.add(0 //Group
,1   //
item id
,Menu.CATEGORY_SECONDARY   //Order
,"item1");//
menu item name

This seem to suggest that the "secondary" belongs to the "item" and
not the group. However in describing menus through XML









The "secondary" seem to be assigned to the "group".

Can I have a group, then, that has one "item" that is a
"CATEGORY_SECONDARY" and one item that is a "CATEGORY_ALTERNATIVE"?

If you have read this far, do you know where the menu.xml files may
have been described at some length.

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



[android-developers] Porting iPhone application to Google Phone using Android

2008-10-01 Thread Yaseen

Has anyone tried porting any iPhone application to Google Phone and If
yes, what are the technical aspects to take into consideration for
this effort.Any reference /url/tutorial for the same highly
appreciated.

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



[android-developers] Re: Maximum size of database

2008-10-01 Thread Yaseen

Nice Thread and it certainly cleared my ignorance related to setting
up the database.

On Oct 1, 5:57 am, Ludwig <[EMAIL PROTECTED]> wrote:
> The call to setMaximumSize(size) restricts the DB to that size, it is not a
> function to preallocate or reserve that space. If you get to the maximum
> size you will get an error that the DB is full.In the course of normal
> action you do not need to set the maximum size, it will just grow with the
> data.
>
> However, while the theoretical limits of SQLite should be in the region of
> 2/4 GB, in practice you will have problems processing that size of data on a
> mobile device. Even on real computers people tend to use real DB systems for
> anything larger than, say, 100MB, and most users would not be happy if you
> chomped away on a million rows in a table.
>
> Ludwig
>
> 2008/10/1 Shraddha <[EMAIL PROTECTED]>
>
>
>
> > Thanks.
> > Additionally, what if the size of my database grows beyond the memory
> > specified? Will it automatically increase to accommodate increased
> > space requirement ?
>
> > On Oct 1, 11:50 am, hackbod <[EMAIL PROTECTED]> wrote:
> > > There is no limit on the size of the database, except for available
> > > storage.
>
> > > On Sep 30, 11:06 pm, Shraddha <[EMAIL PROTECTED]> wrote:
>
> > > > I am considering two options of creating database and interested in
> > > > knowing the maximum size that can be given to a database.
> > > > 1. I see that SQLlite allows us to set the maximum size allowable for
> > > > the database. Can this be set to the maximum available on the
> > > > device  ?
> > > > 2. What would be the maximum allowable size of database if I use
> > > > content provider ?
>
> > > > In other words, What is the max size a db can grow on thee Android
> > > > device, can it cover the total available memory space of the app, or
> > > > it has its own limit?
>
> > > > Thanks for ur time.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to have multiple Android projects in one Eclipse Project?

2008-10-01 Thread DulcetTone

I have a tree of folders containing the source for a working Android
activity I hope to split into a Service and two Activities.

How do I accomplish this?  Can I simply add an AndroidManifest.xml to
each of 3 separate Java packages?

Thanks in advance.

tone


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



[android-developers] Connect to an online SQL database

2008-10-01 Thread Mast3rpyr0

is this possible? i need to send data from my phone to a sql server on
my website instead of in an onboard SQLlite DB.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] What are "CATEGORY_CONTAINER" menus and how do they get added to the menu?

2008-10-01 Thread [EMAIL PROTECTED]

>From the following article

http://code.google.com/android/kb/commontasks.html#addmenuitems

I see how ALTERNATIVE and SELECTED_ALTERNATIVE menu items could be
added to the activity using intents and mime types.

Wondering if someone can throw light on what "container" menus are and
how they get added.

How about CATEGORY_SYSTEM menus as well in a similar manner? When does
the system add them. I am thinking they are more like "Fiel/Save" etc.
Or is my understanding off to the left field.

Appreciate your time
Thanks
Satya
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to use findViewById(int id) out of onCreate() ?

2008-10-01 Thread erkenbrandroid

Hello,

I'd like to use the findViewById(int id) method outside of the
onCreate(bundle) to act on some buttons. How can I do that?

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



[android-developers] How to load html file from sdcard to WebVeiw

2008-10-01 Thread Billsen

Hi,

Is it possible to load html file into WebView? If yes, how?

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



[android-developers] Re: Porting iPhone application to Google Phone using Android

2008-10-01 Thread adamjernst

They're completely different platforms. It's basically impossible to
do any direct port.

Adam


On Oct 1, 3:57 pm, Yaseen <[EMAIL PROTECTED]> wrote:
> Has anyone tried porting any iPhone application to Google Phone and If
> yes, what are the technical aspects to take into consideration for
> this effort.Any reference /url/tutorial for the same highly
> appreciated.
>
> Thanks,
> Yaseen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: changing path r.java

2008-10-01 Thread Xavier Ducrohet

The R.java class is always created in the package declared in manifest.

The only option you have is changing the package.

Xav

On Tue, Sep 30, 2008 at 8:42 AM, alan <[EMAIL PROTECTED]> wrote:
>
> Is it possible to change the path of r.java? My application has shared
> source folders with a J2ME app, r.java is automatically placed in the
> first folder in the project which is one of the shared folders, i
> would like it to be in one of the android specific folders
>
> >
>

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



[android-developers] Re: Connect to an online SQL database

2008-10-01 Thread Billsen

I think you may try to access database in your phone directly. If that
is the case, it is hard to do since there are no database drivers for
Oracle, MySql, MS SQL server in android. If you really want to push
data from your phone to database, you can develop application in your
web server to access database and send data from the phone to your
application.

Regards,
Senshan

On Oct 1, 4:21 pm, Mast3rpyr0 <[EMAIL PROTECTED]> wrote:
> is this possible? i need to send data from my phone to a sql server on
> my website instead of in an onboard SQLlite DB.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Connect to an online SQL database

2008-10-01 Thread Mast3rpyr0

hmm that kinda sucks, maybe a PHP script run from the phoen on the
webserver to get the appropriate data. but how could i do that behind
the scenes?

On Oct 1, 5:40 pm, Billsen <[EMAIL PROTECTED]> wrote:
> I think you may try to access database in your phone directly. If that
> is the case, it is hard to do since there are no database drivers for
> Oracle, MySql, MS SQL server in android. If you really want to push
> data from your phone to database, you can develop application in your
> web server to access database and send data from the phone to your
> application.
>
> Regards,
> Senshan
>
> On Oct 1, 4:21 pm, Mast3rpyr0 <[EMAIL PROTECTED]> wrote:
>
> > is this possible? i need to send data from my phone to a sql server on
> > my website instead of in an onboard SQLlite DB.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] sms messaging questions

2008-10-01 Thread Paul Fisch

I'm just installing the sdk now but I have a few questions before I go
any further.

Is it possible to change the functionality of the built-in text
messaging application.

Not just to replace it, but to actually see the code that it uses and
alter it with an app.


Thanks

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



[android-developers] Geocoder. getFromLocationName - no results [forwardGeocode(): no feature in GLocation]

2008-10-01 Thread Rafael Fernandes

Hey guys,
I'm trying to run this Geocoder map query here but no success at
all... it always returns null...
if I go to Emulator's Map app and search the same thing I got the
desired results...

I also noticed that I receive this message right after the method gets
executed..
10-01 09:35:51.095: ERROR/LocationMasfClient(51): forwardGeocode(): no
feature in GLocation


I've set these permissions:




here is a snap of the code:
Geocoder g = new Geocoder(this);
try {
List b = g.getFromLocationName("pizza, 94043
Mountain View, USA", 10);
int j = b.size();
for (int i = 0; i < j; ++i) {
Address x = b.get(i);
Log.i(Global.LOG_TAG, "Address found = " + x);
   }
} catch (IOException e) {
e.printStackTrace();
}

Am I missing something here? a hidden permission perhaps?

Cheers,
Rafael Fernandes

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



[android-developers] Load HTML from Database and pass to WebView

2008-10-01 Thread David

OK. I need to pass html from a database to a webview. This wouldn't be
difficult (wv.loadData(html, "text/html", "utf-8); ) but I need it to
be able to parse links (like content://com.android.wiki/wiki/Some_Page)
and load the appropriate page (Some_Page) from the appropriate page
table (wiki).

How would I do this? I believe I should create a custom Uri and modify
the query to get the page from the database. I don't need the
update,insert, or delete functions for the Uri.

Any help would be greatly appreciated.

P.S. as you can probably tell this is for a small android desktop
wiki, I have everything working except this

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



[android-developers] Re: when will android support/have Speech Recognition System??

2008-10-01 Thread Rabin

Before you want a speech recognition system, improve your english. The
mobile's not gonna understand your English anyway.
And stop putting heap of question marks after each question. As far as
I know multiple question marks are put only when you are confused
about something and not when you're asking something. And if you were
confused about all the things you've put question marks in, again
there's no point in requesting for a speech rec. system.

On Oct 1, 10:02 am, Wesley <[EMAIL PROTECTED]> wrote:
> Are u mean android not going to support speech recognition???
> But I saw a folder call speech inside android.jar wo???
> Others is working on???
> Means I should ask...
> Anyone is working on this system???
> Can anyone share out??? Or open sources???
>
> but if android have this system... I believe it will b very great new
> to all the developer... Including me...
>
> may I know... when can we have this system on hand inside android???
>
> your attention is much appreciated... Thanks...
>
> wesley.
>
> On 10/1/08, MrSnowflake <[EMAIL PROTECTED]> wrote:
>
>
>
> > I believe someone was working on such a library, but I've read it a
> > couple months ago, so I'm not sure how it was called.
>
> > On 30 sep, 03:51, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> >> hi,
>
> >> when will android support/have Speech Recognition System??
> >> anyone have any ideas???
>
> >> Wesley.
>
> --
> Sent from Gmail for mobile | mobile.google.com

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



[android-developers] Re: unable to open AndroidManifest.xml

2008-10-01 Thread blake

I have the same problem.  If I install the editor plugins, everything
works fine until I restart eclipse.  After that I can no longer open
any of the resource files.

I am running Ganymede with 1.5.  I suspect the versions of the R
$...class files, but I've checked them and they are all v1.5 class
files, as far as I can see.  Just on a long shot, I also checked the
versions on all the classes in the editor plugin.  They are also all
1.5 files.   I can't even find which classfile is causing the
complaint.  Too bad the error message doesn't include that, eh?

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



[android-developers] sms messaging questions

2008-10-01 Thread Paul Fisch

I'm just installing the sdk now but I have a few questions before I go
any further.

Is it possible to change the functionality of the built-in text
messaging application.

Not just to replace it, but to actually see the code that it uses and
alter it with an app.


Thanks

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



[android-developers] Android Emulator and the Tilt Sensors

2008-10-01 Thread Randolpho

I've been searching, but I can't find any mention of them: is there
any way to emulate the tilt sensors in the Android Emulator?

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



[android-developers] Map pin, balloon and drag

2008-10-01 Thread MaTy

Hi, I need to create a MapView with the similar functionality of
Android "Maps" application
First, I need to know how to draw the similar "pin" and balloon info
showed when you "search for pizza" with the arrows to iterate between
the list of results, the text into the balloons and the color change
when click on the balloons (It works like a button). I don't need the
functionality, only how to draw them. Is it a bitmap or I should
create it manually, how i can set the text into the ballons?

Second, I need to implement something like the dragable pin with the
man picture inside (when you select "Street View"). Also, I want to
know about the motion and listener used to do it. Because now, if I
want to drag something the map scrolls a lot, so how I can scroll the
map only when I'm close to the window borders?

Thanks...

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



[android-developers] Re: How to use findViewById(int id) out of onCreate() ?

2008-10-01 Thread Joey Yandle

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> 
> I'd like to use the findViewById(int id) method outside of the
> onCreate(bundle) to act on some buttons. How can I do that?
> 

What's stopping you from calling it outside of onCreate() in the same
way you call it inside onCreate()?


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI4/D8Nig/07RbnEsRAib9AKDG4Q9XAuAdAdFHFhvT1/m3DozcEwCeNzCG
m9MPhKMjfc4810O8hne/qxE=
=ppaK
-END PGP SIGNATURE-

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



[android-developers] Is it possible to embed links into a textview?

2008-10-01 Thread David

This is a similar problem to my other one. I want the links to be
database rows, not to other pages.

Also I know how to do italics and bold in textviews, how do I do
things like larger text? Can a textview do that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sms messaging questions

2008-10-01 Thread Joey Yandle

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Please don't double post.  It's obnoxious, especially on a high volume
list like this one.  Mailing lists often don't send your message for an
indeterminate period of time, so just because you don't see it
immediately doesn't mean that it was lost.

> I'm just installing the sdk now but I have a few questions before I go
> any further.
> 
> Is it possible to change the functionality of the built-in text
> messaging application.
> 

No.  You can, however, listen for incoming SMS, and read stored SMS.

> Not just to replace it, but to actually see the code that it uses and
> alter it with an app.
> 

What do you mean by "actually see the code"?

The code for the messaging app is in the com.android.mms package, but
that code is not available in the SDK.  So you cannot subclass it, or do
any other kind of alterations.

It is possible to *call* the messaging application using an Intent with
an explicit componentName.  Run your emulator with -logcat, and when you
launch the messaging program, you will see the class names for the
various activities.



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI4/KRNig/07RbnEsRAn3eAKDBlZyCpK4y4zodKK0wJyKJCzbRlACfT2w8
5XqXWaMaYUrzG6IGRC64wcA=
=4Gez
-END PGP SIGNATURE-

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



[android-developers] Re: Getting GPS Strength ?

2008-10-01 Thread Nikkelitous

The best thing I can see is getAccuracy() in
android.location.Location.  It unfortunately doesn't return how many
GPS satellites it's seeing but is a more abstract result gathered from
all details of the connections.  This, I assume would include the
number of satellites their strength and other details.  But unless
theres a hidden API I don't think we can really get that data just
yet.  I'd say file it as a feature request but for most purposes
getAccuracy() should be sufficient.  If you're looking for specific
number for something else, why don't you post it and we'll brainstorm
and try to figure out a way to do what you want.

On Sep 28, 10:56 pm, plusminus <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> is there any possibility to get the Strength/Reliability/Quality of
> the current GPS-signal ?
> i.e. the number of satellites the gps-receiver is 'seeing' ?
>
> Best Regards,
> plusminus

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



[android-developers] question about Service.stopSelf()

2008-10-01 Thread j

Is the method Service.stopSelf() purely for saving resources (by
cleaning up memory/cpu used by the service) when all work is done?  If
I don't call stopSelf(), my understanding is that my Service will
simply stick around even though it has completed all the work.  Is
that correct?

Another question is.  If my service spawns off a Thread to do some
time consuming work (e.g. Network I/O) and I call stopSelf in the main
service thread before the spawn-off Thread is done with the work,
would that prevent it from completing the work?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ADT plugin in SDK 0.9

2008-10-01 Thread Lekkala,Jyothsna

HI,

I have installed the new android SDK now and eclipse 3.4 classic -
Ganymede instead of eclipse 3.4 java ee.

Now its working fine.
I understand that I did not install modelling framerwork plugin for
the eclipse and thats why the android layout editor showed the error.

sorry I could not reply to you earlier because I did not have access
to my system.

THanks for replying earlier.

--Jyothsna



On Sep 25, 5:23 pm, "Xavier Ducrohet" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> please provide us with the Eclipse log. It's located in your workspace
> in .metata/.log
>
> thanks
> Xav
>
> On Thu, Sep 25, 2008 at 5:15 PM, Lekkala,Jyothsna<[EMAIL PROTECTED]> wrote:
>
> > HI,
>
> > I opened thelayout/xml file using androidlayouteditorin eclipse
> > It opens a view with xml,layoutviews. Thelayoutview has all green
> > tick marks. there is a create button in the top. But that is greyed
> > out(disabled)
> > and below it shows that eclipse failed to load the framework
> > information and thelayoutlibrary!.
>
> > I searched all blogs,forums etc. but nobody is talking about this
> > error. are you able to use the androidlayouteditorand make layouts
> > like in droiddraw/dreamweaver_for_html.
>
> > Thanks,
> > --Jyothsna
>
> > On Aug 18, 2:53 pm, "Xavier Ducrohet" <[EMAIL PROTECTED]> wrote:
> >> The graphicallayouteditoris the default XMLeditorfor files under
> >> /res/layout(assuming the project is properly tagged as an Android
> >> project)
>
> >> Make sure you haven't set a different defaulteditorby right clicking your
> >>layoutfile and choosing Open With... > AndroidLayoutEditor.
>
> >> Xav
>
> >> On Mon, Aug 18, 2008 at 2:13 PM, szeldon <[EMAIL PROTECTED]> wrote:
>
> >> > Hi,
>
> >> > It is mentioned that "Several new development tools were added, such
> >> > as a graphical preview for XML layouts for users of Eclipse, and a
> >> > tool for constructing 9-patch images.". How to see/use this? Where is
> >> > this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to load html file from sdcard to WebVeiw

2008-10-01 Thread Chris Chiappone

Yeah that should be relatively simple.  List the contents of the
SDCard and find your file.  Then create a WebView and use the
loadData() method to load the data as a string.

~chris

On Wed, Oct 1, 2008 at 3:08 PM, Billsen <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is it possible to load html file into WebView? If yes, how?
>
> Thanks,
> Senhsan
> >
>

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



[android-developers] Re: changing path r.java

2008-10-01 Thread Chris Chiappone

I was trying to think of a way to solve this also.  Basically if you
extend R.java somewhere else then just reference your new subR.java
class and it would work.  But you would still need to have the super
class in the the main packaged declared in the manifest.

~chris

On Wed, Oct 1, 2008 at 3:34 PM, Xavier Ducrohet <[EMAIL PROTECTED]> wrote:
>
> The R.java class is always created in the package declared in manifest.
>
> The only option you have is changing the package.
>
> Xav
>
> On Tue, Sep 30, 2008 at 8:42 AM, alan <[EMAIL PROTECTED]> wrote:
>>
>> Is it possible to change the path of r.java? My application has shared
>> source folders with a J2ME app, r.java is automatically placed in the
>> first folder in the project which is one of the shared folders, i
>> would like it to be in one of the android specific folders
>>
>> >
>>
>
> >
>



-- 
~chris

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



[android-developers] Re: Is it possible to embed links into a textview?

2008-10-01 Thread april

yes, When you create the textview in XML. You need to set a flag:
android:autoLink="all".

You can use   just like html page.

On Oct 1, 2:56 pm, David <[EMAIL PROTECTED]> wrote:
> This is a similar problem to my other one. I want the links to be
> database rows, not to other pages.
>
> Also I know how to do italics and bold in textviews, how do I do
> things like larger text? Can a textview do that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SAXParser reports diffeernt qName on SDK 0.9 from SDK 1.0

2008-10-01 Thread Brad Gies

Charlie,

Yes, I think we are saying ALMOST the same thing. But, I don't think &
is the Escaped Ampersand. I think it's just the Ampersand, and that's why
it's causing the problem. 

As I say, I'm not a Unicode expert, but I think the proper sequence for an
escaped ampersand would be : & & I think that's how an escaped
ampersand would look in UTF-8. The ampersand escaping the ampersand :). Or,
of course the &

Sorry, I can't try it right now, but I'm interested to know if it works.
When I have time, I'll build an app to check it.

Sincerely,
 
Brad Gies

-
Brad Gies
27415 Greenfield Rd, # 2,
Southfield, MI, USA
48076
www.bgies.com  www.truckerphone.com 
www.EDI-Easy.com  www.pricebunny.com
-
 
Moderation in everything, including abstinence
-Original Message-
From: android-developers@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Cicc
Sent: Tuesday, September 30, 2008 10:10 AM
To: Android Developers
Subject: [android-developers] Re: SAXParser reports diffeernt qName on SDK
0.9 from SDK 1.0


Hey Brad,
Just to be sure I tested it out and manually typed in "&" into the
source for the web service. I didn't expect this to work, because even
manually typing it in still leads to each character being encoded.

In the quote you provided it says "they MUST be escaped using either
numeric character references...". UTF-8 (and all unicode) encoding
does just that :) The '&' is number 38.

On the other hand, I also tested the bracket characters < and >. Both
cause the same issue as the & character. Other brackets such as [ and
{ and ( do not cause issue.

So clearly this does have something to do with the SAXParser in
Android handling the special XML characters. I have never used
SAXParser outside of Android so I cannot say whether or not it is any
different. But I can confirm that this did not happen in 0.9 and I am
99% confident it should not be happening at all.

Thanks,
Chris



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



[android-developers] Re: Important Announcement: Handango Android Catalog

2008-10-01 Thread Eric

Thanks Peli.
I have been looking this information for a while.

Eric
Portable Electronics Ltd
www.hdmp4.com

On Oct 1, 4:59 am, Peli <[EMAIL PROTECTED]> wrote:
> This question has been answered 
> here:http://groups.google.com/group/android-discuss/browse_frm/thread/4b3e...
>
> Peliwww.openintents.org
>
> On 30 Sep., 14:45, Eric <[EMAIL PROTECTED]> wrote:
>
> > May I know how do you overcome the restriction on 1.0 SDK that it does
> > NOT allow any apk to be installed unless it comes from Android Market?
>
> > Thanks
> > Eric
> > Portable Electronics Ltdwww.hdmp4.com
>
> > On Sep 30, 1:57 am, Handango <[EMAIL PROTECTED]> wrote:
>
> > > Handango, the original multi-platform app store, will be launching one
> > > of the industry’s first Android catalogs in November. Handango has
> > > served millions of customers since 1999 and has become the trusted and
> > > agnostic source for smartphone content. Handango's legacy is with the
> > > early adopters and, in fact, Handango has supported Linux applications
> > > for many years. Content providers building Android applications and
> > > looking for distribution are encouraged to contact Will Pinnell
> > > ([EMAIL PROTECTED] or +1.972.894.0467) for priority in the promotion
> > > of the content within the catalog.
>
> > > Beginning October 1st, content providers will be able to add Android
> > > applications directly to developer accounts and choose to distribute
> > > them to customers in three ways:
>
> > > 1)     Give them away for free
> > > 2)     Sell them for a one-time purchase fee
> > > 3)     Set them up as a monthly, quarterly, or yearly subscription fee
> > > (subscription APIs provided at no cost)
>
> > > Content providers are encouraged to jump on this opportunity as soon
> > > as possible in order to maximize distribution and revenue as soon as
> > > the first Android phone is in the market. If you’re an existing
> > > Handango content partner, simply add the new Android content to your
> > > account.  If you’re not yet working with Handango, you can apply to
> > > become a software partner athttp://developer.handango.comandyour
> > > application will be accepted within 24 hours. Depending on volume,
> > > content providers keep 50-70% of the suggest retail price that they
> > > provide, less any transaction costs that might occur.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Working with Images

2008-10-01 Thread Jake Maui
I've had problems with images over 250K.  Has anyone else has this problem?


On Tue, Sep 30, 2008 at 2:57 PM, xMemphisx <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> What i'm currently trying to do, is load a large image... lets say the
> dimensions are 1500x1500... but then i want to create other images
> FROM that loaded image, but in smaller portions... so for instance...
> i want to use just the pixels from [250,0] to [500,250] to make a new
> image (on the fly). How can this be accomplished?
>
> >
>

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



[android-developers] Re: question about Service.stopSelf()

2008-10-01 Thread hackbod

First, you should never ever leave services running indefinitely.
They take resources (primarily memory) from things running in the
foreground.

So yes, use stopSelf() when your service is done running if that is
appropriate.  Exactly what you will do depends on what your service is
four, there are at least three main models:

(1) A background service that runs for as long as the user is
interested.  An example is background music playback.  In this case
the service is starting and stopping is controlled directly by the
user.  As such, while started it should have an icon in the status bar
so the user knows something is going on and knows how to stop it.

(2) A service that executes longer-running jobs in the background.  An
example would be a service that fetches recent IMAP mail every 10
minutes.  In this case someone starts the service (maybe just by the
alarm manager going off), and the service calls stopSelf() when it is
done with that batch of work.  Generally there is no need to put an
icon in the status bar.

(3) A service that is there for clients to call in to.  An example
would be something that lets clients connect to it and perform text to
speech conversion of data given to it.  In this case, the service is
never started.  It is created when the first client binds to it, and
destroyed when the last client unbinds.

As for threads, you should stop your threads when the service is
destroyed.  The threads are not, however, tied to the service in any
way by the system, it is only up to you.  All that a service being
created means is that the system will try not to kill your overall
process.

On Oct 1, 3:08 pm, j <[EMAIL PROTECTED]> wrote:
> Is the method Service.stopSelf() purely for saving resources (by
> cleaning up memory/cpu used by the service) when all work is done?  If
> I don't call stopSelf(), my understanding is that my Service will
> simply stick around even though it has completed all the work.  Is
> that correct?
>
> Another question is.  If my service spawns off a Thread to do some
> time consuming work (e.g. Network I/O) and I call stopSelf in the main
> service thread before the spawn-off Thread is done with the work,
> would that prevent it from completing the work?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: changing path r.java

2008-10-01 Thread hackbod

Don't do this.  The R class is created for you by the build system,
and just there for you to get constants out of.  If you need those
constants from another java package, just important the R class into
that java file.

On Oct 1, 4:03 pm, "Chris Chiappone" <[EMAIL PROTECTED]> wrote:
> I was trying to think of a way to solve this also.  Basically if you
> extend R.java somewhere else then just reference your new subR.java
> class and it would work.  But you would still need to have the super
> class in the the main packaged declared in the manifest.
>
> ~chris
>
>
>
> On Wed, Oct 1, 2008 at 3:34 PM, Xavier Ducrohet <[EMAIL PROTECTED]> wrote:
>
> > The R.java class is always created in the package declared in manifest.
>
> > The only option you have is changing the package.
>
> > Xav
>
> > On Tue, Sep 30, 2008 at 8:42 AM, alan <[EMAIL PROTECTED]> wrote:
>
> >> Is it possible to change the path of r.java? My application has shared
> >> source folders with a J2ME app, r.java is automatically placed in the
> >> first folder in the project which is one of the shared folders, i
> >> would like it to be in one of the android specific folders
>
> --
> ~chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Receiving SMS Messages in 1.0?

2008-10-01 Thread Justin (Google Employee)

Cristina,

Set the second parameter to null. The scAddress relates to the address
of the server on the cellular network that will handle the message, it
is not the address of the sender.

Cheers,
Justin
Android Team @ Google

On Sep 24, 5:55 am, Cristina <[EMAIL PROTECTED]> wrote:
> I have just done a text to send a messege to a port using this
>
> SmsManager smsManager = SmsManager.getDefault();
> short port = 16001;
> smsManager.sendDataMessage("5556","5554", port, "Hola".getBytes(),
> null, null);
>
> I use two emulators, one is launched at 5554 and the other at 5556 and
> I try to send the binary sms from 5554 to 5556.
> In the 5556 phone I have launch an application with a
> BroadcastReceiver in order to receive SMS Messages (but I do not know
> how to specify the port)
>
> The application does not failed. But the 5556 phone does not receive
> anything.
> Instead, in the console I receive the following messege every time I
> do a try
> [2008-09-24 14:05:06 - ddms]ADB rejected shell command (ls -l /):
>
> Strange but it seems that the adb is receiving the request...
>
> Does anybody has an example on how to send/receive binary SMS to an
> application port using  sendDataMessage?
>
> On 24 sep, 14:20, "De San Nicolas Jean Philippe" <[EMAIL PROTECTED]>
> wrote:
>
> > Hello, I've tried your code but it failed! my application failed. Have you
> > tried and succeed?
>
> > 2008/9/24 Cristina <[EMAIL PROTECTED]>
>
> > > Hi,
>
> > > I do not know if it is the right way, but I have found a way to get
> > > the message.
> > > Here I include my code to get the SmsMessages. I hope it helps you
>
> > > public class ServerMessagesReceiver extends BroadcastReceiver {
>
> > >    static final String ACTION =
> > > "android.provider.Telephony.SMS_RECEIVED";
>
> > >    public void onReceive(Context context, Intent intent) {
> > >         if (intent.getAction().equals(ACTION)) {
> > >                 StringBuilder buf = new StringBuilder();
> > >                 Bundle bundle = intent.getExtras();
> > >                 if (bundle != null) {
> > >                         Object[] pdusObj = (Object[]) bundle.get("pdus");
> > >                         SmsMessage[] messages = new
> > > SmsMessage[pdusObj.length];
> > >                         for (int i = 0; i > >                                 messages[i] = SmsMessage.createFromPdu
> > > ((byte[]) pdusObj[i]);
> > >                         }
> > > 
> > > 
> > > ...
>
> > > By the way, Does somebody know how to receive an SMS that has been
> > > sent using
> > > an application port using the methos.sendDataMessage?
>
> > > On 24 sep, 08:15, Reto Meier <[EMAIL PROTECTED]> wrote:
> > > > Is it still possible to listen for incoming SMS messages in the latest
> > > > 1.0 SDK release?
>
> > > > The SMS_RECEIVED_ACTION string used to listen for incoming SMS
> > > > messages seems to have gone missing. It used to be available from the
> > > > android.provider.Telephony.Sms package, which also seems to have
> > > > disappeared, so getMessagesFromIntent has gone too.
>
> > > > Previously, you could create a Broadcast Receiver to listen for SMS
> > > > messages using this code:
>
> > > >   String incoming_SMS =
> > > > android.provider.Telephony.Sms.Intents.SMS_RECEIVED_ACTION;
>
> > > >   public void onReceive(Context _context, Intent _intent) {
>
> > > >     if (_intent.getAction().equals(incoming_SMS)) {
> > > >       SmsManager sms = SmsManager.getDefault();
> > > >       SmsMessage[] messages =
> > > > Sms.Intents.getMessagesFromIntent(_intent);
> > > >     }
>
> > > > Is there still a way to do this?
>
> > > > Thanks
> > > > Reto- Ocultar texto de la cita -
>
> > - Mostrar texto de la cita -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: save image in Database

2008-10-01 Thread Andrew Stadler

Are you sure that you really want to do this?

It might make more sense to save each image as a file.  If necessary,
you could use a database to store image metadata (depending on the
needs of your application).



On Tue, Sep 30, 2008 at 7:02 AM, Nemat <[EMAIL PROTECTED]> wrote:
>
> Hi Frnds.
>
> I have to save an image in database.How can it be possible in
> SDK-1.0??
>
> Thanks in Advance

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



[android-developers] Activity Lifecycle

2008-10-01 Thread elvisw

Hi everyone,

Normally, when onDestroy() been called, the process is still there
and waiting the system to kill it.

Is it possible to kill the process in onDestroy() when every time
it is called??
Is there API to exit the process by the activity itself??

Best Regards,
Elvis.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SoundRecordingDemo in v1.0

2008-10-01 Thread De San Nicolas Jean Philippe
hello,
you can record with the emulator.  if, for example, you're running the
SoundRecordDemo, it records from the emulator. it works for me.

2008/10/2 april <[EMAIL PROTECTED]>

>
> my question is how you record it using emulator? Could you give me the
> instructions?
>
> Thanks!
>
> April
>
> On Oct 1, 11:18 am, "De San Nicolas Jean Philippe" <[EMAIL PROTECTED]>
> wrote:
> > yes you can. the format is  .amr and you can read it with the
> mediaplayer.
> > -:)
> >
> > 2008/10/1 april <[EMAIL PROTECTED]>
> >
> >
> >
> > > How do you test the code without real phone? Can you record from
> > > emulator? what is the format of sound?
> >
> > > Thank!
> >
> > > On Oct 1, 9:25 am, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> > > > Eventually I used a "hidden" default intent to capture a sound and
> > > > retrieve the audio file: new
> > > > Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
> >
> > > > On 1 oct, 15:12, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> >
> > > > > I found SoundRecordingDemo in the mailing list files.
> > > > > I tried this because I try to record a sound in one of my
> > > > > activities...
> > > > > First I had to add the RECORD_AUDIO permission in order not to have
> an
> > > > > error message.
> > > > > Regarding the code, the media scanner should be launched after
> > > > > recording, but I had to do this myself (in dev tools application)
> in
> > > > > order to see the new file in the music application.
> >
>

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



[android-developers] Re: changing path r.java

2008-10-01 Thread Alan Birtles

Im not trying to get it in a different package, I want it in the same 
package but in a different source folder

hackbod wrote:
> Don't do this.  The R class is created for you by the build system,
> and just there for you to get constants out of.  If you need those
> constants from another java package, just important the R class into
> that java file.
>
> On Oct 1, 4:03 pm, "Chris Chiappone" <[EMAIL PROTECTED]> wrote:
>   
>> I was trying to think of a way to solve this also.  Basically if you
>> extend R.java somewhere else then just reference your new subR.java
>> class and it would work.  But you would still need to have the super
>> class in the the main packaged declared in the manifest.
>>
>> ~chris
>>
>>
>>
>> On Wed, Oct 1, 2008 at 3:34 PM, Xavier Ducrohet <[EMAIL PROTECTED]> wrote:
>>
>> 
>>> The R.java class is always created in the package declared in manifest.
>>>   
>>> The only option you have is changing the package.
>>>   
>>> Xav
>>>   
>>> On Tue, Sep 30, 2008 at 8:42 AM, alan <[EMAIL PROTECTED]> wrote:
>>>   
 Is it possible to change the path of r.java? My application has shared
 source folders with a J2ME app, r.java is automatically placed in the
 first folder in the project which is one of the shared folders, i
 would like it to be in one of the android specific folders
 
>> --
>> ~chris
>> 
> >
>   

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



[android-developers] Re: BroadCastReceiver with PhoneStateListener

2008-10-01 Thread legerb

Yep,
I've seen the logging entry.
I called the emulator through DDMS on eclipse.
And here is my xml:

http://schemas.android.com/apk/res/android";
  package="android.StartServicesAtStartUp"
  android:versionCode="1"
  android:versionName="1.0.0">











On Sep 29, 11:37 am, chouman82 <[EMAIL PROTECTED]> wrote:
> you actually saw the logging statement when you make a call to the
> emulator through telnet?
>
> On Sep 28, 1:19 am, legerb <[EMAIL PROTECTED]> wrote:
>
>
>
> > I changed the xml accordingly, and it worked :)
>
> > On Sep 27, 2:53 am, Nayr <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > Did you describe the StartServicesAtStartUp in your
> > > AndroidManifest.xml? for example,
>
> > >         
> > >             
> > >                  > > android:name="android.intent.action.BOOT_COMPLETED" />
> > >             
> > >         
>
> > > And you should request user-permission
> > > "android.permission.RECEIVE_BOOT_COMPLETED" like
> > >  > > android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
> > > in the AndroidManifest.xml.
>
> > > Cheers,
> > > Nayr
>
> > > On Sep 27, 9:01 am, chouman82 <[EMAIL PROTECTED]> wrote:
>
> > > > I am trying to register the PhoneStateListener right when the phone
> > > > boots up so I have 2 classes.  One is StartAtStartUp which extends
> > > > BroadcastReceiver that listens for the COMPLETE_BOOT_UP and then this
> > > > will then register the CallStateListener which extends
> > > > PhoneStateListener.  It doesn't seem to work out all that well.
>
> > > > I am not seeing any logging statements that I have put in
> > > > CallStateListener.  Any help would be greatly appreciated!!!
>
> > > > Here is my code:
>
> > > > import android.content.BroadcastReceiver;
> > > > import android.content.Context;
> > > > import android.content.Intent;
> > > > import android.telephony.PhoneStateListener;
> > > > import android.telephony.TelephonyManager;
> > > > import android.util.Log;
>
> > > > import com.lumitrend.netlogger.Logger;
>
> > > > public class StartServicesAtStartUp extends BroadcastReceiver
> > > > {
> > > >         public void onReceive(Context context, Intent intent)
> > > >         {
> > > >                 Log.d("DEBUG",
> > > > "")
> > > >  ;
> > > >                 //Intent phoneStateListener = new Intent(context,
> > > > CallStateListener.class);
> > > >                 
> > > > //phoneStateListener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> > > >                 //context.startService(phoneStateListener);
> > > >                 Log.d("DEBUG", context.getPackageName());
> > > >                 Log.d("DEBUG", context.toString());
> > > >                 TelephonyManager tManager =
> > > > (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
> > > >                 CallStateListener callStateListener = new 
> > > > CallStateListener();
> > > >                 tManager.listen(callStateListener,
> > > > PhoneStateListener.LISTEN_CALL_STATE);
> > > >         }
>
> > > > }
>
> > > > ~~~
>
> > > > import android.telephony.PhoneStateListener;
> > > > import android.telephony.TelephonyManager;
> > > > import android.util.Log;
>
> > > > import com.lumitrend.netlogger.Logger;
>
> > > > public class CallStateListener extends PhoneStateListener
> > > > {
> > > >         public void onCallStateChanged(int state, String incomingNumber)
> > > >         {
> > > >                 Log.d("DEBUG", "addding this here");
> > > >                 super.onCallStateChanged(state, incomingNumber);
> > > >                 Log.d("DEBUG", TelephonyManager.CALL_STATE_OFFHOOK + "
> > > > we are def in
> > > > here: " + state);
>
> > > >                 switch(state)
> > > >                 {
> > > >                         case TelephonyManager.CALL_STATE_IDLE:
> > > >                                 Log.d("DEBUG", 
> > > > "phhhone is idle");
> > > >                                 break;
> > > >                         case TelephonyManager.CALL_STATE_OFFHOOK:
> > > >                                 Log.d("DEBUG", 
> > > > "phoon is off
> > > > hook");
> > > >                                 break;
> > > >                         case TelephonyManager.CALL_STATE_RINGING:
> > > >                                 Log.d("DEBUG",
> > > > "phoonnnee
> > > > is ringing");
> > > >                                 break;
> > > >                         default:
> > > >                                 Log.d("DEBUG", "The 
> > > > staate is " +
> > > > state);
>
> > > >                 }
> > > >         }
>
> > > > }- Hide qu