Log i - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Log i method.

This code example shows how to use the following methods:e, getMessage
		Log.e(TAG, e.getMessage(), e);
	} 
 
	@Override 
	public void onMalformedURLException(MalformedURLException e, final Object state) {
		Log.e(TAG, e.getMessage(), e);
	} 
} 
8
CodeRank
This code example shows how to use the following methods:d, getMessage
        try { 
            file = new RandomAccessFile(imagePath, "r");
            return BitmapFactory.decodeFileDescriptor(file.getFD(), null,
                    options);
        } catch (IOException e) {
            Log.d(TAG, e.getMessage(), e);
            return null; 
        } finally { 
            if (file != null)
                try { 
                    file.close();
                } catch (IOException e) {
                    Log.d(TAG, e.getMessage(), e);
                } 
        } 
    } 
 
    /** 
     * Get a bitmap from the image 
     * 
8
CodeRank
This code example shows how to use the following methods:e, getMessage
		FacebookEvents.onPostPublishingFailed(); 
	} 
 
	@Override 
	public void onMalformedURLException(MalformedURLException e, final Object state) {
		Log.e(TAG, e.getMessage(), e);
		FacebookEvents.onPostPublishingFailed(); 
	} 
} 
8
CodeRank
This code example shows how to use the following methods:e
            throw new DataException(e);
        } catch (SAXException e) {
            Log.e(TAG, "SAXException", e);
            throw new DataException(e);
        } catch (IOException e) {
            Log.e(TAG, "IOException", e);
            throw new DataException(e);
        } 
        return parser.mPersonList;
    } 
 
    private static class PersonHandler extends DefaultHandler {
 
        private StringBuilder mSb = new StringBuilder();
        public ArrayList<Person> mPersonList = new ArrayList<Person>();
        public Person mCurrentPerson = null;
 
        @Override 
        public void startElement(String namespaceURI, String localName, String qName,
                Attributes atts) throws SAXException {
7
CodeRank
This code example shows how to use the following methods:e, getMessage
        JSONObject obj = new JSONObject();
        try { 
            obj.put("level", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_LEVEL, 0));
            obj.put("isPlugged", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_PLUGGED, -1) > 0 ? true : false);
        } catch (JSONException e) {
            Log.e(LOG_TAG, e.getMessage(), e);
        } 
        return obj;
    } 
 
    /** 
     * Updates the JavaScript side whenever the battery changes 
     * 
     * @param batteryIntent the current battery information 
     * @return 
     */ 
    private void updateBatteryInfo(Intent batteryIntent) {
        sendUpdate(this.getBatteryInfo(batteryIntent), true);
    } 
 
7
CodeRank
This code example shows how to use the following methods:notifyDataSetChanged
            String tag = tabSpec.getTag();
 
            TabInfo info = new TabInfo(tag, clss, args);
            mTabs.add(info);
            mTabHost.addTab(tabSpec);
            notifyDataSetChanged(); 
        } 
 
        @Override 
        public int getCount() { 
            return mTabs.size();
        } 
 
        @Override 
        public Fragment getItem(int position) {
            TabInfo info = mTabs.get(position);
            return Fragment.instantiate(mContext, info.clss.getName(), info.args);
        } 
 
        @Override 
7
CodeRank
This code example shows how to use the following methods:d, getMessage
        try { 
            file = new RandomAccessFile(imagePath, "r");
            return BitmapFactory.decodeFileDescriptor(file.getFD(), null,
                    options);
        } catch (IOException e) {
            Log.d(TAG, e.getMessage(), e);
            return null; 
        } finally { 
            if (file != null)
                try { 
                    file.close();
                } catch (IOException e) {
                    Log.d(TAG, e.getMessage(), e);
                } 
        } 
    } 
 
    /** 
     * Get size of image 
     * 
7
CodeRank
This code example shows how to use the following methods:e, getMessage
        // Forbidden being instantiated. 
    } 
 
    // FIXME: need to optimize this method. 
    private static boolean isLowMemory(SQLiteException e) {
        return e.getMessage().equals(SQLITE_EXCEPTION_DETAIL_MESSAGE);
    } 
 
    public static void checkSQLiteException(Context context, SQLiteException e) {
        if (isLowMemory(e)) {
            Toast.makeText(context, "Low Memory",
                    Toast.LENGTH_SHORT).show();
        } else { 
            throw e;
        } 
    } 
 
    public static Cursor query(Context context, ContentResolver resolver, Uri uri,
            String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        try { 

6
CodeRank
This code example shows how to use the following methods:e, printStackTrace, toString
This code example shows how to use the following methods:e, getLocalizedMessage

Related Log i Questions & Answers:

Other Log i Examples

28:	      sensorService.registerListener(mySensorEventListener, sensor,
29:	          SensorManager.SENSOR_DELAY_NORMAL);
30:	      Log.i("Compass MainActivity", "Registerered for ORIENTATION Sensor");
31:	
32:	    } else {

Read More

25:	    @Override
26:	    protected void onRegistered(Context context, String registrationId) {
27:	        Log.i(TAG, "Device registered: regId = " + registrationId);
28:	        displayMessage(context, "Your device registred with GCM");
29:	        Log.d("NAME", MainActivity.name);
-
36:	    @Override
37:	    protected void onUnregistered(Context context, String registrationId) {
38:	        Log.i(TAG, "Device unregistered");
39:	        displayMessage(context, getString(R.string.gcm_unregistered));
40:	        ServerUtilities.unregister(context, registrationId);
-
46:	    @Override
47:	    protected void onMessage(Context context, Intent intent) {
48:	        Log.i(TAG, "Received message");
49:	        String message = intent.getExtras().getString("price");
50:	        
-
59:	    @Override
60:	    protected void onDeletedMessages(Context context, int total) {
61:	        Log.i(TAG, "Received deleted messages notification");
62:	        String message = getString(R.string.gcm_deleted, total);
63:	        displayMessage(context, message);
-
71:	    @Override
72:	    public void onError(Context context, String errorId) {
73:	        Log.i(TAG, "Received error: " + errorId);
74:	        displayMessage(context, getString(R.string.gcm_error, errorId));
75:	    }
-
78:	    protected boolean onRecoverableError(Context context, String errorId) {
79:	        // log message
80:	        Log.i(TAG, "Received recoverable error: " + errorId);
81:	        displayMessage(context, getString(R.string.gcm_recoverable_error,
82:	                errorId));

Read More

31:	     */
32:	    static void register(final Context context, String name, String email, final String regId) {
33:	        Log.i(TAG, "registering device (regId = " + regId + ")");
34:	        String serverUrl = SERVER_URL;
35:	        Map<String, String> params = new HashMap<String, String>();

Read More

i Method Overview
Send an INFO log message.
See Code Examples for other Android Log Methods: