[android-developers] Re: [Android LVL] Sporadic false negatives on client devices

2012-05-21 Thread andrew android
Google must do something about this.  I had even devised a simple method of 
discouraging (rendering ineffective) the most basic LVL hack.  It simply 
involved using bogus qualifications and setting a boolean switch to 
indicate if a negative value returned, then only accepting a positive value 
if a negative had just been received.  It didn't work even after I removed 
that logic, though.

This is not acceptable so let's keep up the pressure on Google to fix it. 
 I submitted a support request.  I'll give that a few days and see if 
anything comes of it.  They make it difficult, though.  They may be the 
best of the best of the best in some ways but developer support is NOT one 
of them.


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

[android-developers] Re: [Android LVL] Sporadic false negatives on client devices

2012-05-20 Thread andrew android
I am having the same issues.  I just created another thread on this.  I 
have been using LVL for a while now and this has been getting worse the 
last few weeks.


On Monday, May 7, 2012 8:07:23 AM UTC-5, Florin wrote:
>
> Hello, 
>
> I have an Android developer account and a couple of paid apps 
> published on the Market since a while now. I have decided to use 
> Android LVL for copy protection from the start on all of my apps, I 
> found it pretty straightforward to use so I told myself why not? extra 
> security is better than no security, right? 
>
> However, after almost one year since my apps have been out in the 
> wild, I keep getting from time to time unsatisfied customers which 
> after purchasing one app constantly get NOT_LICENSED replies from 
> Android licensing servers. And I'm not talking only about occasional 
> NOT_LICENSED caused either by lack of network coverage etc. but about 
> clients which try for days and days(yes, there are clients like this, 
> and they are right, since they paid for their apps!) and still get 
> NOT_LICENSED. 
>
> Now, here goes my questions: 
> 1) For Android dev and apps publishers out there: have you noticed any 
> wave of false negatives complaints from your clients lately? The above- 
> mentioned symptom occurs in my case since the beginning, but since 2 
> weeks now it happens at a much higher frequency. 
> 2) For any Google representative who might see this: are there any 
> kind of License Validation statistics on the Android Licensing server 
> side? Like for instance validation attempts per application, with 
> timestamp and Android Market client version and client ID(not email 
> for security reasons but "something")?  And with some extra message 
> giving a reason for NOT_LICENSED?(apart the obvious didn't buy reason, 
> could there be others?) 
> I think this should be implemented at LVL level and not at app level 
> due to permissions requirement(an app implementing statistics would 
> definitely require network access which for some apps does not 
> justify). So, can we have access to these statistics? If not now, 
> maybe sometimes in the future? 
>
> Florin.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] LVL suddently stopped working - returns only timeouts

2012-05-20 Thread andrew android
I have had LVL (licensing validation) in my apps ever since it was first 
available and suddenly in the past few weeks, without any changes made by 
me, I have only received timeout errors - even when I increase the timeout 
set in licenseChecker.java.  I have checked and rechecked all of my codes 
and my key.  

I have the problem on both my Samsung Galaxy Nexus (running 4.0.2) and my 
WiFi XOOM (running 4.0.4)

Has anybody else been having a problem lately?  I have users with these 
issues as well, it seems.

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: Strange error on HTC Hero running 2.1 in Turkey

2010-09-09 Thread andrew android
Bump

On Aug 29, 2:23 pm, "Andy G." 
wrote:
> A user got the following error when opening a regular old preference
> screen with just a single list preference.  Can anyone tell what is
> going on with this?
>
> E/AndroidRuntime(32133): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime(32133): java.lang.NullPointerException
> E/AndroidRuntime(32133):     at
> android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> 355)
> E/AndroidRuntime(32133):     at
> android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
> E/AndroidRuntime(32133):     at
> android.widget.AbsListView.obtainView(AbsListView.java:1274)
> E/AndroidRuntime(32133):     at
> android.widget.ListView.measureHeightOfChildren(ListView.java:1147)
> E/AndroidRuntime(32133):     at
> android.widget.ListView.onMeasure(ListView.java:1060)
> E/AndroidRuntime(32133):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32133):     at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
> E/AndroidRuntime(32133):     at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 888)
> E/AndroidRuntime(32133):     at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
> E/AndroidRuntime(32133):     at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
> E/AndroidRuntime(32133):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32133):     at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
> E/AndroidRuntime(32133):     at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 888)
> E/AndroidRuntime(32133):     at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
> E/AndroidRuntime(32133):     at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
> E/AndroidRuntime(32133):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32133):     at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
> E/AndroidRuntime(32133):     at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
> E/AndroidRuntime(32133):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32133):     at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
> E/AndroidRuntime(32133):     at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
> E/AndroidRuntime(32133):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32133):     at
> android.view.ViewRoot.performTraversals(ViewRoot.java:767)
> E/AndroidRuntime(32133):     at
> android.view.ViewRoot.handleMessage(ViewRoot.java:1650)
> E/AndroidRuntime(32133):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime(32133):     at android.os.Looper.loop(Looper.java:
> 123)
> E/AndroidRuntime(32133):     at
> android.app.ActivityThread.main(ActivityThread.java:4595)
> E/AndroidRuntime(32133):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime(32133):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> E/AndroidRuntime(32133):     at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:860)
> E/AndroidRuntime(32133):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> E/AndroidRuntime(32133):     at dalvik.system.NativeStart.main(Native
> Method)
> E/JavaBinder(   79): !!! FAILED BINDER TRANSACTION !!!
> E/ActivityManager(   79): fail to set top app changed!
> E/AndroidRuntime(32145): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime(32145): java.lang.NullPointerException
> E/AndroidRuntime(32145):     at
> android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> 355)
> E/AndroidRuntime(32145):     at
> android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
> E/AndroidRuntime(32145):     at
> android.widget.AbsListView.obtainView(AbsListView.java:1274)
> E/AndroidRuntime(32145):     at
> android.widget.ListView.measureHeightOfChildren(ListView.java:1147)
> E/AndroidRuntime(32145):     at
> android.widget.ListView.onMeasure(ListView.java:1060)
> E/AndroidRuntime(32145):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32145):     at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
> E/AndroidRuntime(32145):     at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 888)
> E/AndroidRuntime(32145):     at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
> E/AndroidRuntime(32145):     at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
> E/AndroidRuntime(32145):     at android.view.View.measure(View.java:
> 7966)
> E/AndroidRuntime(32145):     at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
> E/AndroidRuntime(32145):     at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 888)
> E/AndroidRuntime(32145):     at

[android-developers] Droid X background or font color issue?

2010-08-16 Thread andrew android
Hi !

I just got a message from a user of one of my apps that upgraded and
reinstalled onto a Droid X and she says that now the dropdowns
spinners) are defaulting to white font on white background.

Do any of you know of a difference in font color defaults on the Droid
X?

Any suggestions or ideas?

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: My experience with LVL and the precedence it sets

2010-07-30 Thread andrew android
I just started using the LVL also.  I had problems adding a reference
to the LVL project (I kept getting manifest errors immediately upon
adding the reference) so I just added it directly.  Then, I tried to
buile the sample code into my project but I find it all very
"clunky".  I think it is absurd to not take the time to build methods
and properties that automatically can set obfuscation properties,
obtain device Id, make a call to do the validation and such.  Having
source code is mice but they really should have made this quicker to
implement with the option to customize and do more with it or to not
and take a simpler approach.  I was so looking forward to using this
but am sorely disappointed.  There is a competing android market with
a much better licensing implementation, by the way.

On Jul 29, 2:06 am, Mark Carter  wrote:
> I believe I'm using the default eclipse compiler warning settings and
> I got a bunch of "unused import/instance variable" warnings in my
> workspace when adding the LVL project. Furthermore, all the warnings
> were doubled up - once for the library project at the top level and
> once for the library project as a child node of my own project.
>
> Since changing the project warning settings was not an option, I
> solved this by adding @SuppressWarnings annotation at the class level
> of a couple of the LVL classes. But this is far from ideal as it
> requires modifying the code (which I will later want to update as new
> versions are released).
>
> Another problem was that when I changed the LVL code (saving the
> changes), my main project required a "Clean" before it picked up the
> changes. It would be nice if library project changes triggered clean
> to all downstream projects (I think this is how things normally work).
> This problem might have been caused by me editing files in the top
> level LVL project rather than the child LVL node. Again (mentioned
> last month in another thread), this is a problem where the same class
> can appear twice in the workspace (once for the top level, once for
> the child level).
>
> The easiest solution to this would be to NOT make the LVL child node
> browsable. So forcing the dev to do everything through the top level
> project. Also trigger the Cleans accordingly.
>
> One final point about the LVL code I wanted to subclass
> ServerManagerPolicy but had to make a bunch of instance fields
> protected to do so. Would be great if they were already protected.
>
> Also, ResponseData is package private. This prevents devs from
> implementing their own Policy in their own package. Since I wanted to
> make only minimal changes the the LVL project, I just included my
> Policy class in a "com.android.vending.licensing" package within my
> main project instead. Still, would prefer to use my own package
> though...
>
> On Jul 29, 3:00 am, Zsolt Vasvari  wrote:
>
>
>
> > Thanks for your answer, Xavier.
>
> > > $NON-NLS is something specific to Eclipse that we do not use in Android.
> > > Our convention for the android source code do not enforce the use of
> > > this qualifier.
>
> > > As for importing java.lang.String, those 2 files have been created
> > > automatically by aidl (see the files in aidl/) and the tool doesn't
> > > care about unneeded imports and automatically put import statements
> > > for all the used classes.
>
> > Ok, fair comment about the java.lang.String import.  That said, since
> > you are recommending to use Eclipse as the development environment, I
> > think it would be benefitial for everybody if a few minutes taken
> > before release to make sure it compiles with any possible settings the
> > user may have in their Eclipse project.  If that means cleaning up the
> > generated code, I believe that should be undertaken.  Otherwise you
> > will end up with aggrevated users.
>
> > Do you honestly expect the user having to modify their project warning
> > levels to be able to successfully integrate LVL?  Perhaphs the answer
> > is yes, but then it should be documented and spelt out how warning
> > levels need to be set for the project.

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


[android-developers] Re: read default browser cookies for webview

2010-07-30 Thread andrew android
Mark-

I actually was able to read the cookies but now I need to figure out
how to use them in my webview.  That is tricky for me now.  Any help
you have for this?

Thanks!

On Jul 25, 2:33 pm, Mark Murphy  wrote:
> On Sun, Jul 25, 2010 at 10:48 AM,andrewandroid wrote:
> > Can anyone tell me how to read the cookies from the default browser?
>
> You cannot access other applications' data like this, for
> privacy/security reasons. Sorry!
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 Available!

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


[android-developers] read default browser cookies for webview

2010-07-25 Thread andrew android
Can anyone tell me how to read the cookies from the default browser?
Any example ?

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: api levels device lookup chart?

2010-07-20 Thread andrew android
Thanks so much!

On Jul 19, 8:30 pm, Jenus Dong  wrote:
> http://en.wikipedia.org/wiki/List_of_Android_devices
>
> Is it latest right?
>
> On Tue, Jul 20, 2010 at 2:30 AM, andrew android wrote:
>
>
>
> > Does anyone know of a site where I could find all android devices
> > listed with their current api level ?
> > Does such a chart or database exist?
> > Please help!
> > 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 > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] api levels device lookup chart?

2010-07-19 Thread andrew android
Does anyone know of a site where I could find all android devices
listed with their current api level ?
Does such a chart or database exist?
Please help!
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: How to check if GPS signal is available or not

2010-07-12 Thread andrew android
I also need this.  Anybody can help please?

Thanks!

On Jul 6, 9:54 am, Joffrey  wrote:
> Hi all,
>
> Can anyone tell me if and how it is possible to check if theGPS
> signal is available or not. So not wanting to know ifgpsis enable or
> not but if a signal is received.
> GPSstatus doesn't seem to be about that nor does the onStatusChanged
> of the LocationListener. At least it doesn't seem to report the
> signal.
> What I try to do is display an alert when signal is lost (when driving
> in a tunnel) and hide the alert as soon as the device is receiving the
> signal again.
> So it's not only about the firstFix but every time the signal is lost
> or back again... Probably not the only person in the world wanting to
> know this ;-) and it should be possible since thegpsicon in the
> phonedisplay is doing the same...
>
> Thanks in advance,
> Joffrey

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: GPS accuracy reliability

2010-07-12 Thread andrew android
Hi!  Could you provide some sample code for verifying which they are
getting results from (gps vs. Network)?

Thanks so much!

On Jul 10, 11:07 am, jgostylo  wrote:
> In answer to some questions.  I am setting up the network location
> finder and theGPSlocation finder using 2 separate
> LocationListeners.  I have some logic that determines what the user
> has activated so I only listen togpsif the havegpsenabled and so
> forth.
>
> From my user feedback it seems like the biggest location discrepancies
> happen withGPS.  I have not been able to personally verify this.  I
> don't need to be super picky about how accurate it is (500 meters
> would suffice).  I am just wondering ifGPSis putting people several
> hundred miles away from their actual location is it also reliable to
> say that its accuracy is over 200,000 meters?  That way I can throw
> out anything that says it is less accurate than 500 meters.
>
> If it is putting my user 200 miles away and saying that it thinks its
> accuracy is within 100 meter then it really does me no good.  Maybe I
> can be choosy and say that if itGPSthen I demand 20 meter accuracy
> but if it is network then I only demand 500 meter???
>
> Thanks for the responses.
>
> On Jul 10, 10:19 am, "Maps.Huge.Info (Maps API Guru)"
>
>
>
>  wrote:
> > You can manage the orientation changes yourself and eliminate this
> > source of device confusion, it's quite easy, just add
> > android:configChanges="orientation" to your manifest's activity.
>
> > As for the signal source, just make sure to check your provider for
> > "gps" - if it saysgps, it will be from that source.
>
> > -John Coryat

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Petition: Google, please improve the Android Market.

2010-03-01 Thread andrew android
I agree with most of your points but agree with some others that you
need to edit it for length and tone down the negativity.

Also, how about ability to receive emails for each sale made or daily
stats as an option?



On Feb 21, 7:43 am, Rob Irondad  wrote:
> Hi fellow developers.
> I've come up with this text for a petition (warning: long):
>
> http://docs.google.com/View?id=dd9hmc43_0c9zh58gd
>
> You're all welcome to review it and send your comments before I
> publish it to some petition website.
> You can email me directly (rob.iron...@gmail.com).
>
> --
> Rob

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 get map overly to show

2010-02-09 Thread andrew android
Bump)

On Feb 6, 7:16 am, andrew android  wrote:
> Can anyone help?  Thanks!
>
> On Feb 2, 7:42 pm,andrewandroid wrote:
>
>
>
> > 
> >  >   xmlns:android="http://schemas.android.com/apk/res/android";
> >  android:layout_width="wrap_content"
> >  android:layout_height="wrap_content">
> >   
> >  > dth="fill_parent"
> >  android:layout_height="fill_parent"android:enabled="true"android:clickable=
> >  "true"android:apiKey="0lrZO7CweoTib-Xc4lzUlx2BLruXNt6rHvl0-TA"
> > />
> > 
>
> > On Feb 2, 2:57 am, Kevin Duffey  wrote:
>
> > > Oddly enough, I copied/pasted your code and I am getting a class not found
> > > issue.. for some reason I can't get the Launcher to start. Can you paste
> > > your layout xml and string resources as well?
>
> > > On Mon, Feb 1, 2010 at 8:32 PM,andrewandroidwrote:
>
> > > > Any example of what I may be missing?  Thanks!
>
> > > > On Jan 31, 12:10 pm, Kevin Duffey  wrote:
> > > > > Hmm.. I don't know.. I did not set the overlay position.. I just 
> > > > > added it
> > > > to
> > > > > my mapView and mine shows up. Try working with your location 
> > > > > settings. I
> > > > am
> > > > > not sure why the Location is needed tho. I use an ItemizedOverlay for 
> > > > > a
> > > > list
> > > > > of items I pull down from a server, which works fine. My map then
> > > > responds
> > > > > to a click on an item, and puts another overlay above it with text.
>
> > > > > On Sun, Jan 31, 2010 at 9:44 AM,andrewandroid > > > >wrote:
>
> > > > > > My map overlay is not showing up after several attempts
>
> > > > > > Here is my Overlay class code:
>
> > > > > > public class myOverlay extends Overlay{
>
> > > > > >        private final int mRadius = 6;
> > > > > >                       �...@override
> > > > > >                public void draw(Canvas canvas, MapView mapView, 
> > > > > > boolean
> > > > > > shadow) {
> > > > > >                                super.draw(canvas, mapView, shadow);
> > > > > >                                Projection projection =
> > > > > > mapView.getProjection();
> > > > > >        //      if (shadow == false) {
> > > > > >                        Double latitude = location.getLatitude()*1E6;
> > > > > >                        Double longitude = 
> > > > > > location.getLongitude()*1E6;
> > > > > >                        GeoPoint geoPoint;
> > > > > >                        geoPoint = new
> > > > > > GeoPoint(latitude.intValue(),longitude.intValue
> > > > > > ());
> > > > > >                        Point point = new Point();
> > > > > >                        projection.toPixels(geoPoint, point);
> > > > > >                        RectF oval = new RectF(point.x - mRadius,
> > > > point.y -
> > > > > > mRadius,
> > > > > > point.x + mRadius, point.y + mRadius);
> > > > > >                        // Setup the paint
> > > > > >                        Paint paint = new Paint();
> > > > > >                        paint.setARGB(250, 255, 0, 0);
> > > > > >                        paint.setAntiAlias(true);
> > > > > >                        paint.setFakeBoldText(true);
> > > > > >                        Paint backPaint = new Paint();
> > > > > >                        backPaint.setARGB(175, 50, 50, 50);
> > > > > >                        backPaint.setAntiAlias(true);
> > > > > >                        RectF backRect = new RectF(point.x + 2 +
> > > > mRadius,
> > > > > > point.y -
> > > > > > 3*mRadius,      point.x + 65, point.y + mRadius);
> > > > > >                        // Draw the marker
> > > > > >                        canvas.drawOval(oval, paint);
> > > > > >                        canvas.drawRoundRect(backRect, 5, 5, 
> > > > > > backPaint);
> > > > > >                        canvas.drawText(noteName, point.x + 
> > > > > > 2*mRadius,
> > > >

[android-developers] Re: Unable to get map overly to show

2010-02-06 Thread andrew android
Can anyone help?  Thanks!

On Feb 2, 7:42 pm, andrew android  wrote:
> 
>    xmlns:android="http://schemas.android.com/apk/res/android";
>  android:layout_width="wrap_content"
>  android:layout_height="wrap_content">
>   
>   android:layout_height="fill_parent"android:enabled="true"android:clickable="true"android:apiKey="0lrZO7CweoTib-Xc4lzUlx2BLruXNt6rHvl0-TA"
> />
> 
>
> On Feb 2, 2:57 am, Kevin Duffey  wrote:
>
>
>
> > Oddly enough, I copied/pasted your code and I am getting a class not found
> > issue.. for some reason I can't get the Launcher to start. Can you paste
> > your layout xml and string resources as well?
>
> > On Mon, Feb 1, 2010 at 8:32 PM,andrewandroidwrote:
>
> > > Any example of what I may be missing?  Thanks!
>
> > > On Jan 31, 12:10 pm, Kevin Duffey  wrote:
> > > > Hmm.. I don't know.. I did not set the overlay position.. I just added 
> > > > it
> > > to
> > > > my mapView and mine shows up. Try working with your location settings. I
> > > am
> > > > not sure why the Location is needed tho. I use an ItemizedOverlay for a
> > > list
> > > > of items I pull down from a server, which works fine. My map then
> > > responds
> > > > to a click on an item, and puts another overlay above it with text.
>
> > > > On Sun, Jan 31, 2010 at 9:44 AM,andrewandroid > > >wrote:
>
> > > > > My map overlay is not showing up after several attempts
>
> > > > > Here is my Overlay class code:
>
> > > > > public class myOverlay extends Overlay{
>
> > > > >        private final int mRadius = 6;
> > > > >                       �...@override
> > > > >                public void draw(Canvas canvas, MapView mapView, 
> > > > > boolean
> > > > > shadow) {
> > > > >                                super.draw(canvas, mapView, shadow);
> > > > >                                Projection projection =
> > > > > mapView.getProjection();
> > > > >        //      if (shadow == false) {
> > > > >                        Double latitude = location.getLatitude()*1E6;
> > > > >                        Double longitude = location.getLongitude()*1E6;
> > > > >                        GeoPoint geoPoint;
> > > > >                        geoPoint = new
> > > > > GeoPoint(latitude.intValue(),longitude.intValue
> > > > > ());
> > > > >                        Point point = new Point();
> > > > >                        projection.toPixels(geoPoint, point);
> > > > >                        RectF oval = new RectF(point.x - mRadius,
> > > point.y -
> > > > > mRadius,
> > > > > point.x + mRadius, point.y + mRadius);
> > > > >                        // Setup the paint
> > > > >                        Paint paint = new Paint();
> > > > >                        paint.setARGB(250, 255, 0, 0);
> > > > >                        paint.setAntiAlias(true);
> > > > >                        paint.setFakeBoldText(true);
> > > > >                        Paint backPaint = new Paint();
> > > > >                        backPaint.setARGB(175, 50, 50, 50);
> > > > >                        backPaint.setAntiAlias(true);
> > > > >                        RectF backRect = new RectF(point.x + 2 +
> > > mRadius,
> > > > > point.y -
> > > > > 3*mRadius,      point.x + 65, point.y + mRadius);
> > > > >                        // Draw the marker
> > > > >                        canvas.drawOval(oval, paint);
> > > > >                        canvas.drawRoundRect(backRect, 5, 5, 
> > > > > backPaint);
> > > > >                        canvas.drawText(noteName, point.x + 2*mRadius,
> > > > > point.y, paint);
>
> > > > >        //      }
> > > > >        //      else {
>
> > > > >        //      }
>
> > > > >                }
> > > > >               �...@override
> > > > >                public boolean onTap(GeoPoint point, MapView mapView) {
> > > > >                // Return true if screen tap is handled by this overlay
> > > > >                return false;
> > > > >                }
> > > > &g

[android-developers] Re: Problem finding a contact when ID is known

2010-02-02 Thread andrew android
I finally got it figured out (thanks Beth):

@Override
public void onItemClick(AdapterView arg0, View arg1, 
int
position,
long id) {

String name = ContactNameList.get(position);
String strID = ContactIDList.get(position);
String strLKP = ContactLookupList.get(position);
Uri contactUri = 
ContactsContract.Contacts.getLookupUri
(Long.parseLong(strID), strLKP);
Intent intent = new 
Intent(Intent.ACTION_VIEW,contactUri);
startActivity(intent);
}

On Feb 1, 10:30 pm, andrew android  wrote:
> Bump:)
>
> On Feb 1, 5:02 am,andrewandroid  wrote:
>
>
>
> > Could you help give some example? Some Example how you use it?
> > Thanks!
>
> > On Jan 31, 8:34 pm, Dmitri Plotnikov ()  
> > wrote:
>
> > > You don't need to create it.  It is column on the Contacts table. There is
> > > also a conenience method on Contacts that will retrieve it for you.
>
> > > On Jan 31, 2010 3:43 PM, "andrewandroid"  wrote:
>
> > > Please tell me, though, how do you create a lookup key?  Can you give
> > > or point me to a good example?
>
> > > On Jan 31, 12:47 pm, Dmitri Plotnikov ()  
> > > wrote:
>
> > > > Contact IDs are volatile, they often change as a result of aggregation.
> > >  You
> > > > need to store the l...
> > > > On Jan 31, 2010 9:42 AM, "andrewandroid"  wrote:
>
> > > > I am having a proble...
> > > >android-developers+unsubscr...@googlegroups.com > > > cr...@googlegroups.com>
> > > cr...@googlegroups.com>> For more options, visit this group athttp://
>
> > > groups.google.com/group/android-developers?hl=en
>
> > > --
>
> > > You received this message because you are subscribed to the Google
> > > Groups "AndroidDevelopers" group...- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 get map overly to show

2010-02-02 Thread andrew android

http://schemas.android.com/apk/res/android";
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">
  


On Feb 2, 2:57 am, Kevin Duffey  wrote:
> Oddly enough, I copied/pasted your code and I am getting a class not found
> issue.. for some reason I can't get the Launcher to start. Can you paste
> your layout xml and string resources as well?
>
> On Mon, Feb 1, 2010 at 8:32 PM, andrew android wrote:
>
>
>
> > Any example of what I may be missing?  Thanks!
>
> > On Jan 31, 12:10 pm, Kevin Duffey  wrote:
> > > Hmm.. I don't know.. I did not set the overlay position.. I just added it
> > to
> > > my mapView and mine shows up. Try working with your location settings. I
> > am
> > > not sure why the Location is needed tho. I use an ItemizedOverlay for a
> > list
> > > of items I pull down from a server, which works fine. My map then
> > responds
> > > to a click on an item, and puts another overlay above it with text.
>
> > > On Sun, Jan 31, 2010 at 9:44 AM, andrew android  > >wrote:
>
> > > > My map overlay is not showing up after several attempts
>
> > > > Here is my Overlay class code:
>
> > > > public class myOverlay extends Overlay{
>
> > > >        private final int mRadius = 6;
> > > >                       �...@override
> > > >                public void draw(Canvas canvas, MapView mapView, boolean
> > > > shadow) {
> > > >                                super.draw(canvas, mapView, shadow);
> > > >                                Projection projection =
> > > > mapView.getProjection();
> > > >        //      if (shadow == false) {
> > > >                        Double latitude = location.getLatitude()*1E6;
> > > >                        Double longitude = location.getLongitude()*1E6;
> > > >                        GeoPoint geoPoint;
> > > >                        geoPoint = new
> > > > GeoPoint(latitude.intValue(),longitude.intValue
> > > > ());
> > > >                        Point point = new Point();
> > > >                        projection.toPixels(geoPoint, point);
> > > >                        RectF oval = new RectF(point.x - mRadius,
> > point.y -
> > > > mRadius,
> > > > point.x + mRadius, point.y + mRadius);
> > > >                        // Setup the paint
> > > >                        Paint paint = new Paint();
> > > >                        paint.setARGB(250, 255, 0, 0);
> > > >                        paint.setAntiAlias(true);
> > > >                        paint.setFakeBoldText(true);
> > > >                        Paint backPaint = new Paint();
> > > >                        backPaint.setARGB(175, 50, 50, 50);
> > > >                        backPaint.setAntiAlias(true);
> > > >                        RectF backRect = new RectF(point.x + 2 +
> > mRadius,
> > > > point.y -
> > > > 3*mRadius,      point.x + 65, point.y + mRadius);
> > > >                        // Draw the marker
> > > >                        canvas.drawOval(oval, paint);
> > > >                        canvas.drawRoundRect(backRect, 5, 5, backPaint);
> > > >                        canvas.drawText(noteName, point.x + 2*mRadius,
> > > > point.y, paint);
>
> > > >        //      }
> > > >        //      else {
>
> > > >        //      }
>
> > > >                }
> > > >               �...@override
> > > >                public boolean onTap(GeoPoint point, MapView mapView) {
> > > >                // Return true if screen tap is handled by this overlay
> > > >                return false;
> > > >                }
> > > >                Location location;
>
> > > >                public Location getLocation() {
> > > >                return location;
> > > >                }
> > > >                public void setLocation(Location location) {
> > > >                this.location = location;
> > > >                }
> > > >                String noteName;
> > > >                public String getNoteName(){
> > > >                        return noteName;
> > > >                }
> > > >                public void setNoteName(String n){
> > > >                        this.noteName = n;
> > > 

[android-developers] Re: Unable to get map overly to show

2010-02-01 Thread andrew android
Any example of what I may be missing?  Thanks!

On Jan 31, 12:10 pm, Kevin Duffey  wrote:
> Hmm.. I don't know.. I did not set the overlay position.. I just added it to
> my mapView and mine shows up. Try working with your location settings. I am
> not sure why the Location is needed tho. I use an ItemizedOverlay for a list
> of items I pull down from a server, which works fine. My map then responds
> to a click on an item, and puts another overlay above it with text.
>
> On Sun, Jan 31, 2010 at 9:44 AM, andrew android wrote:
>
>
>
> > My map overlay is not showing up after several attempts
>
> > Here is my Overlay class code:
>
> > public class myOverlay extends Overlay{
>
> >        private final int mRadius = 6;
> >                       �...@override
> >                public void draw(Canvas canvas, MapView mapView, boolean
> > shadow) {
> >                                super.draw(canvas, mapView, shadow);
> >                                Projection projection =
> > mapView.getProjection();
> >        //      if (shadow == false) {
> >                        Double latitude = location.getLatitude()*1E6;
> >                        Double longitude = location.getLongitude()*1E6;
> >                        GeoPoint geoPoint;
> >                        geoPoint = new
> > GeoPoint(latitude.intValue(),longitude.intValue
> > ());
> >                        Point point = new Point();
> >                        projection.toPixels(geoPoint, point);
> >                        RectF oval = new RectF(point.x - mRadius, point.y -
> > mRadius,
> > point.x + mRadius, point.y + mRadius);
> >                        // Setup the paint
> >                        Paint paint = new Paint();
> >                        paint.setARGB(250, 255, 0, 0);
> >                        paint.setAntiAlias(true);
> >                        paint.setFakeBoldText(true);
> >                        Paint backPaint = new Paint();
> >                        backPaint.setARGB(175, 50, 50, 50);
> >                        backPaint.setAntiAlias(true);
> >                        RectF backRect = new RectF(point.x + 2 + mRadius,
> > point.y -
> > 3*mRadius,      point.x + 65, point.y + mRadius);
> >                        // Draw the marker
> >                        canvas.drawOval(oval, paint);
> >                        canvas.drawRoundRect(backRect, 5, 5, backPaint);
> >                        canvas.drawText(noteName, point.x + 2*mRadius,
> > point.y, paint);
>
> >        //      }
> >        //      else {
>
> >        //      }
>
> >                }
> >               �...@override
> >                public boolean onTap(GeoPoint point, MapView mapView) {
> >                // Return true if screen tap is handled by this overlay
> >                return false;
> >                }
> >                Location location;
>
> >                public Location getLocation() {
> >                return location;
> >                }
> >                public void setLocation(Location location) {
> >                this.location = location;
> >                }
> >                String noteName;
> >                public String getNoteName(){
> >                        return noteName;
> >                }
> >                public void setNoteName(String n){
> >                        this.noteName = n;
> >                }
> > }
>
> > Here is the call to add the overlay:
>
> >                         positionOverlay = new myOverlay();
> >                Location loc = new Location("over");
> >                loc.setLatitude(lat);
> >                loc.setLongitude(lng);
> >                positionOverlay.setLocation(loc);
> >                positionOverlay.setNoteName(nm);
> >                mapView.getOverlays().add(positionOverlay);
> >                mapView.invalidate();
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > 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- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 finding a contact when ID is known

2010-02-01 Thread andrew android
Bump:)

On Feb 1, 5:02 am, andrew android  wrote:
> Could you help give some example? Some Example how you use it?
> Thanks!
>
> On Jan 31, 8:34 pm, Dmitri Plotnikov ()  
> wrote:
>
>
>
> > You don't need to create it.  It is column on the Contacts table. There is
> > also a conenience method on Contacts that will retrieve it for you.
>
> > On Jan 31, 2010 3:43 PM, "andrewandroid"  wrote:
>
> > Please tell me, though, how do you create a lookup key?  Can you give
> > or point me to a good example?
>
> > On Jan 31, 12:47 pm, Dmitri Plotnikov ()  
> > wrote:
>
> > > Contact IDs are volatile, they often change as a result of aggregation.
> >  You
> > > need to store the l...
> > > On Jan 31, 2010 9:42 AM, "andrewandroid"  wrote:
>
> > > I am having a proble...
> > >android-developers+unsubscr...@googlegroups.com > > cr...@googlegroups.com>
> > cr...@googlegroups.com>> For more options, visit this group athttp://
>
> > groups.google.com/group/android-developers?hl=en
>
> > --
>
> > You received this message because you are subscribed to the Google
> > Groups "AndroidDevelopers" group...- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 finding a contact when ID is known

2010-02-01 Thread andrew android
Could you help give some example? Some Example how you use it?
Thanks!

On Jan 31, 8:34 pm, Dmitri Plotnikov ()  
wrote:
> You don't need to create it.  It is column on the Contacts table. There is
> also a conenience method on Contacts that will retrieve it for you.
>
> On Jan 31, 2010 3:43 PM, "andrew android"  wrote:
>
> Please tell me, though, how do you create a lookup key?  Can you give
> or point me to a good example?
>
> On Jan 31, 12:47 pm, Dmitri Plotnikov ()  
> wrote:
>
>
>
> > Contact IDs are volatile, they often change as a result of aggregation.
>  You
> > need to store the l...
> > On Jan 31, 2010 9:42 AM, "andrew android"  wrote:
>
> > I am having a proble...
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> cr...@googlegroups.com>> For more options, visit this group athttp://
>
> groups.google.com/group/android-developers?hl=en
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 finding a contact when ID is known

2010-01-31 Thread andrew android
Please tell me, though, how do you create a lookup key?  Can you give
or point me to a good example?

On Jan 31, 12:47 pm, Dmitri Plotnikov ()  
wrote:
> Contact IDs are volatile, they often change as a result of aggregation.  You
> need to store the lookup key rather than the id of a contact if you want a
> more stable reference.
>
> Cheers,
> Dmitri
>
> On Jan 31, 2010 9:42 AM, "andrew android"  wrote:
>
> I am having a problem viewing a contact in my app when I know the ID
> (because we just queried and stored it).
>
> I see some comments that a "LOOKUP_URI" is required but I don't know
> how to use it and no matter what, I get "The contact does not exist"
> even though I know with 100% certainty that it does.
>
> Can someone explain based on the following code snippet:
>
> String name = ContactNameList.get(position);
> String strID = ContactIDList.get(position);
> Uri contactUri = ContactsContract.Contacts.getLookupUri(Long.parseLong
> (strID), "name='"+name + "'");
> Intent intent = new Intent(Intent.ACTION_VIEW,contactUri);
>                                startActivity(intent);
>
> I am finding that ID = 676 for example and that is getting parsed
> correctly and also that name='Joe Smith' does not throw an error but
> my activity does not open the contact - I only get the message "The
> contact does not exist" in a toast.
>
> Please help!  Thanks very much!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> 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 cr...@googlegroups.com>
> For more options, visit this group 
> athttp://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] Unable to get map overly to show

2010-01-31 Thread andrew android
My map overlay is not showing up after several attempts

Here is my Overlay class code:

public class myOverlay extends Overlay{

private final int mRadius = 6;
@Override
public void draw(Canvas canvas, MapView mapView, boolean 
shadow) {
super.draw(canvas, mapView, shadow);
Projection projection = mapView.getProjection();
//  if (shadow == false) {
Double latitude = location.getLatitude()*1E6;
Double longitude = location.getLongitude()*1E6;
GeoPoint geoPoint;
geoPoint = new 
GeoPoint(latitude.intValue(),longitude.intValue
());
Point point = new Point();
projection.toPixels(geoPoint, point);
RectF oval = new RectF(point.x - mRadius, point.y - 
mRadius,
point.x + mRadius, point.y + mRadius);
// Setup the paint
Paint paint = new Paint();
paint.setARGB(250, 255, 0, 0);
paint.setAntiAlias(true);
paint.setFakeBoldText(true);
Paint backPaint = new Paint();
backPaint.setARGB(175, 50, 50, 50);
backPaint.setAntiAlias(true);
RectF backRect = new RectF(point.x + 2 + mRadius, 
point.y -
3*mRadius,  point.x + 65, point.y + mRadius);
// Draw the marker
canvas.drawOval(oval, paint);
canvas.drawRoundRect(backRect, 5, 5, backPaint);
canvas.drawText(noteName, point.x + 2*mRadius, point.y, 
paint);

//  }
//  else {

//  }

}
@Override
public boolean onTap(GeoPoint point, MapView mapView) {
// Return true if screen tap is handled by this overlay
return false;
}
Location location;

public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
String noteName;
public String getNoteName(){
return noteName;
}
public void setNoteName(String n){
this.noteName = n;
}
}


Here is the call to add the overlay:

 positionOverlay = new myOverlay();
Location loc = new Location("over");
loc.setLatitude(lat);
loc.setLongitude(lng);
positionOverlay.setLocation(loc);
positionOverlay.setNoteName(nm);
mapView.getOverlays().add(positionOverlay);
mapView.invalidate();

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Problem finding a contact when ID is known

2010-01-31 Thread andrew android
I am having a problem viewing a contact in my app when I know the ID
(because we just queried and stored it).

I see some comments that a "LOOKUP_URI" is required but I don't know
how to use it and no matter what, I get "The contact does not exist"
even though I know with 100% certainty that it does.

Can someone explain based on the following code snippet:

String name = ContactNameList.get(position);
String strID = ContactIDList.get(position);
Uri contactUri = ContactsContract.Contacts.getLookupUri(Long.parseLong
(strID), "name='"+name + "'");
Intent intent = new Intent(Intent.ACTION_VIEW,contactUri);
startActivity(intent);

I am finding that ID = 676 for example and that is getting parsed
correctly and also that name='Joe Smith' does not throw an error but
my activity does not open the contact - I only get the message "The
contact does not exist" in a toast.

Please help!  Thanks very much!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: adding a "quick add event" to the Calendar

2010-01-22 Thread andrew android
.
http://www.developer.com/ws/article.php/3850276/Working-with-the-Android-Calendar.htm
is best place for info.

On Jan 22, 8:17 pm, andrew android  wrote:
> I am using the URI.  For some strange reason, android sdk does not
> expose the API.  There is a content URI for calendars and events.
> Search for "android calendar URI" not on android official site but
> elsewhere and you can find some more info which others have shared and
> this was useful to me.
>
> On Jan 22, 9:15 am, jarkman  wrote:
>
>
>
> > Andrew, can you share how you are adding events to the calendar ? I
> > can't find any documented API, so I am assuming you are using an
> > undocumented one... :-)
>
> > Thanks,
>
> > Richard
>
> > On Jan 22, 1:49 pm, andrew android  wrote:> I 
> > understand where you are coming from...
> > > In my app - Target Date Pro -  it is possible now to do this quick
> > > event addition and also jump to a specific event.  Inclusion of
> > > reminder to the quickly added event is a likely future enhancement.
>
> > > On Jan 13, 8:26 am, Jonathan Epstein  wrote:
>
> > > > I am an experienced developer, but an Android newbie.  I have a Droid
> > > > Eris (Android 1.5), and the awkwardness of adding events to a calendar
> > > > is driving me nuts.  I already made a feature request, but wonder
> > > > whether (a) newer versions of Android already have something like this
> > > > OR (b) if I could get some implementation advice on the following
> > > > idea.  In particular, I wonder if there is a hook available for me to
> > > > receive the necessary trigger when the user selects a time from the
> > > > Calendar Day View, as described below, along with the necessary
> > > > parameters (day and time that the user requested).
>
> > > > Alternatively, perhaps the Calendar source code is available, and I
> > > > should modify that.
>
> > > > Thanks in advance for your advice.
>
> > > > 
>
> > > > When adding an event (in Android 1.5) from the Day View, we currently
> > > > get the full event-add dialog, say for Thursday at 4pm.  An additional
> > > > simple interface would make it much easier to add events to calendars,
> > > > as described below.
>
> > > > Assume that the event is being added to the default calendar (e.g.,
> > > > your Google Calendar).
>
> > > > The first line in the screen contains 5 buttons for times in 30-minute
> > > > increments around the initial time.  E.g., in the 4pm example the
> > > > buttons read: 3:30, 3:45, 4:00 (highlighted), 4:15 and 4:30.
>
> > > > The second line shows an event-duration.  There are only four choices
> > > > (0, 30min, 60min, all day).
>
> > > > Below that is the event description.
>
> > > > Below that is a popup menu forreminders(same as on the current event
> > > > add-screen).
>
> > > > Below that are the opportunities to Save&Cancel.
>
> > > > Note that event location and event description are omitted.
>
> > > > If there's room above, there could be a button to take you to the full-
> > > > blown event entry dialog.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: adding a "quick add event" to the Calendar

2010-01-22 Thread andrew android
I am using the URI.  For some strange reason, android sdk does not
expose the API.  There is a content URI for calendars and events.
Search for "android calendar URI" not on android official site but
elsewhere and you can find some more info which others have shared and
this was useful to me.

On Jan 22, 9:15 am, jarkman  wrote:
> Andrew, can you share how you are adding events to the calendar ? I
> can't find any documented API, so I am assuming you are using an
> undocumented one... :-)
>
> Thanks,
>
> Richard
>
> On Jan 22, 1:49 pm, andrew android  wrote:> I 
> understand where you are coming from...
> > In my app - Target Date Pro -  it is possible now to do this quick
> > event addition and also jump to a specific event.  Inclusion of
> > reminder to the quickly added event is a likely future enhancement.
>
> > On Jan 13, 8:26 am, Jonathan Epstein  wrote:
>
> > > I am an experienced developer, but an Android newbie.  I have a Droid
> > > Eris (Android 1.5), and the awkwardness of adding events to a calendar
> > > is driving me nuts.  I already made a feature request, but wonder
> > > whether (a) newer versions of Android already have something like this
> > > OR (b) if I could get some implementation advice on the following
> > > idea.  In particular, I wonder if there is a hook available for me to
> > > receive the necessary trigger when the user selects a time from the
> > > Calendar Day View, as described below, along with the necessary
> > > parameters (day and time that the user requested).
>
> > > Alternatively, perhaps the Calendar source code is available, and I
> > > should modify that.
>
> > > Thanks in advance for your advice.
>
> > > 
>
> > > When adding an event (in Android 1.5) from the Day View, we currently
> > > get the full event-add dialog, say for Thursday at 4pm.  An additional
> > > simple interface would make it much easier to add events to calendars,
> > > as described below.
>
> > > Assume that the event is being added to the default calendar (e.g.,
> > > your Google Calendar).
>
> > > The first line in the screen contains 5 buttons for times in 30-minute
> > > increments around the initial time.  E.g., in the 4pm example the
> > > buttons read: 3:30, 3:45, 4:00 (highlighted), 4:15 and 4:30.
>
> > > The second line shows an event-duration.  There are only four choices
> > > (0, 30min, 60min, all day).
>
> > > Below that is the event description.
>
> > > Below that is a popup menu forreminders(same as on the current event
> > > add-screen).
>
> > > Below that are the opportunities to Save&Cancel.
>
> > > Note that event location and event description are omitted.
>
> > > If there's room above, there could be a button to take you to the full-
> > > blown event entry dialog.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: adding a "quick add event" to the Calendar

2010-01-22 Thread andrew android
I understand where you are coming from...
In my app - Target Date Pro -  it is possible now to do this quick
event addition and also jump to a specific event.  Inclusion of
reminder to the quickly added event is a likely future enhancement.

On Jan 13, 8:26 am, Jonathan Epstein  wrote:
> I am an experienced developer, but an Android newbie.  I have a Droid
> Eris (Android 1.5), and the awkwardness of adding events to a calendar
> is driving me nuts.  I already made a feature request, but wonder
> whether (a) newer versions of Android already have something like this
> OR (b) if I could get some implementation advice on the following
> idea.  In particular, I wonder if there is a hook available for me to
> receive the necessary trigger when the user selects a time from the
> Calendar Day View, as described below, along with the necessary
> parameters (day and time that the user requested).
>
> Alternatively, perhaps the Calendar source code is available, and I
> should modify that.
>
> Thanks in advance for your advice.
>
> 
>
> When adding an event (in Android 1.5) from the Day View, we currently
> get the full event-add dialog, say for Thursday at 4pm.  An additional
> simple interface would make it much easier to add events to calendars,
> as described below.
>
> Assume that the event is being added to the default calendar (e.g.,
> your Google Calendar).
>
> The first line in the screen contains 5 buttons for times in 30-minute
> increments around the initial time.  E.g., in the 4pm example the
> buttons read: 3:30, 3:45, 4:00 (highlighted), 4:15 and 4:30.
>
> The second line shows an event-duration.  There are only four choices
> (0, 30min, 60min, all day).
>
> Below that is the event description.
>
> Below that is a popup menu forreminders(same as on the current event
> add-screen).
>
> Below that are the opportunities to Save&Cancel.
>
> Note that event location and event description are omitted.
>
> If there's room above, there could be a button to take you to the full-
> blown event entry dialog.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: corporate calendar testing needed -help?

2010-01-17 Thread andrew android
I am unable to get my Droid to connect to my trial of MS Exchange
online.  I have tried.  Has anyone got this to work... if so... how do
you set it up?  I have the trial but the connection doesn't work.

Thanks!

On Jan 13, 5:54 pm, andrew android  wrote:
> Thanks!  I will try this, I think!
>
> On Jan 11, 6:04 am, Kumar Bibek  wrote:
>
>
>
> > HeyAndrew.
>
> >Microsoftonline has a 30 day evaluation forExchange2007 server. You
> > can register there and get upto 20 accounts with all functions free
> > for 30 days.
>
> > Thanks and Regards,
> > Kumar Bibekhttp://tech-droid.blogspot.com
>
> > On Jan 11, 4:40 pm,andrewandroid wrote:
>
> > > Could anyone help test my app with anandroiddevice that is using a
> > > corporate calendar  alternatively, can you tell me how to set up a
> > > mock corporateexchangeserver connection (and thus corporate
> > > calendar) on the emulator?  Can this be done in AVD?
> > > Thanks!- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: corporate calendar testing needed -help?

2010-01-13 Thread andrew android
Thanks!  I will try this, I think!

On Jan 11, 6:04 am, Kumar Bibek  wrote:
> HeyAndrew.
>
> Microsoft online has a 30 day evaluation for Exchange 2007 server. You
> can register there and get upto 20 accounts with all functions free
> for 30 days.
>
> Thanks and Regards,
> Kumar Bibekhttp://tech-droid.blogspot.com
>
> On Jan 11, 4:40 pm,andrewandroid wrote:
>
>
>
> > Could anyone help test my app with anandroiddevice that is using a
> > corporate calendar  alternatively, can you tell me how to set up a
> > mock corporate exchange server connection (and thus corporate
> > calendar) on the emulator?  Can this be done in AVD?
> > 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] corporate calendar testing needed -help?

2010-01-11 Thread andrew android
Could anyone help test my app with an android device that is using a
corporate calendar  alternatively, can you tell me how to set up a
mock corporate exchange server connection (and thus corporate
calendar) on the emulator?  Can this be done in AVD?
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: Achieving evenly spaced buttons on a layout

2009-12-29 Thread andrew android
Have you tried a table layout?

On Dec 28, 9:03 pm, Robert  wrote:
> I am developing a misterhouse frontend.  I have 9 image buttons that I
> want to be evenly spaced on all sides.  
> Seehttp://onlamp.com/onlamp/2004/11/11/graphics/mrhousemain.gif.  What
> layout and xml parameters do I use to achieve 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: ProgressDialog during location tasks either won't show or force closes - I have tried everything!

2009-12-29 Thread andrew android
Thanks.  I was trying to create the ProgressDialog in OnCreate or
OnStart.  That must be the problem so what is the best approach to do
it immediately when theView is loading?I even tried
RunInUIThread?

Sorry for not including much trace before, by the way.  My mistake.  I
may try again later if still...



On Dec 28, 2:04 am, Chander Pechetty  wrote:
> That was not much help as I don't see any stacktrace.
>
> Are you passing the right context when you create the dialog, when you
> say it doesn't show up ?
> like so ... new ProgressDialog(YourActivity.this);
>
> Also you cannot touch any UI components in threads except the main UI
> thread or the Handlers, which might explain the force close.
>
> Please refer the docs for more info at 
> :http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
>
> On Dec 27, 10:10 pm,andrewandroid wrote:
>
>
>
> > Here is the logCat from one method I have tried - using basic thread
> > with progressdialog:
> > 12-27 11:07:46.365: INFO/ApplicationChangeReceiverAbc(5537):
> > com.hawkmoon.locabot.alpha added
> > 12-27 11:07:46.443: INFO/ApplicationChangeReceiverAbc(5537):
> > com.hawkmoon.locabot.alpha disable 1
> > 12-27 11:07:46.764: INFO/ActivityManager(1018): Process com.svox.pico
> > (pid 5532) has died.
> > 12-27 11:07:47.021: INFO/Process(5503): Sending signal. PID: 5503 SIG:
> > 9
> > 12-27 11:07:47.041: INFO/ActivityManager(1018): Process
> > com.android.vending (pid 5524) has died.
> > 12-27 11:07:47.053: INFO/WindowManager(1018): WIN DEATH: Window
> > {448c7438 Please wait... paused=false}
> > 12-27 11:07:47.053: INFO/ActivityManager(1018): Process
> > com.hawkmoon.locabot.alpha (pid 5503) has died.
> > 12-27 11:07:47.060: WARN/UsageStats(1018): Unexpected resume of
> > com.android.browser while already resumed in
> > com.hawkmoon.locabot.alpha
> > 12-27 11:07:47.068: ERROR/JavaBinder(1018): !!! FAILED BINDER
> > TRANSACTION !!!
> > 12-27 11:07:47.146: DEBUG/dalvikvm(5537): GC freed 774 objects / 66528
> > bytes in 273ms
> > 12-27 11:07:47.287: WARN/InputManagerService(1018): Window already
> > focused, ignoring focus gain of:
> > com.android.internal.view.iinputmethodclient$stub$pr...@4467cf08
> > 12-27 11:07:47.357: DEBUG/dalvikvm(5537): GC freed 312 objects / 17904
> > bytes in 94ms
> > 12-27 11:07:47.381: INFO/ActivityManager(1018): Start proc
> > jp.benishouga.clipstore:remote for broadcast
> > jp.benishouga.clipstore/.ClipboardObserver: pid=5544 uid=10061 gids=
> > {1015}
> > 12-27 11:07:47.412: INFO/dalvikvm(5544): Debugger thread not active,
> > ignoring DDM send (t=0x41504e4d l=38)
>
> > On Dec 26, 12:58 am, Chander Pechetty  wrote:
>
> > > post your stack trace on force close ...
>
> > > On Dec 25, 11:41 pm, Wayne Wenthin  wrote:
>
> > > > When you find out let me know.   I've had no luck either.
>
> > > > On Fri, Dec 25, 2009 at 6:50 
> > > > AM,andrewandroidwrote:
>
> > > > > ProgressDialog during location tasks either won't show or force closes
> > > > > - I have tried everything!
>
> > > > > I now have it in a Handler with a full 1 second delay (one method
> > > > > another post suggested) but it doesn't show.  I simply am stuck.
> > > > > Threads are usually force closing when I use those methods.
>
> > > > > What other tricks are there for this?
>
> > > > > Thanks!
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "AndroidDevelopers" group.
> > > > > To post to this group, send email 
> > > > > toandroid-develop...@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > >android-developers+unsubscr...@googlegroups.com > > > > s­cr...@googlegroups.com>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > Writing code is one of few things
> > > > that teaches me I don't know everything.
>
> > > > Join the Closed Beta of Call Girl 
> > > > Managerhttp://www.fuligin.com/forums-Hidequoted text -
>
> > > - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: ProgressDialog during location tasks either won't show or force closes - I have tried everything!

2009-12-27 Thread andrew android
Here is the logCat from one method I have tried - using basic thread
with progressdialog:
12-27 11:07:46.365: INFO/ApplicationChangeReceiverAbc(5537):
com.hawkmoon.locabot.alpha added
12-27 11:07:46.443: INFO/ApplicationChangeReceiverAbc(5537):
com.hawkmoon.locabot.alpha disable 1
12-27 11:07:46.764: INFO/ActivityManager(1018): Process com.svox.pico
(pid 5532) has died.
12-27 11:07:47.021: INFO/Process(5503): Sending signal. PID: 5503 SIG:
9
12-27 11:07:47.041: INFO/ActivityManager(1018): Process
com.android.vending (pid 5524) has died.
12-27 11:07:47.053: INFO/WindowManager(1018): WIN DEATH: Window
{448c7438 Please wait... paused=false}
12-27 11:07:47.053: INFO/ActivityManager(1018): Process
com.hawkmoon.locabot.alpha (pid 5503) has died.
12-27 11:07:47.060: WARN/UsageStats(1018): Unexpected resume of
com.android.browser while already resumed in
com.hawkmoon.locabot.alpha
12-27 11:07:47.068: ERROR/JavaBinder(1018): !!! FAILED BINDER
TRANSACTION !!!
12-27 11:07:47.146: DEBUG/dalvikvm(5537): GC freed 774 objects / 66528
bytes in 273ms
12-27 11:07:47.287: WARN/InputManagerService(1018): Window already
focused, ignoring focus gain of:
com.android.internal.view.iinputmethodclient$stub$pr...@4467cf08
12-27 11:07:47.357: DEBUG/dalvikvm(5537): GC freed 312 objects / 17904
bytes in 94ms
12-27 11:07:47.381: INFO/ActivityManager(1018): Start proc
jp.benishouga.clipstore:remote for broadcast
jp.benishouga.clipstore/.ClipboardObserver: pid=5544 uid=10061 gids=
{1015}
12-27 11:07:47.412: INFO/dalvikvm(5544): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)


On Dec 26, 12:58 am, Chander Pechetty  wrote:
> post your stack trace on force close ...
>
> On Dec 25, 11:41 pm, Wayne Wenthin  wrote:
>
>
>
> > When you find out let me know.   I've had no luck either.
>
> > On Fri, Dec 25, 2009 at 6:50 AM,andrewandroidwrote:
>
> > > ProgressDialog during location tasks either won't show or force closes
> > > - I have tried everything!
>
> > > I now have it in a Handler with a full 1 second delay (one method
> > > another post suggested) but it doesn't show.  I simply am stuck.
> > > Threads are usually force closing when I use those methods.
>
> > > What other tricks are there for this?
>
> > > Thanks!
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "AndroidDevelopers" group.
> > > To post to this group, send email toandroid-develop...@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
>
> > --
> > Writing code is one of few things
> > that teaches me I don't know everything.
>
> > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums- 
> > Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] ProgressDialog during location tasks either won't show or force closes - I have tried everything!

2009-12-25 Thread andrew android
ProgressDialog during location tasks either won't show or force closes
- I have tried everything!

I now have it in a Handler with a full 1 second delay (one method
another post suggested) but it doesn't show.  I simply am stuck.
Threads are usually force closing when I use those methods.

What other tricks are there 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] Re: Inconsistent results from date additions loop

2009-12-14 Thread andrew android
I seem to have resolved it b y replacing the call to the method after
with a comparison.
Thanks everyone!


On Dec 12, 12:13 pm, andrew android  wrote:
> the code is something like this...
>
> public void getWorkDays(final int mm,  final int dd,final int ccyy,
>                         final int mmNew, final int ddNew, final int ccyyNew) {
>
>                 Calendar c2 = Calendar.getInstance();
>                 Calendar c4 = Calendar.getInstance();
>
>                 c2.set(ccyy, mm, dd);
>                 c4.set(ccyyNew,mmNew, ddNew);
>                 c2.setFirstDayOfWeek(1);
>                 c4.setFirstDayOfWeek(1);
>
>                 Integer counter = 0;
>
>                 while (c4.after(c2)) {
>
>                         switch (c2.get(Calendar.DAY_OF_WEEK)){
>                         case 1:
>
>                                         c2.add(Calendar.DATE, 1);
>                                         break;
>                         case 2:
>
>                                         counter = counter + 1;
>                                 c2.add(Calendar.DATE, 1);
>                                 break;
>                         case 3:
>                                         counter = counter + 1;
>
>                                 c2.add(Calendar.DATE, 1);
>                                 break;
>                         case 4:
>                                         counter = counter + 1;
>                                 c2.add(Calendar.DATE, 1);
>                                 break;
>                         case 5:
>                                         counter = counter + 1;
>                                 c2.add(Calendar.DATE, 1);
>                                 break;
>                         case 6:
>                                         counter = counter + 1;
>                                 c2.add(Calendar.DATE, 1);
>                                 break;
>                         case 7:
>                                 c2.add(Calendar.DATE, 1);
>                                 break;
>
>                         }
>                 }
>
>                 WorkDaysCalc=counter;
>
>         }
>
> On Dec 7, 10:51 am, Streets Of Boston  wrote:
>
>
>
> > You don't know how many milliseconds there are in a day, or even how
> > many hours there are.
>
> > Most days have 24 hours, one may have 23 and an other may have 25
> > hours ( DST ). And this depends whether your timezone has DST or not.
> > The Calendar class should be able to figure all this out.
>
> > However, if you're just interested in 'before' or 'after', then
> > comparing the dates using the milliseconds is OK, since you don't need
> > to know the exact amount.
>
> >Andrew, post a code snippet and describe exactly what problem you see.
>
> > On Dec 7, 6:38 am, "Dexter's Brain"  wrote:
>
> > > Doing it the millisecond way might be more confortable.
>
> > > Convert both the dates to milliseconds, and then subtract one from the
> > > other, and then calculate the no of days.
>
> > > Thanks
> > > Kumar Bibekhttp://tech-droid.blogspot.co
>
> > > On Dec 7, 4:52 am,andrewandroid wrote:
>
> > > > I am running code to return date-based calculations.  The method is
> > > > designed to calculate the number of work days given a beginning and
> > > > ending date and I pass in the elements of the dates, create two
> > > > calendar objects from the two dates and compare them.
>
> > > > Can anybody tell me if there is a bug causing inconsistent results
> > > > from
>
> > > > c2.add(Calendar.DATE, 1);
>
> > > > or possibly the Calendar.after method ...?
>
> > > > c2.set(ccyy, mm, dd);
> > > > c4.set(ccyyNew,mmNew, ddNew);
>
> > > > c4.after(c2)
>
> > > > Please help...- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Inconsistent results from date additions loop

2009-12-13 Thread andrew android
Thanks for responding... the code is the following :
public void getWorkDays(final int mm,  final int dd,final int ccyy,
final int mmNew, final int ddNew, final int ccyyNew) {

Calendar c2 = Calendar.getInstance();
Calendar c4 = Calendar.getInstance();

c2.set(ccyy, mm, dd);
c4.set(ccyyNew,mmNew, ddNew);
c2.setFirstDayOfWeek(1);
c4.setFirstDayOfWeek(1);

Integer counter = 0;
while (c4.after(c2)) {

switch (c2.get(Calendar.DAY_OF_WEEK)){
case 1:
c2.add(Calendar.DATE, 1);
break;
case 2:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 3:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 4:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 5:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 6:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 7:
c2.add(Calendar.DATE, 1);
break;

}
}

WorkDaysCalc=counter;

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Inconsistent results from date additions loop

2009-12-13 Thread andrew android
the code is something like this...

public void getWorkDays(final int mm,  final int dd,final int ccyy,
final int mmNew, final int ddNew, final int ccyyNew) {

Calendar c2 = Calendar.getInstance();
Calendar c4 = Calendar.getInstance();

c2.set(ccyy, mm, dd);
c4.set(ccyyNew,mmNew, ddNew);
c2.setFirstDayOfWeek(1);
c4.setFirstDayOfWeek(1);

Integer counter = 0;

while (c4.after(c2)) {

switch (c2.get(Calendar.DAY_OF_WEEK)){
case 1:

c2.add(Calendar.DATE, 1);
break;
case 2:

counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 3:
counter = counter + 1;

c2.add(Calendar.DATE, 1);
break;
case 4:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 5:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 6:
counter = counter + 1;
c2.add(Calendar.DATE, 1);
break;
case 7:
c2.add(Calendar.DATE, 1);
break;

}
}

WorkDaysCalc=counter;

}


On Dec 7, 10:51 am, Streets Of Boston  wrote:
> You don't know how many milliseconds there are in a day, or even how
> many hours there are.
>
> Most days have 24 hours, one may have 23 and an other may have 25
> hours ( DST ). And this depends whether your timezone has DST or not.
> The Calendar class should be able to figure all this out.
>
> However, if you're just interested in 'before' or 'after', then
> comparing the dates using the milliseconds is OK, since you don't need
> to know the exact amount.
>
> Andrew, post a code snippet and describe exactly what problem you see.
>
> On Dec 7, 6:38 am, "Dexter's Brain"  wrote:
>
>
>
> > Doing it the millisecond way might be more confortable.
>
> > Convert both the dates to milliseconds, and then subtract one from the
> > other, and then calculate the no of days.
>
> > Thanks
> > Kumar Bibekhttp://tech-droid.blogspot.co
>
> > On Dec 7, 4:52 am, andrew android  wrote:
>
> > > I am running code to return date-based calculations.  The method is
> > > designed to calculate the number of work days given a beginning and
> > > ending date and I pass in the elements of the dates, create two
> > > calendar objects from the two dates and compare them.
>
> > > Can anybody tell me if there is a bug causing inconsistent results
> > > from
>
> > > c2.add(Calendar.DATE, 1);
>
> > > or possibly the Calendar.after method ...?
>
> > > c2.set(ccyy, mm, dd);
> > > c4.set(ccyyNew,mmNew, ddNew);
>
> > > c4.after(c2)
>
> > > Please help...- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Inconsistent results from date additions loop

2009-12-06 Thread andrew android
I am running code to return date-based calculations.  The method is
designed to calculate the number of work days given a beginning and
ending date and I pass in the elements of the dates, create two
calendar objects from the two dates and compare them.

Can anybody tell me if there is a bug causing inconsistent results
from

c2.add(Calendar.DATE, 1);

or possibly the Calendar.after method ...?

c2.set(ccyy, mm, dd);
c4.set(ccyyNew,mmNew, ddNew);

c4.after(c2)

Please help...



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 method for simply going to a specific calendar date in system calendar?

2009-11-24 Thread andrew android
Please comment - what is the best method for simply going to a
specific calendar date in system calendar?

I would like to simply have the android device calendar open to a
certain date when a button OnClick is called.  Calendar provider wonMt
work, will it?

Any help would be appreciated!

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