[android-developers] Re: Android Controlling Installation of new apps?

2011-08-29 Thread Chris Stratton
On Monday, August 29, 2011 11:01:34 AM UTC-4, Anirvan wrote:

 I only wanted to know if there was some Intent broadcasted by the 
 Android system stack when any app is about to be installed. So it 
 would apply equally to side-loaded apps, and other app stores. So far, 
 I don't suppose there's any such intent provided by the Android stack. 


Even if there is/were, the design philosophy of android would not let a 3rd 
party app interfere in the process of installing another - android has no 
real mechanism by which a user can trust an application with system-level 
permissions, short of installing a customized rom.

-- 
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] Graphs in Android

2011-08-29 Thread Chris Clark
Thanks very Much.
Chart Droid is actually it's own app, i need a chart to be embedded in mine
but i found this which is brilliant!
http://www.jjoe64.com/p/graphview-library.html

On Mon, Aug 29, 2011 at 10:33 AM, saurabh rawat rawatsaur...@yahoo.co.inwrote:


 Hi ,
 I have done quiet some research and still doing it for better graphs.I have
 used achartenigne from which  I was plotting the pie charts and stacked bar
 charts but drawback is that you cant make 3d charts .if you see
 these videos which has quiet fascinated me are too good to
 be included in developing charts for android but I think both are paid .FLX
 charts are mindblowing.

 (1) Aichart http://www.youtube.com/v/3ho5wiV-o8ghl=enfs=1rel=0

 (2) FLX Charts  http://www.youtube.com/watch?v=paTRLcmErNY

 Chartdorid is the port of jfreechart (an excellent library
 for developing charts but unfortunately available only for java )Its free
 and can be used.I think as per your requirements which in this case best
 fits in chartdroid you should give it a try.Other wise my second choice will
 be to go with the light weigh achartengine.
 Rgds,
 Saurabh




 *The ultimate test of a relationship is to disagree but
 to hold hands*...




 --- On *Sat, 30/7/11, Boozel boozelcl...@gmail.com* wrote:


 From: Boozel boozelcl...@gmail.com
 Subject: [android-developers] Graphs in Android
 To: android-developers@googlegroups.com
 Date: Saturday, 30 July, 2011, 9:02 PM


 Hi

 I need to plot a line graph in my app.
 I found a bunch of libraries for graphing in android, Has any one used or
 had any experience with these?
 Which is best? If any one has any suggestions please post them.

 Thanks a lot.

 GraphView: http://android.arnodenhond.com/components/graphview
 Java[TM] Charts for Android:
 http://www.java4less.com/charts/chart.php?info=android
 ChartDroid: http://code.google.com/p/chartdroid/wiki/Screenshots
 Android Plot: http://androidplot.com/wiki/Home
 achartengine: http://code.google.com/p/achartengine/

 --
 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] Can Android devices got normal computer viruses?

2011-08-29 Thread Chris Stratton
On Monday, August 29, 2011 2:56:13 PM UTC-4, Appaholics wrote:

 No.

 On Mon, Aug 29, 2011 at 11:34 PM, Zwiebel hunzw...@gmail.com wrote:

 I'm interested in this question: Can Android devices got normal
 viruses or they can carry them? Can Android got a virus from a website
 if the user doesn't download anything?


That's not entirely true.  While android devices would likely not be 
susceptible to something specifically targeting a particular desktop OS, 
they are potentially susceptible to similar attacks, exploiting either the 
same style of vulnerability of potentially even the exact same vulnerability 
with only the code-to-be-injected needing to be customized for android.

- An exploit of the web browser could lead to arbitrary code executed as the 
browser UID.  This could result in the loss of stored credentials for other 
sites, or set the stage for an attempt to exploit the android system itself 
to gain more privileged (root) access.  IIRC at least one such issue has 
been found and patched.

- Some other android-based client application or content viewer could be 
exploited in a similar fashion, to a similar end.

- Code commonality between different platforms is a potential cross-platform 
vulnerability.  For example, a few years ago a problem with a common jpeg 
library affected not only desktop PC's, but was also used (positively, by 
device owners) as an entry point to run custom software on handheld gaming 
devices.  

- Just about any computer system can carry malicious payloads to which it is 
not susceptible, between systems which are.

-- 
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: SSH to device

2011-08-27 Thread Chris Stratton
On Saturday, August 27, 2011 11:03:26 AM UTC-4, kypriakos wrote:

 What does the adb connect do exactly? Not much info on the adb page 
 about it. 


You would use it to connect to a device which has an adbd listening on 
something other than the USB, for example listening on TCP so that you can 
have ADB over wireless (or even wired ethernet on some non-handheld 
platforms).

For something you would leave running, ssh could be preferable as ADB has no 
security.

In either case though, excepting system-level debugging its probably 
preferable to have the daemon started/stopped by an android app control 
panel, with status bar notification while it is on, so that you only have it 
on when you expect to be using it.

-- 
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: Opportunistic Transfer

2011-08-25 Thread Chris Stratton
On Wednesday, August 24, 2011 5:38:59 PM UTC-4, lbendlin wrote:

 there is no perceptible difference between the energy required to establish 
 a connection and the energy required to maintain a connection. Plus, most 
 devices are always connected anyhow.


On mobile.  On wifi, there probably *is* some difference since it tends to 
be shut down when idle.  Waking it up would cause it to be on until it times 
out again.

 

-- 
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: Disabling a set of 'reserved characters' from user Input?

2011-08-25 Thread Chris


On Thursday, August 25, 2011 4:35:33 AM UTC-4, bdk wrote:


 I'll go hunting for an 'official' list of locale-specific path 
 separators... 


There's a constant in java.io.File named 'separator' which gives you the 
localized, system-specific file separator string.

-- 
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] HW accelerated video decoding lets OpenGL drop to 35fps

2011-08-24 Thread chris
Hi all,
i wrote a small application that has a openGL part (GLSurfaceView) and
a video part (VideoView).
When i run the openGL part everything is ok and the framerate is
constantly at 60fps.
But when i add a VideoView on top of the GLSufaceView and start it,
the openGL framerate drops down to ~35fps. I looked at the CPU load,
but it was ~20% in general, so CPU cannot be the problem i guess.
I also used the WindowManager.addView(...) to have a seperate window.
Nothing worked, fps still dropped down.
To check whether i wrote some bad code, i reused the ApiDemos that
come with the SDK and modified it to have a VideoView on top of the
OpenGL ES 2.0 demo. Still with the same result.
So can anyone hint me, where i'm wrong? Or is this a technical
restriction and i can do nothing about it?

Many thanks in advance for your help.
Greetings, chris

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


[android-developers] Re: Emulator Compliance for Product Release?

2011-08-24 Thread Chris Stratton
On Wednesday, August 24, 2011 9:55:41 AM UTC-4, ColorTheorist wrote:

 Just a curious question, if as a developer, you find as a whole that 
 it is necessary to make an application compliant with the emulator. 
 Do some people actually download an app from the market with the 
 intent on using it on their desktop away from their phone? 


I don't think Market is officially available for the  emulator.  If you 
distribute by other channels you might take it into account, but if not, you 
can probably disregard these as unofficial installs by power 
users/experimenters.


-- 
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: Apk file size limit / number of files limit

2011-08-24 Thread Chris Stratton
On Wednesday, August 24, 2011 12:43:16 PM UTC-4, Drezden wrote:

 I would also suggest that you look into ways to pull your tiles from 
 the web instead of storing them on the device.  You very rarely see 
 apps in the wild that have a larger footprint than 20mb and some 
 devices like the G1 only have 70mb of storage TOTAL for all apps.  So 
 you're basically asking someone to remove everything from their device 
 to load your app. 


Yes, traditional versions of android it would indeed be preferable to 
download the large dataset seperately and store it on the external storage 
(sdcard).

However, for devices which permit installation to external storge or for 
honeycomb and later where it's all the same pool of flash blocks anyway, the 
difference would be a short initial download followed by a long data 
download within the app when it is first run.

While it's tempting to think that data delivered in the apk is more secure, 
it's fairly trivial to extract.  However data placed in external storage can 
be modified more easily, so might need a fingerprint check.

 My observation is: When the asset folder contains around 80mb of 
  files, the app works nicely both on the emulator and on my nexus one. 
  When it's larger than 80mb it crashes on both devices. the devises are 
  running 2.3.3 Api level 10 (but it happens on 3.2, too). 
  http://raphaelbauer.com


Just to make sure the problem is on the running end and not the building 
end, it could be worth opening the apk (it's just a carefully constructed 
zip file with a funny name) on a pc and verifying that all the files are 
there. 

-- 
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: Vector

2011-08-24 Thread Chris
I agree, a List is a lot better than Vector, but what bob was looking for 
was a number (9) of  Vectors capable of holding numerous Articles.  

If it were my code, I'd use a ListListArticle to do this so I could have 
numerous Lists holding numerous Articles.  Your code only has one List 
holding 9 Articles initially.

Hth,
- C

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

[android-developers] Re: Vector

2011-08-24 Thread Chris


On Wednesday, August 24, 2011 1:19:58 PM UTC-4, Lew Bloch wrote:

 +1 to blake's comments.

 A couple more points, inline:
  

Chris wrote: 
  articles = new VectorArticle[9]; 
  
  try articles = (VectorArticle[]) new Vector[9]; 


 Again, neither of these is legal.  You can get around it with 
 '@SuppressWarnings', but shouldn't.


I wasn't suggesting it was legal, or even a good idea.  However, 
ListArticle is not equivalent to an array of VectorArticle, which is 
what bob was looking for.  A List of Lists, however, would be.  Presumably 
there's a need for separating collections and indexing.
 

-- 
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: Vector

2011-08-23 Thread Chris
 articles = new VectorArticle[9];

try articles = (VectorArticle[]) new Vector[9];

- C

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

[android-developers] Re: Layout, Canvas questions

2011-08-22 Thread Chris
   LinearLayout layout = new LinearLayout(this);
   Panel panel = new Panel(this);
   Button button = new Button(this);
   layout.addView(panel);
   layout.addView(button);
   setContentView(panel);

You're creating a LL, adding the panel and button to it, but setting the 
content view to the panel instead of the LL.  Since you never add the button 
to the panel, it won't show.

As far as the emulator slowness goes, I'd suggest testing on a real device 
unless you need to do QA on different screen configurations.

Cheers,
- C

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

[android-developers] Re: getOrientation() madness

2011-08-22 Thread Chris
For real fun, try last minute checkins before a release comprised entirely of 
misleading deprecation annotations.  Great fun.

-- 
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: Deployment to Android devices from Windows and Mac

2011-08-22 Thread Chris
You might want to try 'debug configurations.'

-- 
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] suggestions on importing db

2011-08-21 Thread Chris
If you're using a sqllite db you can just disconnect from it and copy it as a 
file.  Unless you need raw sql inserts for another db format, a sqllite db on 
disk is portable.

File copy is much faster than a sql dump or import by far.

-- 
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] Sudden location issues

2011-08-21 Thread Chris
John, I'm one if those long-time users who started having difficulties after an 
upgrade.  Rooted HTC sensation, custom ROM is the cause, I'm suspecting.  It 
takes ~1 min to get gps locks and, if I'm on WiFi instead of cell network the 
location thread times out, I believe.

Works fine in a stock ROM, so I'm guessing the problems you're seeing are from 
devices with shoddy/hackish gps support.  

-- 
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: Sudden location issues

2011-08-21 Thread Chris
The true irony is I'm not paying close attention when it doesn't work, so I 
can't reproduce it exactly.  When I open up your app I want my radar NOW!, 
so when it doesn't work I'm not the best judge of reproducibility.  :)

Next time it doesn't work, I'll try to recall the circumstances... off hand, 
it seems to be a cell-wifi (or vice-versa) handoff situation.

-- 
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: recommended icon size.

2011-08-21 Thread Chris
is there someone who can answer? 

 In any case, the you can find full details on the developer website 
 and download an icon pack containing templates to use as a base: 
 
 http://developer.android.com/guide/practices/ui_guidelines/icon_desig...

Peter told you the right answer, Google has a page dedicated entirely to 
this topic.  Read and learn.

-- 
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: Emulator disables DPMS (then monitor doesn't sleep)

2011-08-20 Thread Chris Stratton
On Friday, August 19, 2011 1:21:51 PM UTC-4, pb wrote:

 I noticed that starting the emulator disables DPMS and it is not re- 
 enabled when the emulator closes.  So my monitor was never going to 
 sleep until I re-enabled DPMS manually.  Does anyone know why it does 
 this and/or how to fix it?  As a temporary solution I have wrapped the 
 executable in a shell script to run `xset +dpms` when the emulator 
 finishes, but this is probably not ideal.  Ubuntu 10.04.


It does, at least in the current state of the code, appear to be trying to 
handle this intelligently, ie, determine the setting on startup and restore 
it on exit:

http://android.git.kernel.org/?p=platform%2Fexternal%2Fqemu.gita=searchh=HEADst=greps=dpms

You can look through the logs going back further than I did and see if 
that's been worked on since your version.  It's also possible it's still 
subtly broken in some way.

You should be able to compile a version without this, or even patch an 
existing binary (it took me all of 30 seconds with objdump to find a wrapper 
for DPMSDisable() that could be nop'd out).


-- 
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: Jni To Java BLock THe UI thread.

2011-08-19 Thread Chris Stratton
On Monday, August 9, 2010 10:53:37 AM UTC-4, AlreadyAMember wrote:

 During this loop in C  in case of an error  I would like to 
 callback the java UI thread and pop up a dialog from C , the KEY is 
 C has to block and wait. 
 So if I create a thread and set up a handler in Java to show the 
 DIalog the the native C code won't block. I have also looked in to 
 Loopers Thinking that it could be helpful to block the C code. 

 Now of course I could be naive and write a while(wait) in c and as 
 soon as dialog is closed I can make a native call from java and set 
 the wait to false. 
 But that is just not cool. 


Actually that is approximately the right idea, only it would be better if 
the waiting thread could simply ask the kernel scheduler not to run it until 
the wait condition is satisfied, by calling a kernel function that will 
block until that is the case.  A semaphore is a classic operating system 
feature for accomplishing that.  A method for accomplishing nearly as much 
without requiring as much understanding of operating system services would 
be to just put a substantial sleep in the loop.

-- 
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: resolution

2011-08-19 Thread Chris
I'm gonna go out on a limb here... you probably need to set a different 
screen density when creating the AVD.  

If I'm misunderstanding your problem, ask again and clarify what your 
problem is. The last post didn't make too much sense.

-- 
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: DexClassLoader and DexFile Leaking File Handles

2011-08-19 Thread Chris Stratton
On Thursday, August 18, 2011 1:49:34 PM UTC-4, Matt wrote:

 while (true) { 
 Copy plugin jar from assets to temp directory 
 Create a DexClassLoader using plugin jar as the classpath 
 Load plugin using this class loader 
 Delete plugin jar from temp directory 
 } 

 Eventually, creating the DexClassLoader fails due to lack of disk 
 space.


I'd try to avoid copying and deleting the file each time, at least if it's 
the same file.  
 

 Or do I just have to hope that in the real world, my 
 application's process gets restarted often enough that I won't hit 
 this problem? 


It's interesting to think about how the activity lifecycle and things like 
orientation changes mean you process often gets terminated and then 
recreated, in a way that's supposed to be invisible to the user.  I wonder 
if there's a reliable way to cause that to happen?  It might be worth 
looking into.  

-- 
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: DexClassLoader and DexFile Leaking File Handles

2011-08-19 Thread Chris Stratton
On Thursday, August 18, 2011 1:49:34 PM UTC-4, Matt wrote:

 while (true) { 
 Copy plugin jar from assets to temp directory 
 Create a DexClassLoader using plugin jar as the classpath 
 Load plugin using this class loader 
 Delete plugin jar from temp directory 
 } 

 Eventually, creating the DexClassLoader fails due to lack of disk 
 space.


I'd try to avoid copying and deleting the file each time, at least if it's 
the same file.  
 

 Or do I just have to hope that in the real world, my 
 application's process gets restarted often enough that I won't hit 
 this problem? 


It's interesting to think about how the activity lifecycle and things like 
orientation changes mean your process often gets terminated and then 
recreated, in a way that's supposed to be invisible to the user.  I wonder 
if there's a reliable way to cause that to happen?  It might be worth 
looking into.  

-- 
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 Crash during HTTP Post

2011-08-19 Thread Chris Stratton
On Thursday, August 18, 2011 2:30:43 AM UTC-4, perumal316 wrote:

 I checked the logcat, it is showing: 

 ERROR/AndroidRuntime(10335): FATAL EXCEPTION: main 
 ERROR/AndroidRuntime(10335): java.lang.NullPointerException 


You need to look through the next series of lines for a Caused by and then 
a second series of at lines.  Find the first one is part of your project 
and look at what you are doing on that line.  Something on that line of code 
is unexpectedly null.  Figure out why, and/or check to see if it is null, 
and if so handle that intelligently.

 

-- 
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 Crash during HTTP Post

2011-08-19 Thread Chris Stratton
On Thursday, August 18, 2011 2:30:43 AM UTC-4, perumal316 wrote:

 I checked the logcat, it is showing: 

 ERROR/AndroidRuntime(10335): FATAL EXCEPTION: main 
 ERROR/AndroidRuntime(10335): java.lang.NullPointerException 


You need to look through the next series of lines for a Caused by after 
which there will be a second series of at lines.  Find the first one that 
refers to a file that is part of your project and look at what you are doing 
on that line number in the file.  Something on that line of source code is 
something that is unexpectedly null.  Figure out why it is null, and/or add 
a check to see if it is null, and if so handle that intelligently.

 

-- 
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: Jni To Java BLock THe UI thread.

2011-08-19 Thread Chris Stratton
On Friday, August 19, 2011 12:27:04 PM UTC-4, Sudheer wrote:

 If you can do with Java solution, then on Java side after calling 
 handler.sendMessage() call wait()  once the dialog is dismissed call 
 notify() (of course making sure to wait()  notify() on the same object). 
 Alternatively you could use CyclicBarrier or CountDownLatch in the 
 java.util.concurrent package. Hope that helps.


Yes, and there are similar mechanism in the native pthread library (which 
the above java capabilities may well be built upon)

 

-- 
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: adb push error

2011-08-18 Thread Chris Stratton
On Thursday, August 18, 2011 5:28:31 AM UTC-4, androx wrote:

 I am trying to put .so file in the /system/lib folder of device by 
 using adb push, 
 $adb push /home/sudhir/Development/newdroid/filename.so  /system/lib 


As far as this forum (which is about developing 3rd party applications) is 
concerned, you cannot and should not be trying to do that.  /system/lib is 
not a locations writable by 3rd party devs - you should instead be packaging 
your native libs in the .apk of your application in accordance with the ndk 
docs (follow-up on issues there should go to the android-ndk group)

If you are looking to change the android installation itself, that would be 
marginally on topic for android-porting, as a quick summary you should 
include the file when building the android system, though on an unsecured 
development or rooted device you may be able to remount the system partition 
readable and then adb push something there.  But this is not the place to 
discuss that.

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

[android-developers] Re: adb push error

2011-08-18 Thread Chris Stratton
On Thursday, August 18, 2011 5:28:31 AM UTC-4, androx wrote:

 I am trying to put .so file in the /system/lib folder of device by 
 using adb push, 
 $adb push /home/sudhir/Development/newdroid/filename.so  /system/lib 


As far as this forum (which is about developing SDK applications) is 
concerned, you cannot and should not be trying to do that.  /system/lib is 
not a locations writable by 3rd party devs - you should instead be packaging 
your native libs in the .apk of your application in accordance with the ndk 
docs (follow-up on issues there should go to the android-ndk group)

If you are looking to change the android installation itself, that would be 
marginally on topic for android-porting, as a quick summary you should 
include the file when building the android system, though on an unsecured 
development or rooted device you may be able to remount the system partition 
writeable and then adb push something there.  But this is not the place to 
discuss that.

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

[android-developers] Re: Just received Lodsys letter...

2011-08-17 Thread Chris
Google's finally stepped in to help, with the intention of hopefully 
invalidating Lodsys's patents:

http://www.pcmag.com/article2/0,2817,2391070,00.asp

Cheers,
- C

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

[android-developers] Re: text color of a ListView

2011-08-17 Thread Chris
How are you populating your list view?  Do you have a layout resource for 
the rows, or are you creating the rows in code?  In either case, set the 
color there.

-- 
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: Distance between devices

2011-08-16 Thread Chris Stratton
On Monday, August 15, 2011 8:39:03 AM UTC-4, Lucas wrote:

 I need to measure the distance between two android devices, down to 
 the centimeters, to develop an app I´m working on. 
 I have researched a lot and tried some things with GPS and bluetooth, 
 but not seems to work quite right. 
 Do you have an idea of how I can achieve this? 


If you can figure out how to measure the latency within each device, you 
might be able to do something with audio.

-- 
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: FM sporting

2011-08-15 Thread Chris
Which MTK6516 device is it?  Not all of them have FM radio support.

-- 
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 safe to store database in sqlite?

2011-08-12 Thread Chris


On Friday, August 12, 2011 11:49:20 AM UTC-4, Kristopher Micinski wrote:

 http://developer.android.com/guide/topics/data/data-storage.html#db?



Your link doesn't really go into any details about the security and 
integrity of using the database to store sensitive data.

Anyway, they're not all that secure.  Assume anyone with a rooted phone has 
unfettered access to read from  write to your database unless you take 
other steps to ensure data integrity.

-- 
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: Can't get html5 video working properly -- happy to pay for an answer

2011-08-12 Thread Chris Stewart
I have had problems with this in Honeycomb, and I believe it started with
3.1.  In 3.0, it worked fine.

--
Chris Stewart
http://chriswstewart.com



On Fri, Aug 12, 2011 at 12:27 PM, John john.purc...@medialets.com wrote:

 Has anyone gotten inline video working on Honeycomb? This used to work
 if you had hardware acceleration enabled, but this seems to have been
 broken in 3.1/2 (WebView.isHardwareAccelerated() will always now
 return false and inline video will no longer work).

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 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

[android-developers] Re: Is it possible to create a tcp connection form a pc server to Android client?

2011-08-12 Thread Chris Stratton
On Friday, August 12, 2011 11:44:47 AM UTC-4, chu wrote:

As i know,if a client is running on PC,if located in a LAN,the server 
 in the Internet cannot create a TCP connection to it 
 initiatively,because the router of the client will discard the 
 connection request.if we want to connect a client in LAN from a server 
 in the Internet, we must use some technologies as P2P,or the client 
 make a TCP connection initiatively. 


Yes, you will tend to have the same problem with devices on mobile networks.

Devices on wifi networks should be as reachable (which is to say, most 
likely not) as PC's on those same networks.

For android you might look into Cloud-to-device-messaging C2DM as a way of 
contacting the device.

-- 
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: connecting USB serial device to Android handset, is it possible?

2011-08-10 Thread Chris Stratton
On Wednesday, August 10, 2011 10:55:14 AM UTC-4, razor wrote:

 Hi. 
 I have simple USB interface (acting like serial port, basen on FTDI 
 FT245RL chip). 
 It works on windows like COM port. 

 Is it possible to connect it to Android Phone (like HTC Desire) and 
 read/write values from this port ?


Possibly, by rooting the phone to install additional kernel drivers and 
rigging up an external VBUS supply for the device; at least that has been 
possibly on several previous HTC models going back to the G1.

The Honeycomb-and-later (optional) official android methods would not apply 
since there aren't yet phone versions of that released. It's not clear if 
the case of host-capable-logic incapable of supplying VBUS (ie, most of the 
somewhat capable phones out there) would ever be officially supported.

-- 
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: Problem with monkeyrunner. java.lang.ClassCastException when use sameAs().

2011-08-10 Thread Chris Habecker
Hi Alexander,

I wrote a workaround answer to your post at 
http://stackoverflow.com/questions/6096422/monkeyrunner-problem-java-lang-
classcastexception-when-use-sameas-method/7015108#7015108

Please review my answer and consider accepting or upvoting it even if you have 
already worked past this problem.

Sincerely,
Chris

Alexander Sukhov testsemc01 at gmail.com writes:



-- 
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 get current Activity?

2011-08-09 Thread Chris Stratton
On Tuesday, August 9, 2011 1:20:11 AM UTC-4, Sourav Howlader wrote:

 Context context = pass_some_context; 
 ActivityManager activityManager = (ActivityManager) 
 context.getSystemService(Activity.ACTIVITY_SERVICE); 
 String packageName = 
 activityManager.getRunningTasks(1).get(0).topActivity.getPackageName(); 
 String className = 
 activityManager.getRunningTasks(1).get(0).topActivity.getClassName(); 


This is (or at least was) not reliably accurate.

-- 
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: How to change device file permission from Java app.

2011-08-09 Thread Chris Stratton
On Tuesday, August 9, 2011 7:17:30 AM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

  Has this been done for security reasons ?

 Probably.

Unlikely, as it can be done with the ndk, and we are repeatedly told that 
the ndk does not have special permissions.  Most likely they just didn't 
bother implementing support in javaj for something that wasn't envisioned as 
needed.

  Which means if an application downloads some bytes and writes to
  a file created through the below code
 
  File destination = new File (/sdcard/myfile.txt);
 
  there is no way to change permissions of 'myfile.txt' to 777 ?

 First, nobody uses /sdcard, since it is wrong. Use
 Environment.getExternalStorageDirectory().

 Second, nobody bothers to try to change Linux file permissions on
 external storage, since for the vast majority of current devices,
 that's FAT32 (vfat in Linux-ese), and file permissions do not matter
 much on that filesystem.

However, on internal storage where permissions matter, the java file 
creation tools do let you set the permissions to some extent (ie, various 
android presets, but not full unix bit-level control)

  There is a 'Runtime' facility provided through java.lang, but I'm
  skeptical
  whether to use this or not. Runtime would only work on rooted devices
  right?

 More importantly, you cannot reliably change permission bits that way 
 either.

The runtime facility does not require root, though it's perhaps not 
future-proof since it's not officially supported.  It's also needlessly 
roundabout.

A better way to do it would be to invoke an ndk subroutine through jni which 
uses the chmod() syscall.  There's nothing even slightly improper about 
doing that. 

first place. I have no idea what you think change the permission of
 lcd device file permission, but it  has nothing to do with the
 Android SDK.

This may be the only real problem - the device files are certainly not 
owned by application users, and so cannot have their permissions changed by 
one.   (_That_ might be the reason the task would require an ability to 
execute a stand alone program as root)

Ordinary files owned by an application user id and residing on a filesystem 
where it is meaningful can however have their permission bits changed.

-- 
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: Unable to open log device '/dev/log/main': No such file or directory

2011-08-08 Thread Chris Stratton
On Monday, August 8, 2011 5:08:50 PM UTC-4, devgeeks wrote:

 Bumping as a last resort before buying another phone :(


See if you can put a more normal Android build on it? 

-- 
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] 2.3 power management killing background services

2011-08-08 Thread Chris
According to http://developer.android.com/sdk/android-2.3-highlights.html
there are now circumstances other than low system memory that can
result in background services being killed:

The Android system takes a more active role in managing apps that are
keeping the device awake for too long or that are consuming CPU while
running in the background. By managing such apps — closing them if
appropriate — the system helps ensure best possible performance and
maximum battery life.

Is there a list of the circumstances under which such a process
killing can occur? Is there a way to detect this circumstance and
handle it gracefully?

Finally, does making a service a foreground service help in this case?

Thanks,

--Chris

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


[android-developers] Re: Standalone Java applications?

2011-08-07 Thread Chris
Will you emulate swing?  If so, I'll buy you a beer.

-- 
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 source line numbers in stack trace

2011-08-06 Thread Chris Stratton
On Friday, August 5, 2011 4:40:19 PM UTC-4, Tor Norbye wrote:

 On Fri, Aug 5, 2011 at 1:12 PM, Chris Stratton cs0...@gmail.com wrote:
  Who are you and how is this relevant to Caleb9's question?

 Caleb9 mentioned the adt-addons source plugin in his original post and
 Peco is the author of that plugin.

Oops, sorry about that.  At a too-quick glance the first person writing made 
me think it was either the original poster using a different account or 
someone tossing in an unrelated statement-as-question.  

I was frankly operating under the assumption that tracking down the precise 
source would be futile and thinking it more pragmatic to look at the 
application code instead - but I'll try to keep the possibility of original 
authors dropping by in mind next time!

Chris

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

[android-developers] Re: .apk file is not getting downloaded from HTTPS site

2011-08-05 Thread Chris Stratton
On Friday, August 5, 2011 12:07:06 PM UTC-4, dilu wrote:
 

 I have a webserver on which I am putting my .apk file.I have given 
 correct mime type also for apache web server. 
  When I am trying to download from HTTP then it is working fine but 
 the same thing is not getting downloaded from HTTPS site. 
 I have a certificate for HTTPS. 


Figure out at what point it fails.

Can you read ordinary html content from the site?   Are there error 
messages?  Does it try and stop?

What do you see in the server logs?

Can you download the file from that site with a PC?

-- 
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: Android source line numbers in stack trace

2011-08-05 Thread Chris Stratton
On Friday, August 5, 2011 3:54:01 PM UTC-4, snpe wrote:

 The source code in the Sources plugin from code.google.com/p/adt- 
 addons/ http://code.google.com/p/adt-addons/ contains Android 2.3.4 
 source 
 API level 10 is corresponding to Android 2.3.3/2.3.4 (http:// 
 developer.android.com/intl/fr/guide/appendix/api-levels.html) and I 
 have used newer version to build source. 

 Regards, 
 Peco 


Who are you and how is this relevant to Caleb9's question?

-- 
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] Override android.location.Geocoder on a per-app basis?

2011-08-04 Thread Chris J. Karr
I have an app where I want to implement a function that takes a
latitude  longitude pair and return a place associated with those
coordinates. The android.location.Geocoder interface is exactly what I
need, but the documentation includes the following note: The Geocoder
class requires a backend service that is not included in the core
android framework. I assume in most Android devices, this backend is
powered using the Google Maps infrastructure.

Instead of using Google Maps to determine the relevant places, I'd
rather have a fully-offline implementation that implements a simpler
scheme that I'm using in my app. Basically, all I want to do is map
location coordinates to a handful ( 10) regions in the world that I
can determine from the coordinates themselves without an offline call
to Google's services. (In addition to offline access, I also want to
support non-Google sanctioned devices like the Nook.)

The simplest solution would be to ignore Geocoder altogether (and just
use a custom lookup method), but in the spirit of doing things the
Android way, I was wondering if it was possible to override the
system provider Context.LOCATION_SERVICE with one of my own and have
Geocoder use my implementation (just for my own app). Please keep in
mind, I'm a simple app developer using stock devices - not a device
manufacturer. :-)

Thanks in advance,

-Chris Karr

-- 
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: call barcode scanner

2011-08-04 Thread Chris
For Zxing:

Start an Intent on the ZXing Barcode Scanner and return the Result to
your Activity.

Intent i = new Intent(com.google.zxing.client.android.SCAN);
i.setPackage(com.google.zxing.client.android);
i.putExtra(SCAN_MODE, MODE);
startActivityForResult(i, 0);

Hope this helps ;)

On 4 Aug., 06:01, Kavekkb lineageno15ma...@gmail.com wrote:
 i want to use intent to call barcode scanner
 how can i write 口口口 source code???

 Button ButtonCall = (Button) findViewById(R.id.ButtonCall);
 ButtonCall.setOnClickListener(new Button.OnClickListener() {
 public void onClick(View view) {
 Uri uri = Uri.parse(tel:);
 Intent i=new Intent(Intent.口口);
 startActivity(i);
  }

 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


[android-developers] Re: Android source line numbers in stack trace

2011-08-04 Thread Chris Stratton
On Wednesday, August 3, 2011 4:20:02 PM UTC-4, Caleb9 wrote:

 It seems to me that my stack trace in Eclipse, while debugging, is 
 showing wrong line numbers for Android classes.


Can someone please give me some hints on what am I doing wrong or 
 maybe what did I misunderstand about this? 


While people do find bugs in the android platform code, the likelihood is 
that the real problem is in your application code, even if the illegal 
operating occurs in platform code.  

Scan back in call stack until you find mention of a line of your code, see 
what you are doing there, and think about what types of things could go 
wrong and set up a failure in the platform code invoked from there.

-- 
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 make an ordinary view to have rounded corners in code without xml

2011-08-02 Thread Chris Zeng
Is there any way to make an ordinary view to have rounded corners in code 
completely without xml? Overriding onDraw is not the way I'm looking 
for,either. I have read the posts: How to make an ImageView to have rounded 
cornershttp://stackoverflow.com/questions/2459916/how-to-make-an-imageview-to-have-rounded-corners
 and Android: ListView with rounded 
cornershttp://stackoverflow.com/questions/1683185/android-listview-with-rounded-corners,
 
but they are not I'm looking for.

-- 
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] Install .apk without User action

2011-08-02 Thread Chris Stratton
On Tuesday, August 2, 2011 1:17:04 AM UTC-4, Spooky wrote:

 Install it before the user is given their corporate phone and set it so
 it can't be removed.  Of course, you can't prevent them from killing it,
 but that's another story.

How were you planning to set it so it can't be removed ?



-- 
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] Install .apk without User action

2011-08-02 Thread Chris Stratton
On Tuesday, August 2, 2011 3:13:26 PM UTC-4, Dianne Hackborn wrote:

Also just to confirm -- it is indeed not possible for a third party app to 
 silently install another third party app.


Though it is possible for a 3rd party app to silently augment its current 
functionality with additional code operating under its current permissions 
limits; trivially for NDK code, with somewhat more complexity for java code. 
  

-- 
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] Install .apk without User action

2011-08-02 Thread Chris Stratton
On Tuesday, August 2, 2011 6:17:53 PM UTC-4, Dianne Hackborn wrote:

 That isn't the same thing.  It still can't do anything more than the 
 permissions you allowed it.


That's why I said additional code operating within its current permissions 
limits 
 

 NDK or Java is irrelevant -- you could just have a little scripting engine 
 and download code for it.  Or whatever.  Trying to prevent apps from doing 
 dynamic code execution is kind-of a doomed battle. :)


Indeed - but it raises the point of what you can do with a new application 
that you can't do with dynamic code execution in an existing one:

- Get additional permissions (presumably Internet is already claimed to 
enable the download)
- Get a new launcher icon (or is there a way to do that dynamically?)
- Get a new user ID

If none of these are absolutely required, then augmenting an existing app 
with new code might be a passable alternative to installing a new one.

-- 
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: custom events in android

2011-08-01 Thread Chris
I was wondering about this as well; I figured the Google team would
have incorporated a GWT EventBus into Android, as it works very well
in the GWT framework.

On Jul 5, 2:58 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Tue, Jul 5, 2011 at 1:46 PM, doles sachin.d...@gmail.com wrote:
  So, is there any way to fire events on an event bus in Android then?

 There is nothing specific to Android. Just define a listener interface,
 register some listeners and call those to fire an event. If you want to
 pass data, you can extends java.util.EventObject, but that doesn't
 buy you much.

 You can look at Handler if you want to send messages across
 threads.

-- 
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: Interaction between activities

2011-08-01 Thread Chris
You need to have a reference to the other activity, from which you
would call your second (or third) activity's method to update the
coordinates

For example, your second activity could have a static method to return
the component/widget or entire activity.

SecondActivity.java
--
public static Canvas getCoordinateCanvas() {
 return this.myCanvas;
}

FirstActivity.java
--
private void someMethod() {
  Canvas canvasToUpdate = SecondActivity.getCoordinateCanvas();
  canvasToUpdate.your update code
}

On Jul 28, 5:49 pm, Victor Basurto victor.b.r@gmail.com wrote:
 Hi, I'm new in android, i have a problem, i have 3 activities, in the
 first one i have a map where i want to draw a point with a coordinates
 that obtain in the second activity and third one i have a picture, but
 i want to use and refresh this coordinates and navigate between
 activities one and third, how can i refresh this coordinates obtained
 in the second activity without go to this.

 Thanks excuses for my english

-- 
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] Best place to call a service upon Activity load / restart

2011-07-29 Thread Chris
All,

When a certain Activity loads, I'd like to make an AsyncTask call; I'd
like this call to take place the first time the Activity is loaded,
and each time that it is opened/viewed.

Would overriding onStart() and onResume() be the best candidate
locations for this AsyncTask?

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


[android-developers] Re: Hard Crash (Reboot) in 3.2

2011-07-28 Thread Chris Stratton
On Thursday, July 28, 2011 11:21:18 AM UTC-4, Joshua Smith wrote:

 Our app, which works fine in 3.1 and earlier, has started experiencing 
 a hard crash that cause our XOOM to reboot. 


Kernel reboot, or android runtime restart?

You can tell the difference soon thereafter from cat /proc/uptime or (if 
present) the uptime command at the adb shell

-- 
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: Enabling root permissions/functioanlities from the Android application or a folder in Android filesystem with default Permission

2011-07-26 Thread Chris Stratton
On Tuesday, July 26, 2011 4:39:36 AM UTC-4, Jessica wrote:

 *Other way round for this problem is -- Is there any folder in the 
 android file system where i could create a database(sqlite) and do the file 
 operation(read write ) in this case I dont have to enable the chmod 
 permission .*


Yes, android provides an internal storage directory for applications and 
also a related place for them to create sqlite databases.

At the java level, finding the appropriate path is handled automatically by 
some of the typical functions, but you can determine it with 
Context.getDir() and Context.getFileDir() - if you want to do something in 
the NDK, probably call one of those from java and pass the result to your 
ndk routines as a java string, where you would convert it to a native string 
for the posix file functions.

Using root access is to be avoided as it's not available on unmodified 
devices, and should cause some due suspicion (why does this app need 
that?) on the part of the user even where it is.  It's also entirely 
outside the scope of the ndk list.

-- 
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: android:allowClearUserData=false

2011-07-26 Thread Chris Stratton
On Tuesday, July 26, 2011 1:17:42 PM UTC-4, Priyank wrote:

 I saw a few posts which said that even though we add this line in the 
 manifest file, we are not able to disable the Clear Data button for an 
 application. 
 I tried it in 2.2, 2.3 and 3.0 and was not able to disable that 
 button. Am I doing anything wrong or is there any other method to do 
 this. 


Apparently that was only ever available for system applications, and is also 
broken in some versions.  This would be consistent with the android design 
goal of not letting 3rd party apps make semi-permanent changes to the 
device.  Even if it did work, removing and re-installing the application 
would get around it.

See: 
https://groups.google.com/d/msg/android-developers/sQkfGQ9zVrc/AT98os1ZjYAJ 

-- 
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: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-22 Thread Chris Stratton
On Thursday, July 21, 2011 1:26:54 AM UTC-4, Animesh Sinha wrote:

 The issue is that I need to call the service methods as soon as it is 
 connected. 
 So, Is there any way by which I can execute the functions of service 
 JUST AFTER binding is complete ? 

 It takes around 10-20ms for binding, I tried to make use 
 Thread.sleep(30); but it delayed the service from being connected by 
 the same sleep duration, therefore not solving the problem. 


The problem is that android requires you to write event driven code here.  
It can't deliver a new event until you return from the current event.  If 
you sleep, you just delay the return, and thus the new event delivery which 
can only occur after that.

You are going to have to do a lot of re-thinking of how to architect this 
whole process as a chain of events.  Yes, it's painful, but you'll get 
better at that kind of re-shuffling with time.

 

 On Jul 20, 6:33 pm, Mark Murphy mmu...@commonsware.com wrote: 
  On Tue, Jul 19, 2011 at 12:21 PM, animeshsi anime...@gmail.com wrote: 
   Is there some way by which I can make sure that the service binding is 
   complete before any access is made to functions provided by the 
   service ? 
  
  Don't try using the Binder until onServiceConnected() is called. 
 http://commonsware.com/training

-- 
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: Small screens and HDPI

2011-07-21 Thread Chris
What device is giving you grief?

-- 
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: Service Being paused on screen off.

2011-07-20 Thread Chris Conry
Thanks for the replys,
Looking into it the partial wake lock should be my solution, but it isnt
implementing well. I keep getting a runtime error on acquire(). my code
looks like:
PM = (PowerManager) getSystemService(Context.POWER_SERVICE);
WL= PM.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Wakelock);
WL.acquire();
I put this in the onStartCommand(), is that incorrect? Should
only acquire the wakelock when the screen turns off?

Thank you

On Wed, Jul 20, 2011 at 3:59 AM, Filip Havlicek havlicek.fi...@gmail.comwrote:

 Acquire a partial wake lock, that should help.


 2011/7/20 Jan Nielsen j...@air-port.dk

 The common ways to sleep in java, only counts cpu time on the Android
 platform.
 So a Thread.sleep(60 * 1000); may become 5 or 10 minutes if the phone
 is in standby, since it only counts when the cpu is awake.

 afaik you need to use AlarmManager to get called when the phone is in
 standby.
 Even a handler postDelayed wont work, as that is also wake time.

 On 19 Jul., 23:20, Chris Conry cjco...@gmail.com wrote:
  I'm trying to build an app that logs sensor data(using a service), and
  stores it into an SQLite database. My problem is that it stops logging
 when
  the screen is off. It works perfectly fine when the screen is on, but
 when i
  turn the screen off the data doesn't start logging until I turn the
 screen
  on. The process isn't being killed, because it works when the screen
 comes
  back on.
 
  I've tried implementing it as a Thread. I think that wont work because
 it
  needs a context for the database. And I read that using
 startForeground,
  but it didn't change.
 
  Any Suggestions? Can anyone 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.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


-- 
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: Service Being paused on screen off.

2011-07-20 Thread Chris Conry
And your guess was completely correct. Thank you. The problem is
still happening, as soon as I hit the power button the data stops logging.
Is there something else im missing about wakelock?

On Wed, Jul 20, 2011 at 11:26 AM, Mark Murphy mmur...@commonsware.comwrote:

 Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
 LogCat and look at the stack trace associated with your runtime error.
 My guess is that you do not hold the WAKE_LOCK permission.

 On Wed, Jul 20, 2011 at 11:21 AM, Chris Conry cjco...@gmail.com wrote:
  Thanks for the replys,
  Looking into it the partial wake lock should be my solution, but it isnt
  implementing well. I keep getting a runtime error on acquire(). my code
  looks like:
  PM = (PowerManager)
 getSystemService(Context.POWER_SERVICE);
  WL= PM.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Wakelock);
  WL.acquire();
  I put this in the onStartCommand(), is that incorrect? Should
  only acquire the wakelock when the screen turns off?
  Thank you
  On Wed, Jul 20, 2011 at 3:59 AM, Filip Havlicek 
 havlicek.fi...@gmail.com
  wrote:
 
  Acquire a partial wake lock, that should help.
 
  2011/7/20 Jan Nielsen j...@air-port.dk
 
  The common ways to sleep in java, only counts cpu time on the Android
  platform.
  So a Thread.sleep(60 * 1000); may become 5 or 10 minutes if the phone
  is in standby, since it only counts when the cpu is awake.
 
  afaik you need to use AlarmManager to get called when the phone is in
  standby.
  Even a handler postDelayed wont work, as that is also wake time.
 
  On 19 Jul., 23:20, Chris Conry cjco...@gmail.com wrote:
   I'm trying to build an app that logs sensor data(using a service),
 and
   stores it into an SQLite database. My problem is that it stops
 logging
   when
   the screen is off. It works perfectly fine when the screen is on, but
   when i
   turn the screen off the data doesn't start logging until I turn the
   screen
   on. The process isn't being killed, because it works when the screen
   comes
   back on.
  
   I've tried implementing it as a Thread. I think that wont work
 because
   it
   needs a context for the database. And I read that using
   startForeground,
   but it didn't change.
  
   Any Suggestions? Can anyone 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.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
 
  --
  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

 Android Training...At Your Office: http://commonsware.com/training

 --
 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: Service Being paused on screen off.

2011-07-20 Thread Chris Conry
Thanks for the answers,
Makes sense now, I am using the myTouch 4g and LG ally, sadly both of them I
guess turn off their sensors. Its good to hear that the Nexus and some 2.3
device keep it on and hopefully other manufacturers adopt this.

I guess i'm going to try and find a work around. Any suggestions?
Thank you

On Wed, Jul 20, 2011 at 12:42 PM, Filip Havlicek
havlicek.fi...@gmail.comwrote:

 Partial wake lock works just fine with accelerometer sensor on Nexus One
 2.2 (tested this for over than 6 months as a part of my research), although
 this might not be the case for different combination of device and OS
 version.


 2011/7/20 Dianne Hackborn hack...@android.com

 Prior to 2.3 the sensors were turned off when the screen went off in order
 to reduce battery use.  This was changed on 2.3, though it's possible we are
 actually going to end up regretting that change. :p

 Also even as of 2.3, I wouldn't be surprised if some device's drivers are
 still turning off the sensor hardware as part of their power management when
 the screen goes off.

 On Wed, Jul 20, 2011 at 8:53 AM, Chris Conry cjco...@gmail.com wrote:

 And your guess was completely correct. Thank you. The problem is
 still happening, as soon as I hit the power button the data stops logging.
 Is there something else im missing about wakelock?


 On Wed, Jul 20, 2011 at 11:26 AM, Mark Murphy 
 mmur...@commonsware.comwrote:

 Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
 LogCat and look at the stack trace associated with your runtime error.
 My guess is that you do not hold the WAKE_LOCK permission.

 On Wed, Jul 20, 2011 at 11:21 AM, Chris Conry cjco...@gmail.com
 wrote:
  Thanks for the replys,
  Looking into it the partial wake lock should be my solution, but it
 isnt
  implementing well. I keep getting a runtime error on acquire(). my
 code
  looks like:
  PM = (PowerManager)
 getSystemService(Context.POWER_SERVICE);
  WL= PM.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Wakelock);
  WL.acquire();
  I put this in the onStartCommand(), is that incorrect? Should
  only acquire the wakelock when the screen turns off?
  Thank you
  On Wed, Jul 20, 2011 at 3:59 AM, Filip Havlicek 
 havlicek.fi...@gmail.com
  wrote:
 
  Acquire a partial wake lock, that should help.
 
  2011/7/20 Jan Nielsen j...@air-port.dk
 
  The common ways to sleep in java, only counts cpu time on the
 Android
  platform.
  So a Thread.sleep(60 * 1000); may become 5 or 10 minutes if the
 phone
  is in standby, since it only counts when the cpu is awake.
 
  afaik you need to use AlarmManager to get called when the phone is
 in
  standby.
  Even a handler postDelayed wont work, as that is also wake time.
 
  On 19 Jul., 23:20, Chris Conry cjco...@gmail.com wrote:
   I'm trying to build an app that logs sensor data(using a service),
 and
   stores it into an SQLite database. My problem is that it stops
 logging
   when
   the screen is off. It works perfectly fine when the screen is on,
 but
   when i
   turn the screen off the data doesn't start logging until I turn
 the
   screen
   on. The process isn't being killed, because it works when the
 screen
   comes
   back on.
  
   I've tried implementing it as a Thread. I think that wont work
 because
   it
   needs a context for the database. And I read that using
   startForeground,
   but it didn't change.
  
   Any Suggestions? Can anyone 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.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
 
  --
  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

 Android Training...At Your Office: http://commonsware.com/training

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

[android-developers] Service Being paused on screen off.

2011-07-19 Thread Chris Conry
I'm trying to build an app that logs sensor data(using a service), and
stores it into an SQLite database. My problem is that it stops logging when
the screen is off. It works perfectly fine when the screen is on, but when i
turn the screen off the data doesn't start logging until I turn the screen
on. The process isn't being killed, because it works when the screen comes
back on.

I've tried implementing it as a Thread. I think that wont work because it
needs a context for the database. And I read that using startForeground,
but it didn't change.

Any Suggestions? Can anyone 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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Killing rogue plug-in threads within an Android application

2011-07-16 Thread Chris Stratton
On Wednesday, July 13, 2011 9:16:56 AM UTC-4, DCA wrote:

I've developed a framework that loads potentially untrusted plug-in 
 code from a remote repository into my framework's process at runtime 
 (using OSGi). Each plug-in is started on a thread that my framework 
 holds a reference to. Problematically, misbehaving plug-ins


Please note that anything run in your process, or for that matter in another 
process run as your application's user ID will have the full privileges of 
your application.  Should the untrusted code cross the boundary from 
unintentionally misbehaving to malicious, it can do anything the system will 
permit your application to do, and to it in _your_ name.

Web browsers typically solve this problem for javascript by sandboxing the 
virtual machine in which the foreign code runs.  But that's not perfectly 
secure.  

Android solves the problem not by sandboxing the VM's in which applications 
run, but by using unix user ID's to separate the services the kernel 
provides to each application; you are proposing effectively to break down 
that mechanism and trust everything running at the invitation of your 
application by running it all under the same user ID.  Once you do that, 
existence of user-level administration and debug authority of all of a 
user's processes means running in the same or separate processes is just a 
convenience, not a true barrier.

-- 
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] 127.0.0.1 Connection refused when not connected to WiFi

2011-07-16 Thread Chris Stratton
On Saturday, July 16, 2011 2:41:12 AM UTC-4, Naveen Gayar wrote:

 Use 10.0.0.2 instead of localhost or i.p.address. This will work.


That ?might? work on an emulator, but will not on a properly configured 
hardware android device. 

At any rate, the problem is not a networking one, but a web browser that is 
apparently trying to be too clever - most likely something of a work 
offline mode.

-- 
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] setting a textView in a ListView from a DialogBox. Frustrating....

2011-07-16 Thread Chris Johnson
I don't know if anyone knows how to do this... but if so, please help.
I'm trying to set a TextView I have in an xml. to a certain text with
an editText in a dialogBox. Currently my code will save the text and
put it in a random View in the ListView. I do NOT want that... I want
the text I save to go to a specific view and stay there.. anyone have
any suggestions? here is my Code: (The xml is below the code, and  all
I need is for it to save text in alarm_name_text and in ONE listView..
PLEASE HELP!)

package com.MTSUAndroid;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Button;
import android.widget.Toast;
import android.app.*;

public class AlarmList extends Activity {
private static final int DIALOG_YES_NO_MESSAGE = 1;
private static final int DIALOG_YES_NO_LONG_MESSAGE = 2;
private static final int DIALOG_LIST = 3;
private static final int DIALOG_PROGRESS = 4;
private static final int DIALOG_SINGLE_CHOICE = 5;
private static final int DIALOG_MULTIPLE_CHOICE = 6;
private static final int DIALOG_TEXT_ENTRY = 7;

private static final int MAX_PROGRESS = 100;
private ProgressDialog mProgressDialog;
private int mProgress;
private Handler mProgressHandler;

private ListView mainListView;
private Planet[] planets;
private static ArrayAdapterPlanet listAdapter;
private Button Save;
private Button Default;
private TextView text;

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

AlertDialog.Builder alertBox = new AlertDialog.Builder(this);
final TextView rowSavedText =
((TextView)findViewById(R.id.alarm_name_text));
// Find the ListView resource.
mainListView = (ListView) findViewById(R.id.mainListView);
Save = (Button) findViewById(R.id.alarm_button);
Default = (Button) findViewById(R.id.alarm_button1);
text = (TextView)findViewById(R.id.alarm_name_text);
Save.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {

}
});
Default.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {

}
});
// When item is tapped, toggle checked properties of CheckBox 
and
// Planet.

// Create and populate planets.
planets = (Planet[]) getLastNonConfigurationInstance();
if (planets == null) {
planets = new Planet[] { new Planet(Turn On Alarm),
new Planet(Alarm Name), new 
Planet(Time),
new Planet(Sound), new 
Planet(Vibrate),
new Planet(Repeat), new 
Planet(Volume Control),
new Planet(Second Alarm) };
}
ArrayListPlanet planetList = new ArrayListPlanet();
planetList.addAll(Arrays.asList(planets));
// Set our custom array adapter as the ListView's adapter.
listAdapter = new PlanetArrayAdapter(this, planetList);

//int i = mainListView.getFirstVisiblePosition() + 1;
mainListView.setAdapter(listAdapter);
listAdapter.notifyDataSetChanged();
listAdapter.notifyDataSetInvalidated();
mainListView
.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView? parent, View 
item,
int position, long id) {
Planet planet = listAdapter.getItem(position);
planet.toggleChecked();
if (position == 1) {
/*AlertDialog.Builder builder;
   

[android-developers] Re: database query

2011-07-14 Thread Chris
http://lmgtfy.com/?q=android+application+database

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

Re: [android-developers] How to get a view of the interface?

2011-07-14 Thread Chris
At this point we should just encourage others to post in their native 
language, in the hopes that someone who can understand said language can 
answer.

-- 
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] qHD layouts?

2011-07-14 Thread Chris
This bug is driving me nuts.  These nuts are making me thirsty.  Etc.

-- 
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] Does the in-app billing permission affect region availability?

2011-07-11 Thread Chris Stewart
I have a free application that I'd like to add an AdMob advertisement to.
 I'm planning on adding an in-app purchase option to remove the
advertisement.  If I do that, will my application now only be available to
countries that support purchasing on the Market?  Or, will everyone still be
able to download it but only certain countries can use the in-app purchasing
piece?

--
Chris Stewart

-- 
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 Marketplace Search Results

2011-07-10 Thread Chris
Since around 1st July I have noticed the search results on a device
are a bit strange.

The same search on the device and the website return very different
results.

Anyone else spotted this ?

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


Re: RE: [android-developers] Re: Patent Infringement notice by Lodsys.

2011-07-07 Thread Chris
I read yesterday it wasn't 6%, its 0.575% which, principle aside, is a 
paltry amount.  Here's one reference: 
http://9to5mac.com/2011/05/16/lodsys-were-not-patent-trolls-heres-why-were-entitled-to-royalties-over-in-app-purchasing/
 
- I think there's more info at Groklaw about exactly what they're asking.

-- 
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: RE: [android-developers] Re: Patent Infringement notice by Lodsys.

2011-07-07 Thread Chris
I don't give two shits if they want to try and sue me

Me neither.  x% of 0 is still zero.  I love that about math.

-- 
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: Patent Infringement notice by Lodsys.

2011-07-07 Thread Chris
I'm guessing whatever was communicated was sent 'in confidence' and by 
emanating the contents would hurt whatever case he had.  Best to leave this 
question alone for a lil while.

-- 
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: ScrollBar in Android not working ???

2011-07-06 Thread Chris
But I need to add scroll for the Linear layout without using ScrollView

Whoever is telling you how to write the code should be fired for 
incompetence.

-- 
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] External data an persistence across uninstall

2011-07-05 Thread Chris
In my case, its a backup database file that users would like to keep even if 
they uninstall the app (the user's data, not mine).  For other applications, 
I guess it would depend on their requirements.

Just wondering if there were any best practices or some consensus that I was 
ignoring.

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] External data an persistence across uninstall

2011-07-05 Thread Chris
Why don't you include a backup button user can use to backup the database 
into location he sees fit?

Bingo.

-- 
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] External data an persistence across uninstall

2011-07-04 Thread Chris
Is there a standard place on external storage that we can write to that 
won't be wiped when uninstalled?  RdTFM, Googled it, can't seem to find a 
consensus.

-- 
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] External data an persistence across uninstall

2011-07-04 Thread Chris
Yup, like I said I read the f'n manual.  It'd be nice if there was a 
standard place where we could keep data that persists across uninstalls 
though.

-- 
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] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Chris
You think debugging should come for free or something?

-- 
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] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Chris
Grr.

-- 
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] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Chris
Its so less complicated than 'quantum physics'

-- 
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: Scaling text up to be relative to screen pixels

2011-06-30 Thread Chris
http://developer.android.com/guide/practices/screens_support.html is a good 
read.

'sp' is scale-independent sizing specifically for text that relates to the 
user's preferred text size as well as screen density.

-- 
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 I know idle screen?

2011-06-29 Thread chris kang
Hi, all..
I want to display alert dialog when device is idle state..
I just check andrioid launcher, however, it can't cover 3rd party
launcher.
Do they support it by api or who can solve this issue?

-- 
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] Localization of launcher image not working in OS 2.2.2

2011-06-29 Thread Chris
While testing our Android app it is observed that on the devices that
have Android OS 2.2.2 the icons do not change the language even after
the language setting is changed.  This same bundle works on OS 2.1 and
OS 2.3.

We have tested this on the Motorola Droid 2 which has OS 2.2.2 and
also on the emulator. Both show the same behavior.

Is there a known issue here relating to localization of launcher icons
in 2.2.2?

-- 
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: Droid X 2 issue

2011-06-26 Thread Chris
Way out of date btw.

-- 
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: Samsung Galaxy Tab 10.1 with Official 3.1 ROM cant boot

2011-06-23 Thread Chris
I'd suggest contacting the developer of the unspecified apk you downloaded 
in step 3 and installed in step 4, and if that all checks out contact 
Samsung's support.

-- 
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: Permissions, checking network connectivity and the LVL

2011-06-23 Thread Chris
Its not kludgy, if LVL throws quickly if it can't access the connection 
state, its probably the best way to handle it.  If it waits for a network 
timeout before it throws, it might as well not throw anything.  Disclaimer: 
haven't used it, haven't seen the source, but if they have the permission to 
check before access, and they don't throw immediately on a failed check, its 
a bad api.

-- 
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: Application exits silently

2011-06-23 Thread Chris
+1!

-- 
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: Full screen on HTC sensation (qHD)

2011-06-23 Thread Chris
I don't have a solution to your problem, but I just got a Sensation and my 
app which uses a scrollview as its root with fill_parent uses all available 
screen real estate.  So there has to be something in your layout limiting 
it.

-- 
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: Full screen on HTC sensation (qHD)

2011-06-23 Thread Chris
Just to confirm the OP's experience, I've noticed that a lot of other apps 
I've downloaded since don't scale well.  A lot of these use webviews as 
their root view... but the problem isn't limited to webview.

The Sensation has an odd resolution.

-- 
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 difference between the garbage collector calls GC Explicit, GC For Malloc, and GC External Malloc?

2011-06-23 Thread Chris
http://stackoverflow.com/questions/4976566/what-do-gc-for-malloc-gc-explicit-and-other-gc-mean-in-android-logcat

-- 
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: Keyboard Show/Hide Notification

2011-06-23 Thread Chris
Presumably iOS exposes this as an event, and he's porting an iOS app.

-- 
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: Which OS is more preferable for Android apps, middleware,source/OEM level development.

2011-06-23 Thread Chris
C64

-- 
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: Need someone to test app on physical device 2.3, 3.0, 31

2011-06-23 Thread Chris
This mailing list is not a QA forum.

-- 
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: Android mobile app will work on Tablet

2011-06-22 Thread Chris
I am Sparticus.

-- 
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: Android mobile app will work on Tablet

2011-06-22 Thread Chris
That would have worked so much better if I knew how to spell.  Plus its 
probably lost in translation.

-- 
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] Permissions, checking network connectivity and the LVL

2011-06-22 Thread Chris
If the Market App(tm) has NETWORK_STATE permissions, and my app invokes an 
API that uses it, it stands to reason that my app shouldn't have to request 
NETWORK_STATE.  After all, the user already granted permission to the other 
app.  I haven't yet used LVL but if I came across that scenario I'd file a 
bug

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

<    1   2   3   4   5   6   7   8   9   10   >