Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 4 Application Development
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 4 Application Development
This is the forum to discuss the Wrox book Professional Android 4 Application Development Reto Meier; ISBN: 978-1-1181-0227-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 4 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 5th, 2013, 09:22 PM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default Compass Example Using Deprecated

The AccessibilityEvent.MAX_TEXT_LENGTH and AccessibilityEvent.MAX_TEXT_LENGTH are deprecated. What are we suppose to do here ?
Reply With Quote
  #2 (permalink)  
Old April 6th, 2013, 07:28 AM
Authorized User
Points: 89, Level: 1
Points: 89, Level: 1 Points: 89, Level: 1 Points: 89, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default MAX_TEXT_LENGTH

Hi,

I replaced that with an integer value of 500, see also http://developer.android.com/referen...AX_TEXT_LENGTH

Or use @SuppressWarnings("deprecation") before public boolean dispatchPopulateAccessibilityEvent(final AccessibilityEvent event).

Happy programming!
Reply With Quote
  #3 (permalink)  
Old February 11th, 2014, 01:03 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default MAX_TEXT_LENGTH

The Google doc says there is no longer a length restriction on AccessibilityEvent so there is no need to check the length of bearingStr nor to truncate it.
Code:
if (isShown()) {
            String bearingStr = String.valueOf(bearing);
            event.getText().add(bearingStr);
            return true;
        }
Reply With Quote
The Following User Says Thank You to Turmoil For This Useful Post:
xiarnousx (April 6th, 2014)
  #4 (permalink)  
Old April 6th, 2014, 01:42 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default

http://developer.android.com/referen...AX_TEXT_LENGTH
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed subscribing to simulated compass cevripidou BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 0 July 9th, 2011 09:02 AM
Chapter 4 compass stanlick BOOK: Professional Android 2 Application Development 0 March 18th, 2011 03:23 PM
Chapter 4 Compass Cmdr BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 July 11th, 2010 07:05 PM
Chapter 10: Compass Omen_20 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 April 7th, 2010 07:42 PM
Chapter 10: Compass Omen_20 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 April 7th, 2010 07:13 PM



All times are GMT -4. The time now is 01:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.