|
AI2 Component
(Version nb184)
|
Go to the documentation of this file.
7 package com.google.appinventor.components.runtime.util;
9 import java.util.HashMap;
288 errorMessages =
new HashMap<Integer, String>();
292 "Warning: This app contains functionality that does not work on this phone: " +
293 "picking an EmailAddress.");
295 "Warning: This app contains functionality that does not work on this phone: " +
296 "the EmailPicker component.");
298 "Warning: This app contains functionality that does not work on this phone: " +
299 "the FusiontablesControl component.");
301 "Warning: This app contains functionality that does not work on this phone: " +
302 "using cookies in the Web component.");
304 "Warning: This app contains functionality that does not work on this phone: " +
305 "Wi-Fi peer-to-peer connectivity.");
308 "Unable to find latitude from %s.");
310 "Unable to find longitude from %s.");
312 "Location Permission was Denied.");
315 "The camera did not return an image.");
318 "Twitter no longer supports this form of Login. Use the Authorize call instead.");
320 "The ConsumerKey and ConsumerSecret properties must be set in order to authorize access " +
321 "for Twitter. Please obtain a Comsumer Key and Consumer Secret specific to your app from " +
322 "http://twitter.com/oauth_clients/new");
324 "Twitter error: %s");
326 "Unable to get access token: %s");
328 "Twitter authorization failed");
330 "SetStatus failed. %s");
332 "RequestMentions failed. %s");
334 "RequestFollowers failed. %s");
336 "RequestDirectMessages failed. %s");
338 "DirectMessage failed. %s");
340 "Follow failed. %s");
342 "StopFollowing failed. %s");
344 "Twitter RequestFriendTimeline failed: %s");
346 "Twitter search failed.");
351 "The Bluetooth property has not been set.");
353 "Not connected to a robot.");
355 "Unable to receive return package. Has the robot gone to sleep?");
357 "Error code received from robot: %s.");
359 "Invalid program name.");
361 "Invalid file name.");
363 "The NXT does not have a motor port labeled %s.");
365 "The NXT does not have a sensor port labeled %s.");
367 "The NXT does not have a mailbox number %s.");
369 "The NXT only accepts messages up to 58 characters.");
371 "The data is too large; it must be 16 bytes or less.");
373 "Could not decode element %s as an integer.");
375 "Could not fit element %s into 1 byte.");
377 "Invalid source argument.");
379 "Invalid destination argument.");
381 "Unable to download file to robot: %s");
383 "Cannot detect color when the DetectColor property is set to False.");
385 "Cannot detect light level when the DetectColor property is set to True.");
387 "The GenerateColor property is limited to None, Red, Green, or Blue.");
390 "The Bluetooth property has not been set.");
392 "Cannot connect to an EV3 robot. Has the robot gone to sleep?");
394 "Unable to receive a reply or the reply cannot be understood.");
396 "Illegal argument: %s");
398 "Cannot understant motor port: %s");
400 "Cannot understant sensor port: %s");
403 "Bluetooth is not available.");
405 "Bluetooth is not available.");
407 "The specified address is not a valid Bluetooth MAC address.");
409 "The specified address is not a paired Bluetooth device.");
411 "The specified address is not the required class of device.");
413 "The UUID \"%s\" is not formatted correctly.");
415 "Unable to connect. Is the device turned on?");
417 "Unable to listen for a connection from a bluetooth device.");
419 "Unable to accept a connection from a bluetooth device.");
421 "Could not decode \"%s\" as an integer.");
423 "Could not fit \"%s\" into 1 byte.");
425 "Could not fit \"%s\" into %s bytes.");
427 "Could not decode element %s as an integer.");
429 "Could not fit element %s into 1 byte.");
431 "Not connected to a Bluetooth device.");
433 "Unable to write: %s");
435 "Unable to read: %s");
437 "End of stream has been reached.");
439 "The encoding %s is not supported.");
442 "No corresponding activity was found.");
444 "No Action information in ActivityStarter was found.");
447 "Unable to load %s.");
449 "Unable to prepare %s.");
451 "Unable to play %s.");
453 "External storage is available but read-only.");
455 "External storage is not available.");
457 "Image file name must end in \".jpg\", \".jpeg\", or \".png\".");
459 "Cannot open file %s.");
462 "Unable to grant exclusive lock of audio output stream to %s.");
475 "The specified screen orientation is not valid: %s");
478 "Bad value received from other screen: %s");
480 "Bad value for sending to other screen: %s");
482 "Bad value for screen open/close animation: %s");
484 "No Focusable View Found");
486 "ActionBar is not supported on this device.");
488 "The permission %s has been denied. Please enable it in the Settings app.");
496 "Unable to get a response with the specified URL: %s");
498 "The encoding %s is not supported.");
500 "Unable to post or put the text \"%s\" with the specified URL: %s");
502 "Unable to post or put the file \"%s\" with the specified URL %s.");
504 "Unable to decode the JSON text: %s");
506 "Unable to decode the HTML text: %s");
508 "Unable to decode the XML text: %s");
510 "The specified URL is not valid: %s");
512 "The specified request headers are not valid: element %s is not a list");
514 "The specified request headers are not valid: element %s does not contain two elements");
516 "Unable to build request data: element %s is not a list");
518 "Unable to build request data: element %s does not contain two elements");
520 "Unable to delete a resource with the specified URL: %s");
522 "Took longer then timeout period to receive data from the URL: %s");
524 "Unable to encode as JSON the object %s");
527 "The software used in this app cannot extract contacts from this type of phone.");
529 "To pick contacts, pick them directly, without using search.");
532 "READ_CONTACTS Permission was denied.");
534 "The camcorder did not return a clip.");
537 "Cannot start fullscreen mode.");
539 "Cannot exit fullscreen mode.");
541 "Fullscreen mode not supported on this version of Android.");
544 "The value -- %s -- provided for HorizontalAlignment was bad. The only legal values " +
547 "The value -- %s -- provided for VerticalAlignment was bad. The only legal values " +
550 "Your device does not have a scanning application installed.");
552 "Unable to save image: %s");
554 "Unable to copy selected media: %s");
556 "Permission to use the Camera denied.");
559 "Text Receiving should be either 1, 2 or 3.");
561 "You do not have SEND_SMS permission");
563 "You do not have RECEIVE_SMS permission");
565 "Security Error Receiving Blocks from Browser.");
568 "The value -- %s -- provided for AccelerometerSensor's sensitivity was bad. " +
569 "The only legal values are 1, 2, or 3.");
572 "The File %s could not be found on your device.");
584 "available; Please try again later.");
586 "service cannot be parsed; Please try again later.");
588 errorMessages.put(
ERROR_ILLEGAL_HOUR,
"The hour must be set to a value between 0 and 23.");
595 "The response was: %s");
598 "TextToSpeech is not yet ready to perform this operation");
600 errorMessages.put(
ERROR_BAD_PERCENT,
"Percent values should be between 0 and 100.");
603 "The version of Android on this device does not support image rotation.");
607 "Trying to divide %s by 0. The result might not be valid.");
609 "Index %d out of bounds in list %s.");
611 "Expected a number for an index, but got \"%s\" instead.");
613 "Expected a list or dictionary, but found a %s when walking path.");
616 "Error %d in extension %s: %s");
619 "Need at least 2 points for a LineString. Got only %1$d.");
621 "Parse error attempting to create LineString: %1$s.");
623 "Too few fields in point. Expected 2, got %2$d.");
625 "Parse error attempting to create Polygon: %1$s.");
627 "Invalid value for point (%1$s, %2$s).");
629 "Invalid value for point at index %1$d (%2$s, %3$s).");
631 "Invalid type %2$s at index %1$d. Expected %3$s.");
633 "Invalid number of values in point at index %1$d. Expected %2$d but found %3$d.");
635 "Invalid number of values in point. Expected %1$d but found %2$d.");
637 "Invalid type %1$s. Expected %2$s.");
639 "Unable to parse GeoJSON content for the reason: %1$s.");
641 "Unable to save Map due to an internal exception: %1$s.");
643 "Latitude %1$f was not in the expected range [-90, 90].");
645 "Longitude %1$f was not in the expected range [-180, 180].");
647 "Unable to create a tile cache for maps.");
649 "Invalid value %1$d given for AnchorVertical. Valid settings are 1, 2, or 3.");
651 "Invalid value %1$d given for AnchorHorizontal. Valid settings are 1, 2, or 3.");
653 "Invalid latitude %2$s in point at index %1$d. Expected a value between [-90, 90].");
655 "Invalid longitude %2$s in point at index %1$d. Expected a value between [-180, 180].");
657 "Expected an array of values at index %1$d, but got %2$s.");
659 "Invalid unit system %1$d given to ScaleUnits. Expected either 1 or 2.");
663 "You do not have permission to make phone calls.");
667 "Unable to launch the package installer for %1$s.");
671 "Invalid value %1$d given for ARConfigurationType. Valid settings are 1, 2, or 3.");
674 errorMessages.put(
ERROR_AUDIO,
"Audio Recording Error");
691 "Unable to request directions. Reason: %s");
700 String format = errorMessages.get(errorNumber);
701 return String.format(format, messageArgs);
static final int ERROR_TWITTER_SET_STATUS_FAILED
static final int ERROR_SOUND_RECORDER_MAX_FILESIZE_REACHED
static final int ERROR_POLYGON_PARSE_ERROR
static final int ERROR_NO_SMS_PERMISSION
static String formatMessage(int errorNumber, Object[] messageArgs)
static final int ERROR_TWITTER_UNSUPPORTED_LOGIN_FUNCTION
static final int ERROR_NXT_DATA_TOO_LARGE
static final int ERROR_TWITTER_FOLLOW_FAILED
static final int ERROR_NETWORK_TIMEOUT
static final int ERROR_NXT_MESSAGE_TOO_LONG
static final int ERROR_WEBVIEW_SSL_ERROR
static final int ERROR_SCREEN_BAD_VALUE_RECEIVED
static final int ERROR_WEB_UNABLE_TO_DELETE
static final int ERROR_EXPECTED_ARRAY_AT_INDEX
static final int ERROR_SCREEN_BAD_VALUE_FOR_SENDING
static final int ERROR_BAD_VALUE_FOR_VERTICAL_ALIGNMENT
static final int ERROR_TRANSLATE_SERVICE_NOT_AVAILABLE
static final int ERROR_WEB_REQUEST_HEADER_NOT_TWO_ELEMENTS
static final int ERROR_WEB_BUILD_REQUEST_DATA_NOT_TWO_ELEMENTS
static final int ERROR_MEDIA_EXTERNAL_STORAGE_NOT_AVAILABLE
static final int ERROR_UNABLE_TO_LOAD_MEDIA
static final int ERROR_UNABLE_TO_PLAY_MEDIA
static final int ERROR_INVALID_LONGITUDE_IN_POINT_AT_INDEX
static final int ERROR_BLUETOOTH_NOT_REQUIRED_CLASS_OF_DEVICE
static final int ERROR_IMAGE_CANNOT_ROTATE
static final int ERROR_WEB_JSON_TEXT_DECODE_FAILED
static final int ERROR_BLUETOOTH_NOT_ENABLED
static final int ERROR_INVALID_LATITUDE
static final int ERROR_BLUETOOTH_UNABLE_TO_READ
static final int ERROR_BLUETOOTH_COULD_NOT_DECODE_ELEMENT
static final int ERROR_NXT_INVALID_RETURN_PACKAGE
static final int ERROR_FILE_NOT_FOUND_FOR_SHARING
static final int ERROR_EV3_NOT_CONNECTED_TO_ROBOT
static final int ERROR_NXT_CANNOT_DETECT_LIGHT
static final int ERROR_NXT_INVALID_SENSOR_PORT
static final int ERROR_BLUETOOTH_UNABLE_TO_CONNECT
static final int ERROR_FUNCTIONALITY_NOT_SUPPORTED_CONTACT_EMAIL
static final int ERROR_NO_FOCUSABLE_VIEW_FOUND
static final int ERROR_OUT_OF_MEMORY_LOADING_MEDIA
static final int ERROR_BLUETOOTH_COULD_NOT_FIT_ELEMENT_IN_BYTE
static final int ERROR_INVALID_LONGITUDE
static final int ERROR_UNABLE_TO_CREATE_TILE_CACHE
static final int ERROR_LOCATION_NO_PERMISSION
static final int ERROR_PLAYER_INVALID_VOLUME
static final int ERROR_EV3_BLUETOOTH_NOT_SET
static final int ERROR_NXT_INVALID_MOTOR_PORT
static final int ERROR_FUNCTIONALITY_NOT_SUPPORTED_WIFI_DIRECT
static final int ERROR_CANNOT_CREATE_FILE
static final int ERROR_TWITTER_BLANK_CONSUMER_KEY_OR_SECRET
static final int ERROR_INVALID_LATITUDE_IN_POINT_AT_INDEX
static final int ERROR_NXT_ERROR_CODE_RECEIVED
static final int ERROR_BLUETOOTH_NOT_PAIRED_DEVICE
static final int ERROR_INDEX_MISSING_IN_LIST
static final int FUSION_TABLES_QUERY_ERROR
static final int ERROR_NXT_INVALID_SOURCE_ARGUMENT
static final int ERROR_SCREEN_INVALID_ANIMATION
static final int ERROR_MEDIA_IMAGE_FILE_FORMAT
static final int ERROR_FUNCTIONALITY_NOT_SUPPORTED_EMAIL_PICKER
static final int ERROR_MEDIA_CANNOT_OPEN
static final int ERROR_CANVAS_WIDTH_ERROR
static final int ERROR_CAMERA_NO_IMAGE_RETURNED
static final int ERROR_TWITTER_AUTHORIZATION_FAILED
static final int ERROR_TWITTER_DIRECT_MESSAGE_FAILED
static final int ERROR_PHONE_UNSUPPORTED_CONTACT_PICKER
static final int ERROR_ROUTING_SERVICE_ERROR
static final int ERROR_SOUND_RECORDER_CANNOT_CREATE
static final int ERROR_BLUETOOTH_COULD_NOT_FIT_NUMBER_IN_BYTE
static final int ERROR_CANVAS_BITMAP_ERROR
static final int ERROR_INVALID_GEOJSON
static final int ERROR_INVALID_VALUE_IN_PATH
static final int ERROR_INVALID_NUMBER_OF_VALUES_IN_POINT
static final int ERROR_WEB_UNABLE_TO_POST_OR_PUT
static final int ERROR_WEB_MALFORMED_URL
static final int ERROR_TWITTER_UNABLE_TO_GET_ACCESS_TOKEN
static final int ERROR_TWITTER_EXCEPTION
static final int ERROR_BAD_VALUE_FOR_ACCELEROMETER_SENSITIVITY
static final int ERROR_SERIAL_WRITING
static final int ERROR_NXT_INVALID_PROGRAM_NAME
static final int ERROR_TWITTER_SEARCH_FAILED
static final int ERROR_SOUND_RECORDER_MAX_DURATION_REACHED
static final int ERROR_TRANSLATE_JSON_RESPONSE
static final int ERROR_ACTIVITY_STARTER_NO_CORRESPONDING_ACTIVITY
static final int ERROR_FUNCTIONALITY_NOT_SUPPORTED_WEB_COOKIES
static final int ERROR_NO_READ_CONTACTS_PERMISSION
static final int ERROR_EV3_INVALID_REPLY
static final int ERROR_BLUETOOTH_COULD_NOT_DECODE
static final int ERROR_BLUETOOTH_UNSUPPORTED_ENCODING
static final int ERROR_SOUND_RECORDER_ILLEGAL_STOP
static final int ERROR_ACTIONBAR_NOT_SUPPORTED
static final int ERROR_NO_MATCH
static final int ERROR_SOUND_NO_PERMISSION
static final int ERROR_WEB_XML_TEXT_DECODE_FAILED
static final int ERROR_NO_SMS_RECEIVE_PERMISSION
static final int ERROR_CANNOT_SAVE_IMAGE
static final int ERROR_INVALID_POINT_AT_INDEX
static final int ERROR_ACTIVITY_STARTER_NO_ACTION_INFO
static final int ERROR_LINESTRING_TOO_FEW_FIELDS
static final int ERROR_NXT_INVALID_MAILBOX
static final int ERROR_RECOGNIZER_BUSY
static final int ERROR_LOCATION_SENSOR_LATITUDE_NOT_FOUND
static final int ERROR_DEFAULT
static final int ERROR_CANNOT_READ_FILE
static final int ERROR_CANNOT_WRITE_TO_FILE
static final int ERROR_WEB_UNSUPPORTED_ENCODING
static final int ERROR_NO_ROUTE_FOUND
static final int ERROR_BAD_VALUE_FOR_HORIZONTAL_ALIGNMENT
static final int ERROR_CANNOT_COPY_MEDIA
static final int ERROR_TWITTER_STOP_FOLLOWING_FAILED
static final int ERROR_NXT_COULD_NOT_DECODE_ELEMENT
static final int ERROR_WEB_REQUEST_HEADER_NOT_LIST
static final int ERROR_NO_SCANNER_FOUND
static final int ERROR_LINESTRING_PARSE_ERROR
static final int ERROR_UNABLE_TO_INSTALL_PACKAGE
static final int ERROR_BLUETOOTH_UNABLE_TO_WRITE
static final int ERROR_ILLEGAL_HOUR
static final int ERROR_BLUETOOTH_NOT_AVAILABLE
static final int ERROR_VIDEOPLAYER_FULLSCREEN_CANT_EXIT
static final int ERROR_TWITTER_REQUEST_FOLLOWERS_FAILED
static final int ERROR_INVALID_TYPE
static final int ERROR_UNABLE_TO_REQUEST_DIRECTIONS
static final int ERROR_CANNOT_WRITE_ASSET
static final int ERROR_EXTENSION_ERROR
static final int ERROR_NXT_UNABLE_TO_DOWNLOAD_FILE
static final int ERROR_AUDIO
static final int ERROR_VIDEOPLAYER_FULLSCREEN_UNAVAILBLE
static final int ERROR_PHONE_UNSUPPORTED_SEARCH_IN_CONTACT_PICKING
static final int ERROR_WEB_BUILD_REQUEST_DATA_NOT_LIST
static final int ERROR_NO_CALL_PERMISSION
static final int ERROR_TWITTER_REQUEST_DIRECT_MESSAGES_FAILED
static final int ERROR_TWITTER_INVALID_IMAGE_PATH
static final int ERROR_WEB_JSON_TEXT_ENCODE_FAILED
static final int ERROR_UNABLE_TO_PREPARE_MEDIA
static final int ERROR_SOUND_NOT_READY
static final int ERROR_BLUETOOTH_INVALID_ADDRESS
static final int ERROR_TRANSLATE_NO_KEY_FOUND
static final int ERROR_VIDEOPLAYER_FULLSCREEN_UNSUPPORTED
static final int ERROR_WEB_REQUEST_TIMED_OUT
static final int ERROR_BLUETOOTH_END_OF_STREAM
static final int ERROR_BLUETOOTH_COULD_NOT_FIT_NUMBER_IN_BYTES
static final int ERROR_INVALID_API_KEY
static final int ERROR_INVALID_NUMBER_OF_VALUES_IN_POINT_AT_INDEX
static final int ERROR_INVALID_ANCHOR_HORIZONTAL
static final int ERROR_EXCEPTION_DURING_MAP_SAVE
static final int ERROR_CANNOT_DELETE_ASSET
static final int ERROR_WEB_UNABLE_TO_GET
static final int ERROR_BAD_PERCENT
static final int ERROR_LINESTRING_TOO_FEW_POINTS
static final int ERROR_INSUFFICIENT_PERMISSIONS
static final int ERROR_NXT_INVALID_GENERATE_COLOR
static final int ERROR_PERMISSION_DENIED
static final int ERROR_SCREEN_NOT_FOUND
static final int ERROR_NETWORK
static final int ERROR_UNABLE_TO_FOCUS_MEDIA
static final int ERROR_BLUETOOTH_INVALID_UUID
static final int ERROR_SPEECH_TIMEOUT
static final int ERROR_ILLEGAL_MINUTE
static final int ERROR_NXT_NOT_CONNECTED_TO_ROBOT
static final int ERROR_NXT_INVALID_FILE_NAME
static final int ERROR_NO_CAMERA_PERMISSION
static final int ERROR_BAD_VALUE_FOR_TEXT_RECEIVING
static final int ERROR_INVALID_UNIT_SYSTEM
static final int ERROR_NXT_INVALID_DESTINATION_ARGUMENT
static final int ERROR_TWITTER_REQUEST_MENTIONS_FAILED
static final int ERROR_CAMCORDER_NO_CLIP_RETURNED
static final int ERROR_ILLEGAL_DATE
static final int ERROR_NUMBER_FORMAT_EXCEPTION
static final int ERROR_INVALID_POINT
static final int ERROR_WEB_UNABLE_TO_POST_OR_PUT_FILE
static final int ERROR_WEB_HTML_TEXT_DECODE_FAILED
static final int ERROR_INVALID_ANCHOR_VERTICAL
static final int ERROR_BLUETOOTH_UNABLE_TO_ACCEPT
static final int ERROR_EV3_ILLEGAL_MOTOR_PORT
static final int ERROR_EV3_ILLEGAL_ARGUMENT
static final int ERROR_LOCATION_SENSOR_LONGITUDE_NOT_FOUND
static final int ERROR_MEDIA_EXTERNAL_STORAGE_READONLY
static final int ERROR_EV3_ILLEGAL_SENSOR_PORT
static final int ERROR_REPL_SECURITY_ERROR
static final int ERROR_SERIAL_NOT_INITIALIZED
static final int ERROR_CANVAS_DRAW_SHAPE_BAD_ARGUMENT
static final int ERROR_MEDIA_FILE_ERROR
static final int ERROR_DIVISION_BY_ZERO
static final int ERROR_CANNOT_FIND_FILE
static final int ERROR_NXT_COULD_NOT_FIT_ELEMENT_IN_BYTE
static final int ERROR_BLUETOOTH_UNABLE_TO_LISTEN
static final int ERROR_NXT_CANNOT_DETECT_COLOR
static final int ERROR_TTS_NOT_READY
static final int ERROR_INVALID_CONFIGURATION_VALUE
static final int ERROR_BLUETOOTH_NOT_CONNECTED_TO_DEVICE
static final int ERROR_INVALID_SCREEN_ORIENTATION
static final int ERROR_NXT_BLUETOOTH_NOT_SET
static final int ERROR_FUNCTIONALITY_NOT_SUPPORTED_FUSIONTABLES_CONTROL
static final int ERROR_SOUND_RECORDER
static final int ERROR_TWITTER_REQUEST_FRIEND_TIMELINE_FAILED
static final int ERROR_CANVAS_HEIGHT_ERROR
static final int ERROR_SERVER
static final int ERROR_INVALID_TYPE_AT_INDEX
static final int ERROR_CLIENT