In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Canvas; | |
| import android.graphics.Matrix; | |
| import android.graphics.Paint; | |
| import android.media.ExifInterface; | |
| import android.os.AsyncTask; | |
| import android.os.Environment; |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| -dontwarn com.google.android.gms.** | |
| -dontwarn com.github.siyamed.shapeimageview.** | |
| -keepattributes Signature | |
| -keepattributes *Annotation*, EnclosingMethod | |
| -dontwarn com.google.android.gms.** | |
| -dontwarn android.support.** | |
| -optimizationpasses 25 | |
| -dontusemixedcaseclassnames | |
| -dontpreverify |
| package com.app.example.util; | |
| import android.Manifest; | |
| import android.app.Activity; | |
| import android.app.ActivityManager; | |
| import android.app.AlertDialog; | |
| import android.content.ClipData; | |
| import android.content.ClipboardManager; | |
| import android.content.Context; | |
| import android.content.DialogInterface; |
| package com.app.example.location; | |
| import android.app.IntentService; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.AsyncTask; | |
| import com.app.example.interfaces.FusedLocationResultCallback; | |
| import com.app.example.model.location.LocationModel; |
| package com.app.example.util; | |
| import android.os.Bundle; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v4.app.FragmentActivity; | |
| import android.support.v4.app.FragmentManager; | |
| import android.support.v4.app.FragmentTransaction; | |
| import android.support.v7.app.AppCompatActivity; | |
| import com.app.advanceautoparts.R; |
| { | |
| "parser": "babel-eslint", | |
| "plugins": [ | |
| "react", | |
| "react-native" | |
| ], | |
| "parserOptions": { | |
| "ecmaFeatures": { | |
| "jsx": true, | |
| "modules": true |
| public class ProjectUtils { | |
| /*** | |
| * Force MediaScanner to update its media database for recently added files. | |
| * @param context the calling context. | |
| * @param filePathForScan File path which will request the media scanner to rescan and add it | |
| * to the media database. | |
| */ | |
| public static void forceUpdateMediaScanner(Context context, String filePathForScan) { | |
| if (context != null) { | |
| new SingleMediaScanner(context, new File(filePathForScan)); |
| package com.boloro.boloromobileapp.util; | |
| import android.content.Context; | |
| import android.location.Address; | |
| import android.location.Geocoder; | |
| import android.util.Log; | |
| import java.io.IOException; | |
| import java.util.List; | |
| import java.util.Locale; |