[android-developers] Direct interaction between application and library

2010-12-21 Thread Webgenius
Hello,

I am working on a GPS library which needs to interact directly with an
application.
I am not supposed to change any framework code. Hence I have managed
to implement this solution using sockets.

The GPS library creates a new detached thread on startup, which opens
up a socket.
The application also connects to the same socket on onCreate() method.

However the problem is that this setup uses a lot of resources, and I
am looking for a way to solve this problem.
I am looking for a design which will create both the client and server
sockets on application startup, and destroy the same when the
application quits.
To make this happen, I have thought of one approach:

Implement JNI in the vendor directory and create a so, that will be
loaded, and this communicates with GPS library.
When the application is launched, call a function in the library which
opens the socket, and on onDestroy() call another method, which
destroys the socket connection.

But this also suffers from resource problem since the so it is a
process in memory.

Please suggest a method to overcome this problem.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] apkbuilder ?

2010-12-21 Thread Danny Backx
apkbuilder says THIS TOOL IS DEPRECATED (caps not mine).

When I run it from the command line, without any options, it
says (cut somewhat) :

 If you wish to use apkbuilder for a custom build system, please look at the
 com.android.sdklib.build.ApkBuilder which provides support for
 recent build improvements including library projects.

So can someone tell me how/where to look at this ?

Thanks,

Danny

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-21 Thread Mark Murphy
On Tue, Dec 21, 2010 at 1:00 AM, JC j...@oriolesoftware.com wrote:
 Yes i realize that too. that Service::OnCreate and OnDestroy is called
 after Activity::OnCreate and OnDestroy always.

 Then what/how can we get resultant data from service ?

What is resultant data?

Your service can communicate with the activity via a PendingIntent
from createPendingResult(), or a broadcast Intent, or a Messenger
object, etc., any of which can be passed as an extra in the Intent you
supply via startService().

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] findViewById reslove?

2010-12-21 Thread Nikola
Hi,

quick question, if you have two xml layouts and both layouts have the same
button name for eg. how findViewById knows which one is used.

In activity I say setContentView(R.layout.first). Does this means that
findViewById will grab resources from first?.



Thanks.

-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to embed a package in another package

2010-12-21 Thread Mark Murphy
Use Android library projects:

http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
http://developer.android.com/guide/developing/other-ide.html#libraryProject

2010/12/21 Jiang webs...@yahoo.cn

 Thanks,

 Both a.apk and b.apk contains UI and resources, so if I export a.apk as
 a.jar, and import a.jar to the project of b.apk, during building, the
 following message display:
 Error generating final archive: duplicate entry res/drawable/icon.png

 would you please tell me how to implement as you said? Thanks.

 BR,
 -Jiang



 --- *10年12月21日,周二, TreKing treking...@gmail.com* 写道:


 发件人: TreKing treking...@gmail.com
 主题: Re: [android-developers] How to embed a package in another package
 收件人: android-developers@googlegroups.com
 日期: 2010年12月21日,周二,下午12:00

 2010/12/20 Jiang webs...@yahoo.cn http://mc/compose?to=webs...@yahoo.cn
 

 Since the 2 packages are developed by 2 teams, it is more simple to
 maintain�souce code in embeded mode.


 Then have these two teams give you two jar files or one jar and one apk
 that uses it.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: What is the structure of the Android PackageManagerService?

2010-12-21 Thread Mark Murphy
What you want is impossible without firmware modifications, which is
why Ms. Hackborn steered you to lists pertaining to firmware
modifications.

On Tue, Dec 21, 2010 at 1:45 AM, Geet geetag...@gmail.com wrote:
 Hi,
 I am not sure if its a porting/framework question.Let me repeat the
 question

 I just need to give message to the user when he clicks on the
 downloaded .apk files, the message would be like Right now the
 installation is blocked.
 And the same time if he tries to uninstall certain apps, he should get
 message right now the uninstallation is not blocked.

 Please help me--

 Thank you.

 On Dec 20, 10:18 pm, Dianne Hackborn hack...@android.com wrote:
 This group is for the SDK.  Questions about the platform belong on
 android-porting or android-platform.



 On Mon, Dec 20, 2010 at 8:09 AM, Geet geetag...@gmail.com wrote:
  Hi,
  I would like to know , what are the sequence of steps that happen once
  the user clicks on the installApp??

  I need to disable the installation of apps(when user tries to install
  the app by clicking on install), based on certain conditions, how can
  i do it??
  Any suggestions will help.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
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] where is my data?

2010-12-21 Thread Mark Murphy
You cannot access /data from DDMS on most, if not all, non-rooted
Android devices. Your application data will be stored wherever
getFilesDir() says it will be stored.

On Tue, Dec 21, 2010 at 2:50 AM, Stephan Wiesner
testexpe...@googlemail.com wrote:
 Hi,
 after updateing my Samsung Galaxy i9000 to the latest patch (still
 running Android 2.1) I can not find the data of my apps anymore.
 They used to be in /data/data/package name
 Now there is no such directory anymore. /data is empty. I tried to
 find it using DDMS in Eclipse and ASTRO app on the phone, but can't
 find it.
 Any tipps?

 Thanks,
 Stephan

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Game pretty much like mine

2010-12-21 Thread Pent
 If you put the time in and your ready to go, just deploy it.
 Never mind what the rest are doing, you'll never get the
 market experience you need without deploying it.

On the other hand, initial impact is very important. It's the brief
chance to really catch on before you sink into the swamp and disappear
forever. My own advice if there is a competitor is to polish your app
to the absolute maximum before release.

Pent

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] apkbuilder ?

2010-12-21 Thread Mark Murphy
Step #1: Visit http://www.google.com/codesearch

Step #2: Search on:

package:android ApkBuilder

On Tue, Dec 21, 2010 at 3:17 AM, Danny Backx da...@backx.info wrote:
 apkbuilder says THIS TOOL IS DEPRECATED (caps not mine).

 When I run it from the command line, without any options, it
 says (cut somewhat) :

 If you wish to use apkbuilder for a custom build system, please look at the
 com.android.sdklib.build.ApkBuilder which provides support for
 recent build improvements including library projects.

 So can someone tell me how/where to look at this ?

 Thanks,

    Danny

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: where is my data?

2010-12-21 Thread Stephan Wiesner
thanks for the fast reply.
only thing is: getFilesDir() returns  /data/data/de.stephanwiesner
and, like i wrote, that dir does not exist (or is not accessible)

Furthermore I read in Sams Teach Yourself Android that the data should
be in /data/data/package name
And, I am sure that it was there last week. I have copied my database
file several times to my PC for further processing and can't do that
anymore, as I don't find it :-()

My phone was never rooted.

Stephan




On 21 Dez., 10:09, Mark Murphy mmur...@commonsware.com wrote:
 You cannot access /data from DDMS on most, if not all, non-rooted
 Android devices. Your application data will be stored wherever
 getFilesDir() says it will be stored.

 On Tue, Dec 21, 2010 at 2:50 AM, Stephan Wiesner









 testexpe...@googlemail.com wrote:
  Hi,
  after updateing my Samsung Galaxy i9000 to the latest patch (still
  running Android 2.1) I can not find the data of my apps anymore.
  They used to be in /data/data/package name
  Now there is no such directory anymore. /data is empty. I tried to
  find it using DDMS in Eclipse and ASTRO app on the phone, but can't
  find it.
  Any tipps?

  Thanks,
  Stephan

  --
  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
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: where is my data?

2010-12-21 Thread Mark Murphy
On Tue, Dec 21, 2010 at 4:34 AM, Stephan Wiesner
testexpe...@googlemail.com wrote:
 thanks for the fast reply.
 only thing is: getFilesDir() returns  /data/data/de.stephanwiesner
 and, like i wrote, that dir does not exist (or is not accessible)

It is not accessible from DDMS, nor from ASTRO. It is not supposed to be.

 And, I am sure that it was there last week. I have copied my database
 file several times to my PC for further processing and can't do that
 anymore, as I don't find it :-()

 My phone was never rooted.

Then there was a flaw in the original firmware that has since been
corrected. What you are experiencing is the normal state of affairs
for Android development -- you can access your app's local files on an
emulator, or possibly on rooted phones (not sure about that), but not
on regular hardware.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] camera app giving error pls guide.

2010-12-21 Thread Atik
Hello Guys
i have downloaded the camera.zip from the git.its android inbuilt
camera project. i have the source code now. i tried to run the code
but i m getting some error that first unistall the camera app from
device or emulator.

i want to implement the funcationality like the camera should open and
zoom in out and brightness and contrast buttons should work.. i dont
want to capture the image.
can any one guide me pls..

can we run the camara which i downloaded from git on emulator or m i
doing some thing wrong.

pls guide me

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: findViewById reslove?

2010-12-21 Thread Sarwar Erfan


On Tuesday, December 21, 2010 3:05:10 PM UTC+6, vnv wrote:

 Hi,

 quick question, if you have two xml layouts and both layouts have the same 
 button name for eg. how findViewById knows which one is used.

 In activity I say setContentView(R.layout.first). Does this means that 
 findViewById will grab resources from first?.

 Yes. 
findViewById has no interest with what you have in your other xml's. 

Regards
Sarwar Erfan
 

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: camera app giving error pls guide.

2010-12-21 Thread Sarwar Erfan


On Tuesday, December 21, 2010 3:38:26 PM UTC+6, Atik wrote:


 can we run the camara which i downloaded from git on emulator or m i 
 doing some thing wrong. 

 You cannot run this app. What you are trying to do is similar this:
* You have Microsoft Word installed in your PC.
* You somehow got the source files of Microsoft Word!! (Ok, just imagine)
* You built MS Word from source and when you wanted to install, the OS told 
you that it is already installed.


You need to develop your own application. You can examine the source of the 
camera app. Also, I would suggest you to read the SDK documentation if you 
are willing to use camera.


Regards
Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: What is the structure of the Android PackageManagerService?

2010-12-21 Thread Geet
Thanks for the reply Mark.

Do you mean I need to post this question somewhere else in the forum,
in the different category??or can u suggest me where can post this
question to get the right answer??

I would explain the requirement again, kinldy show me the path how can
I achieve the same.

The requirement is
When the user is in certain locality(secure locality) his device will
receive ceratin data/command from the server, and this bloacking of
the installation and blocking of the uninstallation of the installed
app will be anabled.

And when the user moves out of the secure locality, his device will
receive ceratin data from the service and his phone will react
normally-- means he will be able to install and uninstall the apps.

Kindly help--


On Dec 21, 2:07 pm, Mark Murphy mmur...@commonsware.com wrote:
 What you want is impossible without firmware modifications, which is
 why Ms. Hackborn steered you to lists pertaining to firmware
 modifications.



 On Tue, Dec 21, 2010 at 1:45 AM, Geet geetag...@gmail.com wrote:
  Hi,
  I am not sure if its a porting/framework question.Let me repeat the
  question

  I just need to give message to the user when he clicks on the
  downloaded .apk files, the message would be like Right now the
  installation is blocked.
  And the same time if he tries to uninstall certain apps, he should get
  message right now the uninstallation is not blocked.

  Please help me--

  Thank you.

  On Dec 20, 10:18 pm, Dianne Hackborn hack...@android.com wrote:
  This group is for the SDK.  Questions about the platform belong on
  android-porting or android-platform.

  On Mon, Dec 20, 2010 at 8:09 AM, Geet geetag...@gmail.com wrote:
   Hi,
   I would like to know , what are the sequence of steps that happen once
   the user clicks on the installApp??

   I need to disable the installation of apps(when user tries to install
   the app by clicking on install), based on certain conditions, how can
   i do it??
   Any suggestions will help.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
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see and
  answer them.

  --
  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
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers]How to get the data from LBS?

2010-12-21 Thread kevens hao
Use LBS, how to get the data?
For example, hotel, restaurant, groggery info and so on.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: camera app giving error pls guide.

2010-12-21 Thread Atik
Thanks Erfan for quick reply

but u didnt got my issue i guess.

i took all files and made another project with some diff package name
and trying to run it.

so here i mean to say i am not installing the same app twice

i have diff app and here i m getting error like'
Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
[2010-12-21 15:50:36 - CameraNew] Please check logcat output for more
details.
[2010-12-21 15:50:36 - CameraNew] Launch canceled!

so ...i just wanted to see the running app as the code is ok..its
error is osmething abt signature or debug.keystore but i m unable to
resolve it

Thanks

On Dec 21, 2:47 pm, Sarwar Erfan erfanonl...@gmail.com wrote:
 On Tuesday, December 21, 2010 3:38:26 PM UTC+6, Atik wrote:

  can we run the camara which i downloaded from git on emulator or m i
  doing some thing wrong.

  You cannot run this app. What you are trying to do is similar this:

 * You have Microsoft Word installed in your PC.
 * You somehow got the source files of Microsoft Word!! (Ok, just imagine)
 * You built MS Word from source and when you wanted to install, the OS told
 you that it is already installed.

 You need to develop your own application. You can examine the source of the
 camera app. Also, I would suggest you to read the SDK documentation if you
 are willing to use camera.

 Regards
 Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] javax.xml.xpath.XPath For android 2.0.1

2010-12-21 Thread saikiran n
Hi,
android is supporting javax.xml.xpath.XPath in api level 8 ie 2.2
But i am writing some application for 2.0.1  in that there is a need for
XPath parser.
I downloaded jar file from findjar.com
But when i added the jar file to my application i got the following build
error

trouble processing javax/xml/XMLConstants.class:
[2010-12-21 15:49:59 - Client]
Attempt to include a core class (java.* or javax.*) in something other
than a core library. It is likely that you have attempted to include
in an application the core library (or a part thereof) from a desktop
virtual machine. This will most assuredly not work. At a minimum, it
jeopardizes the compatibility of your app with future versions of the
platform. It is also often of questionable legality.

If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine distribution,
as opposed to compiling an application -- then use the
--core-library option to suppress this error message.

If you go ahead and use --core-library but are in fact building an
application, then be forewarned that your application will still fail
to build or run, at some point. Please be prepared for angry customers
who find, for example, that your application ceases to function once
they upgrade their operating system. You will be to blame for this
problem.

If you are legitimately using some code that happens to be in a core
package, then the easiest safe alternative you have is to repackage
that code. That is, move the classes in question into your own package
namespace. This means that they will never be in conflict with core
system classes. If you find that you cannot do this, then that is an
indication that the path you are on will ultimately lead to pain,
suffering, grief, and lamentation.

[2010-12-21 15:49:59 - Client] 1 error; aborting
[2010-12-21 15:49:59 - Client] Conversion to Dalvik format failed with error
1


Any help please,
Thanks
saikiran

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: camera app giving error pls guide.

2010-12-21 Thread Sarwar Erfan
check the android menifest. Did you change it accordingly?

Is there something like android:sharedUserId?
That should be the source of the problem. Normally, you dont provide this 
key and Android gives you an unique id. But, if you specify an Id, all apps 
with same userId must be signed with the same certificate.

Read about android:sharedUserId in this link:
http://developer.android.com/guide/topics/manifest/manifest-element.html

Try omitting that.

Regards
Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: where is my data?

2010-12-21 Thread YuviDroid
Still, you can access that directory through your app. Try writing and
reading a file there and it should work fine.

On Tue, Dec 21, 2010 at 10:37 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Dec 21, 2010 at 4:34 AM, Stephan Wiesner
 testexpe...@googlemail.com wrote:
  thanks for the fast reply.
  only thing is: getFilesDir() returns  /data/data/de.stephanwiesner
  and, like i wrote, that dir does not exist (or is not accessible)

 It is not accessible from DDMS, nor from ASTRO. It is not supposed to be.

  And, I am sure that it was there last week. I have copied my database
  file several times to my PC for further processing and can't do that
  anymore, as I don't find it :-()
 
  My phone was never rooted.

 Then there was a flaw in the original firmware that has since been
 corrected. What you are experiencing is the normal state of affairs
 for Android development -- you can access your app's local files on an
 emulator, or possibly on rooted phones (not sure about that), but not
 on regular hardware.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: where is my data?

2010-12-21 Thread Stephan Wiesner
Yes, I can read my data. Frankly I just wanted to copy my database via
eclipse ddms to my PC for analysis. Guess I will have to mail it or
something .-)

Thanks,
Stephan

2010/12/21 YuviDroid yuvidr...@gmail.com:
 Still, you can access that directory through your app. Try writing and
 reading a file there and it should work fine.

 On Tue, Dec 21, 2010 at 10:37 AM, Mark Murphy mmur...@commonsware.com
 wrote:

 On Tue, Dec 21, 2010 at 4:34 AM, Stephan Wiesner
 testexpe...@googlemail.com wrote:
  thanks for the fast reply.
  only thing is: getFilesDir() returns  /data/data/de.stephanwiesner
  and, like i wrote, that dir does not exist (or is not accessible)

 It is not accessible from DDMS, nor from ASTRO. It is not supposed to be.

  And, I am sure that it was there last week. I have copied my database
  file several times to my PC for further processing and can't do that
  anymore, as I don't find it :-()
 
  My phone was never rooted.

 Then there was a flaw in the original firmware that has since been
 corrected. What you are experiencing is the normal state of affairs
 for Android development -- you can access your app's local files on an
 emulator, or possibly on rooted phones (not sure about that), but not
 on regular hardware.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


 --
 YuviDroid
 Check out Launch-X (a widget to quickly access your favorite apps and
 contacts!)
 http://android.yuvalsharon.net

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: where is my data?

2010-12-21 Thread Sarwar Erfan
If you can read it from app, why dont you just copy it to sdcard by writing 
some lines of codes in your app? Then you can get it to your pc from sdcard.

Regards
Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App disappeared from Market Home

2010-12-21 Thread blindfold
I got the JSON parsing error too when uploading an updated APK
yesterday and today, using Firefox. Did not get this error in the past
with Firefox. Just reloading the page then gives you a draft listing,
and you can next proceed to fill in the Recent Changes (was grayed out
after the error) and press Publish.

 I think it's a cheap way to get people to use Chrome

Reminds me of all those online banking and booking sites that would
break unless you used Microsoft Internet Explorer. :-)

Regards

On Dec 21, 12:14 am, TreKing treking...@gmail.com wrote:
 Which browser are you guys using? I had an issue updating yesterday where it
 wouldn't accept my hi-rez icon on Firefox and gave me some strange JSON
 parsing error when I uploaded my app.

 Everything went fine when I used Chrome instead.

 I think it's a cheap way to get people to use Chrome :-P

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] get name of selected checkboxes from listview

2010-12-21 Thread pramod.deore
Hi all,

  I have stored data in database. Now I am displaying that
data as a list now I want the name of list item that I have selected.
How to do this? Here is my code

public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras();
if(extras !=null)
{
value = extras.getString(roomName);
sw = getSwitchNameArray(value);
}
setListAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_multiple_choice,
sw));

final ListView listView = getListView();

listView.setItemsCanFocus(false);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

listView.setOnItemClickListener(new
ListView.OnItemClickListener() {

@Override
public void onItemClick(AdapterView? arg0, View arg1, 
int arg2,
long arg3)
{
// TODO Auto-generated method stub
System.out.println (User checked boxes);
ListView lv = getListView();
int listItemCount = lv.getChildCount();
for( int i=0;ilistItemCount;i++ )
{
System.out.println 
();

}


}
});


}

public String[] getSwitchNameArray(String rn)
{
   // return array of string
}

How to get name of selected checkbox items?

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to Play Video...?

2010-12-21 Thread Abhilash baddam
Hi,

  I can be able to display all video files names which are in a sdcard
in a listview, now how
  can i play a video whenever i clicked on a particular video which in a
list.
 Any help please..



Regards,
Abhilash

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to Play Video...?

2010-12-21 Thread Robin Talwar
Simple way is to make another activity and then put all the MediaPlayer code
in that activity
Call the above made activity through intent on onlistitemclick event.

On Tue, Dec 21, 2010 at 4:59 PM, Abhilash baddam 
abhilash.androiddevelo...@gmail.com wrote:

 Hi,

   I can be able to display all video files names which are in a sdcard
 in a listview, now how
   can i play a video whenever i clicked on a particular video which in
 a list.
  Any help please..



 Regards,
 Abhilash

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: where is my data?

2010-12-21 Thread Stephan Wiesner
ähm, actually, i do not have an (external) SD Card. The phone has 8 GB
on its own, so no need for a card.
Its actually very interesting to see how many apps don't work without a card .-)
Writing to the internal card would be great, though. Did not think of
that and I will try that right away.
I just wrote a PHP script I can send my data to and that forwards it
to, ähm, it works, but might be a little overkill...

Stephan

2010/12/21 Sarwar Erfan erfanonl...@gmail.com:
 If you can read it from app, why dont you just copy it to sdcard by writing
 some lines of codes in your app? Then you can get it to your pc from sdcard.
 Regards
 Sarwar Erfan

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: where is my data?

2010-12-21 Thread Sarwar Erfan
the internal 8GB flash memory is accessible when you connect the device to 
PC. If you have got what you need, then its already resolved :)

Regards
Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: findViewById reslove?

2010-12-21 Thread Nikola
On Tue, Dec 21, 2010 at 10:38 AM, Sarwar Erfan erfanonl...@gmail.comwrote:



 On Tuesday, December 21, 2010 3:05:10 PM UTC+6, vnv wrote:

 Hi,

 quick question, if you have two xml layouts and both layouts have the same
 button name for eg. how findViewById knows which one is used.

 In activity I say setContentView(R.layout.first). Does this means that
 findViewById will grab resources from first?.

 Yes.
 findViewById has no interest with what you have in your other xml's.

 Regards
 Sarwar Erfan


Thanks.


-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Nexus S as developer phone

2010-12-21 Thread Rafael Martins
Hi,

Anyone knows if Nexus S will be available for developers on Android Market?

Regards!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Auto Re-open Files Even After Shutdown

2010-12-21 Thread Sami
How to reopen the same files after shutdown. click here for details
http://softsami.blogspot.com/2010/12/auto-re-open-files-even-after-shutdown.html

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: camera app giving error pls guide.

2010-12-21 Thread Atik
thanks Erfan and i m doing the same.
hope fully i will complete it and let u know...

thanks for ur kind support

On Dec 21, 3:38 pm, Sarwar Erfan erfanonl...@gmail.com wrote:
 check the android menifest. Did you change it accordingly?

 Is there something like android:sharedUserId?
 That should be the source of the problem. Normally, you dont provide this
 key and Android gives you an unique id. But, if you specify an Id, all apps
 with same userId must be signed with the same certificate.

 Read about android:sharedUserId in this 
 link:http://developer.android.com/guide/topics/manifest/manifest-element.html

 Try omitting that.

 Regards
 Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] How to Play Video...?

2010-12-21 Thread Abhilash baddam
Thanks Robin Talwar..I didn't get that ideaIt's working...thanks a lot.

On Tue, Dec 21, 2010 at 5:05 PM, Robin Talwar
r.o.b.i.n.abhis...@gmail.comwrote:

 Simple way is to make another activity and then put all the MediaPlayer
 code in that activity
 Call the above made activity through intent on onlistitemclick event.

 On Tue, Dec 21, 2010 at 4:59 PM, Abhilash baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 Hi,

   I can be able to display all video files names which are in a sdcard
 in a listview, now how
   can i play a video whenever i clicked on a particular video which in
 a list.
  Any help please..



 Regards,
 Abhilash

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to check...?

2010-12-21 Thread Abhilash baddam
Hi friends,

  How can we know programmatically whether the mobile is
connected to internet or not either by mobile network or wifi.






Regards,
Abhilash

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to check...?

2010-12-21 Thread Kostya Vasilyev
ConnectivityManager (look it up in the sdk reference).

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
21.12.2010 15:35 пользователь Abhilash baddam 
abhilash.androiddevelo...@gmail.com написал:
 Hi friends,

 How can we know programmatically whether the mobile is
 connected to internet or not either by mobile network or wifi.






 Regards,
 Abhilash

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Encoding/decoding problem

2010-12-21 Thread ZeeZo
Hi Guys,
Thanks for your reply.I am having a very strange problem .If i send
byte[] ,that i get from onPreviewFrame method, through TCP to  my
PC.It gives me a valid JPG file but its whole black :(.But intersting
is that if i write that byte[] 1st on sd card  and save that as JPG
and and then read that JPG file back into byte[] and then send that
through TCP to my PC,everything work just perfect.I gets a valid
image .Its really weired and i got no clue what could be the
reason.Thing is that i dont want to write that data 1st on my SD
card.I want to send that data directly to my PC.

But Eric from above scenario at least we can assure oursleves that its
a vig-endian or small-endian issue.

Please help guys.

Best regards.

On Dec 19, 5:35 am, Eric Kraft ekraf...@gmail.com wrote:
 Just a quick suggestion for you due to limited information about your 
 situation: check the byte ordering of your TCP request. One machine might 
 send data big-endian and the other might receive it little-endian. The fact 
 saving the byte stream to a file works makes me think this is the issue you 
 are having.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] published app

2010-12-21 Thread Atik
i have published one app...

its showing the following line..

The application has access to the following (mouse-over for
description):
none

m i doing some mistake while setting some permission for the same..

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] How to check...?

2010-12-21 Thread Abhilash baddam
thanks Kostya Vasilyev,

   I tried like this

   void chkStatus()
{
final ConnectivityManager connMgr = (ConnectivityManager)
this.getSystemService(Context.CONNECTIVITY_SERVICE);

final android.net.NetworkInfo wifi =
connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

final android.net.NetworkInfo mobile =
connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);

if( wifi.isConnected() ){

Toast.makeText(this, Wifi , Toast.LENGTH_LONG).show();
}
else if( mobile.isAvailable() ){
Toast.makeText(this, Mobile 3G  , Toast.LENGTH_LONG).show();
}
else
{Toast.makeText(this, No Network  , Toast.LENGTH_LONG).show();}
}


my problem is in my mobile wifi is on but there is no network..it's showing
wifi in the toast..
i want to show if no network is there then there is a toast which represents
no network.
Thanks in advance.

Regards,
Abhilash



2010/12/21 Kostya Vasilyev kmans...@gmail.com

 ConnectivityManager (look it up in the sdk reference).

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com
 21.12.2010 15:35 пользователь Abhilash baddam 
 abhilash.androiddevelo...@gmail.com написал:

  Hi friends,
 
  How can we know programmatically whether the mobile is
  connected to internet or not either by mobile network or wifi.
 
 
 
 
 
 
  Regards,
  Abhilash
 
  --
  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
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] npapi plugin for android

2010-12-21 Thread bill dr
hi,

I am trying to write an npapi plugin for android browser.
i found that the android 2.2 sdk supply only the pluginstub interface for
that purpose.
has anyone any idea about the manner that we could implement that interface.
is there any example to clarify that issue.

Please help me, all clues are welcome.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to check...?

2010-12-21 Thread Abhilash baddam
any suggestions please...

2010/12/21 Abhilash baddam abhilash.androiddevelo...@gmail.com

 thanks Kostya Vasilyev,

I tried like this

void chkStatus()
 {
 final ConnectivityManager connMgr = (ConnectivityManager)
 this.getSystemService(Context.CONNECTIVITY_SERVICE);

 final android.net.NetworkInfo wifi =
 connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

 final android.net.NetworkInfo mobile =
 connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);

 if( wifi.isConnected() ){

 Toast.makeText(this, Wifi , Toast.LENGTH_LONG).show();
 }
 else if( mobile.isAvailable() ){
 Toast.makeText(this, Mobile 3G  , Toast.LENGTH_LONG).show();
 }
 else
 {Toast.makeText(this, No Network  , Toast.LENGTH_LONG).show();}
 }


 my problem is in my mobile wifi is on but there is no network..it's showing
 wifi in the toast..
 i want to show if no network is there then there is a toast which
 represents no network.
 Thanks in advance.

 Regards,
 Abhilash



 2010/12/21 Kostya Vasilyev kmans...@gmail.com

 ConnectivityManager (look it up in the sdk reference).

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com
 21.12.2010 15:35 пользователь Abhilash baddam 
 abhilash.androiddevelo...@gmail.com написал:

  Hi friends,
 
  How can we know programmatically whether the mobile is
  connected to internet or not either by mobile network or wifi.
 
 
 
 
 
 
  Regards,
  Abhilash
 
  --
  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
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Managing activity stack?

2010-12-21 Thread Nikola
Hi,

I have 3 activity that are used for showing data and choosing options.
There is menu with 3 button at the bottom that enables you to chose
activity.

My question is: how to handle following situations (implement them):

1) I want to show first fourth activity at the start, but discard it after
being shown.
(you cannot go back and see it) ,


2) If I am in for eg. in activity number 2 and want to go in activity 1 then
from 1 back to two,
what is procedure for this, beacuse when I am doing this through intents I
am leaving trail
behind so going with back button there is whole stack. (how to avoid this).


Thanks.

-- 
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: What is the structure of the Android PackageManagerService?

2010-12-21 Thread Mark Murphy
On Tue, Dec 21, 2010 at 5:02 AM, Geet geetag...@gmail.com wrote:
 Do you mean I need to post this question somewhere else in the forum,
 in the different category??or can u suggest me where can post this
 question to get the right answer??

I am saying that you need to modify the firmware of the device, which
typically means you are distributing your own hardware.

If that fits your business model, visit:

http://source.android.com/community/index.html

and choose a relevant group.

If, on the other hand, you are not planning on distributing your own
hardware or modded firmware for existing hardware, what you seek to do
is impossible.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] npapi plugin for android

2010-12-21 Thread maha rm
Hi,

   NPAPI plugin is available right from Donut. I never used sdk to develop
the plugin. Download the source code and the sample plugin is available in
source code itself.  In Android FROYO code, the sample plugin is there in
development/samples/BrowserPlugin.


Thanks,
Maha



On Tue, Dec 21, 2010 at 6:48 PM, bill dr bilel...@gmail.com wrote:

 hi,

 I am trying to write an npapi plugin for android browser.
 i found that the android 2.2 sdk supply only the pluginstub interface for
 that purpose.
 has anyone any idea about the manner that we could implement that
 interface. is there any example to clarify that issue.

 Please help me, all clues are welcome.

  --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] onDestroy() and finish()

2010-12-21 Thread André
I was using just this.finish(); in my app when exiting my app. But
using ESTaskManager after closing my app I found that it's still
running in the background. So I moved this.finish(); inside onDestroy.
But program is still running. What am I doing wrong? I want it to
fully close when it's closed.

André

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Nexus S as developer phone

2010-12-21 Thread Lance Nanek
Why not just buy it from BestBuy/etc. like anyone else?

On Dec 21, 7:13 am, Rafael Martins rafaelwmart...@gmail.com wrote:
 Hi,

 Anyone knows if Nexus S will be available for developers on Android Market?

 Regards!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Ticker issue....

2010-12-21 Thread TreKing
On Mon, Dec 20, 2010 at 11:48 PM, Abhilash baddam 
abhilash.androiddevelo...@gmail.com wrote:

 can anyone send me the code snippet regarding this issue.


Sorry, but I doubt anyone is going to do your work for you. Try a few thing
on your own, see if it works, and if not post back with what work you've
done and what specifically you're stuck on and I'm sure people will be glad
to help.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] I am getting keyDispatchingTImeout

2010-12-21 Thread TreKing
On Tue, Dec 21, 2010 at 12:54 AM, Ravindra Chavan
ravi.chavan...@gmail.comwrote:

 Could u send me solution for


No, sorry. But the solution is to not do networking on the main thread. This
is a common exercise in Android and you should have no trouble finding
plenty of examples online for your situation.


 , i am sending my code herewith which is written in java


Wow - you are going to have some serious fun maintaining and debugging that.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] onDestroy() and finish()

2010-12-21 Thread Mark Murphy
Odds are, ESTaskManager is incorrect. This is pretty typical for these
sorts of apps. Android caches processes, and whatever APIs these apps
(and DDMS) are using report the application that last ran in that
process, even if that application has no active components.

In other words, do not worry about it, unless you come up with
stronger proof that something is amiss in your app.

On Tue, Dec 21, 2010 at 9:54 AM, André pha...@hotmail.com wrote:
 I was using just this.finish(); in my app when exiting my app. But
 using ESTaskManager after closing my app I found that it's still
 running in the background. So I moved this.finish(); inside onDestroy.
 But program is still running. What am I doing wrong? I want it to
 fully close when it's closed.

 André

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] How to check...?

2010-12-21 Thread Sarwar Erfan
Have you tried getState() method of NetworkInfo?

Regards
Sarwar Erfan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: about the market 15 minutes refund window

2010-12-21 Thread TreKing
On Mon, Dec 20, 2010 at 11:05 PM, metal mikey coref...@gmail.com wrote:

 @TreKing: because the subject was changed, gmail lists it as a
 2nd conversation, however it remains bound to the same thread in
 Google Groups because it continues to use the docid from the original
 thread (that had its subject changed).


Oh, gotcha, that makes sense. I always assume it's Google Groups being it's
crappy self. I take back my defense of the hijacker =P

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] published app

2010-12-21 Thread TreKing
On Tue, Dec 21, 2010 at 6:53 AM, Atik atik0...@gmail.com wrote:

 its showing the following line..


Where?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: onDestroy() and finish()

2010-12-21 Thread Leon Moreyn-Android Development
If you want to verify in theory that you app has shut down put a log
into the onDestroy() and have it log that the processes are all
terminated.

Leon

On Dec 21, 9:54 am, André pha...@hotmail.com wrote:
 I was using just this.finish(); in my app when exiting my app. But
 using ESTaskManager after closing my app I found that it's still
 running in the background. So I moved this.finish(); inside onDestroy.
 But program is still running. What am I doing wrong? I want it to
 fully close when it's closed.

 André

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Calculate Horizontal ScrollBar Length with its child

2010-12-21 Thread Ganapathy
Hi,
Can any one help me in this problem.
  I want to calculate the length of Horizontal scrollbar which
contains many child .
and also i want to find when it reach its end.

Thanks,
Ganapathy.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Cost effectiveness of JSON in Android

2010-12-21 Thread Leon Moreyn-Android Development
Thanks Brill. I will take this into consideration.

On Dec 21, 12:42 am, Brill Pappin br...@pappin.ca wrote:
 I wouldn't be too hasty about removing the JSON. XML will cost you more in
 terms of resources and connecting directly to a database is likely also
 going to be more costly (although without seeing the actual implementation,
 I can't be sure of that).

 JSON is actually about as perfect as it gets for mobile devices... you could
 only get better by implementing your own protocol and even then your likely
 not going to save much.

 Also note that connecting directly to the database means that the database
 is exposed on the net in general and will present security problems.
 Although databases have security, they are not designed to ward off all the
 worms that are constantly probing a public address looking for a weak spot.

 You can deploy something like MongoDB (which presents it's data as JSON
 anyway) but it's not recommended.

 However, after rereading your post, I think you are attempting to put a web
 service between your app and the database. This is exactly how the rest of
 us will be doing it, but you don't need to get rid of JSON, in fact JSON is
 what 90% of the apps in the market will be using.

 If your asking how you build that web service, I recommend Jersey REST API
 as a good place to start. There are plenty of other frameworks out there for
 doing it though, so find one you like.

 - Brill Pappin

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Nexus S as developer phone

2010-12-21 Thread Lance Nanek
Oh, I just read the other thread on this, maybe you are international.
I'd be willing to buy and ship you one at cost, although I'd want to
open it up and test an app or two on it first as my fee.
Unfortunately, I'm seeing several errors reported on the Nexus S that
aren't reproducible on the Android 2.3 emulator. So they are
apparently quite different. I don't really want one, personally, since
it can't use the 3G off my iPhone SIM.

On Dec 21, 9:58 am, Lance Nanek lna...@gmail.com wrote:
 Why not just buy it from BestBuy/etc. like anyone else?

 On Dec 21, 7:13 am, Rafael Martins rafaelwmart...@gmail.com wrote:

  Hi,

  Anyone knows if Nexus S will be available for developers on Android Market?

  Regards!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: onDestroy() and finish()

2010-12-21 Thread Kostya Vasilyev

21.12.2010 18:12, Leon Moreyn-Android Development пишет:

If you want to verify in theory that you app has shut down put a log
into the onDestroy() and have it log that the processes are all
terminated.


That's actually not the same.

Even with all application's activities and services terminated, Android 
may still keep the process in memory in a dormant state until it's 
kicked out when memory gets low.


I'd recommend anyone that they stop worrying about process lifecycles, 
and focus on framework-level components and their lifecycles instead 
(activities, services, etc., ensuring proper cleanup of resources and 
state management).


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Media player problems with android 2.3 (gingerbread), I can't open a service connection....

2010-12-21 Thread Lance Nanek
I've seen people firing broadcasts that look the same as the media
buttons on some headsets. That might be a workable alternative to
using the service if you don't need anything special.

On Dec 20, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote:
 Please understand that this is not part of the Android SDK. According
 to the source code, it is not exported, and therefore is not available
 outside of its process.



 On Mon, Dec 20, 2010 at 3:43 PM, neuromit stuart.lay...@gmail.com wrote:
  I'm trying to setup a service connection to control the stock android
  media player. This works great under 2.1 and 2.2. However, when I
  tried to run my application on the 2.3 emulator my application crashes
  and I get the following error:

  ERROR/AndroidRuntime(466): Caused by: java.lang.SecurityException: Not
  allowed to bind to service Intent
  {cmp=com.android.music/.MediaPlaybackService }

  Have the permissions to bind to the IMediaServiceConnetion been
  revoked for gingerbread?

  Here is the code I'm running from my class that is a child of
  ServiceConnection

  Intent i = new Intent();
  i.setClassName(com.android.music,
  com.android.music.MediaPlaybackService);
  a.bindService(i, (ServiceConnection) this, 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
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] what is the meaning of FSL?

2010-12-21 Thread TreKing
On Tue, Dec 21, 2010 at 1:21 AM, 袁堂夫 yuantangf...@gmail.com wrote:

 Who can tell  me?


Google can!

Also try reading this: http://www.catb.org/~esr/faqs/smart-questions.html

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers]How to get the data from LBS?

2010-12-21 Thread TreKing
On Tue, Dec 21, 2010 at 4:13 AM, kevens hao ithjf.kev...@gmail.com wrote:

 Use LBS, how to get the data?
 For example, hotel, restaurant, groggery info and so on.


You should reword and clarify you question.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] get name of selected checkboxes from listview

2010-12-21 Thread TreKing
On Tue, Dec 21, 2010 at 5:28 AM, pramod.deore deore.pramo...@gmail.comwrote:

 How to get name of selected checkbox items?


Keep a reference to your adapter, which has the names, and index into it
when the list is clicked.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Managing activity stack?

2010-12-21 Thread TreKing
On Tue, Dec 21, 2010 at 8:00 AM, Nikola nikola1...@gmail.com wrote:

 1) I want to show first fourth activity at the start, but discard it after
 being shown. (you cannot go back and see it)


Call finish() on it when you're done with it.


 2) If I am in for eg. in activity number 2 and want to go in activity 1
 then from 1 back to two, what is procedure for this, beacuse when I am doing
 this through intents I am leaving trail behind so going with back button
 there is whole stack. (how to avoid this).


Use the right launch mode flags. See the documentation for the various flags
you can use to launch activities and their behavior.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: onDestroy() and finish()

2010-12-21 Thread André
Thanks guys. This was good to know!

On Dec 21, 4:26 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 21.12.2010 18:12, Leon Moreyn-Android Development пишет:

  If you want to verify in theory that you app has shut down put a log
  into the onDestroy() and have it log that the processes are all
  terminated.

 That's actually not the same.

 Even with all application's activities and services terminated, Android
 may still keep the process in memory in a dormant state until it's
 kicked out when memory gets low.

 I'd recommend anyone that they stop worrying about process lifecycles,
 and focus on framework-level components and their lifecycles instead
 (activities, services, etc., ensuring proper cleanup of resources and
 state management).

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Looking for ideas for Multipart Form Handling on Web Service

2010-12-21 Thread Kevin Tambascio
Kostya,

Using that class worked very well.  It didn't dawn on me that I could
take pieces of that library and use them, but it worked great.  I had
to copy about 6 additional files into my project, but not a big deal.
I had to change a few constructors that were package-private to
public, so that I could call them.  It's clear this was only meant as
an internal class, but it's working fine for me.

Thanks for the advice,
Kevin


On Dec 20, 1:02 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Kevin,

 Have you seen this class:

 http://www.docjar.com/html/api/org/apache/commons/fileupload/Multipar...

 I *think* its only dependencies are Java.io.* classes, and (in the
 current version) a couple of small utility classes.

 -- Kostya

 20.12.2010 20:52, Kevin Tambascio пишет:









  Hi,

  I'm playing around with writing a web service that runs on Android
  that handles uploading photos.  I am only writing the server, and do
  not have any control over the client.

  Inside of the message is a small SOAP message, and then the binary
  data.  I am trying to figure out if there's a library that can do the
  parsing of the two pieces.  Apache Commons FileUpload looked like the
  obvious choice, however, it seems to be heavily intertwined with
  servlet libraries, and I don't know if it's possible (or if it's a
  good idea) to put too much J2EE infrastructure on a phone.

  Parsing it myself doesn't seem too bad.  I'm not too familiar with the
  raw HTTP layers/protocol, but it looks like the the boundary delimiter
  string is given in the content type header.  If I find and index past
  those, I should be able to find the two halves of the multi-part
  message that I need to deal with.  At least that's what I seem to
  think after looking at a wireshark trace of the client talking to the
  real server.

  Any thoughts would be appreciated.

  -Kevin

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Looking for ideas for Multipart Form Handling on Web Service

2010-12-21 Thread Kevin Tambascio
Brill,

Thanks for the suggestion, but I'm dealing with a client that I do not
own, so I'm trying to match the desktop version of their server.

Thanks,
Kevin


On Dec 20, 2:39 pm, Brill Pappin br...@pappin.ca wrote:
 I recommend Jersey REST API for this kind of thing.
 I do multipart submissions all the time with it... although I never
 use SOAP (only JSON between mobile app and server).

 - Brill Pappin

 On Dec 20, 12:52 pm, Kevin Tambascio kevin.tambas...@gmail.com
 wrote:







  Hi,

  I'm playing around with writing a web service that runs on Android
  that handles uploading photos.  I am only writing the server, and do
  not have any control over the client.

  Inside of the message is a small SOAP message, and then the binary
  data.  I am trying to figure out if there's a library that can do the
  parsing of the two pieces.  Apache Commons FileUpload looked like the
  obvious choice, however, it seems to be heavily intertwined with
  servlet libraries, and I don't know if it's possible (or if it's a
  good idea) to put too much J2EE infrastructure on a phone.

  Parsing it myself doesn't seem too bad.  I'm not too familiar with the
  raw HTTP layers/protocol, but it looks like the the boundary delimiter
  string is given in the content type header.  If I find and index past
  those, I should be able to find the two halves of the multi-part
  message that I need to deal with.  At least that's what I seem to
  think after looking at a wireshark trace of the client talking to the
  real server.

  Any thoughts would be appreciated.

  -Kevin

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread Kalyan Akella
Hi,

I just tested the start  bind service approach and found some really weird 
stuff going on in the logcat output. Here's what I tried:

Step1: the main activity A is launched.
Step2: A's *onCreate* method attempts to connect with service S (launched in 
a separate process private to the activity) in the following way:

   1. Reads the SharedPreferences to determine if S is already started 
   (using a boolean flag)
   2. If S is not started, invokes *startService* with intent I (*new 
   Intent(this, MyService.class)*)
  - Also sets the flag in SharedPreferences to indicate service started
   3. Calls *bindService(intent, this, 0)* with the same intent I. This step 
   is always executed irrespective of whether S was started or not in 2.

Step3: activity A also implements the ServiceConnection interface and it 
logs the output on service connected/disconnected callbacks.

Now, when I execute these steps in the emulator (v2.2 API level 8), I see 
the following logcat output (note that all of it is generated as a result of 
executing A's *onCreate* method only):

12-21 15:14:01.722: INFO/ActivityManager(59): Starting activity: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
flg=0x1020 cmp=com.my.example/.activities.MyActivity }
12-21 15:14:01.893: INFO/ActivityManager(59): Start proc com.my.example for 
activity com.my.example/.activities.MyActivity: pid=544 uid=10041 
gids={3003, 1015}
12-21 15:14:02.543: INFO/MyActivity(544): Calling startServiceIfRequired  *- 
this is Step 2*
12-21 15:14:02.552: INFO/MyActivity(544): Starting MyService
12-21 15:14:02.572: INFO/ActivityManager(59): Start proc 
com.my.example:myRemote for service com.my.example/.services.MyService: 
pid=550 uid=10041 gids={3003, 1015}  *- first time service starts here*
12-21 15:14:02.602: INFO/MyActivity(544): Calling bindService  *- this is 
Step 2.3*
12-21 15:14:02.993: INFO/ActivityManager(59): Displayed activity 
com.my.example/.activities.MyActivity: 1168 ms (total 1168 ms)
12-21 15:14:03.223: INFO/MyActivity(550): Inside service onCreate
12-21 15:14:03.223: INFO/MyActivity(550): Inside readServiceMetadata
12-21 15:14:03.243: INFO/MyActivity(550): Done readServiceMetadata
12-21 15:14:03.273: INFO/MyActivity(550): Inside initLocationManager
12-21 15:14:03.353: INFO/MyActivity(550): Done initLocationManager
12-21 15:14:03.353: INFO/MyActivity(550): My service started
12-21 15:14:03.384: INFO/MyActivity(550): Inside service onBind
12-21 15:14:03.393: INFO/MyActivity(544): Inside activity onServiceConnected
12-21 15:14:03.413: INFO/MyActivity(544): Inside activity 
onServiceDisConnected  *- why ??? somehow android decides to kill this 
service*
12-21 15:14:03.423: INFO/MyActivity(550): Inside service onUnBind
12-21 15:14:03.423: INFO/MyActivity(550): Inside service onDestroy
12-21 15:14:03.433: INFO/MyActivity(550): My service stopped

As you can notice, right after the call to startService  bindService, 
android seems to start killing my service S without my activity even calling 
*unbindService*. I observed the exact same behavior even if I moved this 
service connection logic to the A's onStart method. 

Am I missing something basic here. Will you please help me ? Let me know if 
any more information is required.

Sincere Regards,
Kalyan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread Kostya Vasilyev

Kalyan,

It should not be necessary to keep track of service state on your own. 
You can call startService just in case, and then have the service call 
stopSelf when *it* knows it's done. StartService calls do not nest, 
that's made clear in the docs.


Now for binding - are you returning a binder from your service's 
onBind() method? I believe when you create a Service using wizards in 
Eclipse, the default implementation returns null, which would explain 
what you are seeing.


Also, make sure you're not calling unBindService until it's time to do so.

-- Kostya

21.12.2010 19:19, Kalyan Akella ?:

Hi,

I just tested the start  bind service approach and found some really 
weird stuff going on in the logcat output. Here's what I tried:


Step1: the main activity A is launched.
Step2: A's *onCreate* method attempts to connect with service S 
(launched in a separate process private to the activity) in the 
following way:


   1. Reads the SharedPreferences to determine if S is already started
  (using a boolean flag)
   2. If S is not started, invokes /startService/ with intent I (/new
  Intent(this, MyService.class)/)
  * Also sets the flag in SharedPreferences to indicate
service started
   3. Calls /bindService(intent, this, *0*)/ with the same intent I.
  This step is always executed irrespective of whether S was
  started or not in 2.

Step3: activity A also implements the ServiceConnection interface and 
it logs the output on service connected/disconnected callbacks.


Now, when I execute these steps in the emulator (v2.2 API level 8), I 
see the following logcat output (note that all of it is generated as a 
result of executing A's *onCreate* method only):


12-21 15:14:01.722: INFO/ActivityManager(59): Starting activity: 
Intent { act=android.intent.action.MAIN 
cat=[android.intent.category.LAUNCHER] flg=0x1020 
cmp=com.my.example/.activities.MyActivity }
12-21 15:14:01.893: INFO/ActivityManager(59): Start proc 
com.my.example for activity com.my.example/.activities.MyActivity: 
pid=544 uid=10041 gids={3003, 1015}
12-21 15:14:02.543: INFO/MyActivity(544): Calling 
startServiceIfRequired *- this is Step 2*

12-21 15:14:02.552: INFO/MyActivity(544): Starting MyService
12-21 15:14:02.572: INFO/ActivityManager(59): Start proc 
com.my.example:myRemote for service 
com.my.example/.services.MyService: pid=550 uid=10041 gids={3003, 
1015} *- first time service starts here*
12-21 15:14:02.602: INFO/MyActivity(544): Calling bindService *- this 
is Step 2.3*
12-21 15:14:02.993: INFO/ActivityManager(59): Displayed activity 
com.my.example/.activities.MyActivity: 1168 ms (total 1168 ms)

12-21 15:14:03.223: INFO/MyActivity(550): Inside service onCreate
12-21 15:14:03.223: INFO/MyActivity(550): Inside readServiceMetadata
12-21 15:14:03.243: INFO/MyActivity(550): Done readServiceMetadata
12-21 15:14:03.273: INFO/MyActivity(550): Inside initLocationManager
12-21 15:14:03.353: INFO/MyActivity(550): Done initLocationManager
12-21 15:14:03.353: INFO/MyActivity(550): My service started
12-21 15:14:03.384: INFO/MyActivity(550): Inside service onBind
12-21 15:14:03.393: INFO/MyActivity(544): Inside activity 
onServiceConnected
12-21 15:14:03.413: INFO/MyActivity(544): Inside activity 
onServiceDisConnected *- why ??? somehow android decides to kill this 
service*

12-21 15:14:03.423: INFO/MyActivity(550): Inside service onUnBind
12-21 15:14:03.423: INFO/MyActivity(550): Inside service onDestroy
12-21 15:14:03.433: INFO/MyActivity(550): My service stopped

As you can notice, right after the call to startService  bindService, 
android seems to start killing my service S without my activity even 
calling /unbindService/. I observed the exact same behavior even if I 
moved this service connection logic to the A's onStart method.


Am I missing something basic here. Will you please help me ? Let me 
know if any more information is required.


Sincere Regards,
Kalyan

--
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] uninstall TTS data from Android = 1.6 ?

2010-12-21 Thread DulcetTone
How do you uninstall voice data from a phone that has it installed?

I need to test code that handles cases of it being absent.

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread Kalyan Akella
Thank you for the reply.

I'm indeed returning a valid IBinder inside the service's onBind method. 
Here it is:

public class MyService extends IntentService {
private Messenger myMessenger;

// Service Constructor
public MyService() {
super(MyService);
*myMessenger = new Messenger(new MyServiceHandler(this))*;
}

@Override
public IBinder onBind(Intent intent) {
Log.i(APP_TAG, Inside service onBind);
return *myMessenger.getBinder()*;
}

// other methods...
}

Moreover I ensured that my activity calls the *unbindService()* method only 
from inside its *onDestroy()* method and no where else. This is exactly 
what's been puzzling me as to why android still decides to unbind  kill the 
service even if the activity that spawned it is still alive in the first 
place.

Am I missing something here ?? Any pointers ???
Sincere Regards,
Kalyan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread Streets Of Boston
If i remeber correctly, the 'relevance' of the service is as high as
the activity with the highest 'relevance' that is bound to it. With
'relevance' i mean the importance of the activity/service that Android
OS uses to determine if it can be killed by the OS or not.

In your case, only *your* activity is bound to it. When your activity
is in the foreground, it has the highest 'relevance'. Since it's bound
to your service, the service has the highest relevance as well.
Android OS will not kill either your activity or your service.

When your activity goes to the background (onPause, onStop), your
activity gets a lower relevance and maybe considered for killing when
necessary. Since it is the only activity still bound to your service,
your service's relevance gets lower as well and it may be considered
for killing by the OS. This is probably what happens; the OS
disconnects and kills your service.

When your service is killed but not your activity (which is still
paused/stopped), you should get a callback in your bind-request
callback-handler of this event (disconnect event).
When you activity goes to the foreground again (onResume), your
service should be restarted (and your bind-request callback-handler
will be notified of this re-connect event as well).


On Dec 21, 11:57 am, Kalyan Akella kalyan.ake...@gmail.com wrote:
 Thank you for the reply.

 I'm indeed returning a valid IBinder inside the service's onBind method.
 Here it is:

 public class MyService extends IntentService {
     private Messenger myMessenger;

     // Service Constructor
     public MyService() {
         super(MyService);
         *myMessenger = new Messenger(new MyServiceHandler(this))*;
     }

     @Override
     public IBinder onBind(Intent intent) {
         Log.i(APP_TAG, Inside service onBind);
         return *myMessenger.getBinder()*;
     }

     // other methods...

 }

 Moreover I ensured that my activity calls the *unbindService()* method only
 from inside its *onDestroy()* method and no where else. This is exactly
 what's been puzzling me as to why android still decides to unbind  kill the
 service even if the activity that spawned it is still alive in the first
 place.

 Am I missing something here ?? Any pointers ???
 Sincere Regards,
 Kalyan

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android Referral Tracking not working

2010-12-21 Thread Andrew
I am attempting to get Android Referral tracking to work. I am
following the only documentation I have found here
http://code.google.com/mobile/analytics/docs/android/#referrals

I have the following in my android manifest file

receiver
android:name=com.google.android.apps.analytics.AnalyticsReceiver
android:exported=true
intent-filter
action android:name=com.android.vending.INSTALL_REFERRER /
/intent-filter
/receiver
receiver android:name=com.package.Receiver android:exported=true
intent-filter
action android:name=com.android.vending.INSTALL_REFERRER /
/intent-filter
/receiver
uses-sdk android:minSdkVersion=4/

com.package.Receiver starts with:

public void onReceive(Context paramContext, Intent paramIntent) {
String str1 = paramIntent.getStringExtra(referrer);
Log.i(myapp, action: ' + paramIntent.getAction() + '
referrer string: ' + str1 + ');

Also with a little bit of decompiling
com.google.android.apps.analytics.AnalyticsReceiver has the following
code in it:

public void onReceive(Context ctx, Intent intent)
/* */   {
/*  24 */ String referrer = intent.getStringExtra(referrer);
/* */
/*  26 */ if ((!
(com.android.vending.INSTALL_REFERRER.equals(intent.getAction(
|| (referrer == null))
/* */ {
/*  28 */   return;
/* */ }
/* */
/*  31 */ String formattedReferrer = formatReferrer(referrer);
/* */
/*  33 */ if (formattedReferrer != null) {
/*  34 */   PersistentEventStore store = new
PersistentEventStore(ctx);
/*  35 */   store.setReferrer(formattedReferrer);
/*  36 */   Log.d(googleanalytics, new
StringBuilder().append(Stored
referrer:).append(formattedReferrer).toString());
/* */ } else {
/*  38 */   Log.w(googleanalytics, Badly formatted referrer,
ignored);
/* */ }
/* */   }

Note the two lines 36 and 38 that Log googleanalytics


I have tried pushing the above app to the market, downloading it on my
Nexus One (after uninstalling a previous version of the app). I have
generated a link using the google page I linked to at the beginning of
this post

http://market.android.com/search?q=pname:com.package.appreferrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_term%3Drunning%252Bshoes%26utm_content%3Dcontent1%26utm_campaign%3Dslogan

I attached logcat to my Nexus One while I download the app, I do not
see any logs from googleanalytics or myapp. The rest of the google
analytics library does work for my app. I.E. I see records on google
analytics about pages hits etc. However all the traffic sources are
Direct Traffic. I am at a loss as to what is going on. Does anyone
have any insight into what I might be doing wrong?

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread Kostya Vasilyev
What happens if you move start/bind to onStart of your activity?

Also, in my code I do it in the reverse order: bind first, then the binding
is established, finally startService when about to tell it to do something
in the background.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
21.12.2010 19:57 пользователь Kalyan Akella kalyan.ake...@gmail.com
написал:
 Thank you for the reply.

 I'm indeed returning a valid IBinder inside the service's onBind method.
 Here it is:

 public class MyService extends IntentService {
 private Messenger myMessenger;

 // Service Constructor
 public MyService() {
 super(MyService);
 *myMessenger = new Messenger(new MyServiceHandler(this))*;
 }

 @Override
 public IBinder onBind(Intent intent) {
 Log.i(APP_TAG, Inside service onBind);
 return *myMessenger.getBinder()*;
 }

 // other methods...
 }

 Moreover I ensured that my activity calls the *unbindService()* method
only
 from inside its *onDestroy()* method and no where else. This is exactly
 what's been puzzling me as to why android still decides to unbind  kill
the
 service even if the activity that spawned it is still alive in the first
 place.

 Am I missing something here ?? Any pointers ???
 Sincere Regards,
 Kalyan

 --
 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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Proguard problem after 2.3 update

2010-12-21 Thread licorna
I just update SDK to 2.3 and I'm facing the same problem here. I don't
use Eclipse, only ant to build my project. This is a list of
everything you recommend to do, and that I did:

 1. Added key.store and key.alias to local.properties
 2. Updated the project with android update project --path .
 3. Added proguard.dir to local.properties with the path of the
proguard lib that came with the SDK (.../android_sdk/tools/proguard)
 4. Added proguard.config=proguard.cfg to default.properties

I'm getting the same error: Problem: failed to create task or type
proguard.

Any ideas?

On Dec 15, 4:30 pm, jtoolsdev brianjto...@gmail.com wrote:
 No I didn't do anything to Eclipse and looking at the Ant section it
 is pointing to the 1.7.1 version but maybe a different one than in /
 usr/bin/.    All I know is after doing that it exported to Proguard.
 What I haven't had time to try yet was a build from the console.  Also
 commenting out the proguard config in the default.properties did turn
 off Proguard on the Export either as I wanted a build without it to
 more easily track down a bug.   Another thing I did do was rename my
 Android SDK folder as it was ancient and I thought perhaps characters
 in the path may have caused a problem.  However I don't think that in
 itself fixed the problem.

 On Dec 15, 7:30 am, jb cona...@gmail.com wrote:







  Did you update the ant plugin for Eclipse to 1.8.1? I know the current
  version is 1.7.1 in Helios 3.6. If so how did you do that?
  Or did you just install apache ant to your system? Did you have to
  change the Ant preferences in Eclipse to point to your 1.8.1
  installation?

  Also, did you have to add -ignorewarning to your proguard.cfg to get
  it to complete the Proguard phase?

  jb

  On Dec 14, 4:37 pm, jtoolsdev brianjto...@gmail.com wrote:

   Well, after updating ant and exporting a signed app from Eclipse it
   worked.  I'll try command line later but for now it's out of the way.
   The other problem which I see others posted on this group is LVL isn't
   registering any license with emulators since the 2.3 update.  I put
   the signed obfuscated app on an emulator on another machine and the
   license worked there but that installation is 2.2.  It would be nice
   to know what is causing that.

   On Dec 14, 3:01 pm, jtoolsdev brianjto...@gmail.com wrote:

For those following this Android sneaked in an instruction that to
even use Proguard in Eclipse you need to modify the default.properties
file with the proguard.config=proguard.cfg (or wherever it is).  This
however did not solve the problem.  They also state elsewhere that you
need ant 1.8 or better (Ubuntu 10.04 comes with 1.7.1).  Now that may
be the source of the parsing problem as soon as I figure out how this
apache-ant 1.8.1 install works.  So far by instructions given it
isn't.  Big problem with open source development is good developers
lousy docs.  IT people probably shake their heads but we programmers
don't do these things everyday so concise and clear docs are
necessary.  Development isn't supposed to be an adventure game.

I would also like to see centralized upgrade info for Android
development rather having to do a scavenger hunt for what has changed
in the development environment.  Next time I'll wait for revision 2 or
higher.

On Dec 13, 12:56 pm, jtoolsdev brianjto...@gmail.com wrote:

 And proguard.config=/path/to/proguard.cfg goes where?  In the
 build.xml?  local.properties?  There already seems to be a reference
 to it in the add-proguard-release.xml:
 property name=proguard-conf value=${proguard-conf.absolute.dir}/
 proguard.cfg /

 I'm now thinking the previous error:
 add-proguard-release.xml:35: Expecting class path separator ':' before
 '{' in argument number 1
 is the problem which somehow messes up it finding proguard if I
 surround the path with quotes though it does away with this error.
 The path has no spaces so quotes shouldn't be necessary and they
 weren't needed before the 2.3 update.  And I tried it pointing to the
 Proguard installation previously used and also with the installation
 that came with the 2.3 update.

 As for Eclipse it doesn't seem to be running it through Proguard when
 generating a signed release as it's not shrinking the size and the obf
 folder is not getting updated unless it is putting one in some
 undocumented location.  I tried the signed release yesterday thinking
 an option for Proguard might be the but saw none.  In fact I see none
 whatsoever in the Properties.

 On Dec 13, 12:07 am, Xavier Ducrohet x...@android.com wrote:

  once you've generated a standard build.xml with android update
  project all you need to do is set
  proguard.config=/path/to/proguard.cfg

  android update project should create a default proguard.cfg in the
  root of your folder as well. This file is 

[android-developers] Re: Direct interaction between application and library

2010-12-21 Thread Brill Pappin
Can you use jini to talk to the native code?

- Brill

On Dec 21, 3:08 am, Webgenius webgenius.co...@gmail.com wrote:
 Hello,

 I am working on a GPS library which needs to interact directly with an
 application.
 I am not supposed to change any framework code. Hence I have managed
 to implement this solution using sockets.

 The GPS library creates a new detached thread on startup, which opens
 up a socket.
 The application also connects to the same socket on onCreate() method.

 However the problem is that this setup uses a lot of resources, and I
 am looking for a way to solve this problem.
 I am looking for a design which will create both the client and server
 sockets on application startup, and destroy the same when the
 application quits.
 To make this happen, I have thought of one approach:

 Implement JNI in the vendor directory and create a so, that will be
 loaded, and this communicates with GPS library.
 When the application is launched, call a function in the library which
 opens the socket, and on onDestroy() call another method, which
 destroys the socket connection.

 But this also suffers from resource problem since the so it is a
 process in memory.

 Please suggest a method to overcome this problem.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Greystripe banner.refresh causes null pointer exception

2010-12-21 Thread MrY
It was totally my bad.  I tried to find the banner view even before
setting a layout in activity code, so the banner became null.

On Dec 19, 8:59 pm, MrY hosun@gmail.com wrote:
 I sent a message to Greystripe support team, but I was wondering if
 anyone else has faced a similar issue and know the cause / solution.

 I followed their android SDK document.
  - added a provider, a view, and permissions to manifest.xml
  - called GSSDK.initialize() and banner.refresh() in my activity
  - registered my phone as a test device in their web site

  banner.refresh() throws a null pointer exception while
 GSSDK.initialize does not.

 I would appreciate pointers.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] C2DM - Message to device delivery time

2010-12-21 Thread Dalla
Hi all

I´m currently developing a C2DM app, and I`m trying to understand what
controls
the time taken from me requesting a push notification, until the
message is actually sent to my device?

Most of the time I get the message within seconds, but on other
occasions it´ll take
up to a minute or more before the message is received by my device.
I´ve tried on both my HTC Desire and with the emulator, experiencing
the same issue.

Can anyone please elaborate on this?

Regards
Daniel

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] MonkeyRunner

2010-12-21 Thread A. Elk
Just as a note:

The documentation for the Android 2.3 SDK is now online at
developer.android.com. It is also one of the packages available for
download through the SDK manager.

This documentation includes documentation for monkeyrunner.

Although monkeyrunner is not part of the Android 2.2 SDK, you can get
monkeyrunner from the Android Open Source Project at
source.developer.com. It probably works with Android 2.2. You're
probably better off upgrading to Android 2.3.

If you have more questions, please read the documentation.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread jotobjects


On Dec 21, 8:19 am, Kalyan Akella kalyan.ake...@gmail.com wrote:
 Hi,

 I just tested the start  bind service approach and found some really weird
 stuff going on in the logcat output. Here's what I tried:

 Step1: the main activity A is launched.
 Step2: A's *onCreate* method attempts to connect with service S (launched in
 a separate process private to the activity) in the following way:

    1. Reads the SharedPreferences to determine if S is already started
    (using a boolean flag)
    2. If S is not started, invokes *startService* with intent I (*new
    Intent(this, MyService.class)*)
       - Also sets the flag in SharedPreferences to indicate service started

This is pointless to use SharedPreferences this way..  You can call
startService multiple times. There is only one Service instance ever
started.

Also you mentioned at the beginning that this is an IntentService.
The behavior of an IntentService is that it stops itself when there
are not more Itents waiting to be processed.  So the Serivice is not
being killed.  It is exiting as designed.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Game pretty much like mine

2010-12-21 Thread niko20
The initial reaction is usually that if it's out there already, that's
a bad thing. Here's a few basic things to remember:

1. If you are the first, that is always a big bonus. Being first helps
you win because you can get your app embedded into people's minds. You
want to be first. But it can't always happen of course.

2. If you are not first, it's not always oh crap waste of time. The
good thing about competition is it shows that there is a market for
the app. So just make your app better then theirs, more polished, more
fun, etc. Whatever it takes. Try to read the comments of the other
app, try to figure out the target market they have and increase it for
yours.

-niko


On Dec 21, 3:09 am, Pent tas...@dinglisch.net wrote:
  If you put the time in and your ready to go, just deploy it.
  Never mind what the rest are doing, you'll never get the
  market experience you need without deploying it.

 On the other hand, initial impact is very important. It's the brief
 chance to really catch on before you sink into the swamp and disappear
 forever. My own advice if there is a competitor is to polish your app
 to the absolute maximum before release.

 Pent

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Anybody seen a slowdown in sales?

2010-12-21 Thread niko20
I think the market ranking are more accurate now. My app, which has
over 20,000 downloads and a 4.6 rating, should certainly be higher
than an app that has only 1000-5000 downloads and a 4.0 rating. I
think they previously have too much emphasis on active installs.
Looks like it's fixed now, and for the better in my opinion.

-nik

On Dec 20, 12:33 am, Mark Carter mjc1...@googlemail.com wrote:
 Indeed I am painfully aware of this and have written in countless forums
 about it over the past couple of years!

 Country I am living in dictates which Country sim card I use in order to
 have mobile broadband without paying huge roaming costs. Switching sim cards
 requires me to pop down to some nearby cafe to make use of their wifi and
 then access the Market for paid apps (or free apps unavailable in obscure
 countries - eBay, YouTube?).

 How I love the sim card rule :(

 On 20 December 2010 14:24, Zsolt Vasvari zvasv...@gmail.com wrote:









  On Dec 20, 2:16 pm, Mark Carter mjc1...@googlemail.com wrote:
   Right now, I'm
   unable to check its ranking on the Android Market app thanks to being in
  a
   non-paid app country :(

  You know that it's the SIM card that determines if you can see the
  paid apps, not your physical location.

  I have to do this as I live in Singapore and I cannot see some apps,
  such as e-Bay (why, why?) and if I want to update it, I need to swap
  in my (non-working) T-Mobile USA SIM card

  --
  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
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Prevent an Android Service from getting destroyed after an unbind

2010-12-21 Thread Kostya Vasilyev

21.12.2010 22:05, jotobjects пишет:

Also you mentioned at the beginning that this is an IntentService.
The behavior of an IntentService is that it stops itself when there
are not more Itents waiting to be processed.  So the Serivice is not
being killed.  It is exiting as designed.


Yeah, that's it.

IntentService exits as soon as all intents sent through startService() 
have been processed.


The unbinding at this point is done by the framework, since the service 
is exiting.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] rawQuery selection args?

2010-12-21 Thread Tobiah

I am unable to find an example of how to use the 'selection args' in the
second argument to rawQuery:

public Cursor rawQuery (String sql, String[] selectionArgs)

Can someone explain what they would be for and how to use them?

Thanks,

Tobiah

--
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] rawQuery selection args?

2010-12-21 Thread Mark Murphy
String[] args={somebaldingguy};
rawQuery(SELECT _id, title FROM books WHERE author=?, args);

The string array elements replace the question mark placeholders.
SQLite handles quotation rules for strings for you, so you do not have
to worry about embedded quotes or apostrophes.

On Tue, Dec 21, 2010 at 2:34 PM, Tobiah t...@tobiah.org wrote:
 I am unable to find an example of how to use the 'selection args' in the
 second argument to rawQuery:

 public Cursor rawQuery (String sql, String[] selectionArgs)

 Can someone explain what they would be for and how to use them?

 Thanks,

 Tobiah

 --
 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: uninstall TTS data from Android = 1.6 ?

2010-12-21 Thread JP

I was able to sufficiently test this with the emulator running a 1.5
AVD, where TTS was not available yet.


On Dec 21, 8:48 am, DulcetTone dulcett...@gmail.com wrote:
 How do you uninstall voice data from a phone that has it installed?

 I need to test code that handles cases of it being absent.

 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to select a Contact Group, so not to create an Invisible Contact ?

2010-12-21 Thread Christopher
Is there a reason I can't get an answer to this question anywhere? Am
I missing something basic, or is there no good answer?

On Dec 20, 9:55 am, Christopher tys...@gmail.com wrote:
 I am running the Contact Manager sample app from the Android SDK. When
 I add a contact to my Gmail account, it gets added as an 'invisible
 contact'. I am assuming this is because I am not telling the contact
 which 'group' within the account it should be assigned to. I have been
 looking around for a few days and have come up empty handed.

 What I really want to do is add the contact to the Contact Account
 that I select and have the contact associated with a Contact Group
 within the selected Gmail Account, so the contact's info will be
 displayed in the user's contacts.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] rawQuery selection args?

2010-12-21 Thread Tobiah

On 12/21/2010 11:38 AM, Mark Murphy wrote:

String[] args={somebaldingguy};
rawQuery(SELECT _id, title FROM books WHERE author=?, args);

The string array elements replace the question mark placeholders.
SQLite handles quotation rules for strings for you, so you do not have
to worry about embedded quotes or apostrophes.


Oh I see, so that would eliminate any worries of say, sql injection
attack right off?  Is there any other reason that one would go
through this?  Any performance gain, etc?

Thanks,

Tobiah

--
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] rawQuery selection args?

2010-12-21 Thread Mark Murphy
On Tue, Dec 21, 2010 at 2:46 PM, Tobiah t...@tobiah.org wrote:
 Oh I see, so that would eliminate any worries of say, sql injection
 attack right off?

I doubt it defends against little Bobby Tables scenarios, though I
have not tried it.

http://xkcd.com/327/

That being said, SQL injection would seem unlikely to be a problem in
a mobile app, simply because the data they would attack would be their
own.

 Is there any other reason that one would go
 through this?  Any performance gain, etc?

Convenience. Beats doing the string concatenation and
apostrophe-escaping yourself.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] rawQuery selection args?

2010-12-21 Thread Tobiah

Is there any other reason that one would go
through this?  Any performance gain, etc?


Convenience. Beats doing the string concatenation and
apostrophe-escaping yourself.


Makes sense, thanks.

Tobiah


--
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Proguard problem after 2.3 update

2010-12-21 Thread jtoolsdev
I was successful with Eclipse in getting a build but it is hard to say
why.   I still can't do a Proguard build from a command line and what
it looks like is for some reason the script has a hard time finding
the Proguard jar.  Tried all kinds of combinations and none worked.  I
am pointing to the recommended 1.8.1 ant in my ANT_HOME path though
Eclipse seems to be using the built-in 1.7.1 ant successfully.  There
are many variables with this 2.3 SDK release that need to be sorted
out.  Are problems with the Eclipse build due to not running Eclispe
Classic as I'm running Galileo and if so why?  We really would like to
hear the reasons for such changes.

On Dec 21, 9:44 am, licorna lico...@gmail.com wrote:
 I just update SDK to 2.3 and I'm facing the same problem here. I don't
 use Eclipse, only ant to build my project. This is a list of
 everything you recommend to do, and that I did:

  1. Added key.store and key.alias to local.properties
  2. Updated the project with android update project --path .
  3. Added proguard.dir to local.properties with the path of the
 proguard lib that came with the SDK (.../android_sdk/tools/proguard)
  4. Added proguard.config=proguard.cfg to default.properties

 I'm getting the same error: Problem: failed to create task or type
 proguard.

 Any ideas?

 On Dec 15, 4:30 pm, jtoolsdev brianjto...@gmail.com wrote:

  No I didn't do anything to Eclipse and looking at the Ant section it
  is pointing to the 1.7.1 version but maybe a different one than in /
  usr/bin/.    All I know is after doing that it exported to Proguard.
  What I haven't had time to try yet was a build from the console.  Also
  commenting out the proguard config in the default.properties did turn
  off Proguard on the Export either as I wanted a build without it to
  more easily track down a bug.   Another thing I did do was rename my
  Android SDK folder as it was ancient and I thought perhaps characters
  in the path may have caused a problem.  However I don't think that in
  itself fixed the problem.

  On Dec 15, 7:30 am, jb cona...@gmail.com wrote:

   Did you update the ant plugin for Eclipse to 1.8.1? I know the current
   version is 1.7.1 in Helios 3.6. If so how did you do that?
   Or did you just install apache ant to your system? Did you have to
   change the Ant preferences in Eclipse to point to your 1.8.1
   installation?

   Also, did you have to add -ignorewarning to your proguard.cfg to get
   it to complete the Proguard phase?

   jb

   On Dec 14, 4:37 pm, jtoolsdev brianjto...@gmail.com wrote:

Well, after updating ant and exporting a signed app from Eclipse it
worked.  I'll try command line later but for now it's out of the way.
The other problem which I see others posted on this group is LVL isn't
registering any license with emulators since the 2.3 update.  I put
the signed obfuscated app on an emulator on another machine and the
license worked there but that installation is 2.2.  It would be nice
to know what is causing that.

On Dec 14, 3:01 pm, jtoolsdev brianjto...@gmail.com wrote:

 For those following this Android sneaked in an instruction that to
 even use Proguard in Eclipse you need to modify the default.properties
 file with the proguard.config=proguard.cfg (or wherever it is).  This
 however did not solve the problem.  They also state elsewhere that you
 need ant 1.8 or better (Ubuntu 10.04 comes with 1.7.1).  Now that may
 be the source of the parsing problem as soon as I figure out how this
 apache-ant 1.8.1 install works.  So far by instructions given it
 isn't.  Big problem with open source development is good developers
 lousy docs.  IT people probably shake their heads but we programmers
 don't do these things everyday so concise and clear docs are
 necessary.  Development isn't supposed to be an adventure game.

 I would also like to see centralized upgrade info for Android
 development rather having to do a scavenger hunt for what has changed
 in the development environment.  Next time I'll wait for revision 2 or
 higher.

 On Dec 13, 12:56 pm, jtoolsdev brianjto...@gmail.com wrote:

  And proguard.config=/path/to/proguard.cfg goes where?  In the
  build.xml?  local.properties?  There already seems to be a reference
  to it in the add-proguard-release.xml:
  property name=proguard-conf value=${proguard-conf.absolute.dir}/
  proguard.cfg /

  I'm now thinking the previous error:
  add-proguard-release.xml:35: Expecting class path separator ':' 
  before
  '{' in argument number 1
  is the problem which somehow messes up it finding proguard if I
  surround the path with quotes though it does away with this error.
  The path has no spaces so quotes shouldn't be necessary and they
  weren't needed before the 2.3 update.  And I tried it pointing to 
  the
  Proguard installation previously used and also with the 

[android-developers] Re: LVL and 2.3 Emulator

2010-12-21 Thread jtoolsdev
Changed a bunch of things.  Hard to say why it worked and why
sometimes now it may not work.   I can't even get a 2.3 emulator to
run properly but 2.2 and earlier are fine.  The emulator runs but no
internals.  I had some company the last few days and didn't get a
chance to try some more things.

On Dec 17, 8:50 am, Nick nick1...@gmail.com wrote:
 I still can't get it working.

 jstoolsdev,
 Did you change anything to get it to start working?

 On Dec 15, 8:55 pm, jtoolsdev brianjto...@gmail.com wrote:

  Today it worked when I ran an emulator in Eclipse from SDK and AVD
  manager.

  On Dec 15, 1:03 pm, jtoolsdev brianjto...@gmail.com wrote:

   Same here too.  I even checked and the Market Licensing Source wasn't
   updated for 2.3 either which I thought might be the problem.   Maybe
   someone will find some obscure note that we were all supposed to read
   for a setting we were supposed to do when upgrading to 2.3 but I
   certainly haven't found one yet.  I have suggest for updates that
   Android write an A,B,C,D type doc for developers sometimes needed info
   gets mixed into the docs for first time installs instead of upgrades.
   I spent less than 30 minutes fixing a minor  SQL bug and two days
   trying to get Proguard to work again so I could run the build.  That's
   a very unproductive workflow.

   On Dec 15, 12:07 pm, mp6800 mport...@gmail.com wrote:

Ditto for me as well.  What's up, Android team?

On Dec 7, 9:58 pm, Nick nick1...@gmail.com wrote:

 I haveLVLworking with my app and am able to test it with the 2.2
 Google API emulator. I updated to2.3and created a2.3Google API
 emulator. I signed in with you dev account on the emulator just like
 before, but now I am getting:

 12-07 21:42:57.879: INFO/LicenseChecker(760): Binding to licensing
 service.
 12-07 21:42:57.899: WARN/ActivityManager(61): Unable to start service
 Intent { act=com.android.vending.licensing.ILicensingService }: not
 found
 12-07 21:42:57.899: ERROR/LicenseChecker(760): Could not bind to
 service.

 I haven't changed anything in the code and it still works on 2.2. I
 have read the2.3release docs and haven't found any documented
 changes toLVL? Obviously I don't have a real phone with2.3to test
 on :)

 Does2.3w/ Google API SDK supportLVL?
 Any ideas?

 Thanks,
 Nick

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] VpnServices.apk source and how does it work

2010-12-21 Thread Adam Bell
Hi all,

I have been searching for the source code for VpnServices.apk - trying
to understand just how this VPN application is implemented such that
root permissions are not required.
I think it is part of the core.jar but the only reference I can find
to it in the Android tree is core.mk

Could someone point me in the right direction and/or explain how the
app. gets at the IP packet stream to implement the security please.

I am very familiar with Linux kernel implementations and IPsec in
general.

Thanks,
Adam

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] One more question about screen brightness

2010-12-21 Thread Alexei 'keyhell' Zhurba
*How to change brightness:*
1) android.provider.Settings.System.putInt(getContentResolver(), 
SCREEN_BRIGHTNESS, 255))
Disadvantages:
#1 Need to turn off and then turn on my screen (Samsung i5700 Spica) to 
apply the changes.
#2 Doesn't allow set value below 13 (10?).

2) WindowManager.LayoutParams.screenBrightness = 1f;
Disadvantages:
#1 Sets brightness for current window only.


*What I'd like to have:*
#1 Change system (not current screen) brightness.
#2 Change system brightness 0 - 100% (0-255, whatever).


Are there any ideas?


P.S.
I hail the auto-brightness and whatever Google is trying to achieve with all 
this brightness-mess, but...

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] AudioRecorder

2010-12-21 Thread cindy
Hi Everyone,

I am using AudioRecord. After the program runs for a while, I will get
following error and AudioRecord.read function never returns back. The
whole program is hanged.

What should I do? any suggestions?

12-21 13:24:16.713: WARN/AudioRecord(9034): obtainBuffer timed out (is
the CPU pegged?) user=, server=

Thanks!

Cindy

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Your apps

2010-12-21 Thread Stephen Lebed
Instead of just jumping into a project, you should plan what you want
your app to do and what features you want to give it.  Write it out on
paper.  Flesh out all the details.  Learn the basics of programming
because a game engine will only get you so far.  Start simple and
build from there.  Also please don't release an app until its ready.
Its not about being perfect, it about being functional.  Make sure you
test it as throughly as possible.

There are already too many poorly written apps on the market.  Spend
the time to learn how to write a good solid app.  If you release a
bad, unfinished, unpolished app, it tarnishes anything you release
later.

Just my .02

Best,
Stephen


On Dec 20, 5:22 pm, brian purgert brianpurge...@gmail.com wrote:
 So I have some questions for you guys:
 What's apps have you made or are working on?
 How long it is take and also how to thought of the idea?
 What was the hardest problem you have overcame? And what problems are you
 still facing facing? Also anyother additional information maybe hints or
 tricks...

 My app doodle bike:
 I've been working on an app for about about two months now and I had the
 idea about a month before that and I tried to learn java but I'm the kind of
 person who just jumps into things and it was a pretty bad idea. So the game
 the game is called doodle bike and its not out yet. I got the idea from the
 iphone, much like stunt stick biker. I'm using emini physics delux edition
 it cost 750 usd and came with a world builder. I think I went with it
 because  I was a novice at the time and box2d looked intimidating, also the
 world builder helps alot. My hardest problem was with screen densities, and
 finding art so I ended up subscribing to shutterstock. Also my computer just
 broke so Im working on a pretty bad computer.
 my tip for making apps is to create in in hvga first(if your using a canvas)
 and also release your app as soon as you can and don't worry about it being
 perfect.

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Media player problems with android 2.3 (gingerbread), I can't open a service connection....

2010-12-21 Thread neuromit
That is exactly what I want to do, but I find it difficult to figure
out which intents drive the individual media players

On Dec 21, 10:34 am, Lance Nanek lna...@gmail.com wrote:
 I've seen people firing broadcasts that look the same as the media
 buttons on some headsets. That might be a workable alternative to
 using the service if you don't need anything special.

 On Dec 20, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote:



  Please understand that this is not part of the Android SDK. According
  to the source code, it is not exported, and therefore is not available
  outside of its process.

  On Mon, Dec 20, 2010 at 3:43 PM, neuromit stuart.lay...@gmail.com wrote:
   I'm trying to setup a service connection to control the stock android
   media player. This works great under 2.1 and 2.2. However, when I
   tried to run my application on the 2.3 emulator my application crashes
   and I get the following error:

   ERROR/AndroidRuntime(466): Caused by: java.lang.SecurityException: Not
   allowed to bind to service Intent
   {cmp=com.android.music/.MediaPlaybackService }

   Have the permissions to bind to the IMediaServiceConnetion been
   revoked for gingerbread?

   Here is the code I'm running from my class that is a child of
   ServiceConnection

   Intent i = new Intent();
   i.setClassName(com.android.music,
   com.android.music.MediaPlaybackService);
   a.bindService(i, (ServiceConnection) this, 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
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
  Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Proguard problem after 2.3 update

2010-12-21 Thread Fred Grott(Android Expert, http://mobilebytes.wordpress.com)
set PROGUARD_HOME to point to the proguard in your android sdk install..

I also had to do a manual ant 1.81 install on Ubuntu 10.04.1 Ubuntu 11 will 
have ant 1.8 but Eclipse 3.7 will not have ant 1.81. until the end of the 
beta process...ie May 2011..

I use a plugin called wickedshell to run ant 1.8.1 from shell in eclipse..

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How do you manipulate content in an Activity from an external class or another Activity?

2010-12-21 Thread Tobiah

Can one Activity manipulate the Views of another?
Even with a class that is external to the Activity,
it seems that I need to pass a pointer to the View
in question around.  I have a subclass of Application
that I could use to keep the View pointers in.  Will
that work?  Does it sound necessary?

Thanks,

Tobiah

--
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to compile Android Emulator for Windows?

2010-12-21 Thread Arunprabhu
Hi,

I'm a newbee to Android. I want to tweak the Emulator and compile it
in Windows. But am not able to the same. Could someone please tell me
how to compile Android Emulator in Windows. Also Please let me know if
there is any Document describing about Android QEMU architecture.

Thanks
Arun

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] just want 2 learn

2010-12-21 Thread Mostafa
hi i wanna learn more about developer's programs
mean wanna 2 learn 2 be developer
any one can help me ?

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Using ResultReceiver

2010-12-21 Thread billeisenhauer
Hello All,

I've been trying to research how to code the techniques talked about
by Virgil Dobjanschi in his Google I/O talk here:

http://www.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html

My specific source of confusion is how to set up the ResultReceiver to
basically wire up a callback.  Its been suggested to use
ResultReceiver, however many of the examples that I see seem to use
ResultReceiver as an interface.  However, I'm finding that this is
really a class.  Has there been a change with this class?

A specific example that comes close to what I think I want to do is on
StackOverflow at the link below:

http://stackoverflow.com/questions/3197335/android-restful-api-service

Does anyone have any thoughts on how to wire this up.  Essentially,
I'm just trying to use an Intent-based API to set up a service where a
receiver is part of the extras in the intent.

Any help is appreciated.

Bill Eisenhauer

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Cost effectiveness of JSON in Android

2010-12-21 Thread Jonathan Foley

Take a look at the Jackson JSON library, its a very nice
implementation and is more performant than Android's built in classes.
It provides methods for fast serialization of user objects to JSON and
back again:


http://jackson.codehaus.org/


Jonathan

On Dec 21, 7:14 am, Leon Moreyn-Android Development
lmor...@earthcam.com wrote:
 Thanks Brill. I will take this into consideration.

 On Dec 21, 12:42 am, Brill Pappin br...@pappin.ca wrote:



  I wouldn't be too hasty about removing the JSON. XML will cost you more in
  terms of resources and connecting directly to a database is likely also
  going to be more costly (although without seeing the actual implementation,
  I can't be sure of that).

  JSON is actually about as perfect as it gets for mobile devices... you could
  only get better by implementing your own protocol and even then your likely
  not going to save much.

  Also note that connecting directly to the database means that the database
  is exposed on the net in general and will present security problems.
  Although databases have security, they are not designed to ward off all the
  worms that are constantly probing a public address looking for a weak spot.

  You can deploy something like MongoDB (which presents it's data as JSON
  anyway) but it's not recommended.

  However, after rereading your post, I think you are attempting to put a web
  service between your app and the database. This is exactly how the rest of
  us will be doing it, but you don't need to get rid of JSON, in fact JSON is
  what 90% of the apps in the market will be using.

  If your asking how you build that web service, I recommend Jersey REST API
  as a good place to start. There are plenty of other frameworks out there for
  doing it though, so find one you like.

  - Brill Pappin

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


  1   2   3   >