How to share code across projects using Android Studio

1. Create a Test application project : MyTestApplication

2. Add a module under MyTestApplication : MyLibrary 






3. Close Android Studio.
4. Go to folder location for MyTestApplication.
5. Locate MyLibrary directory.
6. Move MyLibrary directory to desired location. I'm using one level above to store my library.
7. Make a symlink to the library. 

8. Open Android Studio. 

9.

[Git] Re-setting user name and email and amending commit

User name and email can be modified using following command:

git config --global user.name "My user name"
git config --global user.email "me@example.com"

Already done commit can be modified using this command :
git commit --amend --reset-author 
Editing a specific commit for a commit history of a1-a2-a3-a4, where a4 is the HEAD. Lets say you want to edit a3 and a4. Run theses commands:

  1. git rebase -i a2
  2. This will open the commit message window/terminal. 
  3. Replace "pick" with "edit" for the commits that you want to change author info of.
  4. It will pause at a3, and would give you chance to edit your author for a3 commit.
  5. Now edit the commit:  git commit --amend --author="authorname <user@email.com>"
  6. Execute : git rebase continue --
  7. It will pause at a4, and would give you chance to edit your author for a4 commit.
  8. Execute: git commit --amend --author="authorname <user@email.com>"
  9. Execute: git rebase continue --
  10. You're done !

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .