Skip to content

Instantly share code, notes, and snippets.

@kannansuresh
kannansuresh / .gitattributes
Last active May 10, 2026 08:33
Git Attributes - Manage LF on Mac and Windows
# Set default behavior to always use LF
* text=auto eol=lf
# Explicitly declare text files to be normalized to LF
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.mjs text eol=lf
*.json text eol=lf
@kannansuresh
kannansuresh / Get Android phone call history.md
Last active December 22, 2025 12:23
Get Android phone call history/log programmatically

Source: AndroidDev

To get call history programmatically first add read contact permission in Manifest file:

<uses-permission android:name="android.permission.READ_CONTACTS" />

Create xml file. Add the below code in xml file:

<Linearlayout android:layout_height="fill_parent"