Re: [android-developers] Re: google io

2012-03-29 Thread Zsolt Vasvari
I would have had to fly 18 hours just to get to San Fran.  A $3000 trip 
minimum, so definitely the freebies weren't the motivation.

On Thursday, March 29, 2012 10:48:48 AM UTC+8, Greg Donald wrote:

 On Wed, Mar 28, 2012 at 8:36 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
  Honestly, I think a lot of people are trying to because of the freebies.
  But even if you resell them on eBay for a profit, it's still not cost
  effective by the time you factor in the airfare, hotel, etc.

 I certainly don't care to fly for 6 hours just to get a free device,
 not my own personal motivation at all.

  So what happens is, people who are actually interested in going because 
 they
  make their livelihood from Android, cannot.

 That's what it looks like from where I sit.  And still no one can
 explain to me how tickets appeared to be sold out to my browser 4
 separate times before the actual sold out banner went up at 7:29.
 That's so obviously rigged.

  It's a seriously f-ed up situation, but it is what it is.  As with a lot 
 of
  things related to Android, the ideas are great, but the execution, how
  should I say it, lacks finesse.

 I see no reason to ever try again.  Making something extremely
 difficult to acquire doesn't make me want it more, quite the opposite
 actually.


 -- 
 Greg Donald



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

2012-03-29 Thread Zsolt Vasvari
Just curious, why do you care which side of the screen is up? 

On Thursday, March 29, 2012 9:57:14 AM UTC+8, Mark Carter wrote:

 I've seen a few other questions similar to this but no answers.

 Rotating from portrait to landscape (either direction) and back again, we 
 get the helpful call to onConfigurationChanged().

 However, when rotating from landscape to landscape (through 180 degrees) 
 onConfigurationChanged() is not called.

 I've seen mention of using OrientationEventListener but this seems flakey 
 to me because you can rotate quickly around without triggering a display 
 orientation change.

 I've tried adding a layout change listener, but with no success.

 So the question is, how to reliably detect such a change in landscape 
 orientation?

 Note: I also posted this on SO: 
 http://stackoverflow.com/questions/9909037/how-to-detect-screen-rotation-through-180-degrees-from-landscape-to-landscape-or


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

Re: [android-developers] Re: google io

2012-03-29 Thread Raghav Sood
Their organization or interaction skills clearly aren't even average. I'd
written a mail to them, asking if an exception to the minimum age of
sixteen could be made, as I would be 15 when the IO event happened. Never
got a reply.

Thanks

Raghav Sood
Sent from my Nexus S

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

2012-03-29 Thread Mark Carter
In my case, I need to for the camera (otherwise the image will appear 
upside down).

Some apps (like Paper Camera) get around this by not allowing the screen to 
rotate, and so the SurfaceView (used by the Camera) is more like a window 
(through the device).

At risk of this post going off on a tangent, the window strategy makes 
sense. In other words, when the user rotates the screen, leave the 
SurfaceView as it is and only reposition/redraw the controls. I imagine 
this is quite hard (because you would be effectively drawing the controls 
upside down), and so not worth the effort.

Other reasons for caring about which side the screen is up, include 
anything that uses the orientation sensor, such as games.

On Thursday, March 29, 2012 2:06:51 PM UTC+8, Zsolt Vasvari wrote:

 Just curious, why do you care which side of the screen is up? 

 On Thursday, March 29, 2012 9:57:14 AM UTC+8, Mark Carter wrote:

 I've seen a few other questions similar to this but no answers.

 Rotating from portrait to landscape (either direction) and back again, we 
 get the helpful call to onConfigurationChanged().

 However, when rotating from landscape to landscape (through 180 degrees) 
 onConfigurationChanged() is not called.

 I've seen mention of using OrientationEventListener but this seems flakey 
 to me because you can rotate quickly around without triggering a display 
 orientation change.

 I've tried adding a layout change listener, but with no success.

 So the question is, how to reliably detect such a change in landscape 
 orientation?

 Note: I also posted this on SO: 
 http://stackoverflow.com/questions/9909037/how-to-detect-screen-rotation-through-180-degrees-from-landscape-to-landscape-or



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

[android-developers] Re: Which on is best?

2012-03-29 Thread Kirupa
Thanks.

On Mar 29, 10:40 am, vamsi Vamsi va...@partialbits.in wrote:
 does your application needs features that are only available only in 4.0 ?







 On Thu, Mar 29, 2012 at 9:39 AM, Kirupa answerofandr...@gmail.com wrote:
  I want to do an project in android. Which platform is best? 2.2.3
  (gingerbread) or 4.0 (Ice Cream Sandwich)???

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

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


[android-developers] Re: Getting Acquired: Selling Apps and Games to a Business/Investor

2012-03-29 Thread Mark Carter
  Does Google currently facilitate the transfer of acquired apps/games 
from one developer account to another? 

Earlier this month I emailed Google to transfer my paid app from my 
personal Google account to my Google Apps for Business account. I was 
expecting it to take days or weeks so thought there would be no harm 
emailing them just before bedtime. Woke up the next morning to find the app 
had been transferred in less than two hours and that it had been 
unpublished (presumably because there was some subtle change required by 
me to some pricing - can't remember exactly). So I lost almost half a 
day's - yeah, I like a good sleep - sales but not a big deal in the grand 
scheme of things.

Also, devs need to be aware of this:

http://stackoverflow.com/questions/7802062/any-problems-regarding-lvl-when-moving-apps-from-one-google-account-to-another
 

On Wednesday, March 28, 2012 9:30:39 PM UTC+8, Rob Jackson wrote:

 I'm working on an article about app developers selling their apps/games to 
 larger companies for Phandroid.com and hoping some developers here may be 
 able to offer some insight. If you have any experience, insight, stories to 
 share, or people to refer, please respond here or shoot me an E-Mail at rob 
 (at) phandroid (.) com

 Some specific questions I have:

- Does Google currently facilitate the transfer of acquired apps/games 
from one developer account to another?
- If so, what are the requirements?
- If not, is this something Google may plan for the future?
- Does Google recommend any best practices for Android Developers so 
that they may one day sell their app with minimal complications? Perhaps 
creating a separate dev account for each account, or signing each app with 
a different key, or any other practices?
- Can a developer change the signing key of an app upon request or 
through any automated means?


 I'm guessing the process is rudimentary and relegated to the huge 
 companies buying big name apps like Draw Something, but curious to hear 
 your thoughts. I'm still hoping Google will implement some simpler 
 Developer features like Github-style organization/team management so 
 multiple developers can administer an application in the Market/Play.

 Thanks for your help!


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

Re: [android-developers] Re: Sending GPS coordinates to a server

2012-03-29 Thread Ankit Kasliwal
ok,
First your create your Tracking Application with the use of Location
Manager (Try to search over Google) many application there. in that
application you found onchage method
there you call your webservice or handler file using CustomHttpClient

On Thu, Mar 29, 2012 at 11:20 AM, I-Sheng Lin ckjboy2...@gmail.com wrote:

 I like this topic...


 On Thu, Mar 29, 2012 at 1:43 PM, Bhuvan Chandra bhuvanchandr...@gmail.com
  wrote:

 Actually i come from a science background and iam not an android
 developer , i was trying to develop an application for the sake of my
 project - Vehicle tracking using a mobile, I would be very thankful to u if
 u could explain to me in simple terms how to do it, I couldnt understand
 what u have mentioned earlier


 On Wed, Mar 28, 2012 at 10:39 PM, Ankit Kasliwal 
 kasliwalankit2...@gmail.com wrote:

 Hello,
 First you create Handler file or Web service which store
 data over server and then
 call that file through your Android application on Location onchange
 function to pass all the values to file.


 On Thu, Mar 29, 2012 at 11:04 AM, Bhuvan Chandra 
 bhuvanchandr...@gmail.com wrote:

 By sending the coordinates to a server I mean once u recieve the
 position coordinates of the location they have to be transmitted to a
 server(By server i mean our college server , The server which is used in
 our college and which iam working on) so that the coordinates can be
 accessed from the server and overlayed on a map from tracking the vehicle.
 Can anybody give me an idea about how to code a program so that i could
 recieve the coordinates of the location and directly transmit them to the
 server i mentioned above

 On Mon, Mar 26, 2012 at 12:41 AM, Ali Chousein 
 ali.chous...@gmail.comwrote:

  recieve the Location coordiantes

 http://stackoverflow.com/questions/1513485/how-do-i-get-the-current-gps-location-programmatically-in-android
 (The guidance provided by CommonsWare is simply excellent)

  send them directly to a server
 This depends what type of interface you have at the server side.
 Without knowing the server side interface, no one can tell you how to
 communicate with it from an Android platform. First you need to
 clarify your server side architecture, a question which is not
 directly related to Android SDK. If the server you should send data is
 already there, contact the responsible people to find out its
 interface. If you should develop the server also, I guess you need to
 research the best practices for server side architectures to decide
 which one fits best your scenario.

 -
 Ali Chousein
 http://socialnav.blogspot.com | http://twitter.com/socialnav1
 http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
 http://www.codeproject.com/KB/android/PayGol-Android.aspx
 http://geo-filtered-assistant.blogspot.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


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




 --

 Thanks and Regards,

 Ankit Kasliwal
 kasliwalankit2...@gmail.com
 +91-9300-940-136

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


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




 --
 I-Sheng Lin(Sam)
 +886-929-052-222
 +86-159-1539-8455
 *Many things difficult to design prove easy to performance.-Samuel
 Johnson
 *

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




-- 

Re: [android-developers] Get an app's api level programmatically

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and 
undocumented) at Android device,  maybe this tool can help you to check if 
undocumented API was available at target Android version.

You can get my tool by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer

exiquio於 2012年3月24日星期六UTC+8上午3時13分47秒寫道:


 Perhaps a better test would be to check for undocumented APIs that are 
 known to have disappeared in a particular Andorid version, but just 
 collecting the data for this type of checking is going to be a large task.


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

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and 
undocumented) at device,  maybe this tool can help you to check if 
undocumented API was available at target Android version. 

You can get it by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer

Nolan Darilek於 2012年3月20日星期二UTC+8上午1時39分18秒寫道:

 I had code that caught some undocumented intents on Android 2.2+, but 
 this code doesn't seem to work on ICS. What I'd like to do is detect 
 when a headset connects/disconnects and perform certain actions. 
 Currently I have the following Scala code:

private def initSCOV11() {
  bluetoothAdapter = BluetoothAdapter.getDefaultAdapter

  val listener = new BluetoothProfile.ServiceListener {

def onServiceConnected(profile:Int, proxy:BluetoothProfile) {
  Log.d(spielcheck, Profile: +profile+, Proxy: +proxy)
  Log.d(spielcheck, proxy.getConnectedDevices.toString)
}

def onServiceDisconnected(profile:Int) {
  Log.d(spielcheck, Profile: +profile)
  if(profile == BluetoothProfile.HEADSET)
bluetoothHeadsetDisconnected()
}

  }

  Log.d(spielcheck, Value: 
 +bluetoothAdapter.getProfileProxy(service, listener, 
 BluetoothProfile.HEADSET))
}

 getProfileProxy returns true, and the onServiceConnected gets called. If 
 there are no headsets connected, the list is empty, but with my SCO 
 earpiece connected, I get its MAC address in the list. This seems odd to 
 me, since if no headsets are connected, I'd not expect this method to 
 get called at all.

 My assumption was that this code would trigger whenever a headset is 
 connected or disconnected from the device, but I've 
 activated/deactivated both SCO and A2DP headsets and the callbacks 
 aren't triggered. I must be misunderstanding what these callbacks do. 
 Instead of being called when individual devices connect/disconnect, they 
 must be called when the profiles are available to be queried or something.

 How do I set up code to run when a headset connects/disconnects?



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Why is the SMS content provider still no included in the SDK?

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and 
undocumented) at device,  maybe this tool can help you to get undocumented 
API for SMS. 

You can get it by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer

Sam Duke於 2012年1月16日星期一UTC+8下午8時59分00秒寫道:

 This has been an undocumented/unsupported feature for many years now. With 
 popular applications such as Handcent presumably making use of it, when are 
 Google going to officially support it!? 


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

[android-developers] Re: Access Point Change detection

2012-03-29 Thread Hera
Thank you for your help, in my case is a Nexus One v2.3.6 (a bit old)
and I have been doing a bit more of testing, this is the logcat when
the access point change:


03-29 08:33:12.890 I/wpa_supplicant(  934): CTRL-EVENT-DISCONNECTED -
Disconnect event - remove keys
03-29 08:33:12.890 V/WifiMonitor(   96): Event [CTRL-EVENT-
DISCONNECTED - Disconnect event - remove keys]
03-29 08:33:12.890 V/WifiStateTracker(   96): New network state is
DISCONNECTED
03-29 08:33:12.900 I/wpa_supplicant(  934): CTRL-EVENT-STATE-CHANGE
id=1 state=0 BSSID=00:00:00:00:00:00
03-29 08:33:12.900 V/WifiMonitor(   96): Event [CTRL-EVENT-STATE-
CHANGE id=1 state=0 BSSID=00:00:00:00:00:00]
03-29 08:33:12.900 V/WifiStateTracker(   96): Changing supplicant
state: COMPLETED == DISCONNECTED
03-29 08:33:12.900 D/ARIADNA (  606): connectionChangeReceiver -
SUPPLICANT_STATE_CHANGED_ACTION
03-29 08:33:12.900 D/ARIADNA (  606): Stop Socket and start
buffering...

The problem is that the last message received by the server is on
08:32:54 after that 10 messages are sended but not received (before
the broadcast received).

¿Is there any way to detect if the message has arrive to the server?
¿Other way to test connectivity or test the server? this is the way I
implement the socket:

sock = new Socket();
sock.bind(null);
InetSocketAddress isa = new
InetSocketAddress(serverIPAddress,serverPort);
sock.connect(isa, conectionTimeOut);
sock.setKeepAlive(true);
isR = new InputStreamReader(sock.getInputStream(), UTF8);
reader = new BufferedReader(isR);
out = new BufferedWriter(new
OutputStreamWriter(sock.getOutputStream(), UTF8));

Thank you so much







On 29 mar, 00:52, Irfan Sheriff isher...@gmail.com wrote:
   It would be good to know if there are devices beyond ICS that still have
  issues around not resetting socket connections when a network goes away.

  Beyond ICS? I don't know what this means.

  My flagship Galaxy Nexus still hasn't received 4.0.3.

  And what do you mean by would be good to know?

  Should we, developers, and our users, moonlight as Android's test
  department?

 I think we dont have a CTS around this behavior. I will look at filing a
 bug internally for this to ensure things remain sane going forward.

 Thanks









  Ideally, apps should not have to listen to any broadcasts to handle
  network switches and should get resets on an existing socket.

  Not ideally -- really -- apps are supposed to work on more than the 1.6%
  of devices with ICS.

  And beyond ICS - what portion of the market is that, at this time,
  exactly?

  -- K

  Irfan

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

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


[android-developers] Re: DevicePolicyManager LockNow problem

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and 
undocumented) at Android device,  maybe this tool can help you to check if 
undocumented API was available at target Android version. 

You can get it by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer 

albnok於 2012年1月20日星期五UTC+8下午4時40分29秒寫道:

 Well it says it's only on API Level 8 so I can't help you there. If 
 you know it works in another app, on Android 2.1 or below, you might 
 try decompiling that app, but I have no experience with that so I 
 can't say whether it is possible to find an undocumented API that 
 works. 

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

[android-developers] Re: Which on is best?

2012-03-29 Thread EhyehAsherEhyeh
ICS is is quite superior in terms of available features (in fact,
anything after 3.0 has a slew of improvements which you sorely miss
when developing for lower versions), however, ICS also has abysmal
adoption, with less than 2% of users, and 2.1-2.3.7 accounting for
~90% of users (2.1 ~7%, 2.2 ~25%, 2.3.3-2.3.7 ~60%, numbers quoted
from memory, you can check for updated numbers, but I believe they
will be close to these). So even though ICS would be a lot nicer to
the developer, if you wish to actually reach any kind of market
segment, you have to account for versions down to at least 2.2.3,
unfortunately.

On Mar 29, 8:26 am, Kirupa answerofandr...@gmail.com wrote:
 Thanks.

 On Mar 29, 10:40 am, vamsi Vamsi va...@partialbits.in wrote:







  does your application needs features that are only available only in 4.0 ?

  On Thu, Mar 29, 2012 at 9:39 AM, Kirupa answerofandr...@gmail.com wrote:
   I want to do an project in android. Which platform is best? 2.2.3
   (gingerbread) or 4.0 (Ice Cream Sandwich)???

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

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


Re: [android-developers] GPS Fix Status

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and 
undocumented) at device,  maybe this tool can help you to check if 
undocumented API was available at target Android version. 

You can get it by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer 

Kristopher Micinski於 2012年1月6日星期五UTC+8上午9時13分33秒寫道:


 http://stackoverflow.com/questions/2021176/how-can-i-check-the-current-status-of-the-gps-receiver

 Maybe it's stupid to point you at that, because you've probably already 
 seen it?

 If nobody has a good answer for this (I suspect somebody does, though
 I don't know) it probably wouldn't too hard to dig through the system
 and see how it's happening (the blinking / solid thing).

 It looks like this isn't a standard intent.  It isn't documented, it
 looks like it's declared as GPS_FIX_CHANGE_ACTION, but using
 undocumented API features is a bad idea.

 Kris

 P.s., off the top of my head, would it be possible to register a
 passive listener, and listen for locations from that?



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

[android-developers] Re: How can I know removed non-public API in Gingerbread

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and 
undocumented) at device,  maybe this tool can help you to check if 
undocumented API was available at target Android version. 

You can get it by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer 

burnbrain於 2011年7月25日星期一UTC+8下午12時25分43秒寫道:

 Dear All developers, 

 Hello, I have some problem to use 
 com.android.server.status.AnimatedImageView on Gingerbread. 
 It works fine until 2.2, but it doesn't run on 2.3. 
 I have found the cause that the AnimatedImageView doesn't exist in 
 2.3. 

 If so, what API can I use to indicate downloading instead of 
 AnimatedImageView? 
 And, How can I know removed non-public API in 2.3, 2.4 or 2.5 and so 
 on (on the future version)? 
 Shouldn't I use non-public API? 

 Please advice~ 
 Thank you.

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

[android-developers] Writing files in UTF-8

2012-03-29 Thread Dirk Vranckaert
In my application users can export their data (or a subset of it) to a CSV 
file (to be used in Excel or any other spreadsheet app).
However some of my users are reporting that if they export some that 
contains non-western characters (like chinese or hebrew writings) the text 
is not correctly in the export.

When I try this myself I indeed see that the text is not correct. Here is 
the code that writes the content to the file (UTF-8 encoded).

Writer out = null;
try {
out = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream(file), UTF-8
));
out.write(result.toString());
} catch (UnsupportedEncodingException e) {
Log.e(LOG_TAG, The encoding is not supported!, e);
} catch (FileNotFoundException e) {
Log.e(LOG_TAG, The file is not found, e);
} catch (IOException e) {
Log.e(LOG_TAG, Exception occurred during export..., e);
} finally {
if (out != null) {
try {
out.close();
} catch (IOException e) {
Log.e(LOG_TAG, Could not close the writer, e);
}
}
}

Is there anything else that I can do to optimize my code to support those 
languages?

Kr,

Dirk Vranckaert

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

2012-03-29 Thread EhyehAsherEhyeh
ScrollView can only hold one view, so put a LinearLayout in there
(orientation horizontal). Put three LinearLayouts in that
LinearLayout, use layout_weight to give them equal spacing (doesn't
matter what you set each weight to as long as they each get equal
weight and as long as those three are the only immediate children of
the wrapping LinearLayout.) The weights indicate how large a portion
of the free space each layout should get, after they've each been
allotted the width they request in layout_width, so set each of them
to width=0dp, which means all the space is free space and the
weights should distribute all available width. Once that's done you
have your three columns, so just set each imageview you add to them to
have width=fill_parent and an appropriate scaling type and you're
done.

On Mar 29, 1:12 am, Farhan Tariq farhan@gmail.com wrote:
 Hi everyone,

 I need to make an application that would show a number of images on the
 screen. The images can vary in height and width. I want to be able to show
 the images in a scrollView, such that there are no empty spaces between
 images. So...

 1 -  its a scrollable view,
 2 - with 3 columns. Each column has a fixed width,
 3 - and each image of different heights and widths adjusts its width
 according to the width of the column.

 The number of images is not known, and they would be added to the
 scrollView at runtime. How do I construct this view? Would scrollview be a
 good choice? Can I have a gridView for the purpose?

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

2012-03-29 Thread Hera


Thank you for your help, in my case is a Nexus One v2.3.6 (a bit
old).

Theoretically the socket should continue working anyway and
application should not stop ant start again the socket?

I have been doing a bit more of testing, this is the logcat when the
access point change:
03-29 08:33:12.890 I/wpa_supplicant(  934): CTRL-EVENT-DISCONNECTED -
Disconnect event - remove keys
03-29 08:33:12.890 V/WifiMonitor(   96): Event [CTRL-EVENT-
DISCONNECTED - Disconnect event - remove keys]
03-29 08:33:12.890 V/WifiStateTracker(   96): New network state is
DISCONNECTED
03-29 08:33:12.900 I/wpa_supplicant(  934): CTRL-EVENT-STATE-CHANGE
id=1 state=0 BSSID=00:00:00:00:00:00
03-29 08:33:12.900 V/WifiMonitor(   96): Event [CTRL-EVENT-STATE-
CHANGE id=1 state=0 BSSID=00:00:00:00:00:00]
03-29 08:33:12.900 V/WifiStateTracker(   96): Changing supplicant
state: COMPLETED == DISCONNECTED
03-29 08:33:12.900 D/ARIADNA (  606): connectionChangeReceiver -
SUPPLICANT_STATE_CHANGED_ACTION
03-29 08:33:12.900 D/ARIADNA (  606): Stop Socket and start
buffering...


The problem is that the last message received by the server is on
08:32:54 after that 10 messages are sended but not received (before
the broadcast received).
¿Is there any way to detect if the message has arrive to the server?
¿Other way to test connectivity or test the server? this is the way I
implement the socket:
sock = new Socket();
sock.bind(null);
InetSocketAddress isa = new
InetSocketAddress(serverIPAddress,serverPort);
sock.connect(isa, conectionTimeOut);
sock.setKeepAlive(true);
isR = new InputStreamReader(sock.getInputStream(),
UTF8);
reader = new BufferedReader(isR);
out = new BufferedWriter(new
OutputStreamWriter(sock.getOutputStream(), UTF8));


Thank you so much






On 29 mar, 00:52, Irfan Sheriff isher...@gmail.com wrote:
   It would be good to know if there are devices beyond ICS that still have
  issues around not resetting socket connections when a network goes away.

  Beyond ICS? I don't know what this means.

  My flagship Galaxy Nexus still hasn't received 4.0.3.

  And what do you mean by would be good to know?

  Should we, developers, and our users, moonlight as Android's test
  department?

 I think we dont have a CTS around this behavior. I will look at filing a
 bug internally for this to ensure things remain sane going forward.

 Thanks









  Ideally, apps should not have to listen to any broadcasts to handle
  network switches and should get resets on an existing socket.

  Not ideally -- really -- apps are supposed to work on more than the 1.6%
  of devices with ICS.

  And beyond ICS - what portion of the market is that, at this time,
  exactly?

  -- K

  Irfan

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

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


Re: [android-developers] Writing files in UTF-8

2012-03-29 Thread Bin Yang
try to flush!

在 2012年3月29日 下午3:25,Dirk Vranckaert dirkvrancka...@gmail.com写道:

 In my application users can export their data (or a subset of it) to a CSV
 file (to be used in Excel or any other spreadsheet app).
 However some of my users are reporting that if they export some that
 contains non-western characters (like chinese or hebrew writings) the text
 is not correctly in the export.

 When I try this myself I indeed see that the text is not correct. Here is
 the code that writes the content to the file (UTF-8 encoded).

 Writer out = null;
  try {
 out = new BufferedWriter(new OutputStreamWriter(
  new FileOutputStream(file), UTF-8
  ));
 out.write(result.toString());
  } catch (UnsupportedEncodingException e) {
  Log.e(LOG_TAG, The encoding is not supported!, e);
 } catch (FileNotFoundException e) {
  Log.e(LOG_TAG, The file is not found, e);
  } catch (IOException e) {
 Log.e(LOG_TAG, Exception occurred during export..., e);
  } finally {
 if (out != null) {
  try {
 out.close();
  } catch (IOException e) {
  Log.e(LOG_TAG, Could not close the writer, e);
 }
  }
 }

 Is there anything else that I can do to optimize my code to support those
 languages?

 Kr,

 Dirk Vranckaert

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

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

[android-developers] Detect SMS sending limitation

2012-03-29 Thread Jawwad Farooq
Hi All,

Is there still a limitation on sending SMS in Android 2.2+ versions?
In Android 2.2, an App can't send more than 100 messages in an hour.

And if this limitation is removed in later versions of Android, is
there any standard way to detect that if the phone can send more than
100 messages or not?


Regards,


Jawwad

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

2012-03-29 Thread Alger Lin
Android is a source opened OS, and Google release API at web-side. However, 
still has many function can't be implemented by public APIs. Many developer 
has to take risk to use undocumented API.

So I release a tool to dumping all classes (includes disclosed and 
undocumented) at Android device, to help developer to find out undocumented 
API, and help them to check if those APIs are existed at target device.

You can get this tool by URL below.
https://play.google.com/store/apps/details?id=com.twrd.yulin.classminer

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

Re: [android-developers] Writing files in UTF-8

2012-03-29 Thread Dirk Vranckaert
When I debug the result.toString() value I see that it's correctly stored 
in the String.
However adding the out.flus(); just after the out.write(...); doesn't 
change anything!

Kr,

Dirk

Op donderdag 29 maart 2012 09:32:33 UTC+2 schreef bin yang het volgende:

 try to flush!

 在 2012年3月29日 下午3:25,Dirk Vranckaert dirkvrancka...@gmail.com写道:

 In my application users can export their data (or a subset of it) to a 
 CSV file (to be used in Excel or any other spreadsheet app).
 However some of my users are reporting that if they export some that 
 contains non-western characters (like chinese or hebrew writings) the text 
 is not correctly in the export.

 When I try this myself I indeed see that the text is not correct. Here is 
 the code that writes the content to the file (UTF-8 encoded).

 Writer out = null;
  try {
 out = new BufferedWriter(new OutputStreamWriter(
  new FileOutputStream(file), UTF-8
  ));
 out.write(result.toString());
  } catch (UnsupportedEncodingException e) {
  Log.e(LOG_TAG, The encoding is not supported!, e);
 } catch (FileNotFoundException e) {
  Log.e(LOG_TAG, The file is not found, e);
  } catch (IOException e) {
 Log.e(LOG_TAG, Exception occurred during export..., e);
  } finally {
 if (out != null) {
  try {
 out.close();
  } catch (IOException e) {
  Log.e(LOG_TAG, Could not close the writer, e);
 }
  }
 }

 Is there anything else that I can do to optimize my code to support those 
 languages?

 Kr,

 Dirk Vranckaert

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




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

[android-developers] datepicker in android

2012-03-29 Thread Kirupa
Can we reduce the size of datapicker in android?

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


[android-developers] Re: Which on is best?

2012-03-29 Thread Kirupa
Thanks sir.

On Mar 29, 12:18 pm, EhyehAsherEhyeh jacobsen.ar...@gmail.com wrote:
 ICS is is quite superior in terms of available features (in fact,
 anything after 3.0 has a slew of improvements which you sorely miss
 when developing for lower versions), however, ICS also has abysmal
 adoption, with less than 2% of users, and 2.1-2.3.7 accounting for
 ~90% of users (2.1 ~7%, 2.2 ~25%, 2.3.3-2.3.7 ~60%, numbers quoted
 from memory, you can check for updated numbers, but I believe they
 will be close to these). So even though ICS would be a lot nicer to
 the developer, if you wish to actually reach any kind of market
 segment, you have to account for versions down to at least 2.2.3,
 unfortunately.

 On Mar 29, 8:26 am, Kirupa answerofandr...@gmail.com wrote:







  Thanks.

  On Mar 29, 10:40 am, vamsi Vamsi va...@partialbits.in wrote:

   does your application needs features that are only available only in 4.0 ?

   On Thu, Mar 29, 2012 at 9:39 AM, Kirupa answerofandr...@gmail.com wrote:
I want to do an project in android. Which platform is best? 2.2.3
(gingerbread) or 4.0 (Ice Cream Sandwich)???

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

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


[android-developers] Dynamic check box

2012-03-29 Thread Rahul Vijay
Hi, Friends
I have a new problem,
how to to generate a dynamic checkbox as well as fiind each checkbox
id(Position of checkbox)
for example- There are 4 checkbox in AVD click any one of Checkbox or one
or more check box . it generate a corresponding checked id(position)
Suppose I am select first Check box, it generate 1
suppose I am select first  third check box it generate 1  3

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

[android-developers] strange blue boxes with ? instead of images in my Android app...

2012-03-29 Thread Stuart B


https://lh5.googleusercontent.com/-B1sU3tiWMZg/T3QbVMPcn3I/AN0/V2_45P9uxKg/s1600/Screenshot_2012-03-27-18-16-30.png
Can you help? I have an app that runs great on iPhone/Pad, but on a few 
Android devices the images show up as question marks in a blue box. Anyone 
know why? Thanks!

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

[android-developers] app sales dropped dramatically in the past few days

2012-03-29 Thread Mat Jones
Has anyone seen a fallen in their app sales through on app billing in
the past few days? The past two days in app billing sales are down
90%

We have around 800 New users a day and the same amount viewing the
extra features page, so don't understand the issue

Regards

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


Re: [android-developers] datepicker in android

2012-03-29 Thread jagruti sangani
2 down vote accepted

No. You cannot reduce the size of a view beyond their minimum size. Using
wrap_content ensures that the DatePicker is just big enough to enclose its
contents.

DatePicker
android:layout_width=wrap_content
android:layout_height=wrap_content
/


On Thu, Mar 29, 2012 at 1:36 PM, Kirupa answerofandr...@gmail.com wrote:

 Can we reduce the size of datapicker in android?

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




-- 
Regards
jagruti Sangani
*iNextrix Technologies*

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

Re: [android-developers] Dynamic check box

2012-03-29 Thread jagruti sangani
refer this link might be get solution...
http://stackoverflow.com/questions/4666870/android-dynamic-checkbox-issue
http://stackoverflow.com/questions/5105463/setonclicklisteners-for-dynamic-created-checkboxes

On Thu, Mar 29, 2012 at 1:50 PM, Rahul Vijay rahul.vija...@gmail.comwrote:

 Hi, Friends
 I have a new problem,
 how to to generate a dynamic checkbox as well as fiind each checkbox
 id(Position of checkbox)
 for example- There are 4 checkbox in AVD click any one of Checkbox or one
 or more check box . it generate a corresponding checked id(position)
 Suppose I am select first Check box, it generate 1
 suppose I am select first  third check box it generate 1  3

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




-- 
Regards
jagruti Sangani
*iNextrix Technologies*

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

2012-03-29 Thread Ajay Sharma

http://stackoverflow.com/questions/9921189/multiple-alarm-fire-at-same-time

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

Re: [android-developers] Re: Different sized images, arrangement and layout problem

2012-03-29 Thread Farhan Tariq
In that case, I would have to add to one of the 3 linear layouts usings
their id, no? I would also need to keep track of which linear layout I
added to first, so that I add the next image to the next one. There would
be a lot of 'if's executing at run time.

Can I have a gridView with different heights of images, fitting together
perfectly?

On Thu, Mar 29, 2012 at 12:28 PM, EhyehAsherEhyeh
jacobsen.ar...@gmail.comwrote:

 ScrollView can only hold one view, so put a LinearLayout in there
 (orientation horizontal). Put three LinearLayouts in that
 LinearLayout, use layout_weight to give them equal spacing (doesn't
 matter what you set each weight to as long as they each get equal
 weight and as long as those three are the only immediate children of
 the wrapping LinearLayout.) The weights indicate how large a portion
 of the free space each layout should get, after they've each been
 allotted the width they request in layout_width, so set each of them
 to width=0dp, which means all the space is free space and the
 weights should distribute all available width. Once that's done you
 have your three columns, so just set each imageview you add to them to
 have width=fill_parent and an appropriate scaling type and you're
 done.

 On Mar 29, 1:12 am, Farhan Tariq farhan@gmail.com wrote:
  Hi everyone,
 
  I need to make an application that would show a number of images on the
  screen. The images can vary in height and width. I want to be able to
 show
  the images in a scrollView, such that there are no empty spaces between
  images. So...
 
  1 -  its a scrollable view,
  2 - with 3 columns. Each column has a fixed width,
  3 - and each image of different heights and widths adjusts its width
  according to the width of the column.
 
  The number of images is not known, and they would be added to the
  scrollView at runtime. How do I construct this view? Would scrollview be
 a
  good choice? Can I have a gridView for the purpose?

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

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

[android-developers] Tab in Android.

2012-03-29 Thread Kirupa
I created three tab in one activity. Now I want to go new activity
when click on tab.

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

2012-03-29 Thread Febi.M.Felix Maliakkal
I have a gridview and i need images from my website to get loaded on to 
this gridview fastly..there should not be any delay..that means, 
downloading action should be in background while the gridview get 
populated..i have implemented a method..but it takes more time...Only after 
downloading the complete pictures, the gridview gets populated...please 
help..

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

[android-developers] Tab in Android.

2012-03-29 Thread Kirupa
I created three tab in one activity. Now I want to go new activity
when click on tab.  is  it possible?
please show source?

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

2012-03-29 Thread Remote Red



     out = new BufferedWriter(new OutputStreamWriter(
 new FileOutputStream(file), UTF-8
     ));

Why are you using FileOutputStream AND OutputStreamWriter AND
BufferedWriter?

     out.write(result.toString());

What is the type of result? How did you put content in it?

You are not checking the returnvalue of your write statement.

 I indeed see that the text is not correct.

Please explain exactly what is wrong with it.

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


Re: [android-developers] Tab in Android.

2012-03-29 Thread jagruti sangani
ya you can do that.just apply onclicklistener and onclick() write the
intent for opening new activity.

On Thu, Mar 29, 2012 at 3:01 PM, Kirupa answerofandr...@gmail.com wrote:

 I created three tab in one activity. Now I want to go new activity
 when click on tab.  is  it possible?
 please show source?

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




-- 
Regards
jagruti Sangani
*iNextrix Technologies*

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

2012-03-29 Thread I-Sheng Lin
Hi Android developers,

I have done that the porting of HID profile onto Android 2.3 as the host.

My Android device(Gingerbread) now is able to connect to the Bluetooth
mouse/kb and it works really nice!

However, my question is that it seems very lack of information about to
make Android device as the client side.

For example, simulate the Android device can work as the KB/mouse and
connect it to the other Android device through Bluetooth.

I know that Cyanogenmod allows us to do it and yes, I have a sample code
and it works perfectly.

Unfortunately, when I install the code onto my generic Android 2.3, the
Bluetooth can be connected but drop right after being connected.

Does anyone know why this happened on Android 2.3?

Any clue will be highly appreciated.



-- 
I-Sheng Lin(Sam)*
*

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

2012-03-29 Thread I-Sheng Lin
Hi Android developers,

I have done that the porting of HID profile onto Android 2.3 as the host.

My Android device(Gingerbread) now is able to connect to the Bluetooth
mouse/kb and it works really nice!

However, my question is that it seems very lack of information about to
make Android device as the client side.

For example, simulate the Android device can work as the KB/mouse and
connect it to the other Android device through Bluetooth.

I know that Cyanogenmod allows us to do it and yes, I have a sample code
and it works perfectly.

Unfortunately, when I install the code onto my generic Android 2.3, the
Bluetooth can be connected but drop right after being connected.

Does anyone know why this happened on Android 2.3?

Any clue will be highly appreciated.

-- 
I-Sheng Lin(Sam)

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

Re: [android-developers] app sales dropped dramatically in the past few days

2012-03-29 Thread Anirudh Loya
Same thing happened to my app !

On Thu, Mar 29, 2012 at 2:10 PM, Mat Jones mashable...@gmail.com wrote:

 Has anyone seen a fallen in their app sales through on app billing in
 the past few days? The past two days in app billing sales are down
 90%

 We have around 800 New users a day and the same amount viewing the
 extra features page, so don't understand the issue

 Regards

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




-- 

Thank you

Anirudh Loya | Android Developer**

Desk: +9140-30681824 | Mobile: +91*9246561265*

*Love your Job but don't Love your company, Because you may not know when
your company stops loving you.--  Voice Of Love*

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

[android-developers] Re: app sales dropped dramatically in the past few days

2012-03-29 Thread Mat Jones
How long has you billing been in place?

Whats the percentage drop?

Have any users reported errors during checkout?

Mine is for 2 months and the past few days are the worst

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


[android-developers] Re: app sales dropped dramatically in the past few days

2012-03-29 Thread Mat Jones
How long as your billing been active for?

Have you had any users email you about payment issues?

Regards

On Mar 29, 11:05 am, Anirudh Loya loya.anir...@gmail.com wrote:
 Same thing happened to my app !









 On Thu, Mar 29, 2012 at 2:10 PM, Mat Jones mashable...@gmail.com wrote:
  Has anyone seen a fallen in their app sales through on app billing in
  the past few days? The past two days in app billing sales are down
  90%

  We have around 800 New users a day and the same amount viewing the
  extra features page, so don't understand the issue

  Regards

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

 --

 Thank you

 Anirudh Loya | Android Developer**

 Desk:+9140-30681824begin_of_the_skype_highlighting+9140-30681824  |
  Mobile: +91*9246561265*

 *Love your Job but don't Love your company, Because you may not know when
 your company stops loving you.--  Voice Of Love*

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

2012-03-29 Thread Matt Green
Hi Lew,

Yeah, my terminology was a bit off.

I've got a class, an instance of which is run at program start:

public class ServerPushActivity extends Activity {
ListView listView1;
LogItemAdapter logItemAdapter;
ArrayListLogRecord logs;

public void updateList(){

}
}

The updateList() function adds some items to the local ArrayList and
uses that to populate a ListView.

Then I have another Class which is triggered by the C2DM call:
public class C2DMMessageReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

}
}

What I need is some way of getting the C2DMMessageReceiver.onRecieve()
function to run the ServerPushActivity.updateList() function against
the instance of ServerPushActivity that is created when the program
starts.

I'm thinking I need to do something with Intents, or I could be coding
the thing completely the wrong way and I need to move my data store
out of a variable local to the main function. It's a problem with
doing a fair amount of coding in the past (C, VB, PHP, etc), but this
is my first Android app, so I'm not used to all the android specific
bits.

Matt

On Mar 27, 7:29 pm, Lew lewbl...@gmail.com wrote:
 Matt Green wrote:

  I've not been doing Android (or Java) programming very long, so I'm
  still getting my head around the android/Java specific features.
  I'm trying to integrate C2DM into a simple app I've made.

  My current app grabs some JSON data and puts it into a ListView, this
  is all handled within a single class. My app then polls the ser ver
  regularly to see if there are any updates to the data.

  I've then had a go at integrating C2DM into my app by adding in
  classes and buttons from the C2DM tutorial at vogella.de (http://
 www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html)

  This works, I can get a message through telling me that there is new
  data, however, I can't see how to integrate it any further.

  What I want to do is have the C2DM class trigger a function in my main
  class that will go collect the new data.

  Any ideas what I should do?

 I am not familiar with C2DM but I can discuss the general Java idioms for
 this.

 The two most common mechanisms are polling and callbacks.

 A poller loops around, perhaps after a delay each cycle, usually in a
 background thread, checking for a desired state. After detecting that
 state, or after a timeout, the poller returns.

 A callback implements an interface that the service knows about. The
 service calls the known method on the callback object.

 By the way, unless you are using 'static' methods, and not really even
 then, a class doesn't call another class. An instance calls methods on an
 instance.

  public interface FooListener
  {
    void doSomething( Gromitz gromitz );
  }

  public class FooClient implements FooListener, Runnable
  {
    private final transient Logger logger = getLogger(getClass());

    private final FooService service = obtainFooService();

    private Framxeg framxeg;

    @Override public void doSomething( Gromitz gromitz )
    {
       framxeg = gromitz.getFramxeg();
    }

    public void init()
    {
       service.setListener(this);
    }

    @Override public void run()
    {
      if (service.getListener() != this)
      {
        IllegalStateException exc = new
 IllegalStateException(uninitialized);
        logger.error(exc);
        throw exc;
       }
       service.doYourThing();
    }

    public Framxeg getFramxeg()
    {
      return framxeg;
    }
  }

 --
 Lew

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

2012-03-29 Thread Matt Green
Hi Lew,

Yeah, my terminology was a bit off.

I've got a class, an instance of which is run at program start:

public class ServerPushActivity extends Activity {
ListView listView1;
LogItemAdapter logItemAdapter;
ArrayListLogRecord logs;
public void updateList(){

}
}

The updateList() function adds some items to the local ArrayList and
uses that to populate a ListView.
Then I have another Class which is triggered by the C2DM call:

public class C2DMMessageReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {

}
}


What I need is some way of getting the C2DMMessageReceiver.onRecieve()
function to run the ServerPushActivity.updateList() function against
the instance of ServerPushActivity that is created when the program
starts.

I'm thinking I need to do something with Intents, or I could be coding
the thing completely the wrong way and I need to move my data store
out of a variable local to the main function. It's a problem with
doing a fair amount of coding in the past (C, VB, PHP, etc), but this
is my first Android app, so I'm not used to all the android specific
bits.

Matt

On Mar 27, 7:29 pm, Lew lewbl...@gmail.com wrote:
 Matt Green wrote:

  I've not been doing Android (or Java) programming very long, so I'm
  still getting my head around the android/Java specific features.
  I'm trying to integrate C2DM into a simple app I've made.

  My current app grabs some JSON data and puts it into a ListView, this
  is all handled within a single class. My app then polls the ser ver
  regularly to see if there are any updates to the data.

  I've then had a go at integrating C2DM into my app by adding in
  classes and buttons from the C2DM tutorial at vogella.de (http://
 www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html)

  This works, I can get a message through telling me that there is new
  data, however, I can't see how to integrate it any further.

  What I want to do is have the C2DM class trigger a function in my main
  class that will go collect the new data.

  Any ideas what I should do?

 I am not familiar with C2DM but I can discuss the general Java idioms for
 this.

 The two most common mechanisms are polling and callbacks.

 A poller loops around, perhaps after a delay each cycle, usually in a
 background thread, checking for a desired state. After detecting that
 state, or after a timeout, the poller returns.

 A callback implements an interface that the service knows about. The
 service calls the known method on the callback object.

 By the way, unless you are using 'static' methods, and not really even
 then, a class doesn't call another class. An instance calls methods on an
 instance.

  public interface FooListener
  {
    void doSomething( Gromitz gromitz );
  }

  public class FooClient implements FooListener, Runnable
  {
    private final transient Logger logger = getLogger(getClass());

    private final FooService service = obtainFooService();

    private Framxeg framxeg;

    @Override public void doSomething( Gromitz gromitz )
    {
       framxeg = gromitz.getFramxeg();
    }

    public void init()
    {
       service.setListener(this);
    }

    @Override public void run()
    {
      if (service.getListener() != this)
      {
        IllegalStateException exc = new
 IllegalStateException(uninitialized);
        logger.error(exc);
        throw exc;
       }
       service.doYourThing();
    }

    public Framxeg getFramxeg()
    {
      return framxeg;
    }
  }

 --
 Lew

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

2012-03-29 Thread EhyehAsherEhyeh
I don't believe so, but I am not absolutely certain it's impossible.
As for keeping track of which layout to add to in my example, I'd just
use an array of LinearLayouts, which you find on Activity creation,
then keep an int to increment each time you add an image and use that
modulus 3 (or however many columns you want) to index the array:

linearLayoutArray[index%3].addView(...);
index++;

On Mar 29, 11:30 am, Farhan Tariq farhan@gmail.com wrote:
 In that case, I would have to add to one of the 3 linear layouts usings
 their id, no? I would also need to keep track of which linear layout I
 added to first, so that I add the next image to the next one. There would
 be a lot of 'if's executing at run time.

 Can I have a gridView with different heights of images, fitting together
 perfectly?

 On Thu, Mar 29, 2012 at 12:28 PM, EhyehAsherEhyeh
 jacobsen.ar...@gmail.comwrote:







  ScrollView can only hold one view, so put a LinearLayout in there
  (orientation horizontal). Put three LinearLayouts in that
  LinearLayout, use layout_weight to give them equal spacing (doesn't
  matter what you set each weight to as long as they each get equal
  weight and as long as those three are the only immediate children of
  the wrapping LinearLayout.) The weights indicate how large a portion
  of the free space each layout should get, after they've each been
  allotted the width they request in layout_width, so set each of them
  to width=0dp, which means all the space is free space and the
  weights should distribute all available width. Once that's done you
  have your three columns, so just set each imageview you add to them to
  have width=fill_parent and an appropriate scaling type and you're
  done.

  On Mar 29, 1:12 am, Farhan Tariq farhan@gmail.com wrote:
   Hi everyone,

   I need to make an application that would show a number of images on the
   screen. The images can vary in height and width. I want to be able to
  show
   the images in a scrollView, such that there are no empty spaces between
   images. So...

   1 -  its a scrollable view,
   2 - with 3 columns. Each column has a fixed width,
   3 - and each image of different heights and widths adjusts its width
   according to the width of the column.

   The number of images is not known, and they would be added to the
   scrollView at runtime. How do I construct this view? Would scrollview be
  a
   good choice? Can I have a gridView for the purpose?

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

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


[android-developers] Re: Writing files in UTF-8

2012-03-29 Thread Dirk Vranckaert


 Why are you using FileOutputStream AND OutputStreamWriter AND 
 BufferedWriter?  

 

I need the OutputStreamWriter to specify the encoding, however that doesn't 
seem to work...

What is the type of result? How did you put content in it? 

The result is a CSV file, I just loop over some DB records and build a 
string, then I write the string to the writer... 

 You are not checking the returnvalue of your write statement.  

the Writer.write(..) method does not return anything... it's void...!

 Please explain exactly what is wrong with it.

I thought I did, but anyway, I'll do it again:
Very simplistic explained: so in the application text (that the user 
enters) is stored in a DB, I read the contents of the DB and construct a 
string. Then I write the string in the writer (to the file)!
So when I do so for Dutch, German, English, Frensh,... (all western 
languages) it works. However users started reporting that when inputting 
Chinese or Hebrew characters the application works just fine but for the 
export the content of the CSV file is unreadable. You can open the CSV file 
in a text-editor or a spreadsheet editor but the characters that should be 
Chinese or Hebrew are just unreadable characters.

So instead of seeing something like this:
這是一個測試
I see something like this:
â €å”€å”€å”€à €à €à €ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€Ì€Ì€Ì€Ì€Ì€Ì€

So it's a matter of encoding that is not correct. But I am encoding in 
UTF-8 so I don't see the issue...

Kr,

Dirk



Op donderdag 29 maart 2012 11:35:37 UTC+2 schreef Remote Red het volgende:




  out = new BufferedWriter(new OutputStreamWriter( 
  new FileOutputStream(file), UTF-8 
  )); 

 Why are you using FileOutputStream AND OutputStreamWriter AND 
 BufferedWriter? 

  out.write(result.toString()); 

 What is the type of result? How did you put content in it? 

 You are not checking the returnvalue of your write statement. 

  I indeed see that the text is not correct. 

 Please explain exactly what is wrong with it.

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

[android-developers] Re: GPS Fix Status

2012-03-29 Thread lbendlin
It may not be a good solution but it may be a viable solution.

On Thursday, January 5, 2012 10:17:17 PM UTC-5, gotok wrote:

  The solution to this issue that was proposed by a poster in that thread 
 was to issue another requestLocationUpdates, which doesn't seem like a 
 good solution to me. 

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

Re: [android-developers] How to get the TextView values in ListView

2012-03-29 Thread Mahabaleshwara Adiga
Hi,

If you want to access textview values from ListView, then you should use
this code:

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

TextView tv=(TextView) arg1.findViewById(R.id.videoId);
String value=tv.getText().toString();

}



Thanks  Regards,
 M.Adiga,
 eesha...@gmail.com




On Wed, Mar 28, 2012 at 10:20 PM, Justin Anderson magouyaw...@gmail.comwrote:

 String[] data;

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

   String temp=  data[position];
  TextView tv = (TextView)findViewById(R.id.

 videoId);
tv.setText(temp);

  }

 This is not correct... He is not wanting to SET the text of the text
 view.  He is wanting to GET the text from the text view.  Also, you can't
 do findViewById in here because every list view row has the same id.  You
 are going to get the first one every time doing this.

 i want to extract the textview values of that corresponding row.

 No you don't... The textviews in a list view are intended for display
 purposes only.  They are intended to be a user display of the back-end data
 that you have, meaning your adapter

 How to get these values..???

 What you need to do is access the DATA in your adapter at the given
 position... So there are a couple ways to get this data...

 If you have a refrence to your adapter, you could do something like this:
 String value = (String)_adapter.getItem(position);
 Or, if you have direct access to your data structure, say, an array of
 strings, you could do something like this: String value =
 stringVals[position];

 Hope that helps...

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Tue, Mar 27, 2012 at 10:07 PM, BNReddy narayanareddy...@gmail.comwrote:

 String[] data;

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

   String temp=  data[position];
  TextView tv = (TextView)findViewById(R.id.videoId);
tv.setText(temp);

  }




 --
 Regards,
 Narayanareddy.B
 9032478372

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


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

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

[android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Jim Graham

While working on my current app, I find myself needing to populate
a spinner (and a MultiSpinner, but that one's easy---feed it the
list directly) from data that's stored in various types of Lists
(ListString, ListInteger, ListCamera.Size, and probably
Listint[]).

So far, I've read all kinds of stuff about the ArrayList type, and
when I search for Listx I get ArrayListx[] instead.  I THOUGHT
I had the solution, using

   String[] foo = bar.toArray();

Eclipse threw an error, and required me to cast that to String[] as:

   String[] foo = (String[]) bar.toArray();

And this caused a force close, where the error stated that you can't
cast toArray() to String[].

I've gone through multiple searches through this list, Stack Overflow,
XDA, google, books and e-books on both Android and Java in general, and
have yet to find anything that works.  If I can just successfully (i.e.,
without a force close) get that Listx to x[] (where 'x' is String,
Integer, etc.), I could then feed that to the ArrayAdapter and feed
the Spinner.

Could someone help me out with that, please?  I'm sure that toArray()
is part of the answer, but I haven't found a working example, and my
(mis) understanding of it was clearly wrong.

Thanks,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

Seen in alt.sysadmin.recovery:  Priceless; that's better than telling
him to use the Read Manual command with the Real Fast option.

Android Apps Listing at http://www.jstrack.org/barcodes.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


Re: [android-developers] Re: Access Point Change detection

2012-03-29 Thread Kostya Vasilyev
Yes -- have the server confirm each message (or a batch of messages) to 
the client.


The client would only removes from its queue those messages that have 
been confirmed.


Now you won't have dropped messages, but you may have some messages 
being sent twice - if the network disconnects at the wrong time and the 
client doesn't receive the confirmation for a message that was accepted 
by the server.


To avoid this last issue, assign each message a unique id and have the 
server ignore, but confirm, duplicates.


Not much to do with Android, of course - and I suspect Googling should 
give you a bunch of better ideas than the above :)


-- K

29.03.2012 11:15, Hera написал:

¿Is there any way to detect if the message has arrive to the server?
¿Other way to test connectivity or test the server?


--
Kostya Vasilyev

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

2012-03-29 Thread Remote Red


On 29 mrt, 13:03, Dirk Vranckaert dirkvrancka...@gmail.com wrote:
  Why are you using FileOutputStream AND OutputStreamWriter AND
  BufferedWriter?

 I need the OutputStreamWriter to specify the encoding,

Ok. But then why also a BufferedWriter?

 The result is a CSV file,

Sorry but you did not understand my question. You wrote
result.toString()
so of what type is result in result.toString()?

 So when I do so for Dutch, German, English, Frensh,... (all western
 languages) it works.

Do characters like ö, é come through ok?

 ... You can open the CSV file
 in a text-editor


Are you shure you use an utf-8 capable editor?

 So instead of seeing something like this:
 這是一個測試
 I see something like this:
 â €å”€å”€å”€à €à €à €ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€Ì€Ì€Ì€Ì€Ì€Ì€

That looks like what an editor that cannot handle utf-8 would display.

All this encoding is very interesting and I would like to help you.

Suggesting:
-make a small utf-8 file with those Chinese characters.
-put that file somewhere on the internet so we can download it.
-make an activity that just reads the file in a string and writes
 the contents of that string to another file.
-compare the two files.

If you publish your activity code here (keep it as small as possible)
I will experiment with it.


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


Re: [android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Kostya Vasilyev
The issue is that you're trying to cast *the array* whereas you intent 
was probably to cast *each element of the array*.


You could try this:

for (Camera.Size size : cameraSizeList) {
stringArray.add(size.toString());
}

... etc

Or you could combine the arrays into one Object[] array. The adapter 
would then call toString on each Object inside the array.


https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/ArrayAdapter.java#L389

But if you do that, you won't be able to refer to objects in the array 
and know their types (which may be useful), unless you used instanceof.


To keep type information, you could implement wrappers for your objects 
that have a common base class (or interface), overriding toString() for 
binding, and implementing other methods that would do stuff specific to 
your application logic.


-- K

29.03.2012 15:21, Jim Graham написал:

While working on my current app, I find myself needing to populate
a spinner (and a MultiSpinner, but that one's easy---feed it the
list directly) from data that's stored in various types of Lists
(ListString, ListInteger, ListCamera.Size, and probably
Listint[]).

So far, I've read all kinds of stuff about the ArrayList type, and
when I search for Listx  I get ArrayListx[]  instead.  I THOUGHT
I had the solution, using

String[] foo = bar.toArray();

Eclipse threw an error, and required me to cast that to String[] as:

String[] foo = (String[]) bar.toArray();

And this caused a force close, where the error stated that you can't
cast toArray() to String[].

I've gone through multiple searches through this list, Stack Overflow,
XDA, google, books and e-books on both Android and Java in general, and
have yet to find anything that works.  If I can just successfully (i.e.,
without a force close) get that Listx  to x[] (where 'x' is String,
Integer, etc.), I could then feed that to the ArrayAdapter and feed
the Spinner.

Could someone help me out with that, please?  I'm sure that toArray()
is part of the answer, but I haven't found a working example, and my
(mis) understanding of it was clearly wrong.

Thanks,
--jim



--
Kostya Vasilyev

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

2012-03-29 Thread arun kumar
am having a button in the activity (button) ...if i click the button then
it fetches data from the server .if data is sucess then i has to show toast
as sucess...after if i click button while fetching data from the server if
net or wifi disconnect then it has to show (wifi or net disconnect
toast)...it sis working fine..


After disconnecting and connecting the wifi or net (not changing the
Activity just in the mobile making wifi disable and enable) ...now here
the wifi is enabled but iam getting the toast as wifi or net disconnected
..instead of the Sucess Message.




here am attaching the code am getting data (emailResponse=sb.tostring)...

int bytes_read = 0;

StringBuilder sb = new StringBuilder();

while ((bytes_read = is.read(buffer, 0, buffer.length))  0) {
sb.append(new String(buffer, 0, bytes_read));
}

 emailResponse=sb.toString();


Log.i(response:, R: + sb.toString());


}
 catch (ConnectException e) {
 error=105;
 }
 catch (SocketException e) {
// TODO: handle exception
}
 catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
} catch (IOException e) {

error = 101;

// TODO Auto-generated catch block
// e.printStackTrace();
}

catch (NullPointerException e) {
// TODO: handle exception
}

catch (Exception e) {

error = 100;

Log.e(getClass().getSimpleName(), e.toString());
}


 return null;
}

@Override
protected void onPostExecute(String Result) {
// TODO Auto-generated method stub
super.onPostExecute(Result);
 if (emailResponse!=null) {
ACTIVITY_INSTANCE.dismissDialog(PROGRESS_DIALOG);

Toast.makeText(getApplicationContext(),Sucess ,Toast.LENGTH_SHORT).show();
}
  else if (error == 105) {
Toast.makeText(getApplicationContext(),Wifi or net disconnect
,Toast.LENGTH_SHORT).show();


}

}

}

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

[android-developers] How to get the APN name in java/NDK layer

2012-03-29 Thread Vikas KM
Hi,

How can i get the APN name in java layer?

OK ‘AT+CGDCONT=1,”IP”,”internet”’  --internet 為中華電信 APN name

To use here...


--
Regards

Vikas KM
http://arowboat.org

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

2012-03-29 Thread Remote Red
Just a thougth: does the produced file have a BOM (Byte Order Mark)
as the first bytes?

If not you have to write them yourself.

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

2012-03-29 Thread shihab shiha
Hi All,

 I want to pass the edittext value in a dialogue box to listview when i
click the save button of the dialogue box.

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

2012-03-29 Thread Dirk Vranckaert


 Ok. But then why also a BufferedWriter?  

 
The BufferedWriter is indeed obsolete but leaving it out doesn't change 
anything...

so of what type is result in result.toString()?  


Result is of type StringBuilder.

Do characters like ö, é come through ok?  


These do indeed come through correctly! 

Are you shure you use an utf-8 capable editor?  


Yes I'm sure :) I'm using Notepadd++ ;)

I attached the file as it is exported!

the produced file does not have a BOM (or at least I don't know :) )
How can I write 'them' myself?

Kr,

Dirk

Op donderdag 29 maart 2012 13:50:28 UTC+2 schreef Remote Red het volgende:

 Just a thougth: does the produced file have a BOM (Byte Order Mark) 
 as the first bytes? 

 If not you have to write them yourself. 


Op donderdag 29 maart 2012 13:50:28 UTC+2 schreef Remote Red het volgende:

 Just a thougth: does the produced file have a BOM (Byte Order Mark) 
 as the first bytes? 

 If not you have to write them yourself. 


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

2012-03-29 Thread Dirk Vranckaert
Oups, forgot the file ;)

But update:
I was wrong, ö ë é
are not working either!

File is now attached! :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=enStartdate;Starttime;Enddate;Endtime;Comment;Project;Task;Project-comment;
3/29/12;11:55 AM;Until now...;;QaE???;Your Project;Your Task!;;
3/29/12;07:03 AM;3/29/12;11:54 AM;;Your Project;Your Task!;;


[android-developers] Re: Writing files in UTF-8

2012-03-29 Thread Dirk Vranckaert
Allright it works now!
Thank you for poiting out to me the Byte Order Mark.

I've added out.write('\ufeff'); to write the Byte Order Mark and you can 
see in the attachment the export now works fine! :)

This is my code now:

out = new OutputStreamWriter(
new FileOutputStream(file), UTF-8
);
out.write('\ufeff');
out.write(result.toString());
out.flush();

Op donderdag 29 maart 2012 14:11:01 UTC+2 schreef Dirk Vranckaert het 
volgende:

 Oups, forgot the file ;)

 But update:
 I was wrong, ö ë é
 are not working either!

 File is now attached! :)


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en?Startdate;Starttime;Enddate;Endtime;Comment;Project;Task;Project-comment;
3/29/12;11:55 AM;Until now...;;QaE???;Your Project;Your Task!;;
3/29/12;07:03 AM;3/29/12;11:54 AM;;Your Project;Your Task!;;


[android-developers] Re: Looking for Jersey/Restlet/REST recommendations

2012-03-29 Thread gc
I've implemented REST using Jersey on several projects and it's very 
lightweight and easy to use.

On Wednesday, March 28, 2012 3:44:44 PM UTC-5, Mark Phillips wrote:

 I forgot to include a subject line.

 On Wed, Mar 28, 2012 at 11:38 AM, Mark Phillips 
 m...@phillipsmarketing.biz wrote:

 My android app needs to talk to a MySQL database on a server. I have been 
 googling for solutions and found recommendations for Jersey and Restlet. I 
 have looked at these two frameworks, but from reading I cannot tell which 
 is better. I am new to REST, but have experience in Java, servlets, and 
 jsp. So I was wondering if anyone on this list has experience with one or 
 both, and any recommendations you may have. I am looking for a simple way 
 to CRUD data in my database (~ 15-20 tables). Any hands-on feedback is 
 appreciated!

 Thanks!

 Mark

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



On Wednesday, March 28, 2012 3:44:44 PM UTC-5, Mark Phillips wrote:

 I forgot to include a subject line.

 On Wed, Mar 28, 2012 at 11:38 AM, Mark Phillips 
 m...@phillipsmarketing.biz wrote:

 My android app needs to talk to a MySQL database on a server. I have been 
 googling for solutions and found recommendations for Jersey and Restlet. I 
 have looked at these two frameworks, but from reading I cannot tell which 
 is better. I am new to REST, but have experience in Java, servlets, and 
 jsp. So I was wondering if anyone on this list has experience with one or 
 both, and any recommendations you may have. I am looking for a simple way 
 to CRUD data in my database (~ 15-20 tables). Any hands-on feedback is 
 appreciated!

 Thanks!

 Mark

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




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

[android-developers] How to serialize a Class that includes a Bitmap?

2012-03-29 Thread saex
Hi

I have a simple class that implements Serializable, because i'm 
serializating the class storing it on the sdcard into a file.

The class haves a Bitmap inside, and the bitmap is not bening 
Serialized because when i recover the class from the sdcard binary file 
the bitmap is NULL

How can solve this? i can't find info on google.

Thanks

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

[android-developers] Re: Writing files in UTF-8

2012-03-29 Thread Remote Red
 I've added out.write('\ufeff'); to write the Byte Order Mark

That is not the bom for utf-8. You wrote the bom for UTF-16.

http://en.wikipedia.org/wiki/Byte_order_mark

The bom for utf-8 is 0xEF, 0xBB, 0xBF.

 ... and you can
 see in the attachment the export now works fine! :)

Those attachment have no bom and do not contain characters like
€å”€å”€å”€à €à €à €ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€Ì€Ì€Ì€Ì€Ì€Ì€
but a lot of questionmarks line.
?

You are not done before it works with the right bom.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] my apk file download in internet explorer as zip file

2012-03-29 Thread Aryan
when download My apk file from internet
explorer is being by default saved as .zip file. the hyper link
mentions .apk, but only when the save as dialog comes, it prompts to
be saved as .zip. if i rename it to .apk, it works just fine. How will
I prevent this file from being saved as zip file ?

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


Re: [android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Jim Graham
On Thu, Mar 29, 2012 at 03:37:19PM +0400, Kostya Vasilyev wrote:
 The issue is that you're trying to cast *the array* whereas you
 intent was probably to cast *each element of the array*.

I was just trying to directly convert the List (in this case,
ListString) to an array of strings (String[]).  I hadn't gotten
as far as the other settings types yet---just preparing for them
when I get to them.

The idea here is to use one spinner for all of the settings types.
That one spinner will be reloaded depending on the type of settings
the user is working with (selected from a ListView).  Having spinners
for ALL of the settings works fine on my tablet, but would have to be
so tiny on a phone it'd be impossible to use.  So, the user selects
one settings mode, the spinner is reloaded, and the user makes their
choice.  Then, ohItemClicked responds accordingly for the settings
type currently in effect.

A MultiSpinner (spinner with checkboxes instead of radiobuttons) will
handle options where more than one can apply.  But that one's easy---you
just load it directly from a List.

 You could try this:
 
 for (Camera.Size size : cameraSizeList) {
 stringArray.add(size.toString());
 }
 
 ... etc

I was hoping for a direct conversio for each List to each respective
array, but I'm starting to think that might not be ideal, after all.

 Or you could combine the arrays into one Object[] array. The adapter
 would then call toString on each Object inside the array.

Again, multiple arrays, not one.

 But if you do that, you won't be able to refer to objects in the
 array and know their types (which may be useful), unless you used
 instanceof.

I've already got that covered.  :-)   A simple switch() in onItemClicked
will determine which type of settings are in effect, and respond
accordingly.

 To keep type information, you could implement wrappers for your
 objects that have a common base class (or interface), overriding
 toString() for binding, and implementing other methods that would do
 stuff specific to your application logic.

I'm afraid that's far above my level at this point (let's put it this
way, I was debating on whether to post this in this list or the
android-for-beginners list).  I'm still not sure whether that list
would have been more appropriate (in other words, did I ask yet another
beginner-level question here, or was it more at an intermediate level?).

Either way, I can use the example you showed above, and I think that'll
work for me.

Thanks,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)| DMR: So fsck was originally called
spooky1...@gmail.com|  something else.
 Running FreeBSD 7.0  | Q:   What was it called?
ICBM / Hurricane:   | DMR: Well, the second letter was different.
   30.44406N 86.59909W  |-- Dennis M. Ritchie, Usenix, June 1998.

Android Apps Listing at http://www.jstrack.org/barcodes.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] Wifi and phone sleep state

2012-03-29 Thread Put_tiMe
I have a situation where in I use AlarmManager to wake up once in a few 
minutes, and switch on/off wifi.
If I don't use the device for a while, then the wifi never connects to the 
preferred wifi network.
Is there anything happening with the wifi if the phone is in a sleep state?
 
And how exactly does the phone reach the sleep state?
 
In a sleep state, will the phone not connect to wifi?
 
 

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

Re: [android-developers] Wifi and phone sleep state

2012-03-29 Thread Mark Murphy
On Thu, Mar 29, 2012 at 9:02 AM, Put_tiMe putt...@gmail.com wrote:
 I have a situation where in I use AlarmManager to wake up once in a few
 minutes, and switch on/off wifi.
 If I don't use the device for a while, then the wifi never connects to the
 preferred wifi network.
 Is there anything happening with the wifi if the phone is in a sleep state?

The WiFi radio will power down. Use a WifiLock if you need WiFi. Bear
in mind that this increases power drain.

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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] my apk file download in internet explorer as zip file

2012-03-29 Thread Mark Murphy
Change the MIME type that your Web server uses for the file.

On Thu, Mar 29, 2012 at 8:45 AM, Aryan aryantiwari...@gmail.com wrote:
 when download My apk file from internet
 explorer is being by default saved as .zip file. the hyper link
 mentions .apk, but only when the save as dialog comes, it prompts to
 be saved as .zip. if i rename it to .apk, it works just fine. How will
 I prevent this file from being saved as zip file ?

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



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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] Detect SMS sending limitation

2012-03-29 Thread Mark Murphy
On Thu, Mar 29, 2012 at 3:33 AM, Jawwad Farooq jawwad.far...@gmail.com wrote:
 Is there still a limitation on sending SMS in Android 2.2+ versions?
 In Android 2.2, an App can't send more than 100 messages in an hour.

AFAIK, yes.

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

Android Training in NYC: http://marakana.com/training/android/

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

2012-03-29 Thread Dirk Vranckaert
Ooh yeah, I will have a look tomorrow for the UTF-8.

But the question marks in the in the file i attached are because google 
groups did not get it right the document... Locally it works and I can send 
it through mail without issues.

Kr,

Dirk

Op donderdag 29 maart 2012 14:43:33 UTC+2 schreef Remote Red het volgende:

  I've added out.write('\ufeff'); to write the Byte Order Mark 

 That is not the bom for utf-8. You wrote the bom for UTF-16. 

 http://en.wikipedia.org/wiki/Byte_order_mark 

 The bom for utf-8 is 0xEF, 0xBB, 0xBF. 

  ... and you can 
  see in the attachment the export now works fine! :) 

 Those attachment have no bom and do not contain characters like 
 €å”€å”€å”€à €à €à €ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€ç¼€Ì€Ì€Ì€Ì€Ì€Ì€ 
 but a lot of questionmarks line. 
 ? 

 You are not done before it works with the right bom. 


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

2012-03-29 Thread bob
I attempted to do some Flash on an Android device like so:

String html = html\nhead\nstyle\n +
body {margin: 0px;}\n/style\n +
/head\nbody\n +
object width=+width+ height=+height+
 data='file:///mnt/sdcard/test.swf'\n +
param name=scale value=exactfit\n/object\n/body\n/html;

wv.loadDataWithBaseURL(file:///mnt/sdcard/, html, text/html,
UTF-8, about:blank);


It didn't work, and this is what the failure looked like:

http://s17.postimage.org/hamd9b0sf/flash_fail.png

The device definitely has Flash Player installed, so I don't know what went 
wrong.  Any ideas?

Thanks.

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

[android-developers] Re: release keys do not work

2012-03-29 Thread i b
When I recently switched to a new computer and created a new keystore
and various alias keystores, my release keys no longer work. The debug
key is OK (for debugging only)

For example, I gave their site this MD5 fingerprint:
C0:28:EE:1F:D7:59:C3:5F:4B:5F:4F:F4:40:8F:6B:78

and was given this:
 android:apiKey=0VhiLw2B2QaMVlZjc1cqpMVo5SK0z4Ctm3f5oAQ

which does not work

I have published numerous apps before and am fairly sure that I am now
signing them correctly for Export

I had the same problem a year or two ago. I believe that Google is not
registering my key

Last time, I wrote them about it, and a few days later the release key
began to work, odd as that sounds

This must be a rare problem, and perhaps due to my account
registration being confused 3 years ago (?)

Any suggestions, as I cannot update or publish new apps till I figure this out?


- Ian

On 12/2/10, i b fundyandr...@gmail.com wrote:
 I've had a problem for the last week that the release keys I derive
 using keytool or the Export .apk do not function. The map pages show
 up blank. When I reinsert my debug key instead, everything works
 fine.

 For example I have a MD5 fingerprint

 Keystore type: JKS
 Keystore provider: SUN
 Your keystore contains 3 entries
 alias77, Dec 1, 2010, PrivateKeyEntry,
 Certificate fingerprint (MD5):
 AC:F5:3B:F5:E4:01:CA:B0:A5:D0:67:91:16:CE:05:3C
 alias7, Nov 30, 2010, PrivateKeyEntry,
 Certificate fingerprint (MD5): 98:E4:24:BB:
 03:84:A9:76:67:B3:0D:B7:16:89:AB:85
 alias00, Dec 2, 2010, PrivateKeyEntry,
 Certificate fingerprint (MD5): C7:19:8F:5E:A5:59:E7:5A:DC:B0:ED:EA:BF:
 57:5F:EB

 Using the last of the above, alias00 above as input, Google offered
 this release key:
 0VhiLw2B2QaNSmcZKtY-R5Qf40AL9adtEmlpbnw

 Everything seems normal but this key does not work. Just inserting it
 where my debug key was before, causes the maps to come up blank.

 I don't understand how this could happen.

 Because of this key problem, I have had to unpublish my five apps as
 arecent download customer complained that the maps failed to work for
 them either.

 Now it seems to me that because I never had an uninstall or complaint
 from any other customer before, that all my apps must have been
 working OK till just a few days ago.

 I made no code changes yet my published apps ceased to work. I believe
 this unusual problem is not my fault but rather due to a flaw in the
 way the release key is generated or recognized by Google.

 This is a major problem for me and I need some assistance ASAP.

 - Ian in Nova Scotia




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


Re: [android-developers] Flash issue

2012-03-29 Thread Mark Murphy
If the same HTML works with an http:// URL, then perhaps the Flash
Player plugin cannot handle local files.

On Thu, Mar 29, 2012 at 10:28 AM, bob b...@coolfone.comze.com wrote:
 I attempted to do some Flash on an Android device like so:

 String html = html\nhead\nstyle\n +
     body {margin: 0px;}\n/style\n +
     /head\nbody\n +
     object width=+width+ height=+height+
      data='file:///mnt/sdcard/test.swf'\n +
     param name=scale value=exactfit\n/object\n/body\n/html;

 wv.loadDataWithBaseURL(file:///mnt/sdcard/, html, text/html,
                 UTF-8, about:blank);


 It didn't work, and this is what the failure looked like:

 http://s17.postimage.org/hamd9b0sf/flash_fail.png

 The device definitely has Flash Player installed, so I don't know what went
 wrong.  Any ideas?

 Thanks.

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



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

Android Training in NYC: http://marakana.com/training/android/

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

2012-03-29 Thread androidmediadeveloper
Let me clarify the code, the post from last night was in sheer
exhaustion after having looked at it for hours on end.



Now, I have the mediascanner invoked from inside a thread to pick up
the new metadata and art that has been written to the file


Thread thread = new Thread()
{
@Override
public void run() {
ListString
mTrackUris = getListOfChangedFiles();

if
(mTrackUris != null  !mTrackUris.isEmpty()) {
 
final Iterator iter = mTrackUris.iterator();
 
SingleMediaScanner singleFileScanner = new
SingleMediaScanner(FetchResultDetailActivity.this,
mTrackUris.size());


while(iter.hasNext()) {

final String track = (String) iter.next();


if (track != null) {

if (Consts.DEBUG) {

Log.i(TAG, String.format(Kicking the mediascanner for
track: %s, track));

}


//
This clears off the entry out of the audio_meta, albums and album_art
tables. This is expected, so that is good

int
rowsUpdated =
getContentResolver().delete(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
_data = ' + track + ', null);



singleFileScanner.setFilepath(track);

singleFileScanner.startScan();

}
}
 }

And, this is my mediascanner class

private class SingleMediaScanner implements
MediaScannerConnectionClient {

private MediaScannerConnection mMediaScanner;
private String mFilepath;
private int mNumFilesToScan;

public SingleMediaScanner(Context context, int numFilesToScan) {
mNumFilesToScan = numFilesToScan;
mMediaScanner = new MediaScannerConnection(context, this);
}

@Override
public void onMediaScannerConnected() {
if (Consts.DEBUG) {
Log.i(TAG, String.format(Scan starting for: 
%s, mFilepath));
}
mMediaScanner.scanFile(mFilepath, null);
}

@Override
public void onScanCompleted(String path, Uri uri) {
if (Consts.DEBUG) {
Log.i(TAG, String.format(Scan finished for: 
%s, uri: %s, path,
uri.toString()));
}
mMediaScanner.disconnect();
if (--mNumFilesToScan == 0) {
h.sendEmptyMessageDelayed(SAVE_ART2, 10);
}
}

public void startScan() {
mMediaScanner.connect();
}

/**
 * @param mFilepath the mFilepath to set
 */
public void setFilepath(String filepath) {
this.mFilepath = filepath;
}
}


Hopefully this is a lot clearer than the earlier post, please share
any ideas you have.

After the scanner runs, if I pull the database file from the phone out
and view it, only the audio_meta entry seems recreated, the albums
and album_art entries are not.

Thanks !



On Mar 28, 10:58 pm, androidmediadeveloper kamathaj...@gmail.com
wrote:
 I have spent 2 entire days on this but havent been able to figure out,
 if someone has any ideas, please please share.

 I am basically trying to update the album_art on a user's music
 collection. So, when a user is playing a track, he/she can make a get
 art request. I fetch art from an external source and then actually
 write the art and metadata to the mp3 file. All this is working great,
 the file is accurately written with the new art.

 My problem however is this, since the player uses the android
 medialibrary to display metadata and art (MedisStore.Audio.Media),
 

[android-developers] 5 free chapters from the previous editions of Pro Android

2012-03-29 Thread Satya Komatineni
I have made available some valuable published content from the
previous editions of Pro Android for free. we had to remove these
chapters from our latest edition ProAndroid 4
(http://androidbook.com/proandroid4)  due to size and other reasons.

The chapters are

OpenGL
Search API
Live Folders
Text to Speech
Titaninum

These 5 free android sdk chapters are avilable at

http://androidbook.com/item/4060

Bootstrapping developers on the Android SDK
http://twitter.com/SatyaKomatineni
http://androidbook.com/training
http://satyakomatineni.com
http://androidbook.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] Activity Intent-Filter configuration

2012-03-29 Thread rk
Hi All,

My application is having an launcher activity with following intent-
filter
Action - android.intent.action.VIEW
Category  - android.intent.category.DEFAULT
Mime-type -image/jpeg

From 'Dual File Manger', When I try to open a file, which is not
having proper extension (name file.txy, NOT txt ) and as mime-type is
not known to Dual File Manger,  Resolver Activity is listing many
applications including my Application/Activity, none of these
application can open this file, as it is not standard file-extension.

When I checked logcat logs, I observed following line

I/ActivityManager(154): START {act=android.intent.action.VIEW
dat=file:///sdcard/folder/file.txy typ=*/* cmp=android/
com.android.internal.app.ResolverActivity} from pid

I would like to know why my App/Activity is listed, even-though its
not supporting */* mime-type ?
In this case, how Can I avoid my app listing in Resolver Activity ?

Thanks

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


Re: [android-developers] Activity Intent-Filter configuration

2012-03-29 Thread Mark Murphy
On Thu, Mar 29, 2012 at 11:19 AM, rk ramakrishnar...@gmail.com wrote:
 My application is having an launcher activity with following intent-
 filter
        Action - android.intent.action.VIEW
        Category  - android.intent.category.DEFAULT
        Mime-type -image/jpeg

 From 'Dual File Manger', When I try to open a file, which is not
 having proper extension (name file.txy, NOT txt ) and as mime-type is
 not known to Dual File Manger,  Resolver Activity is listing many
 applications including my Application/Activity, none of these
 application can open this file, as it is not standard file-extension.

 When I checked logcat logs, I observed following line

 I/ActivityManager(154): START {act=android.intent.action.VIEW
 dat=file:///sdcard/folder/file.txy typ=*/* cmp=android/
 com.android.internal.app.ResolverActivity} from pid

 I would like to know why my App/Activity is listed, even-though its
 not supporting */* mime-type ?

Sure it is. */* is a wildcard. Anything matches.

 In this case, how Can I avoid my app listing in Resolver Activity ?

Tell the authors of Dual File Manager to not use */* as a MIME type.

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

Android Training in NYC: http://marakana.com/training/android/

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


[android-developers] Get and save GPS location while i am walking

2012-03-29 Thread Spica
Guys,
How i can save GPS locations while i am walking? I will be displaying
my walking track which i will recording while walking. Where i would
be saving all those huge number of locations on my phone?
There are few apps in the market who are doing that, please share your
ideas how and where they save this data?

Thanks,

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


Re: [android-developers] Re: release keys do not work

2012-03-29 Thread Justin Anderson

 When I recently switched to a new computer and created a new keystore
 and various alias keystores, my release keys no longer work.


Why did you do that?  I have switched computers multiple times but have
never done that.  Just keep a copy of your original release .keystore file
backed up somewhere and you never have a problem.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 29, 2012 at 8:31 AM, i b fundyandr...@gmail.com wrote:

 When I recently switched to a new computer and created a new keystore
 and various alias keystores, my release keys no longer work.


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

[android-developers] Re: Get and save GPS location while i am walking

2012-03-29 Thread lbendlin
Nothing huge about it. You only get one data row per second max.  SQLite is 
laughing at that.

On Thursday, March 29, 2012 12:22:47 PM UTC-4, Spica wrote:

 Guys, 
 How i can save GPS locations while i am walking? I will be displaying 
 my walking track which i will recording while walking. Where i would 
 be saving all those huge number of locations on my phone? 
 There are few apps in the market who are doing that, please share your 
 ideas how and where they save this data? 

 Thanks,

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

[android-developers] XML Parsing w/ DocumentBuilder

2012-03-29 Thread Bozzified
Hello everyone.

I am trying to get a hang of XML parsing and can't get this to show me the 
right elements as I'm fairly new to Android/Java dev. Would appreciate 
some guidance.

I've build a class that gets the custom xml url and needs to parse it and 
fill ArrayList with values. After trying several versions I can't wrap my 
head around parsing nodes and extracting element values.

This is what I have

  DocumentBuilderFactory factory = DocumentBuilderFactory.*newInstance*();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(feedURL);

   // get xml document root element
Element root = doc.getDocumentElement();

   // get node list of all elements with tag name item
NodeList items = root.getElementsByTagName(item);

 ArrayListString[] photoSet = *new* ArrayListString[]();

*for* (*int* i = 0; i  items.getLength(); i++) {

Node itemNode = items.item(i);

NodeList itemChildNodes = itemNode.getChildNodes();

Node itemChildNode = itemChildNodes.item(2);

String value = itemChildNode.getNodeValue();

 Log.*d*(ITEM ELEMENT VALUE, Node value for item[+i+] 
- +value);

}

here's what the XML looks like:

gallery
item photoid509/photoid url
http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash4/320622_10150298438271744_326149431743_8468654_1542995730_n.jpg
/url titleFoster The People DC/title description/description 
category/category dateupdated2012-01-24 23:31:58/dateupdated 
dateupdated2Wed Jan 25 07:31:58 GMT-0800 2012/dateupdated2

/item

item photoid508/photoid url
http://a8.sphotos.ak.fbcdn.net/hphotos-ak-ash4/308152_10150298438346744_326149431743_8468655_312468158_n.jpg
/url titleFoster The People Philly/title description/description 
category/category dateupdated2012-01-24 23:31:44/dateupdated 
dateupdated2Wed Jan 25 07:31:44 GMT-0800 2012/dateupdated2/item
/gallery

So now why I put itemChildNodes.item(2) is basically because I thought that 
would give me back 3rd subchild element of that node which is in this case 
title tag under item node

Would someone be kind enough to educate me on why this is not working and 
what's the best way to do this. The reason I'm not using SAX is because 
these XML files will be fairly small so I went with DocumentBuilder and 
also I wanted to learn both ways.


Many thanks good people.

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

Re: [android-developers]Android Bluetooth HID profile

2012-03-29 Thread Justin Anderson
Please don't post the same message multiple times...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 29, 2012 at 3:43 AM, I-Sheng Lin ckjboy2...@gmail.com wrote:

 Hi Android developers,

 I have done that the porting of HID profile onto Android 2.3 as the host.

 My Android device(Gingerbread) now is able to connect to the Bluetooth
 mouse/kb and it works really nice!

 However, my question is that it seems very lack of information about to
 make Android device as the client side.

 For example, simulate the Android device can work as the KB/mouse and
 connect it to the other Android device through Bluetooth.

 I know that Cyanogenmod allows us to do it and yes, I have a sample code
 and it works perfectly.

 Unfortunately, when I install the code onto my generic Android 2.3, the
 Bluetooth can be connected but drop right after being connected.

 Does anyone know why this happened on Android 2.3?

 Any clue will be highly appreciated.

 --
 I-Sheng Lin(Sam)

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

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

[android-developers] How do I view Android application specific cache?

2012-03-29 Thread Karim Varela
 

Is there any way to dynamically view the application specific cache in 
Android? I'm saving images to the cache (/data/data/my_app_package/cache) 
and I'm 99% sure they're saving there, but not sure how long they're 
staying around.

When I look in the cache using the DDMS File Explorer within Eclipse, it's 
always empty. I've also tried examining the appropriate cache dir in ADB 
and again it's always empty.

Any suggestions?

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

Re: [android-developers] Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson

 I had a problem with designing chat custom listview but when i update list
 when user send or receive message it update all previous rows with the name
 of new sender/receiver and seems like one person send/receive all messages!!


That code doesn't make a lot of sense...  We don't know what MarkChat is,
for one.  We don't really know how the flag works as well.

But I can tell you that you have a problem with your ViewHolder pattern.
Your title and body variables should be members of the ViewHolder class,
not member variables of your adapter class.  I don't know why you would
really need titleOdd and bodyOdd either...

Also, you have to remember that when a listview updates itself, it will
update every view that it is currently displaying on the screen, at the
very least.  There is nothing you can do to change that.  That means that
getView() will be called one time for each item currently on the screen

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 29, 2012 at 11:51 AM, AndroidGirl8 walaamahmou...@gmail.comwrote:


 Hi,
 I had a problem with designing chat custom listview but when i update list
 when user send or receive message it update all previous rows with the name
 of new sender/receiver and seems like one person send/receive all messages!!

 i tried everything and then think how to stop list from updating previous
 items and only work with specific current item only , here is what i'm
 using now in baseAdapter.

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

 ViewHolder h;
  View v = null;

 if (flag) {

 if (convertView == null) {
  // //for incoming
 h = new ViewHolder();
 v = mInflater.inflate(R.layout.evenbubble, null);

 title = (TextView) v.findViewById(R.id.BuddyTitle);
 body = (TextView) v.findViewById(R.id.BuddyMessage);
  v.setTag(h);
 } else {
 v = convertView;
 }
  Log.d(FLAG,  + flag);
 body.setText(groupsMessage.get(position));

 title.setText(MarkChat.Name.get(0));

 } else {

 // /for outcoming
 if (convertView == null) {
  h = new ViewHolder();
 v = mInflater.inflate(R.layout.oddbubble, null);

 titleOdd = (TextView) v.findViewById(R.id.BuddyTitle);
  bodyOdd = (TextView) v.findViewById(R.id.BuddyMessage);
 v.setTag(h);
 } else {

 v = convertView;
 }
 Log.d(FLAG,  + flag);
  bodyOdd.setText(groupsMessage.get(position));

 titleOdd.setText(MarkChat.Name.get(1));
 }
  return v;
 }

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

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

[android-developers] Re: Writing files in UTF-8

2012-03-29 Thread Lew
Remote Red wrote:
 Dirk Vranckaert wrote:

  I've added out.write('\ufeff'); to write the Byte Order Mark 

 That is not the bom for utf-8. You wrote the bom for UTF-16. 

 http://en.wikipedia.org/wiki/Byte_order_mark 

 The bom for utf-8 is 0xEF, 0xBB, 0xBF. 


And that same article reminds us, 
The Unicode standard recommends against the BOM for 
UTF-8.[26]http://en.wikipedia.org/wiki/Utf-8#cite_note-25
 

It also says that the need for it is something Notepad decided despite that 
it violates the recommendation.
 

 You are not done before it works with the right bom. 


Which ought to be no BOM at all.

-- 
Lew
 

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

Re: [android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Lew
Spooky wrote:

 Kostya Vasilyev wrote:
  The issue is that you're trying to cast *the array* whereas you
  intent was probably to cast *each element of the array*.

 I was just trying to directly convert the List (in this case,

I was just trying ... implies that the rules of Java should accommodate 
your programming instead of the other way around.

Java doesn't let you cast across type hierarchies. Thus, you cannot cast 
'Camera.Size' to 'String', nor can you cast 'Camera.Size[]' to 'String[]'.

You might find the Java tutorials informative.
 

 ListString) to an array of strings (String[]).  I hadn't gotten
 as far as the other settings types yet---just preparing for them
 when I get to them.

 ... 

  You could try this:
  
  for (Camera.Size size : cameraSizeList) {
  stringArray.add(size.toString());
  }
  
  ... etcI was hoping for a direct conversio for each List to each 
 respective
 array, but I'm starting to think that might not be ideal, after all.

  Or you could combine the arrays into one Object[] array. The adapter
  would then call toString on each Object inside the array.

 Again, multiple arrays, not one.

Again, he's just making suggestions. Again.
 

  But if you do that, you won't be able to refer to objects in the
  array and know their types (which may be useful), unless you used
  instanceof.

 I've already got that covered.  :-)   A simple switch() in onItemClicked
 will determine which type of settings are in effect, and respond
 accordingly.


Switching on types is an antipattern in O-O programming. Polymorphism, will 
do that switch for you.
 

  To keep type information, you could implement wrappers for your
  objects that have a common base class (or interface), overriding
  toString() for binding, and implementing other methods that would do
  stuff specific to your application logic.

 I'm afraid that's far above my level at this point (let's put it this
 way, I was debating on whether to post this in this list or the
 android-for-beginners list).  I'm still not sure whether that list

The right answer remains the right answer regardless of your level. Maybe 
you should rise to the level that you can use this suggestion.
 

 would have been more appropriate (in other words, did I ask yet another
 beginner-level question here, or was it more at an intermediate level?).

 Either way, I can use the example you showed above, and I think that'll
 work for me.

The wrapper approach is one way but I normally use the simple array-copy 
technique. Why are you so afraid of that loop?

 ListString choices = new ArrayListString(sizes.size());
 for (Camera.Size size : sizes )
 {
   choices.add(size.toString());
 }

-- 
Lew
 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Stop listview from updating previous items and only update current items

2012-03-29 Thread Nadeem Hasan
The MarkChat.Name.get() returns the same value for all your list items. 
That is causing the name to be the same for all items. It should return the 
name based on the position of the item in the adapter.

Also, as Justin noted, your ViewHolder usage seems to be incorrect. Try 
something like below:

*if* (convertView == null) {
h = new ViewHolder();
v = mInflater.inflate(R.layout.oddbubble, null);
h.title = (TextView) v.findViewById(R.id.BuddyTitle);
h.body = (TextView) v.findViewById(R.id.BuddyMessage);
v.setTag(h);
} *else* {
h = convertView.getTag();
}
h.body.setText(groupsMessage.get(position));
h.title.setText(MarkChat.Name.get(position));

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

[android-developers] Re: my apk file download in internet explorer as zip file

2012-03-29 Thread JackN
I would just rename. MS does that in IE when they want to suppress
something they don't like. Same with EPS files and others. APK is zip,
but by renaming, MS gets to complicate anyone's life that is trying to
download via IE and isn't aware.

On Mar 29, 6:30 am, Mark Murphy mmur...@commonsware.com wrote:
 Change the MIME type that your Web server uses for the file.

 On Thu, Mar 29, 2012 at 8:45 AM, Aryan aryantiwari...@gmail.com wrote:
  when download My apk file from internet
  explorer is being by default saved as .zip file. the hyper link
  mentions .apk, but only when the save as dialog comes, it prompts to
  be saved as .zip. if i rename it to .apk, it works just fine. How will
  I prevent this file from being saved as zip file ?

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

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

 Android Training in NYC:http://marakana.com/training/android/

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


Re: [android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Jim Graham
On Thu, Mar 29, 2012 at 11:35:32AM -0700, Lew wrote:
 Spooky wrote:
 
  Kostya Vasilyev wrote:
   The issue is that you're trying to cast *the array* whereas you
   intent was probably to cast *each element of the array*.
 
  I was just trying to directly convert the List (in this case,

 I was just trying ... implies that the rules of Java should accommodate 
 your programming instead of the other way around.

No, it doesn't.  It implies (rather strongly) that I thought, based on
the portions of the Dev Guide that I'd read on this, that I knew what I
was doing.  I was wrong.  Get over it...I have.

 Java doesn't let you cast across type hierarchies. Thus, you cannot cast 
 'Camera.Size' to 'String', nor can you cast 'Camera.Size[]' to 'String[]'.

Nor did I try (nor WOULD I try to do something stupid like that).  Go
back and READ my original post.  I said that I hadn't even GOTTEN to any
Camera.Size stuff---so far, only one, and that WAS a String[].  Where,
from THAT, do you get that I'm assuming I can just cast (and thus
magically translate) Camera.Size to String[]?  Answer: you don't.

 You might find the Java tutorials informative.

Again, read what I posted.  How many Java books did I go through?  I lost
count.

  ListString) to an array of strings (String[]).  I hadn't gotten
  as far as the other settings types yet---just preparing for them
  when I get to them.

There...see, I said it again.  I hadn't gotten being ListString and
String[].  Read what you're replying to next time.  :-)

   You could try this:
   
   for (Camera.Size size : cameraSizeList) {
   stringArray.add(size.toString());
   }
   
  ... etcI was hoping for a direct conversio for each List to each
  respective array, but I'm starting to think that might not be ideal,
  after all.

And just in case that was misunderstood, I was saying that I liked his
idea, and that I thought it would work for me.

   Or you could combine the arrays into one Object[] array. The adapter
   would then call toString on each Object inside the array.
 
  Again, multiple arrays, not one.
 
 Again, he's just making suggestions. Again.

Yes...I know.  But the above assumes (or at least, appears to assume)
that I'm handing one huge list of settings to the spinner, whereas I'm
planning to reuse one spinner with multiple sets of data.  I haven't
tried that yet, and if it doesn't work, that'll be just another lesson
learned for me.  So I was just clarifying what I had in mind.

   But if you do that, you won't be able to refer to objects in the
   array and know their types (which may be useful), unless you used
   instanceof.
 
  I've already got that covered.  :-)   A simple switch() in onItemClicked
  will determine which type of settings are in effect, and respond
  accordingly.
 
 Switching on types is an antipattern in O-O programming. Polymorphism, will 
 do that switch for you.

Did I say ANYTHING about switching based on variable types?  No.  I was
saying that I would use the switch to take actions based on what the DATA
was.  In other words, if spinner item #2 is Incandescent then I know
that the spinner's current data set is White Balance settings.
Understand now?  :-)

  Either way, I can use the example you showed above, and I think that'll
  work for me.
 
 The wrapper approach is one way but I normally use the simple array-copy 
 technique. Why are you so afraid of that loop?

You mean the loop that, in the quoted text that you just responded to, I
I said I liked the loop idea, and implied that I would probably just use
it?  H?  Read *what I wrote*.  If you're trying to read my MIND,
instead, you're doing an absolutely miserable job of it.  Even my CATS
do better than that (actually, they do really well at it).   :-)

  ListString choices = new ArrayListString(sizes.size());
  for (Camera.Size size : sizes )
  {
choices.add(size.toString());
  }

Looks like the example I already decided to use.  :-)

Kostya answered my question with a perfectly useable solution, and I
thought, in my response, that I made my appreciation for that clear.
Apparently, I didn't make that as clear as I thought I did.  Apologies,
Kostya, for not making my appreciation for your help clear.

I still have some reading to do, but Kostya put me on the right track,
which is exactly what I needed, and what I was looking for.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)| Tux (E Cat):  DS B+Wd Y 6 Y L+++ W+ C++/C++ I+++
spooky1...@gmail.com| T++ A E H+ S V- F++ Q+++ P/P+ B++ PA+ PL SC---
 Running FreeBSD 7.0  | 
ICBM / Hurricane:   | Tiggerbelle:  DS W+S+Bts % 1.5 X L W C+++/C+
   30.44406N 86.59909W  | I+++  T A E++ H S++ V+++ Q+++ P  B++ PA++ PL+ SC

Android Apps Listing at http://www.jstrack.org/barcodes.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 

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson

 The MarkChat.Name.get() returns the same value for all your list items.


That's what I thought at first as well... But I think this list view
represents a chat between two people... And so, depending on the item in
the list, the OP only wants to return one of two names... I may be wrong,
but that is what I inferred from these two lines:

title.setText(MarkChat.Name.get(0));
 titleOdd.setText(MarkChat.Name.get(1));


Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 29, 2012 at 12:43 PM, Nadeem Hasan nha...@nadmm.com wrote:

 The MarkChat.Name.get() returns the same value for all your list items.

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

[android-developers] Re: Get and save GPS location while i am walking

2012-03-29 Thread Spica
Hmm... would be expenssive on battery coz GPS would be working all
that time.

Any different idea?

On Mar 29, 12:59 pm, lbendlin l...@bendlin.us wrote:
 Nothing huge about it. You only get one data row per second max.  SQLite is
 laughing at that.



 On Thursday, March 29, 2012 12:22:47 PM UTC-4, Spica wrote:

  Guys,
  How i can save GPS locations while i am walking? I will be displaying
  my walking track which i will recording while walking. Where i would
  be saving all those huge number of locations on my phone?
  There are few apps in the market who are doing that, please share your
  ideas how and where they save this data?

  Thanks,- Hide quoted text -

 - Show quoted text -

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


Re: [android-developers] Re: Get and save GPS location while i am walking

2012-03-29 Thread Kristopher Micinski
Yes, having GPS going on a lot will be bad for your battery..., you
have to live with it.

You can try getting the location from a passive provider, but that's
somewhat spotty, of course..., If you want to use GPS, you have to be
willing to pay the price..

kris

On Thu, Mar 29, 2012 at 3:29 PM, Spica spicaneb...@gmail.com wrote:
 Hmm... would be expenssive on battery coz GPS would be working all
 that time.

 Any different idea?

 On Mar 29, 12:59 pm, lbendlin l...@bendlin.us wrote:
 Nothing huge about it. You only get one data row per second max.  SQLite is
 laughing at that.



 On Thursday, March 29, 2012 12:22:47 PM UTC-4, Spica wrote:

  Guys,
  How i can save GPS locations while i am walking? I will be displaying
  my walking track which i will recording while walking. Where i would
  be saving all those huge number of locations on my phone?
  There are few apps in the market who are doing that, please share your
  ideas how and where they save this data?

  Thanks,- Hide quoted text -

 - Show quoted text -

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

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


Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Nadeem Hasan
Justin,

You are right. In that case, I think the culprit is the flag. It is 
supposed to be true for incoming and false for outgoing. But, it remains 
static while listview is building its items. I think this flag should be in 
the adapter along with message.

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

Re: [android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Lew
Spooky wrote:

 Lew wrote:
  Spooky wrote:
  
   Kostya Vasilyev wrote:
The issue is that you're trying to cast *the array* whereas you
intent was probably to cast *each element of the array*.
  
   I was just trying to directly convert the List (in this case,

  I was just trying ... implies that the rules of Java should 
 accommodate 
  your programming instead of the other way around.

 No, it doesn't.  It implies (rather strongly) that I thought, based on
 the portions of the Dev Guide that I'd read on this, that I knew what I
 was doing.  I was wrong.  Get over it...I have.


You might want to cool your attitude down a notch, there, buddy.
 

  Java doesn't let you cast across type hierarchies. Thus, you cannot cast 
  'Camera.Size' to 'String', nor can you cast 'Camera.Size[]' to 
 'String[]'.

 Nor did I try (nor WOULD I try to do something stupid like that).  Go
 back and READ my original post.  I said that I hadn't even GOTTEN to any
 Camera.Size stuff---so far, only one, and that WAS a String[].  Where,
 from THAT, do you get that I'm assuming I can just cast (and thus
 magically translate) Camera.Size to String[]?  Answer: you don't.


Since you provided woefully incomplete information. we have to guess. You 
shouldn't be shouting at me for that. You never said anyhthing about 
casting a 'String[]' because you didn't say what type 'bar' is. So get off 
your bloody high horse, bubba.

Since you didn't tell us at all yet, what is the type of 'bar'?
 

  You might find the Java tutorials informative.

 Again, read what I posted.  How many Java books did I go through?  I lost
 count.


Zero.

Or you wouldn't have made the mistake you did, Mr. Attitude.
 

   ListString) to an array of strings (String[]).  I hadn't gotten
   as far as the other settings types yet---just preparing for them
   when I get to them.

 There...see, I said it again.  I hadn't gotten being ListString and
 String[].  Read what you're replying to next time.  :-)


Boy, you love to be rude, don't you?

Do you think a smiley makes your comment less obnoxious?

I ask again, what was the type of 'bar'?

You cop all this attitude, bu you leave out the vital datum.
 

You could try this:

for (Camera.Size size : cameraSizeList) {
stringArray.add(size.toString());
}

   ... etcI was hoping for a direct conversio for each List to each
   respective array, but I'm starting to think that might not be ideal,
   after all.

 And just in case that was misunderstood, I was saying that I liked his
 idea, and that I thought it would work for me.

Or you could combine the arrays into one Object[] array. The adapter
would then call toString on each Object inside the array.
  
   Again, multiple arrays, not one.
  
  Again, he's just making suggestions. Again.

 Yes...I know.  But the above assumes (or at least, appears to assume)
 that I'm handing one huge list of settings to the spinner, whereas I'm
 planning to reuse one spinner with multiple sets of data.  I haven't
 tried that yet, and if it doesn't work, that'll be just another lesson
 learned for me.  So I was just clarifying what I had in mind.

But if you do that, you won't be able to refer to objects in the
array and know their types (which may be useful), unless you used
instanceof.
  
   I've already got that covered.  :-)   A simple switch() in 
 onItemClicked
   will determine which type of settings are in effect, and respond
   accordingly.
  
  Switching on types is an antipattern in O-O programming. Polymorphism, 
 will 
  do that switch for you.

 Did I say ANYTHING about switching based on variable types?  No.  I was


Yes, you said and quoted again, A simple switch() in onItemClicked will 
determine which type of settings are in effect.

What kind of type did you mean?
 

 saying that I would use the switch to take actions based on what the DATA
 was.  In other words, if spinner item #2 is Incandescent then I know
 that the spinner's current data set is White Balance settings.
 Understand now?  :-)


I understand that you are obnoxious. Smiley faces don't reduce your 
rudeness, Flame Boy.

 

   Either way, I can use the example you showed above, and I think that'll
   work for me.
  
  The wrapper approach is one way but I normally use the simple array-copy 
  technique. Why are you so afraid of that loop?

 You mean the loop that, in the quoted text that you just responded to, I
 I said I liked the loop idea, and implied that I would probably just use
 it?  H?  Read *what I wrote*.  If you're trying to read my MIND,
 instead, you're doing an absolutely miserable job of it.  Even my CATS
 do better than that (actually, they do really well at it).   :-)


You are pathetic.

-- 
Lew

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

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson
That its what I was thinking as well...
On Mar 29, 2012 2:16 PM, Nadeem Hasan nha...@nadmm.com wrote:

 Justin,

 You are right. In that case, I think the culprit is the flag. It is
 supposed to be true for incoming and false for outgoing. But, it remains
 static while listview is building its items. I think this flag should be in
 the adapter along with message.

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

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

[android-developers] item tag requires a 'drawable' attribute

2012-03-29 Thread Pinheiro
I have this simple XML in the drawable folder:

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/dark_pressed
android:state_pressed=true /
item android:drawable=@drawable/dark_focused
android:state_focused=true
android:state_enabled=true
android:state_window_focused=true /
item android:drawable=@drawable/dark /
/selector

And I'm getting the error in Eclipse:
Binary XML file line #2: item tag requires a 'drawable' attribute or
child tag defining a drawable

Anyone knows what the problem is? I've tried to clean the project and
restarting Eclipse but nothing worked.

Thanks in advance!

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

2012-03-29 Thread mike digioia
Anyone out there worked with the Maven tools? I am having trouble adding
jar files since I can't locate the necessary parameter needed by mvn
install:install-file command. I Google it but no one says where to get
this info? Do I need to look at the binary JAR file? I attempted to make up
the number I could not find and it worked except the claasses in the JAR
are still not known to resolve references in my code.



On Mon, Mar 26, 2012 at 11:14 AM, mike digioia mpd...@gmail.com wrote:

 Hi,

 Just started to work on a new project with Stanford open source for White
 Board apps on Android phones. Does anyone out there know what version of
 eclipse and libs will be required to develop new apps for this project on
 Android 2.3.3 (or 4)? My concern is to not have major issues attempting to
 integrate and develop new apps with the wrong environment.

 /mpd


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

Re: [android-developers] Stanford U WhiteBoard apps

2012-03-29 Thread Kristopher Micinski
These are fairly basic questions, and are all answered at the SDK website.

http://developer.android.com/sdk/index.html

You then have to set an appropriate API level for your app, to make
sure you're not including things you don't want, etc..,

kris

On Mon, Mar 26, 2012 at 2:14 PM, mike digioia mpd...@gmail.com wrote:
 Hi,

 Just started to work on a new project with Stanford open source for White
 Board apps on Android phones. Does anyone out there know what version of
 eclipse and libs will be required to develop new apps for this project on
 Android 2.3.3 (or 4)? My concern is to not have major issues attempting to
 integrate and develop new apps with the wrong environment.

 /mpd

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

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


Re: [android-developers] Stanford U WhiteBoard apps

2012-03-29 Thread mike digioia
I am not using eclipse where it is all detailed at this site. I am using
the Maven environment instead that uses command line. Have you used Maven
before?

On Thu, Mar 29, 2012 at 2:13 PM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 These are fairly basic questions, and are all answered at the SDK website.

 http://developer.android.com/sdk/index.html

 You then have to set an appropriate API level for your app, to make
 sure you're not including things you don't want, etc..,

 kris

 On Mon, Mar 26, 2012 at 2:14 PM, mike digioia mpd...@gmail.com wrote:
  Hi,
 
  Just started to work on a new project with Stanford open source for White
  Board apps on Android phones. Does anyone out there know what version of
  eclipse and libs will be required to develop new apps for this project on
  Android 2.3.3 (or 4)? My concern is to not have major issues attempting
 to
  integrate and develop new apps with the wrong environment.
 
  /mpd
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

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

Re: [android-developers] populating a Spinner with various types of Listxxx class

2012-03-29 Thread Kostya Vasilyev
29 марта 2012 г. 23:07 пользователь Jim Graham spooky1...@gmail.comнаписал:


 Kostya answered my question with a perfectly useable solution, and I
 thought, in my response, that I made my appreciation for that clear.
 Apparently, I didn't make that as clear as I thought I did.  Apologies,
 Kostya, for not making my appreciation for your help clear.


No aplogies needed - you were quite clear indeed.

In fact, I need to apologize for calling obj.toString() a typecast in my
original message. It's not, of course, rather it's a method call.




 I still have some reading to do, but Kostya put me on the right track,
 which is exactly what I needed, and what I was looking for.


Sure seems that you do, but then -- you're an adult and I'm not your
mother, so I'm not going to reproach you for having had to ask in the first
place :)

Almost anyone gets stuck and needs a bit of help with something sooner or
later.

That's cool, it's what this list is for.

-- K

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

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Kostya Vasilyev
Note that there are two layouts being used here:

R.layout.evenbubble
R.layout.oddbubble

Without overriding getViewTypeCount / getItemViewType in the adapter and
returning the right item type...

.. the list view will mix up those two layouts when recycling, which would
appear as a list of send bubbles or a list of receive bubbles.

The view type presumably should be based on flag, which in turn, as was
already noted, presumably should depend on the item's position, and a data
structure lookup to determine if it's a send bubble or a receive bubble.

-- K

30 марта 2012 г. 0:49 пользователь Justin Anderson
magouyaw...@gmail.comнаписал:

 That its what I was thinking as well...
 On Mar 29, 2012 2:16 PM, Nadeem Hasan nha...@nadmm.com wrote:

 Justin,

 You are right. In that case, I think the culprit is the flag. It is
 supposed to be true for incoming and false for outgoing. But, it remains
 static while listview is building its items. I think this flag should be in
 the adapter along with message.

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

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


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

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson
Good catch Kostya... I didn't notice the two different layouts until you
mentioned it.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


2012/3/29 Kostya Vasilyev kmans...@gmail.com

 Note that there are two layouts being used here:

 R.layout.evenbubble
 R.layout.oddbubble

 Without overriding getViewTypeCount / getItemViewType in the adapter and
 returning the right item type...

 .. the list view will mix up those two layouts when recycling, which would
 appear as a list of send bubbles or a list of receive bubbles.

 The view type presumably should be based on flag, which in turn, as was
 already noted, presumably should depend on the item's position, and a data
 structure lookup to determine if it's a send bubble or a receive bubble.

 -- K

 30 марта 2012 г. 0:49 пользователь Justin Anderson 
 magouyaw...@gmail.comнаписал:

 That its what I was thinking as well...
 On Mar 29, 2012 2:16 PM, Nadeem Hasan nha...@nadmm.com wrote:

 Justin,

 You are right. In that case, I think the culprit is the flag. It is
 supposed to be true for incoming and false for outgoing. But, it remains
 static while listview is building its items. I think this flag should be in
 the adapter along with message.

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

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


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


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

  1   2   >