[android-developers] upgrade to 4.2.2 -- Eclipse sees device offline and unknown

2013-02-21 Thread alexdonnini
Hello,

Unfortunately, I foolishly proceeded with the upgrade of my nexus 4 from 
4.2.1 to 4.2.2

Now, even though the device is configured for USB debugging and connected 
as a camera device, although it sees it Eclipse cannot access it as the 
device is reported to be offline.

Does anyone have any information about this problem, ways to resolve it, or 
experienced the same problem?

Any help would be greatly appreciated.

If the problem is known and unnsolved, could anyone let me know how I can 
downgrade back to 4.2.1?

Thanks,

Alex Donnini

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Finally someone at Google gets it - Please read you might like it

2011-10-13 Thread alexdonnini
Hello,

I don't know how many of you have read this. I have stopped paying too
much attention to the postings on this group because of the problem
highlighted by the writer. Perhaps, someone has already posted about
this article. If this is the case, I apologize in advance for the
duplication and wasting your time.

https://plus.google.com/112678702228711889851/posts/eVeouesvaVX

If you have not, you might/should want to.

It's a long article by a Google developer who, unlike many at Google
including Google employees who contribute to this and other Google
groups ( you know who you are) seems to understand to build a
platform.

Please note that I did not say an open platformbut a platform. If
you wonder what the difference is, please read the article.

Although it does  not help my work, I feel somewhat relieved and
gratified.

If you have the time and desire, please also read carefully the part
of the article about accessibility and security. Again, something not
understood by some (many?) on the Android team.

Thank you,

Alex Donnini

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

2010-04-29 Thread alexdonnini
Hi,

Your entry was very useful. I was wondering if you could offer some
more assistance. I added

TrustManagerFactory mTrustManagerFactory = new
TrustManagerFactory(mTrustManagerFactorySpi, null, malg);
KeyStore ks = null;
try {
mTrustManagerFactory.init(ks);
} catch (KeyStoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

to onCreate in my application. I have three questions:

1) Is this what you meant by create a TrustManagerFactory and specify
a null KeyStore in the init() method?

2) How do I check that it worked? Access the TrustStore property
informtion?

3) If I was successful, in order to take advantage of having all the
certificates in cacerts.bks available to my application, would I need
to change my application's entry in files such as packages.xml?

Thanks for your help.

Alex Donnini


On Mar 16, 5:40 am, Scytmo i...@scytmo.org.uk wrote:
 Also, I wouldn't rely on the file necessarily always being available
 at that path.  For instance, if a later update to Android includes the
 ability for the end-user to add root certificates, then the mechanism
 for the certificate store would likely change.

 For a desktop J2SE installation, you would set the Java system
 property javax.net.ssl.trustStore on the Java command-line to point
 to the default KeyStore.  In contrast, on Android, if you create a
 TrustManagerFactory and specify a null KeyStore in the init() method,
 then Android sets the javax.net.ssl.trustStore Java system property
 to point to thatcacerts.bks file and you therefore get your
 TrustManagerFactory populated with those certificates (as a side-
 effect, you can also find out where the file is by querying the
 javax.net.ssl.trustStore Java system property).

 Seehttp://developer.android.com/reference/javax/net/ssl/TrustManagerFact...

 And, for those who are interested, the code where this is done is on
 lines 53-62 here:

 http://android.git.kernel.org/?p=platform/dalvik.git;a=blob;f=libcore...

 While this mechanism also doesn't appear to be documented, I would
 suggest that using this is preferable to relying on the particular
 pathname of thecacerts.bks file.

 On Mar 15, 8:47 pm, Kumar Bibek coomar@gmail.com wrote:

  Yes, this would be available in all the devices. This is a storehouse
  of all the valid certificates that Android(Browser and other apps)
  accepts by default.

  But, I guess, with this fact, you don;t have much freedom to do
  anything with this file. You cannot edit this file from your program
  if that is what you are looking for. You cannot even update this file
  on a device through the adb.

  Thanks and Regards,
  Kumar Bibek

  On Mar 15, 12:19 pm, p c pc.023...@gmail.com wrote:

  cacerts.bks is a certificate store, which is present on Droid at the
   location /system/etc/security/cacerts.bks.

   Would this certificate store be present on all the devices ? I
   searched through the Android documentation but could not find any
   mention of it.

   Does the default Android browser and mail client use it ? If not do
   they ship with their own certificate store ?

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

2010-04-09 Thread alexdonnini
Hello,

Probably, you have heard of the iPhone application called Line2. In
short, it gives an iPhone a second phone number and line complete with
contacts list, voice mail, etc., etc.

I have been working on an application in the same area for Android but
have run into the system's security/permission barriers.

I was wondering if anyone has thoughts as to how the Android security/
permission issues inherent when attempting to develop an application
such as Line2 could be resolved.

My hope is that on an open system such as Android, developing an
application such as Line2 would not be harder than it is on a closed
system such as the iPhone.

Thanks.

Alex Donnini

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: 2nd phone line Line2 iPhone

2010-04-09 Thread alexdonnini
Hi Mark,

Did you actually take a look at Line2? If you have, would be
interested in your more detailed feedback. I do not believe that any
of the Android applications you mention performs the same functions as
Line2.

I may be mistaken but I do not believe that Line2 is simply a VOIP
application. Based on my limited understanding (I could be wrong),
Line2 actually manages calls either via ATT or the Internet (VOIP),
i.e. works alongside/replaces the iPhone phone application.

With regards to the security/permission barriers I refer to below,
please refer to any attempt to access phone application related
functions. Have you tried to do that in an application? If you have,
which ones did you try to use? I am very interested in gaining a
better understanding of how one could use phone application functions
in one's own application (just like Line2 does on the iPhone).

Thank you.

Alex Donnini

On Apr 9, 9:45 am, Mark Murphy mmur...@commonsware.com wrote:
 alexdonnini wrote:
  Probably, you have heard of the iPhone application called Line2. In
  short, it gives an iPhone a second phone number and line complete with
  contacts list, voice mail, etc., etc.

 It is more generically referred to as voice over IP (VOIP).

  I was wondering if anyone has thoughts as to how the Android security/
  permission issues inherent when attempting to develop an application
  such as Line2 could be resolved.

 What, specifically, do you feel are the Android security/permission
 issues inherent when attempting to develop a VOIP app?

 I ask because there are several VOIP apps for Android (such as Google
 Voice, Skype, SipDroid, and Fring, to name four off the top of my head).
 Hence, it would seem unlikely that there are Android
 security/permission issues in implementing a VOIP app, otherwise those
 apps would not exist.

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

 Android Consulting:http://commonsware.com/consulting

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: 2nd phone line Line2 iPhone

2010-04-09 Thread alexdonnini
Understood but I am not interested in VOIP. I am interested in
implementing phone application functions. Again, based on my limited
understanding, Line2 is not just a VOIP application. It actually
performs phone app functions and can let users pamek calls over the
ATT network, but I could be wrong.

As far as I know, in Android security/permission barriers prevent any
application from using/implementing phone app functions.

Thank you.

Alex Donnini

On Apr 9, 9:57 am, Disconnect dc.disconn...@gmail.com wrote:
 At least google voice isn't VOIP, and ISTR that neither is skype (although
 that may have changed with recent releases.) They both function by dialing
 special-use numbers (google voice uses http to set up a line to remote
 mapping, so that when you call 202-111-2345 gvoice connects you to
 202-123-4567 and remaps the source #, etc. ISTR the skype app just
 phone-carded it - dial a generic access #, then dial codes to get
 connected..)

 Not familiar with sipdroid or fring, and as of 1.5 or so it became possible
 to manipulate the audio stream so they may well be proper sip clients now :)

 On Fri, Apr 9, 2010 at 9:45 AM, Mark Murphy mmur...@commonsware.com wrote:
  alexdonnini wrote:
   Probably, you have heard of the iPhone application called Line2. In
   short, it gives an iPhone a second phone number and line complete with
   contacts list, voice mail, etc., etc.

  It is more generically referred to as voice over IP (VOIP).

   I was wondering if anyone has thoughts as to how the Android security/
   permission issues inherent when attempting to develop an application
   such as Line2 could be resolved.

  What, specifically, do you feel are the Android security/permission
  issues inherent when attempting to develop a VOIP app?

  I ask because there are several VOIP apps for Android (such as Google
  Voice, Skype, SipDroid, and Fring, to name four off the top of my head).
  Hence, it would seem unlikely that there are Android
  security/permission issues in implementing a VOIP app, otherwise those
  apps would not exist.

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

  Android Consulting:http://commonsware.com/consulting

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

  To unsubscribe, reply using remove me as the subject.



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

2010-04-09 Thread alexdonnini
Mark,

I am not sure you are correct (although you seem very sure that you
are). I have read through the Line2 information. I guess I have a
different understanding of what they mean by what they mean by dual
cellular/voip application. But, I could certainly be wrong.

However, I certainly did not want to get into a debate about Line2.
Frankly, who cares?

And, probably I was not very clear. I would not want to replace the
default phone application. But, I think it is reasonable to be able to
access/perform some of its functions alongside it. This, as I am sure
you know, is not possible because of permission/security limitations.

Thank you.

Alex Donnini


On Apr 9, 10:19 am, Mark Murphy mmur...@commonsware.com wrote:
 alexdonnini wrote:
  Based on my limited understanding (I could be wrong),
  Line2 actually manages calls either via ATT or the Internet (VOIP),
  i.e. works alongside/replaces the iPhone phone application.

 It does not replace the iPhone phone application. It is just another
 application on the iPhone. Just like Fring, etc. on Android. Watch
 Line2's video on their home page and show me where they replace the
 iPhone phone application:

 http://www.line2.com/

  With regards to the security/permission barriers I refer to below,
  please refer to any attempt to access phone application related
  functions. Have you tried to do that in an application? If you have,
  which ones did you try to use? I am very interested in gaining a
  better understanding of how one could use phone application functions
  in one's own application (just like Line2 does on the iPhone).

 You don't need any of that to implement Line2, just as Line2 did not
 need any of that to implement their iPhone app.

 alexdonnini wrote:
  Again, based on my limited
  understanding, Line2 is not just a VOIP application.

 Yes, it is. In fact, they even say they are VOIP on their comparison page:

 http://www.line2.com/voip-cell-comparison.aspx

 In the video, they are very careful to distinguish between calls they
 handle (over 3G/WiFi) and calls the iPhone handles (cellular voice).

  It actually
  performs phone app functions and can let users pamek calls over the
  ATT network, but I could be wrong.

 As ATT 3G data calls using VOIP, yes, it does.

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

 Android Consulting:http://commonsware.com/consulting

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Android developers in Boston

2010-01-05 Thread alexdonnini
Hello,

I would like to connect with Android application developers in the
Boston area to share ideas, experiences, and potentially work on joint
projects.

If you are interested, send me a message at:

alexdonn...@ieee.org

Thanks.

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

2009-12-10 Thread alexdonnini
Dianne,

You are a smart person, and should recognize that what you state as
being a fact, and inherently right is, in fact, simply your (Google's)
opinion and position and, unlike most of us, you are in the position
to enforce that opinion and position.

While it is true that since Google invested significant resources into
Android (for its own interest and good), it is acting normally in
exercising control over the platform, I find it somewhat irritating
that Google tries to portray itself as a promoter of Open Source. It
is not. Google uses Open Source to further its corporate goals. Plain
and simple. Nothing wrong with that. When Google's interests and thos
of the Open Source community at large coincide, everybody is happy.
When they don't Google enforces its position and acts based on its
corporate interests.

Claiming, as some do, that Android is open and anyone can go and
implement his/her own distribution is somewhat disingenuous. I will
let you figure out why it is.

Alex Donnini

On Dec 10, 2:28 am, Dianne Hackborn hack...@android.com wrote:
 Taking over the home key will not be done with a permission, period.

 This is way you get to take over the home key: by having an intent-filter
 saying you can be home, and letting the user explicitly select your app at
 the point where they press home.  The home key is too central to the user's
 security for it to be misdirected by some random application they installed
 a month ago that at time time seemed okay to be able to intercept home key
 (if they looked at it at all).

 And as far as the lock screen goes -- nobody has said that there would never
 be support for third party lock screens.  Right now, however, there isn't,
 and there is no near-term plan to do so.  If you want to see why, start
 perusing the lock screen code starting here:

 http://android.git.kernel.org/?p=platform/frameworks/policies/base.gi...http://android.git.kernel.org/?p=platform/frameworks/policies/base.gi...

 Lock screen management is extremely complicated, and not in any shape at
 this point to be user replaceable.  At the very least, all of the points of
 contacts with the rest of the system (complicated interaction with the
 in-call experience in various states, dealing with emergency dialing that is
 legally required and the related SIM states that go with it, deep fragile
 interaction with low-level power management and event dispatching, etc)
 needs to be deeply abstracted out of the UI itself.  And then there are all
 of the issues of dealing with this now no longer trusted third party code
 when it crashes or otherwise misbehaves.

 This isn't just oh those mean Android people won't let me write a few lines
 of code to replace the lock screen.



 On Wed, Dec 9, 2009 at 7:55 PM, Lance Nanek lna...@gmail.com wrote:
  Allowing apps like this, but requiring a permission seems like it
  would support the most users.

  Users who want a fancy toddler lock or screensaver or different unlock
  screen or whatever could then use those apps and would just have to
  agree to an extra permission when installing.

  Users who don't want any app to have this level of access just have to
  check for the permission being requested and not install.

  On Dec 9, 8:07 pm, Jason Proctor jason.android.li...@gmail.com
  wrote:
   Or purposely writing code to break them as with the promises Diane
   made on this topic.

   oh sorry i didn't know there were promises made re home button or
   lock app replacements. what were they?

   Making it impossible to replace the screen lock app doesn't enhance
   security.  Knowing Android engineers will purposely write code to
   break any discovered workarounds for the restrictions isn't enhancing
   security either.

   do you really want lock app replacements that ship your phone ID and
   lock code around the network?

   Fairly open != open.

   can you, or can you not, create exactly the Android distro you want?
   yes, you can. hence, open. the owners of distros, which could be you,
   decide how open particular distros are.

   Apples and oranges.

   not at all -- stick whatever drivers you like in your distro. nobody
   else's distro is obliged to take them. ditto your lock app
   replacement or home button override. this arrangement is a feature,
   IMHO.

   --
   jason.vp.engineering.particle

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

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 

[android-developers] Re: Block Switch App

2009-12-10 Thread alexdonnini
Hello Jason,

I would be glad to. Let me give you a simple example that does not
quite fit but should give you an approximate idea of what I mean.

Gold mining is an open activity. Anyone can go and look for gold. An
entire mythology has grown reinforcing the dream that ANYONE can go
and get rich looking for and finding gold. In fact, there have been a
few (very very few) individuals that have struck the proverbial gold
mine. However, for the vast majority of humanity, gold mining is
completely out of reach. In fact, gold mining is very big business. As
I said, this is a very small and imperfect example. To further
clarify, the keywords are scale and resources. It does not matter how
open something in theory is. Ultimately, if the scale and resources
are not there, it will die or, live in a very small niche.

By the way, ever heard of the word sycophant? Perhaps, I am being too
harsh but whenever I read these postings, that word comes to mind. I
am puzzled by the number of individuals that rise in the (aggressive)
defense of Google and its employees, as if they needed to be defended,
and don't do a good enough job of defending themselves as regularly
proven by Dianne.

Google and Android are not causes. They are a company and a product.
The packaging may be a little different, and updated, but ultimately
Google is not and cannot be any different from, say, IBM, Apple,
Microsoft and Oracle. And, there is absolutely nothing wrong with
that.

Alex Donnini

On Dec 10, 3:57 pm, Jason Proctor jason.android.li...@gmail.com
wrote:
 Claiming, as some do, that Android is open and anyone can go and
 implement his/her own distribution is somewhat disingenuous. I will
 let you figure out why it is.

 well people *have* created their own distributions, so why don't you
 go ahead and tell me why it's disingenuous to claim that it's
 possible?

 (btw, i have no connection with Google and IMHO Android is great but
 in no way perfect. but claiming that it's not open when the source is
 right there, well...)

 --
 jason.vp.engineering.particle

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

2009-12-10 Thread alexdonnini
Bottom line is that some believe and trust Google's and its engineers'
motivations more than others. Not recognizing that their motivations
are different (not good, not evil) from those of the community at
large is ignoring and not understanding human nature. You do this at
your own peril.

Alex Donnini

On Dec 10, 5:37 pm, TreKing treking...@gmail.com wrote:
 Code was implemented to prevent users from making an alternate lock app.
  It wasn't some sort of accident.

 OK, so then, no, you did not read what Dianne posted. Try that first.

 Drink the koolaid, pretend Android is open source if you want.

 Open 
 Sourcehttp://www.google.com/search?hl=enrlz=1C1CHMB_enUS321US322defl=enq
 No one is pretending. And I'm done arguing with this 3 year old.

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

 On Thu, Dec 10, 2009 at 4:25 PM, Greg Donald gdon...@gmail.com wrote:
  On Thu, Dec 10, 2009 at 4:16 PM, TreKing treking...@gmail.com wrote:
   Did you even read Dianne's earlier post? She covered ALL of this ...

  Code was implemented to prevent users from making an alternate lock
  app.  It wasn't some sort of accident.

  Drink the koolaid, pretend Android is open source if you want.

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

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


[android-developers] localsocket programming - server-less communication

2009-12-02 Thread alexdonnini
Hello,

I would appreciate any information on whether and how LocalSocket can
be used to set-up server-less communication (i.e. without using
LocalServerSocket).

I believe this should be possible as I think this communication method
is used by RIL.java

I have written a test program to attempt to do that but have run into
a number of roadblocks.

I do know that there are a number of other ways to use LocalSocket and
LocalServerSocket and other classes to implement socket-based
communication, and I have implemented them. However, for the purpose
of my application I would need to implement (the equivalent of)
LocalSocket-to-LocalSocket communication.

Any help/feedback to help me implement this would be greatly
appreciated.

Thanks.

Alex Donnini

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

2009-11-09 Thread alexdonnini
Hello,

Could anyone help me understand when API level 5 methods such as
getNetworkType() in NeighboringCellInfo will be available to
application developers?

Unless I am mistaken, at present the getCid() method in
NeighobringCellInfo depending on the network in use is not directly
usable as it returns values which need to be decoded/unscrambled.  The
getNetworkType() function is necessary to find out the network is
being used and if necessary, as in the case of 3G networks (e.g.
sample NeighboringCellInfo entry from a 3G network [[6c at 0], [74 at
0]] ), unscramble the getCid result.

I use Eclipse and have updated the SDK using the Android SDK and
Android AVD function as instructed. Infact, the 2.0 SDK and API level
5 are listed among installed packages.

Thanks.

Alex Donnini

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

2009-11-09 Thread alexdonnini
Hello,

Could anyone tell me when getPsc() in NeighboringCellInfo will be
available in the SDK? I could not find it in SDK 2.0.

If I am not mistaken, getPsc() is necessary in order to retrieve CID
information for neighboring cells when connected to a UMTS.

Thanks.

Alex Donnini

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

2009-10-30 Thread alexdonnini
Problem solved.

On Oct 28, 1:31 pm, alexdonnini alexdonn...@ieee.org wrote:
 Hello,

 I have an application that generates a list with two buttons for each
 entry in the list.

 It's working to a limited extent. I have run into a problem which I
 have not be able to resolve.

 Can anyone point me to a tutorial or code sample, or both where I
 could see a working example of a list with buttons attached to
 individual list entries?

 Thanks in advance for your help.

 Alex Donnini

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

2009-10-28 Thread alexdonnini

Hello,

I have an application that generates a list with two buttons for each
entry in the list.

It's working to a limited extent. I have run into a problem which I
have not be able to resolve.

Can anyone point me to a tutorial or code sample, or both where I
could see a working example of a list with buttons attached to
individual list entries?

Thanks in advance for your help.

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

2009-10-26 Thread alexdonnini

Problem solved. I needed to replace the Maps API key.

On Oct 25, 9:07 pm, alexdonnini alexdonn...@ieee.org wrote:
 Hello,

 Until recently, the map view function in my application worked.
 Starting a few weeks ago, although the function still seems to be
 working, the map itself is not being displayed any longer.

 To verify whether there was a problem in my code, I implemented an
 activity using the code in Hello, MapView. Although it runs, the map
 itself is not displayed.

 The DDMS log reports:

 10-25 21:03:26.443: ERROR/MapActivity(7765): Couldn't get connection
 factory client

 I would appreciate it if someone could help me understand how to
 resolve this issue.

 Thanks.

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

2009-10-25 Thread alexdonnini

Hello,

Until recently, the map view function in my application worked.
Starting a few weeks ago, although the function still seems to be
working, the map itself is not being displayed any longer.

To verify whether there was a problem in my code, I implemented an
activity using the code in Hello, MapView. Although it runs, the map
itself is not displayed.

The DDMS log reports:

10-25 21:03:26.443: ERROR/MapActivity(7765): Couldn't get connection
factory client

I would appreciate it if someone could help me understand how to
resolve this issue.

Thanks.

Alex Donnini
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Find long/lat distance X from current location

2009-08-23 Thread alexdonnini

Hi John,

Excellent! Connceptually, that's exactly what I was looking for. I
will probably need to make some changes to the code but it's a great
start.

Thank you.

Alex Donnini

On Aug 22, 2:10 pm, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 This example using a Google map may be useful: (JavaScript)

 http://maps.huge.info/dragcircle2.htm

 -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: Find long/lat distance X from current location

2009-08-22 Thread alexdonnini

Thanks all for the suggestions.

Mark, I am well aware that there is an infinite number of points on
the circle at distance X from a known location. To start with, for my
application, my plan is to find 16-64 of the locations at distance X
from my location. That should be sufficient.

The problem I have is that, unless I am mistaken, all GC formulas are
of the form d = some formula using lat/lng of two locations. In my
case, I know d and lat/lng of one location. I need to find lat/lng of
the second location. In order to solve this kind of equation (two
unknowns), I could use some form of estimation or some other approach.

Unless I am missing something obvious, I think I may need to figure
something out using the geometry of a circle combined with some type
of estimation.

Thanks.

Alex Donnini

On Aug 22, 7:04 am, Thomas (geomancer) tbirchm...@usa.net wrote:
 I had the same problem and found my sources 
 athttp://williams.best.vwh.net/avform.htm
 . Ed Williams goes into detail on great circle navigation. I took his
 formulas for distance between points and true course and translated
 them into PHP.  Projecting a point is given as well.  The translated
 PHP formulas calculate the same numbers as my Garmin 76cxs.
  Regards, Tom Birchmire

 On Aug 22, 4:17 am, Panut Sunyakorn panu...@gmail.com wrote:

  This will help you.

 http://www.movable-type.co.uk/scripts/latlong.html

  2009/8/22 Mark Murphy mmur...@commonsware.com:

   alexdonnini wrote:
   I had already considered using the GCC formula (I did not know the
   name GCC). Unfortunately, the only lat/lng information I have is mine,
   none other. This is why the problem is a little trickier.

   There are an infinite number of latitude/longitude combinations at a
   distance X from a fixed point. You are going to need some other
   criteria, such as a direction, in order to come up with your second
   position.

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

   Android Training in Germany, 18-22 January 2010:http://bignerdranch.com

  --

  Panut Sunyakorn
  086-334-1616


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Find long/lat distance X from current location

2009-08-22 Thread alexdonnini

Thanks. I think I will use the parametric formulas for calculating the
coordinates of points on a circle using increments of 1 degree. If
that turns out to be too ambitious (because of the performance hit
generated by the additional processing once I have calculated the 360
possible locations), I will reduce the number and see what happens.

Alex Donnini

On Aug 22, 12:39 pm, Mark Murphy mmur...@commonsware.com wrote:
 alexdonnini wrote:
  Mark, I am well aware that there is an infinite number of points on
  the circle at distance X from a known location. To start with, for my
  application, my plan is to find 16-64 of the locations at distance X
  from my location. That should be sufficient.

 OK, which 16-64?

  The problem I have is that, unless I am mistaken, all GC formulas are
  of the form d = some formula using lat/lng of two locations. In my
  case, I know d and lat/lng of one location. I need to find lat/lng of
  the second location. In order to solve this kind of equation (two
  unknowns), I could use some form of estimation or some other approach.

  Unless I am missing something obvious, I think I may need to figure
  something out using the geometry of a circle combined with some type
  of estimation.

 If you don't care which 16-64, you have one center point, a radius, and
 16-64 headings (e.g., one every 10 degrees for a total of 36). That
 should be sufficient data to figure out a second point. If your
 distances are small (i.e., curvature of the earth isn't a big deal),
 regular geometry might suffice. There should be some orienteering or
 non-GPS sailing sites out there with the formulae you need.

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

 Android Training in Germany, 18-22 January 2010:http://bignerdranch.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] Find location at distance X from current location

2009-08-21 Thread alexdonnini

I apologize if this message is a duplicate but I looked for an earlier
message I had posted about this same subject and could not find it.

Hello,

I was wondering if anyone has ideas, or could help me solve this
problem.

I would like to find the location (lat, lng) at distance X from my
current location.

I realize that the number of such locations is infinite (all the
points on the circumference of the circle with radius X with center at
my current location) but I was thinking that I would limit the
collection of such location to a sample (say 32, or 64 samples).

I would appreciate any ideas and suggestions.

Thanks.

Alex Donnini
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Find long/lat distance X from current location

2009-08-21 Thread alexdonnini

Hi Donn,

Thanks for the suggestion.

Please ignore my other post on this same subject.

Alex Donnini

On Aug 21, 1:29 pm, Donn Felker donnfel...@gmail.com wrote:
 Look up the Great Circle Calculation. That will provide you with the method
 for finding x within a given y radius. As for finding other geo coordinates,
 you'll need to find a data source for those or make your own set of data to
 work with. You might be able to use some Google API for that as well.



 On Fri, Aug 21, 2009 at 10:44 AM, alexdonnini alexdonn...@ieee.org wrote:

  Hello,

  I can easily find long/lat of my current location. Once I do that, I
  would like to find long/lat information for locations at distance X
  from y current location.

  Does anyone have suggestion(s) on how to do this using Android SDK
  methods?

  Thanks.

  Alex Donnini

 --
 Donnhttp://blog.donnfelker.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: Find long/lat distance X from current location

2009-08-21 Thread alexdonnini

Donn,

I had already considered using the GCC formula (I did not know the
name GCC). Unfortunately, the only lat/lng information I have is mine,
none other. This is why the problem is a little trickier.

Thanks.

Alex

On Aug 21, 1:29 pm, Donn Felker donnfel...@gmail.com wrote:
 Look up the Great Circle Calculation. That will provide you with the method
 for finding x within a given y radius. As for finding other geo coordinates,
 you'll need to find a data source for those or make your own set of data to
 work with. You might be able to use some Google API for that as well.



 On Fri, Aug 21, 2009 at 10:44 AM, alexdonnini alexdonn...@ieee.org wrote:

  Hello,

  I can easily find long/lat of my current location. Once I do that, I
  would like to find long/lat information for locations at distance X
  from y current location.

  Does anyone have suggestion(s) on how to do this using Android SDK
  methods?

  Thanks.

  Alex Donnini

 --
 Donnhttp://blog.donnfelker.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: Direct access to GEARS geolocation without going through the browser interface

2009-07-16 Thread alexdonnini

Mark,

Thanks. I am aware of that. My question was different. Have you looked
into the GEARS geolocation class? If you have, you will have seen the
three Android Java classes I refer to below. My question is about the
purpose and intended use of those classes.

Given that Google has removed all of the MASF related functions from
the SDK, very few ways are left for accessing location information
starting from WIFI, GPS, or cell data. Fortunately, it appears that
the http://www.google.com/glm/mmap interface is still accessible (for
how long???). GEARS geolocation offers a way to derive location
information starting from GPS, WIFI, or radio information. However, it
would be incorrect to assume that access via a browser is optimal, or
appropriate for all applications.

The fact that geolocation includes Android-specific public Java
classes to access GPS, WIFI, and radio information leads me to believe
that, in fact, there is (should be) a way to directly access
geolocation functions from an Android application without going
through the browser.

If you are not familiar with this area, that's OK, just say so.

Thanks.

Alex Donnini

On Jul 16, 6:26 am, Mark Murphy mmur...@commonsware.com wrote:
 alexdonniniwrote:
  I have searched this group's archives, and several other sources for
  information on direct access to GEARS geolocation functions from an
  Android application. To date, I have not found any.

 Google Gears is available for the Browser application, but it is not
 part of the SDK for use by Java applications.

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

 _Android Programming Tutorials_ Version 1.0 In Print!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Direct access to GEARS geolocation without going through the browser interface

2009-07-15 Thread alexdonnini

Hello,



I have searched this group's archives, and several other sources for

information on direct access to GEARS geolocation functions from an

Android application. To date, I have not found any.



geolocation includes three Android-specific public Java classes,

AndroidGpsLocationProvider, AndroidRadioLocationProvider, and

AndroidWifiLocationProvider. The fact that they are Android-specific

and that they are public lead me to conclude that I should be able to

use these classes in my application.



However, not surprisingly, when I try to access these classes, my

application fails (see log below) because, among other things, I have

no way to correctly identify nativeObject in the java classes.



I would appreciate anyone's feedback, suggestions, and help in

resolving this problem. At the very least, I would like to understand

the purpose of the three Android-specific public Java classes, and how

we should use them.



Thanks.



Alex  Donnini





07-15 20:51:28.779: WARN/dalvikvm(31357): No implementation found for

native Lcom/android/universallocation/

AndroidRadioDataProvider;.onUpdateAvailable (Lcom/android/

universallocation/AndroidRadioDataProvider$RadioData;J)V

07-15 20:51:28.789: WARN/dalvikvm(31357): threadid=3: thread exiting

with uncaught exception (group=0x4000fe70)

07-15 20:51:28.799: ERROR/AndroidRuntime(31357): Uncaught handler:

thread main exiting due to uncaught exception

07-15 20:51:28.859: ERROR/AndroidRuntime(31357):

java.lang.UnsatisfiedLinkError: onUpdateAvailable

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

com.android.universallocation.AndroidRadioDataProvider.onUpdateAvailable

(Native Method)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

com.android.universallocation.AndroidRadioDataProvider.notifyListeners

(AndroidRadioDataProvider.java:236)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

com.android.universallocation.AndroidRadioDataProvider.onCellLocationChanged

(AndroidRadioDataProvider.java:229)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

android.telephony.PhoneStateListener$2.handleMessage

(PhoneStateListener.java:251)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

android.os.Handler.dispatchMessage(Handler.java:99)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

android.os.Looper.loop(Looper.java:123)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

android.app.ActivityThread.main(ActivityThread.java:3948)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

java.lang.reflect.Method.invokeNative(Native Method)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

java.lang.reflect.Method.invoke(Method.java:521)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run

(ZygoteInit.java:782)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)

07-15 20:51:28.859: ERROR/AndroidRuntime(31357): at

dalvik.system.NativeStart.main(Native Method)



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

2009-07-14 Thread alexdonnini

Thanks. Good point. I have seen the behavior described in the thread
you pointed to.

Alex

On Jul 14, 3:37 pm, skink psk...@gmail.com wrote:
 On Jul 14, 7:35 pm, Mark Murphy



  Just pass in the activity to your ItemizedOverlay's subclass'
  constructor, and use it to create your Toast.

 be careful though, since passing Activity context to Toast can in some
 situations be dangerous, see:

 http://groups.google.com/group/android-developers/browse_thread/threa...

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

2009-07-13 Thread alexdonnini

Hello,

Unless I am mistaken, a tap is not the same as a click, is it?

If I am correct, would a click event need to be handled using an on-
click listener?

Thanks.

Alex Donnini

On Jun 15, 8:10 am, adadcalledrichard adadcalledrich...@gmail.com
wrote:
 Check out the onTap(int item) method on theItemizedOverlayclass

 http://code.google.com/android/add-ons/google-apis/reference/index.html

 Cheers,

 Richardhttp://www.creelcard.com

 On Jun 13, 7:07 pm, pat patrick.m...@gmail.com wrote:

  Hi there,

  I am developing a map application for Android.

  My idea is to have a map with several markers. Whenever the user
  clicks on a marker i would like to change to a different activity and
  pass certain information.

  My question: how can i attach something like onClick event to the
  markers on the map?

  I would really appreciate your replies.

  regards

  Patrick


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

2009-07-13 Thread alexdonnini

Hello,

I looked for any information about onTap event processing for itemized
overlays in this group. There is a lot of useful information but I
could not find the answer to one question.

The tutorial by Mark Murphy on itemized overlays, http://androidguys.com/?p=1413

describes how to generate a Toast message whenever an onTap event
occurs. In his case, the custom itemized overlay activity is included
in the main activity. In my case, it is not. My custom itemized
overlay activity is included in the application package as a public
activity.

This means that the line

Toast.makeText(NooYawk.this, items.get(i).getSnippet(),
Toast.LENGTH_SHORT).show();

will not work as is.

I have had trouble in correctly identifying the context for the Toast.
Attempts to use the main class' (the one calling the custom itemized
overlay class) context have not worked. I would appreciate it if
anyone could suggest how I could resolve this issue. Incorporating the
custom itemized overlay class in the main class is not a desirable
option.

Alternatively, I would appreciate any suggestions for generating a
display of the title and/or snippet information for markers on a map.

Thanks.

Alex Donnini

P.S. the onTap event works fine (Log.i statements in the onTap method
display the correct information for each marker tapped)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: onTap display toast or message

2009-07-13 Thread alexdonnini

Hi Mark,

Thanks. What I meant is that I thought that in your example,
SitesOverlay is an inner class of the map activity NooYawk. In my
case, the custom itemized overlay class is not an inner class of the
map activity. This means that an entry like NooYawk.this will not
work.

Am I wrong? I have not been able to get it to work.

Alex

On Jul 13, 5:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 alexdonniniwrote:
  I looked for any information about onTap event processing for itemized
  overlays in this group. There is a lot of useful information but I
  could not find the answer to one question.

  The tutorial by Mark Murphy on itemized 
  overlays,http://androidguys.com/?p=1413

  describes how to generate a Toast message whenever an onTap event
  occurs.

 Hey, that name looks familiar...

  My custom itemized
  overlay activity is included in the application package as a public
  activity.

 Neither Overlay nor ItemizedOverlay are subclasses of Activity, so I do
 not understand the above sentence.

  I have had trouble in correctly identifying the context for the Toast.

 Use the activity hosting the MapView. If you are somehow getting that
 activity inside another (e.g., shoehorned a MapView-wielding activity
 into a TabActivity), try using the top-most activity.

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

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



[android-developers] Re: onTap display toast or message

2009-07-13 Thread alexdonnini

Scott Mikolyski (sc...@mikolyski.com) solved my problem.

He suggested I add a private context to the custom itemized overlay,
modify the itemized overlay constructor to assign a context to the
private contxt. Then pass the context of the map activity to the
instantiation of the custom itemized overlay.

Alex

P.S. I am still interested in implementing a display of detail marker
information when hovering over a marker as implemented in many
location/map based products.


On Jul 13, 9:25 pm, alexdonnini alexdonn...@ieee.org wrote:
 Hi Mark,

 Thanks. What I meant is that I thought that in your example,
 SitesOverlay is an inner class of the map activity NooYawk. In my
 case, the custom itemized overlay class is not an inner class of the
 map activity. This means that an entry like NooYawk.this will not
 work.

 Am I wrong? I have not been able to get it to work.

 Alex

 On Jul 13, 5:16 pm, Mark Murphy mmur...@commonsware.com wrote:

  alexdonniniwrote:
   I looked for any information about onTap event processing for itemized
   overlays in this group. There is a lot of useful information but I
   could not find the answer to one question.

   The tutorial by Mark Murphy on itemized 
   overlays,http://androidguys.com/?p=1413

   describes how to generate a Toast message whenever an onTap event
   occurs.

  Hey, that name looks familiar...

   My custom itemized
   overlay activity is included in the application package as a public
   activity.

  Neither Overlay nor ItemizedOverlay are subclasses of Activity, so I do
  not understand the above sentence.

   I have had trouble in correctly identifying the context for the Toast.

  Use the activity hosting the MapView. If you are somehow getting that
  activity inside another (e.g., shoehorned a MapView-wielding activity
  into a TabActivity), try using the top-most activity.

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

  Android 1.5 Programming Books:http://commonsware.com/books.html


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



[android-developers] Re: Multiple points on a map

2009-07-06 Thread alexdonnini

Yes, Thanks. I think I am all set for now. Thanks for the tip on the
adding order.

Alex Donnini

On Jul 4, 9:24 am, Piwaï py.ri...@gmail.com wrote:
 Hello,

 Have you read the MapView tutorial ? It shows how to display multiple
 items on a 
 map:http://developer.android.com/guide/tutorials/views/hello-mapview.html

 In this example, you should notice the following lines of code :
 ListOverlay mapOverlays = mapView.getOverlays();
 mapOverlays.add(itemizedoverlay);

 If you want more overlays (such as another overlay for location), then
 you just need to add it to the list ;-) .

 The adding order is important, because it directly impacts the drawing
 order and the event handling order (clicks..)

 Regards,
 Piwaï

 On Jul 3, 11:58 pm,alexdonninialexdonn...@ieee.org wrote:

  Hello,

  I have another quick question. Does your application still work with
  Android 1.5 (SDK and OS version)?

  Thanks.

  Alex Donnini

  On Jul 3, 4:38 pm,alexdonninialexdonn...@ieee.org wrote:

   Hello,

   Thanks. It's as I hoped. Can you sketch for me the approach you used
   to implement multiple overlays?

   Alex Donnini

   On Jul 3, 10:24 am, MrChaz mrchazmob...@googlemail.com wrote:

You can have multiple overlays at the same time.
In my application I have one for traffic incidents and one for
roadworks.

On Jul 3, 3:08 pm,alexdonninialexdonn...@ieee.org wrote:

 Hello,

 I need advice/pointers on how to display on a map multiple points that
 change somewhat infrequently based on the device's location.

 Currently, my application already displays in real-time the device's
 changing location on a map. I can also easily display the location of
 one of the other points of interest.

 However, I have not figured out a way to have both displayed on a map
 at the same time.

 Nay help, hint, pointer, advice, would be greatly appreciated.

 Thanks.

 Alex Donnini


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

2009-07-03 Thread alexdonnini

Hello,

I need advice/pointers on how to display on a map multiple points that
change somewhat infrequently based on the device's location.

Currently, my application already displays in real-time the device's
changing location on a map. I can also easily display the location of
one of the other points of interest.

However, I have not figured out a way to have both displayed on a map
at the same time.

Nay help, hint, pointer, advice, would be greatly appreciated.

Thanks.

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

2009-07-03 Thread alexdonnini

Hello,

Thanks. It's as I hoped. Can you sketch for me the approach you used
to implement multiple overlays?

Alex Donnini

On Jul 3, 10:24 am, MrChaz mrchazmob...@googlemail.com wrote:
 You can have multiple overlays at the same time.
 In my application I have one for traffic incidents and one for
 roadworks.

 On Jul 3, 3:08 pm,alexdonninialexdonn...@ieee.org wrote:

  Hello,

  I need advice/pointers on how to display on a map multiple points that
  change somewhat infrequently based on the device's location.

  Currently, my application already displays in real-time the device's
  changing location on a map. I can also easily display the location of
  one of the other points of interest.

  However, I have not figured out a way to have both displayed on a map
  at the same time.

  Nay help, hint, pointer, advice, would be greatly appreciated.

  Thanks.

  Alex Donnini


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

2009-07-03 Thread alexdonnini

Hello,

I have another quick question. Does your application still work with
Android 1.5 (SDK and OS version)?

Thanks.

Alex Donnini

On Jul 3, 4:38 pm, alexdonnini alexdonn...@ieee.org wrote:
 Hello,

 Thanks. It's as I hoped. Can you sketch for me the approach you used
 to implement multiple overlays?

 Alex Donnini

 On Jul 3, 10:24 am, MrChaz mrchazmob...@googlemail.com wrote:

  You can have multiple overlays at the same time.
  In my application I have one for traffic incidents and one for
  roadworks.

  On Jul 3, 3:08 pm,alexdonninialexdonn...@ieee.org wrote:

   Hello,

   I need advice/pointers on how to display on a map multiple points that
   change somewhat infrequently based on the device's location.

   Currently, my application already displays in real-time the device's
   changing location on a map. I can also easily display the location of
   one of the other points of interest.

   However, I have not figured out a way to have both displayed on a map
   at the same time.

   Nay help, hint, pointer, advice, would be greatly appreciated.

   Thanks.

   Alex Donnini


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

2009-06-28 Thread alexdonnini

Hello,

The code snippet reported at the end of this message causes an
IOException connection refused failure

Could anyone explain to me why this failure occurs, and how I could
instantiate a localsocket connection?

By the way, replacing

l = new LocalSocketAddress(SOCKET_NAME);

with

l = new LocalSocketAddress(SOCKET_NAME,
LocalSocketAddress.Namespace.FILESYSTEM);

causes an IOException socket not created failure.

Thanks.

Alex Donnini

LocalSocket s = null;
LocalSocketAddress l;

try {

Log.i(TAG,  instantiating local socket --- );

s = new LocalSocket();

Log.i(TAG, s --- +s.toString());

//l = new LocalSocketAddress(SOCKET_NAME,
LocalSocketAddress.Namespace.FILESYSTEM);
l = new LocalSocketAddress(SOCKET_NAME);
s.connect(l);
} catch (IOException ex){
try
{
if (s != null) {

Log.i(TAG,  about to close socket after
IOException --- );
ex.printStackTrace();
s.close();
}
else
{

Log.i(TAG,  socket is null ---
+s.toString());

}
}
catch (IOException ex2)

{

Log.i(TAG,  failure to close after failure
to connect --- );

}

}



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

2009-06-21 Thread alexdonnini

Hi Liam,

You need to have Android libraries in your project's Libraries build
path (this means that you need to have the Android project source
accessible from your IDE (e.g. Eclipse), and then make sure that the
Android libraries precede the Android SDK library in the build order.

I hope this helps.

Alex

On Jun 17, 4:29 am, Ne0 liamjamesalf...@googlemail.com wrote:
 As you can probably tell, i am new to android development and rusty on
 java. I have just had a quick look at cellfinder and its importing
 com.android.internal packages, how do you do this? As the SDK
 android.jar doesn't allow access to internal packages.

 This lack of understanding is no doubt due to one of the black holes
 in my memories of java, shouldn't have had so many beers over the last
 5 years!! ;-)

 Liam

 On Jun 17, 9:13 am, Ne0 liamjamesalf...@googlemail.com wrote:

  Thanks Alex, i will look into it.

  On Jun 16, 5:55 pm, alexdonnini alexdonn...@ieee.org wrote:

   Liam,


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



[android-developers] Android 1.5 SDK, Release 2 -- TelephonyManager

2009-06-16 Thread alexdonnini

Hello,

I have a simple/quick question.

Does TelephonyManager in Android 1.5 SDK, Release 2 (the SDK version I
am using) contain the

getNeighboringCellInfo()

method?

The reference documentation,

http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNeighboringCellInfo()

seems to indicate that it does.

However, if you try to use getNeighboringCellInfo() in an application,
it does not work generating cannot be resolved to a type error.

If you add the Java libraries framework intermediaries library from
Android the cannot be resolved to a type error is resolved but the
application crashes at run-time (VerifyError, not surprisingly).

My hope is that I am overlooking something obvious, and/or making a
simple mistake.

If my mistake is in the code below, I would appreciate seeing a
snipped that does work.

 Thanks.

Alex Donnini

P.S. here is the code of the application I wrote to test
getNeighboringCellInfo()

package com.telephonytest.com;


import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.telephony.NeighboringCellInfo;
import android.telephony.TelephonyManager;
import android.util.Log;

public class TelephonyTest extends Activity {

private static String TAG = TelephonyTest;
private static TelephonyManager mTelephonyManager;

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

mTelephonyManager = (TelephonyManager)getSystemService
(TelephonyTest.TELEPHONY_SERVICE);

ArrayListNeighboringCellInfo mNeighboringCellInfo;
mNeighboringCellInfo = new ArrayListNeighboringCellInfo();
mNeighboringCellInfo = (ArrayList)
mTelephonyManager.getNeighboringCellInfo();
for(int i = 0; i  mNeighboringCellInfo.size(); ++i)
{
Log.i(TAG,mNeighboringCellInfo.get(i) -
+mNeighboringCellInfo.get(i).toString());
}


}
}



uses-permission
android:name=android.permission.ACCESS_COARSE_LOCATION /
uses-permission
android:name=android.permission.ACCESS_FINE_LOCATION /
uses-permission
android:name=android.permission.ACCESS_COARSE_UPDATES /

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

2009-06-16 Thread alexdonnini

Liam,

Casting from List to ArrayList works fine. It does not cause an error.

I guess I run into a problem because my target is Android 1.1, not 1.5

You can get cell and location related information in a number of
ways:using other applications as starting point. For example:

- radioinfo.java
[platform/packages/apps/Settings.git] / src / com / android /
settings / RadioInfo.java

- cellfinder
http://code.google.com/p/codetastrophe/

- AndroidGpsLocationProvider.java
http://code.google.com/p/gears/source/browse/trunk/gears/geolocation/AndroidGpsLocationProvider.java


With regard to duplicating the fieldtest application functionality,
you need working getNeighboringCellInfo() and other neighboring cell
related function.

Note that if you do a dexdump of fieldtest, you will see that it uses
OEM RIL related functions to extract neighboring cell related
information (however, I could be wrong about this).

I hope this helps. Unfortunately, I am still stuck with regards to
getNeighboringCellInfo().

Alex Donnini

On Jun 16, 10:47 am, Ne0 liamjamesalf...@googlemail.com wrote:
 Yes it does, though you have make sure that you are building your app
 for 1.5 versions only, this is done when setting up your project using
 Eclipse, thats how i do it anyway.

 I have yet to test my code on an actual phone, though there is one
 thing you may be clear up for me, its been many years since i have
 used java, you are using ArrayList, though the documentation
 describes getNeighboringCellInfo() as returning a List, are these
 the same thing? If not it may be an error in your code, mine works on
 the emulator using List though it returns NULL.

 Hope this helps.

 On a different note, i am trying to get other info for my app, do you
 know how to get anything other LAC, CID, Neighbour list with power?
 Like the Field test App? Cheers

 Liam

 On Jun 16, 3:35 pm, alexdonnini alexdonn...@ieee.org wrote:

  Hello,

  I have a simple/quick question.

  Does TelephonyManager in Android 1.5 SDK, Release 2 (the SDK version I
  am using) contain the

  getNeighboringCellInfo()

  method?

  The reference documentation,

 http://developer.android.com/reference/android/telephony/TelephonyMan...()

  seems to indicate that it does.

  However, if you try to use getNeighboringCellInfo() in an application,
  it does not work generating cannot be resolved to a type error.

  If you add the Java libraries framework intermediaries library from
  Android the cannot be resolved to a type error is resolved but the
  application crashes at run-time (VerifyError, not surprisingly).

  My hope is that I am overlooking something obvious, and/or making a
  simple mistake.

  If my mistake is in the code below, I would appreciate seeing a
  snipped that does work.

   Thanks.

  Alex Donnini

  P.S. here is the code of the application I wrote to test
  getNeighboringCellInfo()

  package com.telephonytest.com;

  import java.util.ArrayList;

  import android.app.Activity;
  import android.os.Bundle;
  import android.telephony.NeighboringCellInfo;
  import android.telephony.TelephonyManager;
  import android.util.Log;

  public class TelephonyTest extends Activity {

          private static String TAG = TelephonyTest;
          private static TelephonyManager mTelephonyManager;

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

          mTelephonyManager = (TelephonyManager)getSystemService
  (TelephonyTest.TELEPHONY_SERVICE);

          ArrayListNeighboringCellInfo mNeighboringCellInfo;
          mNeighboringCellInfo = new ArrayListNeighboringCellInfo();
          mNeighboringCellInfo = (ArrayList)
  mTelephonyManager.getNeighboringCellInfo();
          for(int i = 0; i  mNeighboringCellInfo.size(); ++i)
          {
                  Log.i(TAG,mNeighboringCellInfo.get(i) -
  +mNeighboringCellInfo.get(i).toString());
          }

      }

  }

  
  uses-permission
  android:name=android.permission.ACCESS_COARSE_LOCATION /
  uses-permission
  android:name=android.permission.ACCESS_FINE_LOCATION /
  uses-permission
  android:name=android.permission.ACCESS_COARSE_UPDATES /


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

2009-05-29 Thread alexdonnini

My application does have

uses-permission
android:name=android.permission.ACCESS_COARSE_LOCATION /
uses-permission
android:name=android.permission.ACCESS_FINE_LOCATION /
uses-permission
android:name=android.permission.ACCESS_COARSE_UPDATES /


Here is an example of the fialure I referred to in my message:

This code:


ArrayListNeighboringCellInfo mNeighboringCellInfo;
mNeighboringCellInfo = new ArrayListNeighboringCellInfo
();
mNeighboringCellInfo = (ArrayList)
mTelephonyManager.getNeighboringCellInfo();
for(int i = 0; i  mNeighboringCellInfo.size(); ++i)
{
System.out.println(mNeighboringCellInfo.get(i) -
+mNeighboringCellInfo.get(i));
}


generates this failure:

05-29 16:46:08.981: WARN/dalvikvm(5415): VFY: unable to resolve
virtual method 13918: Landroid/telephony/
TelephonyManager;.getNeighboringCellInfo ()Ljava/util/List;
05-29 16:46:08.981: WARN/dalvikvm(5415): VFY:  rejecting opcode 0x74
at 0x013a
05-29 16:46:08.981: WARN/dalvikvm(5415): VFY:  rejected Lcom/android/
commmanager/CommManager;.onCreate (Landroid/os/Bundle;)V
05-29 16:46:08.981: WARN/dalvikvm(5415): Verifier rejected class Lcom/
android/commmanager/CommManager;
05-29 16:46:08.981: WARN/dalvikvm(5415): Class init failed in
newInstance call (Lcom/android/commmanager/CommManager;)
05-29 16:46:08.991: WARN/dalvikvm(5415): threadid=3: thread exiting
with uncaught exception (group=0x40013e28)

Could you send the community an example of code where you were
successful in using getNeighboringCellInfo()? It would help all of us
who have not been able to get getNeighboringCellInfo() to work,
correct our mistakes.

Thanks.

On May 29, 4:24 pm, Mark Murphy mmur...@commonsware.com wrote:
 alexdonnini wrote:
  I have low expectations that this message will get any response as it
  seems that Google developers do not like to address issues too close
  to the Android core and to strategic mobility applications.

 Do you honestly think insulting Google developers will improve your
 chances of getting answers?

  Yet, getNeighboringCellInfo() does not work. Any attempt to call it in
  an application results in application failure.

 File a bug report athttp://b.android.com. I didn't find any issues
 referencing that method. If you can attach a project that reproduces the
 issue, so much the better.

 BTW, the Android 1.5 docs say you need the ACCESS_COARSE_UPDATES
 permission -- do you hold that permission? That might be a documentation
 bug, in that I cannot find any other reference to that permission, so
 you might also try ACCESS_COARSE_LOCATION. None of that would seem to
 line up with the stack trace you posted in that one thread, but you
 never know...

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

 Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Telephony Manager functions don't work

2009-05-29 Thread alexdonnini

Sorry Mark, I thought you had tried it.

I will file a bug report.

Thanks.

Alex Donnini

On May 29, 5:01 pm, Mark Murphy mmur...@commonsware.com wrote:
 alexdonnini wrote:
  My application does have

  uses-permission
  android:name=android.permission.ACCESS_COARSE_LOCATION /
  uses-permission
  android:name=android.permission.ACCESS_FINE_LOCATION /
  uses-permission
  android:name=android.permission.ACCESS_COARSE_UPDATES /

 Oh, well, so much for the permission idea.

  generates this failure:

  05-29 16:46:08.981: WARN/dalvikvm(5415): VFY: unable to resolve
  virtual method 13918: Landroid/telephony/

 H...that's a different virtual method number than in the other stack
 trace...not quite sure what that means.

 Off the cuff, it feels like the C .so doesn't export its edition of
 getNeighboringCellInfo(), so the JNI lookup is failing. I'm not quite
 good enough in surfing the Android source code to try to confirm this
 theory, though.

  Could you send the community an example of code where you were
  successful in using getNeighboringCellInfo()?

 I've never tried it, which is why I suggested filing a bug over 
 athttp://b.android.comif the permissions didn't clear up your problem.

 You couched your post as this issue being another Great Google
 Conspiracy. You're welcome to depict the situation however you like.
 But, it would seem prudent to also file a bug report, to see if that
 gets you better results. But, hey, that's just me.

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

 Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Telephony Manager functions don't work

2009-05-29 Thread alexdonnini

Hi Mark,

I had not seen your comment about insulting Google developers until
now. Saying that they do not like to address certain question is
insulting?? Come on... so thin skinned?

The fact of the matter is that asking certain questions gets no
answers.

Why is it that it is OK for developers to ignore my questions, and not
consider that insulting (being ignored), while simply saying that
they are ignoring my questions is insulting? I am truly puzzled by
this.

Alex Donnini

On May 29, 5:21 pm, alexdonnini alexdonn...@ieee.org wrote:
 Sorry Mark, I thought you had tried it.

 I will file a bug report.

 Thanks.

 Alex Donnini

 On May 29, 5:01 pm, Mark Murphy mmur...@commonsware.com wrote:

  alexdonnini wrote:
   My application does have

   uses-permission
   android:name=android.permission.ACCESS_COARSE_LOCATION /
   uses-permission
   android:name=android.permission.ACCESS_FINE_LOCATION /
   uses-permission
   android:name=android.permission.ACCESS_COARSE_UPDATES /

  Oh, well, so much for the permission idea.

   generates this failure:

   05-29 16:46:08.981: WARN/dalvikvm(5415): VFY: unable to resolve
   virtual method 13918: Landroid/telephony/

  H...that's a different virtual method number than in the other stack
  trace...not quite sure what that means.

  Off the cuff, it feels like the C .so doesn't export its edition of
  getNeighboringCellInfo(), so the JNI lookup is failing. I'm not quite
  good enough in surfing the Android source code to try to confirm this
  theory, though.

   Could you send the community an example of code where you were
   successful in using getNeighboringCellInfo()?

  I've never tried it, which is why I suggested filing a bug over 
  athttp://b.android.comifthe permissions didn't clear up your problem.

  You couched your post as this issue being another Great Google
  Conspiracy. You're welcome to depict the situation however you like.
  But, it would seem prudent to also file a bug report, to see if that
  gets you better results. But, hey, that's just me.

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

  Need Android talent? Ask on HADO!http://wiki.andmob.org/hado


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

2009-05-15 Thread alexdonnini

Hello,

Below, you will find the source code for a simple application testing
access to the rild socket in dev/socket.

Before running the application, I manually changed permissions on rild
in dev/socket to allow r/w/x for all users.

The application below is based in large part on code I found at
http://all4dev.blogspot.com/2009/02/android-localsocket-localserversocket.html

As originally written, the application works.

When I changed it to use rild socket as the conduit for communication
between receiver and sender, it stopped working.

Specifically, I believe that connection to the rild socket (s.connect
()) never completes. No exceptions are produced either.

I would greatly appreciate it if anyone could let me know where they
think I made a mistake, why the application does not work, and what I
should do to fix it.

Thanks.

Alex Donnini

package com.android.sockettest;

import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.net.LocalServerSocket;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

/**
*
* @author Denis Migol
*
*/

public class SocketTest extends Activity {

private static String TAG = sockettest;

LocalSocket mServer;

static final String SOCKET_NAME_RIL = rild;

static final int SOCKET_OPEN_RETRY_MILLIS = 4 * 1000;

LocalSocketAddress mLocalSocketAdress =
new LocalSocketAddress(SOCKET_NAME_RIL,
LocalSocketAddress.Namespace.RESERVED);

// background threads use this Handler to post messages to
// the main application thread
private final Handler handler = new Handler();

public class NotificationRunnable implements Runnable {
private String message = null;

public void run() {
if (message != null  message.length()  0) {
showNotification(message);
}
}

/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}

// post this to the Handler when the background thread notifies
private final NotificationRunnable notificationRunnable = new
NotificationRunnable();

public void showNotification(String message) {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
}

class SocketListener extends Thread {
private Handler handler = null;
private NotificationRunnable runnable = null;

public SocketListener(Handler handler, NotificationRunnable
runnable) {
this.handler = handler;
this.runnable = runnable;
this.handler.post(this.runnable);
}

/**
* Show UI notification.
* @param message
*/
private void showMessage(String message) {
this.runnable.setMessage(message);
this.handler.post(this.runnable);
}

@Override
public void run() {
showMessage(DEMO: SocketListener started!);
try {

while (true) {

Log.i(TAG, running socket listener --- );

LocalSocket s = null;
LocalSocketAddress l;

try {
s = new LocalSocket();
l = new LocalSocketAddress(SOCKET_NAME_RIL,
 
LocalSocketAddress.Namespace.RESERVED);
s.connect(l);

Log.i(TAG, Successfully connected to socket s
- +s.toString());

} catch (Exception ex){
try {
if (s != null) {

Log.i(TAG, About to close socket after
Exception --- );
s.close();
}
} catch (Exception ex2) {
Log.i(TAG, Failed to close socket s);
}
}

mServer = s;

Log.i(TAG, Connected to mServer --- );

if (mServer != null) {

Log.i(TAG, mServer is not null);

InputStream input = mServer.getInputStream();

// simply for java.util.ArrayList
int readed = input.read();
int size = 0;
int capacity = 0;
byte[] bytes = new byte[capacity];

// reading
while (readed != -1) {
// java.util.ArrayList.Add(E e);
capacity = (capacity * 3)/2 + 1;
//bytes = Arrays.copyOf(bytes, capacity);
   

[android-developers] read from local socket does not work

2009-05-13 Thread alexdonnini

Hello,

I was wondering if anyone would explain to me why the code snippet
below does not work:

s.getOutputStream().write(length);
s.getOutputStream().write(data);

Log.i(TAG, data from socket -
+Integer.toString(s.getInputStream().read()));

In my application, the code is surrounded by try/catch. It does not
generate an exception.

s is an instantiation of LocalSocket.

The code does not work because the attempt to read data from the
socket never completes, i.e. no data is ever returned from the socket
(via the Log.i statement).

I would appreciate it if anyone could help me understand if and where
I made a mistake.

Thanks.

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

2009-04-18 Thread alexdonnini

Hello,

Access to the maps API at

http://www.google.com/glm/mmap

was disabled some time ago.

Would someone be able to tell if it was replaced, and what the current
access path is?

Alternatively, I would appreciate it if someone could give me some
information regarding getting access equivalent to that provided by
Yahoo via

http://zonetag.research.yahooapis.com/services/rest/V1/cellLookup.php

Thanks.

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

2009-04-15 Thread alexdonnini

Hello Vincent,

I do not believe RadioInfo.java is a standard application. I don't
think it was ever officially released, but I could be mistaken.

I have installed it and gotten it to work (partially) but, at least in
my set-up, it required a number of changes related to access to
Phone.java and interface not accessible via the SDK.

Alex Donnini

On Apr 6, 11:58 pm, Vincent Chen vincent.s.c...@gmail.com wrote:
 Dear Sir,

 I found RadioInfo.java in Android source code
 Is this a application in Setting? And how to use it? I can't find any
 icon.

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

2009-04-10 Thread alexdonnini

Hello again Richard,

I have a quick question.

The SignalStrength class and setSignalStrength methods in the two
lines below are not part of the Android SDK or other Android telephony
related classes. Did you write it, or did you find it somewhere else?

SignalStrength.setSignalStrength(signalPercent);
SignalStrength.setSignalStrengthASU(signalStrength);

Thanks.

Alex Donnini

On Apr 9, 10:18 pm, alexdonnini alexdonn...@ieee.org wrote:
 Hello Richard,

 Thanks very much. This is very helpful. I am using the same SDK
 version but in this case I was not using the SDK.

 I had been experimenting with LocationListener too. I had been using
 onLocationChanged.

 Again, Thanks.

 Alex Donnini

 On Apr 9, 7:32 pm, Richard Schilling richard.rootwirel...@gmail.com
 wrote:

  I have the SDK version 1.1r1 on my machine, and Actually don't see
  this API call in the current version.  What version of the SDK are you
  using?

  Anyway, I assume you want to cell tower location and such.  Try
  creating a listener, and then registering your listener with the
  TelephonyManager.

  Start by giving your application the following permissions:

       android.permission.ACCESS_FINE_LOCATION
       android.permission.ACCES_COARSE_LOCATION

  Then, create your listener:

  // implement both phone state listener and location listener.
  public class PhoneSignalListener extends PhoneStateListener
          implements LocationListener{

          /**
           * @param signalStrength signal strength in ACU.
           */
          public void onSignalStrengthChanged(int signalStrength){

                  float signalPercent = ((float)signalStrength)/31f * 100f;
                  SignalStrength.setSignalStrength(signalPercent);
                  SignalStrength.setSignalStrengthASU(signalStrength);

          }

          public void onCellLocationChanged(CellLocation cellLoc){}

          public void onLocationChanged(Location loc) {}

          public void onProviderDisabled(String arg0) {}

          public void onProviderEnabled(String arg0) {}

          public void onStatusChanged(String arg0, int arg1, Bundle arg2) {}

  }

  And then you register it with TelephonyManager.  In your application's
  main activity (Activity.onCreate()):

  public class MyActivity extends Activity{

      public void onCreate(Bundle savedInstanceState) {
          TelephonyManager telManager = (TelephonyManager)
  this.getSystemService(Context.TELEPHONY_SERVICE);
          telManager.listen(new PhoneSignalListener(),
                          PhoneStateListener.LISTEN_SERVICE_STATE |
                          PhoneStateListener.LISTEN_SIGNAL_STRENGTH |
                          PhoneStateListener.LISTEN_CELL_LOCATION);
      }

  }

  As the phone location changes you get the information delivered,
  wrapped in a pretty package with a bow, to the Phone signal listener.

  Richard Schilling
  Root Wireless

  On Apr 9, 11:15 am,alexdonninialexdonn...@ieee.org wrote:

   Hello,

   Although the manifest file in my application contains

   uses-permission
   android:name=android.permission.CONTROL_LOCATION_UPDATES /

   the operation,

   mTelephonyManager.enableLocationUpdates();

   fails with

   04-09 14:01:01.754: WARN/System.err(5495):
   java.lang.SecurityException: Neither user 10026 nor current process
   has android.permission.CONTROL_LOCATION_UPDATES.

   Could anyone help me understand where I am making a mistake, and how
   to correct it?

   Thanks.

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

2009-04-09 Thread alexdonnini

Hello,

Although the manifest file in my application contains

uses-permission
android:name=android.permission.CONTROL_LOCATION_UPDATES /

the operation,

mTelephonyManager.enableLocationUpdates();

fails with

04-09 14:01:01.754: WARN/System.err(5495):
java.lang.SecurityException: Neither user 10026 nor current process
has android.permission.CONTROL_LOCATION_UPDATES.

Could anyone help me understand where I am making a mistake, and how
to correct it?

Thanks.

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

2009-04-09 Thread alexdonnini

Hello Richard,

Thanks very much. This is very helpful. I am using the same SDK
version but in this case I was not using the SDK.

I had been experimenting with LocationListener too. I had been using
onLocationChanged.

Again, Thanks.

Alex Donnini

On Apr 9, 7:32 pm, Richard Schilling richard.rootwirel...@gmail.com
wrote:
 I have the SDK version 1.1r1 on my machine, and Actually don't see
 this API call in the current version.  What version of the SDK are you
 using?

 Anyway, I assume you want to cell tower location and such.  Try
 creating a listener, and then registering your listener with the
 TelephonyManager.

 Start by giving your application the following permissions:

      android.permission.ACCESS_FINE_LOCATION
      android.permission.ACCES_COARSE_LOCATION

 Then, create your listener:

 // implement both phone state listener and location listener.
 public class PhoneSignalListener extends PhoneStateListener
         implements LocationListener{

         /**
          * @param signalStrength signal strength in ACU.
          */
         public void onSignalStrengthChanged(int signalStrength){

                 float signalPercent = ((float)signalStrength)/31f * 100f;
                 SignalStrength.setSignalStrength(signalPercent);
                 SignalStrength.setSignalStrengthASU(signalStrength);

         }

         public void onCellLocationChanged(CellLocation cellLoc){}

         public void onLocationChanged(Location loc) {}

         public void onProviderDisabled(String arg0) {}

         public void onProviderEnabled(String arg0) {}

         public void onStatusChanged(String arg0, int arg1, Bundle arg2) {}

 }

 And then you register it with TelephonyManager.  In your application's
 main activity (Activity.onCreate()):

 public class MyActivity extends Activity{

     public void onCreate(Bundle savedInstanceState) {
         TelephonyManager telManager = (TelephonyManager)
 this.getSystemService(Context.TELEPHONY_SERVICE);
         telManager.listen(new PhoneSignalListener(),
                         PhoneStateListener.LISTEN_SERVICE_STATE |
                         PhoneStateListener.LISTEN_SIGNAL_STRENGTH |
                         PhoneStateListener.LISTEN_CELL_LOCATION);
     }

 }

 As the phone location changes you get the information delivered,
 wrapped in a pretty package with a bow, to the Phone signal listener.

 Richard Schilling
 Root Wireless

 On Apr 9, 11:15 am,alexdonninialexdonn...@ieee.org wrote:

  Hello,

  Although the manifest file in my application contains

  uses-permission
  android:name=android.permission.CONTROL_LOCATION_UPDATES /

  the operation,

  mTelephonyManager.enableLocationUpdates();

  fails with

  04-09 14:01:01.754: WARN/System.err(5495):
  java.lang.SecurityException: Neither user 10026 nor current process
  has android.permission.CONTROL_LOCATION_UPDATES.

  Could anyone help me understand where I am making a mistake, and how
  to correct it?

  Thanks.

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

2009-02-05 Thread alexdonnini

Hello,

Does anyone know if the utilities in

system/core/libnetuitls

can be used in an application?

At this point in time, I am particularly interested in

ifc_utils

I would appreciate any insight into this.

Thanks.

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

2009-01-26 Thread alexdonnini

Hello,

I have been looking for a way to programmatically change the active
connection on a G1.

for example, I would like to be able to switch from g3 to wifi by
first disconnecting the g3 connection.

When it comes to WIFI, enabling/disabling WIFI, and connecting/re-
connecting to a WIFI access point is fairly straightforward.

However, when it comes to non-WIFI connections, I have not been able
to find the equivalent classes and methods.

Please note that, unless I am mistaken, the ConnectivityManager
class does not include any methods for managing connections. It's just
for accessing information about a connection, and manage some
configuration settings.

I would appreciate any ideas and feedback.

Thanks.

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

2009-01-26 Thread alexdonnini

Hello,

Does anyone know if there is any way to access/use ConnectivityService
from an application?

ConnectivityService includes a number of methods related to handling a
change in network connection across different types of network (e.g.
from mobile to WIFI) which I would like to use in my application.

Here is a link to ConnectivityService:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=services/java/com/android/server/ConnectivityService.java;hb=179573d3618c45290a4506be10a7b7f8369422a5

A number of the classes used by ConnectivityService have been removed
from the SDK.

Thanks.

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

2009-01-06 Thread alexdonnini

Hello,

Depending on what you want to run from the command line, you might
want to think about trying

Runtime.getRuntime().exec()

e.g.

Runtime.getRuntime().exec(top -t -n 1)

Alex Donnini

On Jan 6, 8:01 am, Mark Murphy mmur...@commonsware.com wrote:
 Asif k wrote:
    Can you lpease tell me what is the use of
  android.content.Intent.ACTION_RUN intent???

 I do not believe it is presently in use in Android, except perhaps as
 part of a test harness.

  can we run any other application using it??

 Not that I am aware of.

 To start another application, you need a Uri to something it can handle
 (e.g., ACTION_VIEW on a contact Uri to view the contact, ACTION_EDIT on
 a contact Uri to edit the contact).

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Listening for dynamic buttons created by an adapter

2008-12-07 Thread alexdonnini

Hello,

Without source code to take a look at, it's difficult to guess what's
causing the problem.

Sorry.

Alex Donnini

On Nov 29, 6:45 am, for android [EMAIL PROTECTED] wrote:
 I have a strange problem.

 I am using an efficient list adapter with a list which has row with a
 text view and a button.Now on click of the button,I collapse that row
 and download a file,with a progress bar.(this has been done along the
 lines of the list collapsible adapter example of the api demos).

 On click of the button,if any of the other rows have their progress
 bar running(i interupt the download).I set the progress bar to 0 and
 start of the download of the click of the row which has been clicked
 latest,.

 The code works perfectly ok when I have the list size to be 5.

 When the list size is two, say i click row 1 and the progress bar is
 25% complete.And then I click row 2.then still the progress bar shows
 to be 25%,though I set the progress bar to 0.

 Remember the same peice of code works for when the size of the list is 5.

 The work around which I got was not to use the efficient list adapter
 when the list size is 2.Immediately after that I fond that the code
 starts to work like magic.

 Is there anything that I am doing wrong? Or is there a lower limit in
 the size as to when to use the efficient list adapter.And whats the
 reason for such a behaviour.

 Thanks.Let me know if I am not clear.

 On 11/20/08, Mark Murphy [EMAIL PROTECTED] wrote:



 alexdonniniwrote:
  Hello,

  I think I may have solved the problem. As I suspected (if I am right),
  the solution was pretty simple. All I had to do is change:

  kill2 =  (Button) findViewById(R.id.kill2);
  to
  kill2 =  (Button) convertView.findViewById(R.id.kill2);

  Ah, yes.

  findViewById(R.id.kill2) searches the root view of your Activity for the
  item identified as kill2. convertView.findViewById(R.id.kill2) searches
  your list row for the item identified as kill2.

  The latter is definitely what you want.

  --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] creating and writing files

2008-12-03 Thread alexdonnini

Hello,

Using a call such as

new FileWriter(/data/+fileName)

causes an IO exception.

Based on documentation for the FileWriter constructor used above, the
IO exception may be caused by the inability to create a file.

If I push in the data directory a file named fileName (i.e. the
value of the string fileName), the FileWriter constructor works as
expected.

Would anyone be able to tell me why I am able to copy a file into /
data but am not able to create a new file using the FileWriter
construct?

Am I making a mistake somewhere?

I would appreciate help in resolving this problem.

Thanks.

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



[android-developers] Re: creating and writing files

2008-12-03 Thread alexdonnini

Hi Mark,

Thanks for the quick reply and the pointer.

I replaced

new FileWriter(/data/+fileName)

with

openFileOutput(fileName, 0)

it worked as openFileOutput writes into files (or creates them if they
do not exist) in an application's private storage space. The
documentation for getFilesDir states:

Returns the absolute path to the directory on the filesystem where
files created with openFileOutput(String, int) are stored. 

Alex Donnini

On Dec 3, 2:55 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 alexdonnini wrote:
  Hello,

  Using a call such as

  new FileWriter(/data/+fileName)

  causes an IO exception.

 Because that's not a good spot for you to be putting your own data.

 Use Context#getFilesDir() to find the base directory for data storage
 for your application, or write them to a mounted /sdcard.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Setting up intents for dynamic buttons

2008-11-25 Thread alexdonnini

Hello Julian,

I think that you need to attach the button by name to the view.

Please refer to this thread for information which might be relevant.

http://groups.google.com/group/android-developers/browse_thread/thread/297073fb1c8579cc/df6767b1f70f86d6?lnk=gstq=alexdonnini#df6767b1f70f86d6

Alex Donnini

On Nov 22, 10:30 pm, Julian [EMAIL PROTECTED] wrote:
 Ok.  I have a screen that is essentially a list with a dynamic number
 of items.  Each of these items when clicked needs to switch to the
 next screen and pass a variable over saying which was clicked.  I am
 trying to use intents to do this, but I am having some trouble.  Here
 is the chunk of code where I am trying to do this:

 for (int i = 0; i  count; i++){
                 mi = db.getItem(i);
                 //countText.setText(mi.title);
                 items[i] = new TextView(this);
                 items[i].setClickable(true);
                 items[i].setText(mi.title);
                 inteIntent = new Intent(this, MIScreen.class);
                 inteIntent.putExtra(com.android.MIScreen.curIndex, i);
                 items[i].setOnClickListener(new View.OnClickListener() {
                  public void onClick(View v) {
                         startActivity(inteIntent);
                  }
              });
                 linearLayout.addView(items[i]);
                 //items[i].setVisibility(1);
         };

 What happens is every button I click just has the last intent settings
 so no matter which one I click the next screen shows that I clicked
 the last item.  I also tried to do this by using an array of intents.
 But that gives me an error when I click a button that I have not been
 able to figure out.

 So how should I be doing this?  Am I taking the wrong approach
 completely or am I just missing something small?

 Also, Im trying to use the wsimport tool to set up the Amazon API but
 am very unfamiliar with the Java tools and can't get wsimport to run
 on the command line at all.

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



[android-developers] Re: Base Adapter View and OnClick Lister

2008-11-21 Thread alexdonnini

Hello,

You need to post all of the code in question.

Alex Donnini

On Nov 21, 2:24 am, for android [EMAIL PROTECTED] wrote:
 I have extended a BaseAdapter for a listView.

 The List View is on the lines of ListAdapter Collapsed ,but instead of the
 dialogue box i have a seek bar(which gets enabled and disabled)On the
 trigger of the expansion.There is an imagebutton widget which changes to
 play/pause.

 On the onClicklistern of the imageButtons(I change the image),I observe that
 the getView of the Adapter gets called again??(Whats the reason for this)

 Also in the list what i am observing is that  only the first row of the
 list, i see that the play button changes to pause.(i am using the Image
 Button).The rest of the rows donot change to the play/pause of the image
 button though the media player changes from play to pause and vice versa.  i
 am surprised because there no where in my code there is hardcoding,the
 action are based on the positions.But only the first row is behaving the way
 i want,what could be the pssible reason..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Listening for dynamic buttons created by an adapter

2008-11-19 Thread alexdonnini

Hello,

I think I may have solved the problem. As I suspected (if I am right),
the solution was pretty simple. All I had to do is change:

kill2 =  (Button) findViewById(R.id.kill2);
to
kill2 =  (Button) convertView.findViewById(R.id.kill2);

Alex Donnini

On Nov 17, 10:25 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 alexdonniniwrote:
  Next, I need to make sure that each and every kill button is wired,
  not just the one for the first item in the list.

  In order to do that, do you think it would be sufficient to set up a
  loop ranging across all members of the dataset (in my case an
  ArrayList) in getView?

 Eek!

 I mean, that shouldn't be necessary.

 Just wire each button as it is created. If the button has not been
 created yet, it cannot be clicked.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Listening for dynamic buttons created by an adapter

2008-11-17 Thread alexdonnini

Hello Mark,

I have been trying to implement the same functionality as Moazzam.
Specifically, I want each row in my list to have a delete (in my
case a process kill) button.

I read carefully your very good tutorials on lists, and tried to
follow the approach you describe in tutorial #5 (see the code below).

The result is as follows:

1) Each row does have a kill button
2) The first row is always blank (except for the kill button
3) On the kill button in the first row is active, i.e. performs the
required action
4) When clicking on the kill button in the first row, the item at
the bottom of the screen (the last visible item) is killed

a) I have not been able to wire all buttons
b) The button which is wired does not act on the desired item because
the value of the position parameter returned by getView.

I would appreciate your thoughts (or anyone else's) on this, and any
pointers regarding the errors in my code.

Thanks.

Alex Donnini

public View getView(int position, View convertView, ViewGroup
parent) {

ViewHolder holder;
holder = new ViewHolder();

try
{
if (convertView == null) {
convertView = mInflater.inflate
(R.layout.list_item_icon_text, null);

Button kill2 = (Button) findViewById
(R.id.kill2);
kill2.setOnClickListener(new
View.OnClickListener() {

public void onClick(View v) {

//Button  click action processing
} });

holder.text = (TextView)
convertView.findViewById(R.id.text);
holder.icon = (ImageView)
convertView.findViewById(R.id.icon);

convertView.setTag(holder);
}

else {

holder = (ViewHolder) convertView.getTag();

Button kill2 = (Button) findViewById(R.id.kill2);
kill2.setOnClickListener(new View.OnClickListener
() {

public void onClick(View v) {

//Button  click action processing
} });

}

holder.text.setText(activityList.get(position));
holder.icon.setImageBitmap((position  1) == 1 ?
mIcon1 : mIcon2);
}

catch(Exception e)
{
e.printStackTrace();
}

return convertView;

}


On Nov 2, 6:24 am, Mark Murphy [EMAIL PROTECTED] wrote:
 moazzamk wrote:
  Can anyone point me in the right direction please. I used the notepad
  example on android's site and created a listActivity which uses a
  database to fill out thelist. However, every row has a deletebutton
  and I want to listen for a click of thatbuttonand then delete the
  row from listView. Is there a way I can do that?

 The easiest way I know of is to subclass your adapter, override
 getView(), inflate your own row Views, and attach a listener at that
 point, since you have eachButtonobject handy as part of the inflation
 process.

 You can get an idea of the concept by reading my Fancy ListViews
 series of posts over on AndroidGuys (http://androidguys.com). However,
 they were mostly from this summer and were written for the M5 SDK, and
 so will require some changes to get the source code samples to run on
 Android 1.0r1.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Listening for dynamic buttons created by an adapter

2008-11-17 Thread alexdonnini

Hello again Mark,

Thanks for the help. I really appreciate it. It worked. I also had to
move the button wiring section after the view set-up section.

Next, I need to make sure that each and every kill button is wired,
not just the one for the first item in the list.

In order to do that, do you think it would be sufficient to set up a
loop ranging across all members of the dataset (in my case an
ArrayList) in getView?

Thanks.

Alex Donnini

On Nov 17, 5:25 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 alexdonnini wrote:
  Hello Mark,

 If you're referring to me, hi!

  I read carefully your very good tutorials on lists

 Thanks!

  b) The button which is wired does not act on the desired item because
  the value of the position parameter returned by getView.

 That's because you're not holding onto it. At least, near as I can tell
 from the code listing you supplied.

 Add position to your ViewHolder. Fill in the ViewHolder's position at
 the same time you update the TextView and ImageView. When your button
 clicks, get the ViewHolder from the button's parent, get the position
 out of the ViewHolder, and use that position.

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Network traffic monitoring

2008-11-09 Thread alexdonnini

Hello,

Where are network traffic logs, and other networking related
information stored on an Adriod based device? Which directories, and
files should I look for? I am writing a small application to allow
tracking and retrieval of system information including processes,
threads, and networking events and traffic. I have had no problem in
retrieving and processing process and thread information but I can't
seem to find networking event information.

I looked in /dev where I found a number of files and directories which
I thought would be relevant but could not retrieve any information. I
used the code below. The result, so far, has always been a file not
found exception.

I would appreciate any help in locating the files where networking
related information (including events and traffic) should be located.

Thanks.

Alex Donnini

 FileReader fstream = null;
 try
 {
 fstream = new FileReader(/dev/cpu_dma_latency);
 }
 catch (FileNotFoundException e)
 {
e.printStackTrace();
 }

 try
 {
 BufferedReader in = new BufferedReader(fstream, 500);
 String line = null;
 while ((line = in.readLine()) != null)
 {
 netTrafficDev.add(line);
 }
 }
 catch (Exception e)
 {
e.printStackTrace();
 }

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



[android-developers] command line window in emulator

2008-10-28 Thread alexdonnini

Hello,

Is there any way to open a command line window in the Android
emulator?

I am trying to verify the results of certain commands I want to run
from my application by running them directly.

In particular, I am trying to verify the results of ps and other
related commands.

Thanks.

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



[android-developers] Re: command line window in emulator

2008-10-28 Thread alexdonnini

Great! Thanks. It's exactly what I was looking for. Probably, I should
have looked harder in the documentation.

By the way, infinitezest is a very nice site.

On Oct 28, 5:31 pm, Rob Franz [EMAIL PROTECTED] wrote:
 Seehttp://www.infinitezest.com/articles/using-adb--android-debug-bridge

 On Tue, Oct 28, 2008 at 5:25 PM, alexdonnini [EMAIL PROTECTED] wrote:

  Hello,

  Is there any way to open a command line window in the Android
  emulator?

  I am trying to verify the results of certain commands I want to run
  from my application by running them directly.

  In particular, I am trying to verify the results of ps and other
  related commands.

  Thanks.

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



[android-developers] Re: process ids

2008-10-27 Thread alexdonnini

Ludwig,

Thanks. I was aware of the /proc structure. ps gets its data from /
proc/stats

I thought that using ps would minimize the possibility of future
incompatibilities.

when running the code I listed below, it does not fail. However, all
it seems to retrieve is the column headers.

Note that when I run the code on a Linux desktop (via Eclipse). The
expected output, the entrie list of processes, is produced.

So, at this point, I wonder why when running the code in the Android
emulator, all I get is the column headers.

Alex

On Oct 26, 5:54 pm, Ludwig [EMAIL PROTECTED] wrote:
 /proc is a (virtual) file system, so you can navigate through it with the
 usual File operations. For every process there is a directory /proc/pid
 where pid is the processes PID. Under that directory is a whole lot of stuff
 relating to that process, such as command line, actual executable, open
 files etc etc.
 Searching for proc filesystem should give you much more information, but as
 hackbod pointed out you do not have any guarantees that the layout will stay
 exactly the same over versions/devices etc.Command like ps actually read
 from /proc for their output.

 Ludwig

 2008/10/26 alexdonnini [EMAIL PROTECTED]



  I thought I would try using ps with code like the one listed below.
  headers for the process list are reported correctly but not much else.

   When you mentioned accessing /proc directly, did you have something
  else (other than ps) in mind?

  Thanks.

  Alex Donnini

     private void getProcessList()
     {
         System.out.println(retrieving list of running processes via --
  ps -e -- command);
         try
         {
             processList = new ArrayListString();
             String line;
             java.lang.Process p = Runtime.getRuntime().exec(ps -e);
             BufferedReader input =
                     new BufferedReader(new
  InputStreamReader(p.getInputStream()));
             while ((line = input.readLine()) != null)
            {
                 System.out.println(running process - +line); //--
  Parse data here.
                 processList.add(line);
             }
             input.close();
         }
          catch (Exception err)
         {
             err.printStackTrace();
          }

  On Oct 26, 2:43 pm, alexdonnini [EMAIL PROTECTED] wrote:
   Thanks. I understand the risk in going for direct access.

   On Oct 24, 1:09 am, hackbod [EMAIL PROTECTED] wrote:

Sorry, we don't currently have a high-level API for doing this.  As a
hack, you can read /proc directly, but that is not something that is
part of the SDK and so you have no guarantees of it working on future
releases or other phones.

On Oct 23, 8:25 pm,alexdonnini[EMAIL PROTECTED] wrote:

 Hello,

 Would anyone be able to tell me (or point me in the right direction)
 how I could retrieve the pids and related process information as
 reported, for example, in DDMS in an Android application?

 I have been able to put together a small application that retrieves
 information about all tasks running
 (ActivityManager activityManager =
 (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
         ListActivityManager.RunningTaskInfo runningTasks =
 activityManager.getRunningTasks(30); )

 However, if possible, I would like to retrieve task and process
 information at a higher level of granularity (or, if you like, at
 lower level).

 Any help would be greatly appreciated.

 Thanks.

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



[android-developers] Re: process ids

2008-10-26 Thread alexdonnini

Thanks. I understand the risk in going for direct access.

On Oct 24, 1:09 am, hackbod [EMAIL PROTECTED] wrote:
 Sorry, we don't currently have a high-level API for doing this.  As a
 hack, you can read /proc directly, but that is not something that is
 part of the SDK and so you have no guarantees of it working on future
 releases or other phones.

 On Oct 23, 8:25 pm,alexdonnini[EMAIL PROTECTED] wrote:

  Hello,

  Would anyone be able to tell me (or point me in the right direction)
  how I could retrieve the pids and related process information as
  reported, for example, in DDMS in an Android application?

  I have been able to put together a small application that retrieves
  information about all tasks running
  (ActivityManager activityManager =
  (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
          ListActivityManager.RunningTaskInfo runningTasks =
  activityManager.getRunningTasks(30); )

  However, if possible, I would like to retrieve task and process
  information at a higher level of granularity (or, if you like, at
  lower level).

  Any help would be greatly appreciated.

  Thanks.

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



[android-developers] Re: process ids

2008-10-26 Thread alexdonnini

I thought I would try using ps with code like the one listed below.
headers for the process list are reported correctly but not much else.

 When you mentioned accessing /proc directly, did you have something
else (other than ps) in mind?

Thanks.

Alex Donnini

private void getProcessList()
{
System.out.println(retrieving list of running processes via --
ps -e -- command);
try
{
processList = new ArrayListString();
String line;
java.lang.Process p = Runtime.getRuntime().exec(ps -e);
BufferedReader input =
new BufferedReader(new
InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null)
   {
System.out.println(running process - +line); //--
Parse data here.
processList.add(line);
}
input.close();
}
 catch (Exception err)
{
err.printStackTrace();
}


On Oct 26, 2:43 pm, alexdonnini [EMAIL PROTECTED] wrote:
 Thanks. I understand the risk in going for direct access.

 On Oct 24, 1:09 am, hackbod [EMAIL PROTECTED] wrote:

  Sorry, we don't currently have a high-level API for doing this.  As a
  hack, you can read /proc directly, but that is not something that is
  part of the SDK and so you have no guarantees of it working on future
  releases or other phones.

  On Oct 23, 8:25 pm,alexdonnini[EMAIL PROTECTED] wrote:

   Hello,

   Would anyone be able to tell me (or point me in the right direction)
   how I could retrieve the pids and related process information as
   reported, for example, in DDMS in an Android application?

   I have been able to put together a small application that retrieves
   information about all tasks running
   (ActivityManager activityManager =
   (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
           ListActivityManager.RunningTaskInfo runningTasks =
   activityManager.getRunningTasks(30); )

   However, if possible, I would like to retrieve task and process
   information at a higher level of granularity (or, if you like, at
   lower level).

   Any help would be greatly appreciated.

   Thanks.

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



[android-developers] process ids

2008-10-23 Thread alexdonnini

Hello,

Would anyone be able to tell me (or point me in the right direction)
how I could retrieve the pids and related process information as
reported, for example, in DDMS in an Android application?

I have been able to put together a small application that retrieves
information about all tasks running
(ActivityManager activityManager =
(ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
ListActivityManager.RunningTaskInfo runningTasks =
activityManager.getRunningTasks(30); )

However, if possible, I would like to retrieve task and process
information at a higher level of granularity (or, if you like, at
lower level).

Any help would be greatly appreciated.

Thanks.

Alex Donnini

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