[android-developers] Re: Application onCreate called more than once?

2012-11-11 Thread Nitin Sethi
The onCreate.. method of the class extending Application is called only 
once unless the process gets killed somehow and restarted. You can 
investigate for any reason(s) of your process getting killed.

On Sunday, 11 November 2012 03:02:42 UTC+5:30, Craig wrote:

 I received an error because I'm doing something (init'ing ACRA) in my 
 overridden Application class' onCreate, and I expected this method to be 
 called only once. I think I have a clue as to what is happening - I see 
 multiple logcat lines like: Force stopping package  for my package 
 close together, for example:
 11-09 11:53:40.394
 11-09 11:53:40.744
 11-09 11:53:41.364

 I am using a Service, but only through onHandleIntent, and I did not 
 register it to run in a separate process. 

 My theory is that I'm holding onto some reference which is preventing my 
 app from being stopped (and garbage collected).

 Does this make sense? If it does, is there a good way to track down what 
 reference or references could be causing this? My app is rather large 
 (about a dozen activities, a handful of async tasks, a few 
 broadcasters/receivers, etc.), so I was really hoping for a good way to 
 track these down. 




-- 
You received this message because you are subscribed to the Google
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] Handwritten Signature

2012-11-11 Thread Brad Stintson
Hii Group

How to recognize and store handwritten signatures on android?

Regards,
Brad

-- 
You received this message because you are subscribed to the Google
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: breakpoints ignored

2012-11-11 Thread Piren
Because you can't... breakpoints need to be placed on code that actually 
runs.. either the first line of the function or the call to that function.


On Friday, November 9, 2012 12:34:07 AM UTC+2, bob wrote:



 On Thursday, November 8, 2012 4:31:52 PM UTC-6, Sunghun wrote:

 Did you put your break-point just on the method declaration?


 Yes, I did.
  

 I hope it is not true.


 Why?
  


 On Thursday, November 8, 2012 3:28:04 AM UTC+11, bob wrote:

 Ok, I am having some more issues with breakpoints that the compiler is 
 ignoring.

 Here is the code in question:

 static Handler handler = new Handler() {

 @Override
 public void handleMessage(Message msg) {
 Log.d(hmmm,hmmmok); 
 }
 };

 What I did was I put a method breakpoint on this line:

 public void handleMessage(Message msg) {

 It did not get triggered when that method was called.

 However, when I put a breakpoint here:

 Log.d(hmmm,hmmmok); 

 It breaks as it should.

 Can someone please help me understand 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

[android-developers] Re: random Resource$NotFoundException reports

2012-11-11 Thread Piren
From my experience these always came due to memory constraint issues... 
when i pushed it too high android started doing that.



On Thursday, November 8, 2012 1:57:06 PM UTC+2, Andrea Pietroni wrote:

 Hi all,
 I have published an app (with ACRA for crash reporting) which results in 
 some random crashes due to resources not found. The app of course works 
 here and for many customers.

 I thought it could be because of some particular configurations without a 
 default, but it happened also with a res/xml/preferences.xml in which all 
 strings used have a default.

 Some references to similar questions:

 http://stackoverflow.com/questions/7609708/cant-find-layout-id-for-1-of-users

 http://stackoverflow.com/questions/7801157/resourcesnotfoundexception-report-from-wild

 What's going on? Has anyone experienced this? is it just a temporary 
 problem? I haven't received any complaint, maybe they reinstalled the app 
 and it worked?

 Thanks,
 Andrea


-- 
You received this message because you are subscribed to the Google
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] Location Update on wifi/3g off

2012-11-11 Thread Giosia Gentile
Hi,
I have a problem with location update using NETWORK_PROVIDER.

When I use NETWORK_PROVIDER if the wifi or 3g network are offline in the 
onLocationChanged(Location location) I receive a LastKnow location but I 
want it is call just when there is a real new location.

I must check if user is in the same location for 2 minutes, and if the wifi 
or 3g are offline betwen the two minutes as soon as its are online the 
locationChanched is call.

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] About OTA server

2012-11-11 Thread Chuz Lin
Hi,all ,How to set up OTA server?Can someone help me?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] About OTA server

2012-11-11 Thread Michael Banzon
Make sure you have all the wired you need before starting. ;o)

And maybe re-phrase the question to include a specific problem hopefully
regarding the Android SDK.


On Sun, Nov 11, 2012 at 12:38 PM, Chuz Lin shmcc...@gmail.com wrote:

 Hi,all ,How to set up OTA server?Can someone help me?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




-- 
Michael Banzon
http://michaelbanzon.com/

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

[android-developers] Re: Application onCreate called more than once?

2012-11-11 Thread Craig
My process getting killed should not be an issue, as long as it dies. I'm 
scheduling alarms to start it up at different times - the issue I seem to 
be having is that multiple instances of my process run at the same time...



On Sunday, November 11, 2012 3:27:30 AM UTC-5, Nitin Sethi wrote:

 The onCreate.. method of the class extending Application is called only 
 once unless the process gets killed somehow and restarted. You can 
 investigate for any reason(s) of your process getting killed.

 On Sunday, 11 November 2012 03:02:42 UTC+5:30, Craig wrote:

 I received an error because I'm doing something (init'ing ACRA) in my 
 overridden Application class' onCreate, and I expected this method to be 
 called only once. I think I have a clue as to what is happening - I see 
 multiple logcat lines like: Force stopping package  for my package 
 close together, for example:
 11-09 11:53:40.394
 11-09 11:53:40.744
 11-09 11:53:41.364

 I am using a Service, but only through onHandleIntent, and I did not 
 register it to run in a separate process. 

 My theory is that I'm holding onto some reference which is preventing my 
 app from being stopped (and garbage collected).

 Does this make sense? If it does, is there a good way to track down what 
 reference or references could be causing this? My app is rather large 
 (about a dozen activities, a handful of async tasks, a few 
 broadcasters/receivers, etc.), so I was really hoping for a good way to 
 track these down. 




-- 
You received this message because you are subscribed to the Google
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 happens in android device.If gps is working for a long time continously (more than 5 hours)

2012-11-11 Thread GlenLee
Paul,

Actually I was being serious.  I started having problems with my phone
so I took it into Sprint.  When I picked it up I was given a polite
lecture on having my location updated every 60 seconds. They informed
me that they'd replaced the antenna assembly, which included the GPS
antenna.  The tech that did the work stated that the GPS antenna
wasn't designed for continual use.  Apparently these phones are
engineered for recreational personal use, not for heavy a duty
business type work load.  The nice thing about it is that he was able
to replace everything on site.  On the down side, with being told the
phone can't handle continual GPS updates and with the Task Manager
killing my service when I unplug the phone, I can't use it for what I
need it for. My Photon is nothing more than an expensive paper weight.

On Nov 6, 9:37 pm, lbendlin l...@bendlin.us wrote:
 Remember Paul, don't feed the trolls.  Glen was being funny. There are no
 moving parts in a GPS antenna, at least not at the macroscopic level.







 On Tuesday, November 6, 2012 5:23:53 PM UTC-5, Paul wrote:

  No problems that I'm aware of. My app is used by tens of thousands and has
  GPS on for long periods (2-5 hours). No issues, of the sort noted by Glen
  Edwards below, that have ever been reported to me or that I've experienced.

-- 
You received this message because you are subscribed to the Google
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 do I sell apps from South Africa?

2012-11-11 Thread Rok Kralj
They do have computers in Africa?

Dne nedelja, 08. julij 2012 21:48:32 UTC+2 je oseba MeltdownZA napisala:

 We have an upcoming title we'd like to sell via the Google Play store.
 From the research I've done, it seems that we can sell apps if we are in 
 South Africa.

 Yet when I registered a Google Play developer account, and paid the $25, 
 and I registered, South Africa is not in the list of countries I can 
 register for as a developer.
 What is the correct approach to take for this?

 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] ProGuard docs are inconsistent with the actual config files

2012-11-11 Thread Keith Wiley
I'm working off these instructions, which as you can see are a proper and 
formal component of the official Android dev docs:
*http://developer.android.com/tools/help/proguard.html*

(Side-note: that file has no date written on it and no applicable Android 
SDK version written on it; it is temporally unresolvable.  Perhaps my 
problems arise from the fact that the docs are out-of-date, but there's no 
way to know.  Those docs could be four years old for all I know.  Online 
files should always be dated.)

At any rate, near the top of those docs, just trying to get started with 
ProGuard, it says this:
*To enable ProGuard so that it runs as part of an Ant or Eclipse build, set 
the proguard.config property in the project_root/project.properties file.
*
First of all, it would be helpful if those docs would offer more up-front 
information about how to get the crucial proguard.cfg file to appear in the 
project directory.  I found out that I needed to run this:
$ android update project -p . -t 6
...but that was in rather tangential documentation (a StackOverflow 
discussion if I recall correctly).

Regardless, the next step as described in the docs is to edit 
project.properties, but if I open that file, I immediately see the 
following warning:
*# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
*
...which is where I currently stand, rather stuck as you can imagine.  The 
docs say to edit that file, but the file clearly says not to edit it!  This 
overall process does not appear to be adequately documented and I'm not 
sure how to proceed.  Does anyone have any thoughts on how to best get 
ProGuard up and running with an Eclipse based Android project.  I'm finding 
a lot of casual discussion online but little in the way of formal 
procedure.  Even the formal Android docs I'm working off of seem to be 
incompatible with the circumstances, as I just described above.

I understand it sounds like whining to complain about these problems, but 
the official docs on *http://developer.android.com* don't match the 
do-not-edit warning in the actual files generated by the Android SDK and I 
honestly don't know what the next step is.  This is a troublesome 
inconsistency.

I would be very grateful for any help in getting this going.  Thanks a 
bunch!

*Cheers!*

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

[android-developers] [Using Ant] BUILD FAILED: com.android.ant.SignApkTask cannot be found

2012-11-11 Thread Nobu Games
Since I need to implement release / debug dependent code changes I was 
thinking that using Ant would be a good idea. Knowing zilch about it so far 
I looked up how-tos and docs.

   - I installed ant (version 1.8.2)
   - I added the SDK paths platform-tools and tools to the global PATHvariable
   - I prepared my Android app project with android update project -p 
   /path/to/project
   - I do not have any space characters in any of my development related 
   file system paths (causes Ant to break)

However, as soon as I try to build with ant debug or ant release or ant 
clean I get the following error message:

Buildfile: /home/tw/Development/Android/workspace/ApiDemos/build.xml

BUILD FAILED
/home/tw/Development/Android/workspace/ApiDemos/build.xml:91: The following 
error occurred while executing this line:
/home/tw/Development/Android/SDK/tools/ant/build.xml:90:* taskdef A class 
needed by class com.android.ant.SignApkTask cannot be found: 
com.android.ant.SignApkTask*
 using the classloader 
AntClassLoader[/home/tw/Development/Android/SDK/tools/lib/anttasks.jar:/home/tw/Development/Android/SDK/tools/lib/common.jar:/home/tw/Development/Android/SDK/tools/lib/sdklib.jar:/home/tw/Development/Android/SDK/tools/lib/androidprefs.jar:/home/tw/Development/Android/SDK/tools/lib/mkidentity.jar:/home/tw/Development/Android/SDK/tools/lib/commons-compress-1.0.jar:/home/tw/Development/Android/SDK/tools/lib/httpclient-4.1.1.jar:/home/tw/Development/Android/SDK/tools/lib/httpcore-4.1.jar:/home/tw/Development/Android/SDK/tools/lib/httpmime-4.1.1.jar:/home/tw/Development/Android/SDK/tools/lib/commons-logging-1.1.1.jar:/home/tw/Development/Android/SDK/tools/lib/commons-codec-1.4.jar:/home/tw/Development/Android/SDK/tools/lib/manifmerger.jar]

Total time: 1 second

Wow. The class *SignApkTask* cannot find itself. Really clever.

As you can see in the output above I also tried building a fresh ApiDemos 
project with Ant.

   - I could not find any information related to that particular error 
   message above.
   - The file SDK/tools/lib/anttasks.jar *does* contain a class named 
   com.android.ant.SignApkTask
   - I re-downloaded the latest SDK, installed everything, same error
   - I tried the Ant version that comes bundled with Eclipse, same error

So how do I fix this problem?

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

Re: [android-developers] Re: Application onCreate called more than once?

2012-11-11 Thread TreKing
I think you should provide more details regarding what you're seeing that
makes you think the process is starting over again.

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

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

[android-developers] Re: Application onCreate called more than once?

2012-11-11 Thread Nobu Games
Post your manifest.xml. I assume that you have your broadcastreceiver or 
some service running in a separate process. That would cause 
Application.onCreate to be called multiple times.

On Saturday, November 10, 2012 3:32:42 PM UTC-6, Craig wrote:

 I received an error because I'm doing something (init'ing ACRA) in my 
 overridden Application class' onCreate, and I expected this method to be 
 called only once. I think I have a clue as to what is happening - I see 
 multiple logcat lines like: Force stopping package  for my package 
 close together, for example:
 11-09 11:53:40.394
 11-09 11:53:40.744
 11-09 11:53:41.364

 I am using a Service, but only through onHandleIntent, and I did not 
 register it to run in a separate process. 

 My theory is that I'm holding onto some reference which is preventing my 
 app from being stopped (and garbage collected).

 Does this make sense? If it does, is there a good way to track down what 
 reference or references could be causing this? My app is rather large 
 (about a dozen activities, a handful of async tasks, a few 
 broadcasters/receivers, etc.), so I was really hoping for a good way to 
 track these down. 




-- 
You received this message because you are subscribed to the Google
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] Designing graphics for different devices/screens?

2012-11-11 Thread Fred Stluka

Lots of good detailed practical info at:

http://developer.android.com/training/basics/supporting-devices/screens.html

and for mobile Web apps on Android:
http://developer.android.com/guide/webapps/targeting.html

To see how big your screen is, browse with a phone/table to:
http://bristle.com/Tips/BrowserWidth.htm
and for more info:
http://bristle.com/Tips/BrowserStats.htm

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.


On 11/8/12 9:26 PM, TreKing wrote:
On Wed, Nov 7, 2012 at 1:52 AM, Søren Neigaard sneiga...@gmail.com 
mailto:sneiga...@gmail.com wrote:


But how do I design a full screen graphics that works well on
Android devices, what sizes should it be?


I'd look at this: http://developer.android.com/tools/help/draw9patch.html

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


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


--
You received this message because you are subscribed to the Google
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 onCreate called more than once?

2012-11-11 Thread Craig
Here's my manifest.xml (with no process attributes):

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
package=com.mypackage.rm android:versionCode=1
android:versionName=@string/versionName
uses-sdk android:minSdkVersion=8 android:targetSdkVersion=8 /

application android:icon=@drawable/launcher
android:label=@string/app_name android:theme=@style/CustomTheme
android:name=.core.RandomMomentsApplication
activity android:name=com.mypackage.rm.activity.ChoosePHAActivity 
android:screenOrientation=portrait /
activity android:name=com.mypackage.rm.activity.ChooseUserActivity 
android:screenOrientation=portrait /
activity android:name=.activity.SetupActivity 
android:screenOrientation=portrait /

!-- not fixing this warning (leaving default of exported=true) so the app 
will open when run from Eclipse --
activity 
android:name=com.mypackage.rm.activity.ChooseMomentActivity
android:alwaysRetainTaskState=true
android:launchMode=singleTask
android:screenOrientation=portrait

intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.HOME/
category android:name=android.intent.category.DEFAULT /
category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
activity 
android:name=com.mypackage.rm.activity.NotificationActivity
android:theme=@android:style/Theme.Dialog
android:screenOrientation=portrait / 
activity android:name=com.mypackage.rm.activity.UpdateAPKActivity 
android:screenOrientation=portrait /
activity 
android:name=com.mypackage.rm.activity.CreateTestMomentsActivity 
android:screenOrientation=portrait /
activity android:name=com.mypackage.rm.activity.MultiResponseActivity 
android:screenOrientation=portrait / 

activity android:name=com.rsginc.survey.SurveySectionActivity 
android:screenOrientation=portrait 
 intent-filter
action android:name=com.rsginc.survey.SURVEY_START /
!-- DEFAULT: execute if being directly invoked. --
category android:name=android.intent.category.DEFAULT /
/intent-filter
/activity

activity 
android:name=com.mypackage.rm.activity.ChooseVoucherNonVoucherActivity 
android:screenOrientation=portrait /
activity android:name=com.mypackage.rm.activity.ChooseTaskActivity 
android:screenOrientation=portrait /
activity android:name=com.mypackage.rm.activity.ConfirmActivity 
android:screenOrientation=portrait
intent-filter
action android:name=com.rsginc.survey.SURVEY_COMPLETE /
!-- DEFAULT: execute if being directly invoked. --
category android:name=android.intent.category.DEFAULT /
/intent-filter
/activity
activity android:name=com.rsginc.message.activity.ThreadActivity 
android:screenOrientation=portrait /
activity 
android:name=com.rsginc.message.activity.ThreadsActivity 
android:screenOrientation=portrait /
activity 
android:name=com.rsginc.message.activity.MessageComposeActivity 
android:screenOrientation=portrait /
 receiver android:name=com.mypackage.rm.core.AlarmReceiver /
receiver android:name=.core.BootReceiver
intent-filter
action android:name=android.intent.action.BOOT_COMPLETED /
category android:name=android.intent.category.HOME /
/intent-filter
/receiver
receiver android:name=com.rsginc.lib.ConnectionMonitor
intent-filter
action android:name=android.net.conn.CONNECTIVITY_CHANGE /
/intent-filter
/receiver
receiver android:name=.core.Syncher
intent-filter
action 
android:name=com.rsginc.lib.ConnectionMonitor.CONNECTION_ESTABLISHED /
/intent-filter   serv
/receiver
service android:name=.activity.ChooseMomentActivity$VersionSyncerService 
/
/application

uses-permission android:name=android.permission.GET_TASKS /
uses-permission android:name=android.permission.ACCESS_NETWORK_STATE /
uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE /
uses-permission android:name=android.permission.WRITE_SETTINGS /
uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED /
uses-permission android:name=android.permission.VIBRATE /
uses-permission android:name=android.permission.INTERNET /
uses-permission android:name=android.permission.READ_PHONE_STATE /
uses-permission android:name=android.permission.READ_LOGS/
uses-permission android:name=android.permission.WAKE_LOCK/
/manifest

On Sunday, November 11, 2012 5:17:28 PM UTC-5, Nobu Games wrote:

 Post your manifest.xml. I assume that you have your broadcastreceiver or 
 some service running in a separate process. That would cause 
 Application.onCreate to be called multiple times.

 On Saturday, November 10, 2012 3:32:42 PM UTC-6, Craig wrote:

 I received an error because I'm doing something (init'ing ACRA) in my 
 overridden Application class' onCreate, and I expected this method to be 
 called only once. I think I have a clue as to what is happening - I see 
 multiple logcat lines like: Force stopping package  for my package 
 

[android-developers] Re: What happens in android device.If gps is working for a long time continously (more than 5 hours)

2012-11-11 Thread lbendlin
I call BS.  While the GPS on the phones is not as sensitive as the one in 
handheld devices etc (due to design limitations in the phone  body etc) 
there is no way that a permanently running GPS (assuming the usual 1Hz rate 
of consumer gear) can have ANY impact on the phone hardware.  Granted, it 
will suck the battery dry, but if you leave your GPS running continuously 
like you do for road navigation then you are most likely connecting your 
device to a power source anyhow.

Don't let anyone tell you how often to update the GPS position. Make that 
design decision yourself, based on the needs of your application and the 
expectations of your users.

On Sunday, November 11, 2012 12:32:18 PM UTC-5, Glen wrote:

 Paul, 

 Actually I was being serious.  I started having problems with my phone 
 so I took it into Sprint.  When I picked it up I was given a polite 
 lecture on having my location updated every 60 seconds. They informed 
 me that they'd replaced the antenna assembly, which included the GPS 
 antenna.  The tech that did the work stated that the GPS antenna 
 wasn't designed for continual use.  Apparently these phones are 
 engineered for recreational personal use, not for heavy a duty 
 business type work load.  The nice thing about it is that he was able 
 to replace everything on site.  On the down side, with being told the 
 phone can't handle continual GPS updates and with the Task Manager 
 killing my service when I unplug the phone, I can't use it for what I 
 need it for. My Photon is nothing more than an expensive paper weight. 

 On Nov 6, 9:37 pm, lbendlin l...@bendlin.us wrote: 
  Remember Paul, don't feed the trolls.  Glen was being funny. There are 
 no 
  moving parts in a GPS antenna, at least not at the macroscopic level. 
  
  
  
  
  
  
  
  On Tuesday, November 6, 2012 5:23:53 PM UTC-5, Paul wrote: 
  
   No problems that I'm aware of. My app is used by tens of thousands and 
 has 
   GPS on for long periods (2-5 hours). No issues, of the sort noted by 
 Glen 
   Edwards below, that have ever been reported to me or that I've 
 experienced. 


-- 
You received this message because you are subscribed to the Google
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] OFF_Topc - Isto é ou não ter tecnologia na pele....

2012-11-11 Thread Ray da Costa
http://www.facebook.com/photo.php?fbid=494025013965424set=a.492352420799350.116577.167171263317469

-- 
Ray da Costa
The best way to predict the future is to invent it.
Alan Kay

-- 
You received this message because you are subscribed to the Google
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: Advice for a strategic game map

2012-11-11 Thread Nobu Games
If you want to use 3D graphics then you need to brush up your OpenGL 
knowledge and optionally use one of the available game engines out there 
that also support Android.

If it's 2D and performance is not a big concern then you can write your own 
custom View for that map (you also could create your 2D game in OpenGL by 
the way).

Your custom map view would:

   - respond to touch gestures through View.onTouchEvent
  - Pinch-to-zoom
  - panning
  - touching game objects for interaction
   - have an internal representation of the game map
  - ...which could be composed of a grid of X * Y tiles
  - Or it could be one big space image
 - Preferably also split in tiles so you can stay compatible with 
 older Android version that don't have 
android.graphics.BitmapRegionDecoder
  - have an internal representation of all game objects and their 
   positions:
  - ships, planets etc.
  - have an internal zoom factor
   - x/y coordinates of the current map translation
   - This is the point you are looking at right now on your map
   - implement onDraw to:
  - render the currently visible part of the map by:
 - draw the background first
 - draw the game object 
 - draw the UI in the end
 
On
 Saturday, November 10, 2012 10:44:07 AM UTC-6, tlegras wrote:

 Hi, 
 I am starting the development of a strategy game. For that I would like to 
 develop an interactive galaxy map with objects (basically planets, 
 spaceships). Note this would NOT be a real time game, but a turn by turn 
 game. 
 What is the best way to start knowing I would like a typical mapview touch 
 controls (scroll, zoom) but of course with my own map content :)
 - ViewGroup and I develop everything? 
 - Custom MapView?
 - Some higher level android or google class 
 - third party open source toolkit

 Any suggestion welcome
 Thierry.
  

-- 
You received this message because you are subscribed to the Google
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: A proplem with the floating window

2012-11-11 Thread ivan shi
up!   anybody who can help me?

在 2012年11月8日星期四UTC+8下午3时29分14秒,ivan shi写道:

 I developed a floating window, when I need to change the position of the 
 floating window,I call WindowManager.updateViewLayout to update the layout. 
 If the initial coordinates x 0, adjust it to 500, this box is sliding past, 
 android show herea sliding animation. I do not want this effect, want to 
 jump directly to box in the past, do not know how to engage,who can help me?



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

[android-developers] Re: [Using Ant] BUILD FAILED: com.android.ant.SignApkTask cannot be found

2012-11-11 Thread Nobu Games
Ok, I figured it out. I had a misconfiguration on my box that caused the 
JAVA_HOME variable to point to an old Java version (JRE 1.5).
I corrected the path and now it works.


On Sunday, November 11, 2012 2:24:07 PM UTC-6, Nobu Games wrote:

 Since I need to implement release / debug dependent code changes I was 
 thinking that using Ant would be a good idea. Knowing zilch about it so far 
 I looked up how-tos and docs.

- I installed ant (version 1.8.2)
- I added the SDK paths platform-tools and tools to the global PATHvariable
- I prepared my Android app project with android update project -p 
/path/to/project
- I do not have any space characters in any of my development related 
file system paths (causes Ant to break)

 However, as soon as I try to build with ant debug or ant release or ant 
 clean I get the following error message:

 Buildfile: /home/tw/Development/Android/workspace/ApiDemos/build.xml

 BUILD FAILED
 /home/tw/Development/Android/workspace/ApiDemos/build.xml:91: The 
 following error occurred while executing this line:
 /home/tw/Development/Android/SDK/tools/ant/build.xml:90:* taskdef A class 
 needed by class com.android.ant.SignApkTask cannot be found: 
 com.android.ant.SignApkTask*
  using the classloader 
 AntClassLoader[/home/tw/Development/Android/SDK/tools/lib/anttasks.jar:/home/tw/Development/Android/SDK/tools/lib/common.jar:/home/tw/Development/Android/SDK/tools/lib/sdklib.jar:/home/tw/Development/Android/SDK/tools/lib/androidprefs.jar:/home/tw/Development/Android/SDK/tools/lib/mkidentity.jar:/home/tw/Development/Android/SDK/tools/lib/commons-compress-1.0.jar:/home/tw/Development/Android/SDK/tools/lib/httpclient-4.1.1.jar:/home/tw/Development/Android/SDK/tools/lib/httpcore-4.1.jar:/home/tw/Development/Android/SDK/tools/lib/httpmime-4.1.1.jar:/home/tw/Development/Android/SDK/tools/lib/commons-logging-1.1.1.jar:/home/tw/Development/Android/SDK/tools/lib/commons-codec-1.4.jar:/home/tw/Development/Android/SDK/tools/lib/manifmerger.jar]

 Total time: 1 second

 Wow. The class *SignApkTask* cannot find itself. Really clever.

 As you can see in the output above I also tried building a fresh ApiDemos 
 project with Ant.

- I could not find any information related to that particular error 
message above.
- The file SDK/tools/lib/anttasks.jar *does* contain a class named 
com.android.ant.SignApkTask
- I re-downloaded the latest SDK, installed everything, same error
- I tried the Ant version that comes bundled with Eclipse, same error

 So how do I fix this problem?


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

Re: [android-developers] Re: Application onCreate called more than once?

2012-11-11 Thread Nikolay Elenkov
On Mon, Nov 12, 2012 at 7:17 AM, Nobu Games dev.nobu.ga...@gmail.com wrote:
 Post your manifest.xml. I assume that you have your broadcastreceiver or
 some service running in a separate process. That would cause
 Application.onCreate to be called multiple times.


ACRA keeps track of initialization using a static variable, so with
multiple processes
this should not happen. I've seen this too in error reports, still no
idea why it happens.
Here's a related issue:

https://github.com/ACRA/acra/issues/3

-- 
You received this message because you are subscribed to the Google
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] Load an error resID after devices just started.

2012-11-11 Thread fycd
hi all:

I get strange problem with .R class while devices just started.

my app get all kind of broadcast and send a notification.
but some times, after devices has started, my app receives the first 
broadcast and send a notification with wrong layout id.
and it cause my app crash forCouldn't expand RemoteViews for.
I have checked my code that the notification's layout id never be changed.
but why it change a nother id, and it just occurs after the devices started.

Are there any clues can help me find the root cause?
All are welcome to give your ideas

-- 
You received this message because you are subscribed to the Google
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] bluetooth PAN issue

2012-11-11 Thread Robin Gujjar
Hi All ,


I am trying to setup the bluetoooth PAN on my devlopment board( Client 
PANU).  Master is running on a Ubuntu PC 12.04 . 
Master is working fine as i am able to access interbet on another ubuntu PC 
. 

But on my android development board i am not able to start a connection, i 
have done the below steps : 

On my android board : 

W/ProcessStats( 1665): Skipping unknown process pid 2239
W/ThrottleService( 1665): unable to find stats for iface rmnet0
I/pand( 2254): Bluetooth PAN daemon version 4.93
I/pand( 2254): Connecting to 74:E5:43:51:8C:E6
I/pand( 2254): bnep0 connected

root@android:/ # pand -l 
bnep0 E6:8C:51:43:E5:74 PANU

method 1: 
Static IP setting : 
ifconfig bnep0 172.22.22.10 netmask 255.255.255.0
route add default gw 172.22.22.1 dev bnep0 
setprop net.dns1 198.95.1.1


130|root@android:/ # netcfg 
lo   UP
   127.0.0.1/8   0x0049 00:00:00:00:00:00
sit0 DOWN   0.0.0.0/0   0x0080 
00:00:00:00:00:00
ip6tnl0  DOWN   0.0.0.0/0   0x0080 
00:00:00:00:00:00
bnep0UP172.22.22.10/24  0x1043 
00:02:72:bc:01:47

Method2 : 
I also tried the dhcp :

1|root@android:/ # dhcpcd -d 
bnep0 
dhcpcd[2346]: version 5.2.10 starting
dhcpcd[2346]: bnep0: using hwaddr 00:02:72:bc:01:47
dhcpcd[2346]: bnep0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', 
reason PREINIT
dhcpcd[2346]: bnep0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', 
reason CARRIER
dhcpcd[2346]: host does not support a monotonic clock - timing can skew
dhcpcd[2346]: bnep0: reading lease `/data/misc/dhcp/dhcpcd-bnep0.lease'
dhcpcd[2346]: bnep0: checking for 169.254.159.45
dhcpcd[2346]: bnep0: sending ARP probe (1 of 3), next in 1.11 seconds
dhcpcd[2346]: bnep0: sending ARP probe (2 of 3), next in 1.81 seconds
dhcpcd[2346]: bnep0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[2346]: bnep0: using IPv4LL address 169.254.159.45
dhcpcd[2346]: bnep0: adding IP address 169.254.159.45/16
dhcpcd[2346]: bnep0: adding route to 169.254.0.0/16
dhcpcd[2346]: bnep0: writing lease `/data/misc/dhcp/dhcpcd-bnep0.lease'
dhcpcd[2346]: bnep0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', 
reason IPV4LL
dhcpcd[2346]: forking to background
dhcpcd[2346]: forked to background, child pid 2370


= 
None of them works for me:  i can not ping my master form android client. 
am i missing any other step ? 
Please give me soem pointers ? 

thanks 
Robin Singh

-- 
You received this message because you are subscribed to the Google
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] Confused about signature process to verify purchases

2012-11-11 Thread Stu
After any exchange between the app and Google play to purchase some goods, 
the app must then forward this request to some external content-delivery 
server requesting that the purchased goods be delivered.

Obviously, there is no way to prevent the user from modifying the source 
code of their app from simply sending any arbitrary message -- such as a 
purchase was successful message to your server (obfuscation may slow down 
attackers, but isn't truly secure).

Therefore, the only way to be secure is if the purchase successful 
message has been digitally signed by Google play.  The only mention of this 
I found in the documentation is here:
http://developer.android.com/guide/google/play/billing/billing_integrate.html

where it says:  *Your application must also provide a way to verify the 
signatures that accompany every PURCHASE_STATE_CHANGED broadcast intent. 
The Security.java file in the sample application shows you how to do this.*

Now, if we look at the source code for Security.java (inside the Dungeons 
example they are referring to), then we find the verifyPurchase function, 
which contains this code:

/**
 * Compute your public key (that you got from the Android 
Market publisher site).
 *
 * Instead of just storing the entire literal string here 
embedded in the
 * program,  construct the key at runtime from pieces or
 * use bit manipulation (for example, XOR with some other 
string) to hide
 * the actual key.  The key itself is not secret information, 
but we don't
 * want to make it easy for an adversary to replace the public 
key with one
 * of their own and then fake messages from the server.
 *
 * Generally, encryption keys / passwords should only be kept 
in memory
 * long enough to perform the operation they need to perform.
 */
String base64EncodedPublicKey = 
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqiPOV7jXSWomX32h9KYRfWXOLEbmakAQJhq5lq1j1tEC3Tz8qvO9RUAmaCKF1x51Wyc5zI4weX5N1Wix/RdpvAFPk4O5PmGcCpA78grFMPFLZtwI9R1cOtlOSwoRBMc2PDdGVWsLWyWoNhsnkOXMvfOk78daT0reFFFdMPmACzROcwcW/Dq+gkE4sTb2fgtLlYLOAy186PTHuES+j+532jbuOBFLLVw64UYjTcP29LdIVC/XBvqqiMdMLeDblvQyQVhoQcFvOwf0+k0ZJUdNcZcJXgQJC0fsMOaWu/aTzqm5fqQcboYDko/lG76+lNqS71wkWefKAzzkGHjyrZS6AwIDAQAB;
PublicKey key = 
Security.generatePublicKey(base64EncodedPublicKey);
verified = Security.verify(key, signedData, signature);
if (!verified) {
Log.w(TAG, signature does not match data.);
return null;
}


Now, this seems odd to me...because they are using OUR OWN public key to 
verify the signature.  The Security.Verify would verify that the supplied 
public key had been signed with the corresponding PRIVATE key.  But Google 
Play does not have access to our private key...so how could they have 
signed it for us?  

Secondly, it does not make sense to do verification on the client side.  
The verification needs to be done by the content-delivery server, to verify 
that the message came from Google Play -- which means that Google should 
have signed it with THEIR private key.

Please help me understand how this makes any 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