Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 59 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,60 @@
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# built native files in case there are any
# *.o
# *.so

# generated files
bin/
gen/

# Ignore gradle files
.gradle/
build/
captures/
out/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated
proguard/

# Metadata generated if any
.metadata/

# Mac OS X clutter for those using Windows
*.DS_Store

# Windows clutter if someone using Windows
Thumbs.db

# Eclipse project files if any
.classpath
.project

# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/libraries
.idea/compiler.xml
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
/app/google-services.json
/app/app-release.apk
/app/build.gradle
/app/build/
/.idea/vcs.xml
/app/src/main/java/com/miraclemessages/Constants.java
/app/src/main/java/com/miraclemessages/Util.java
*.ipr
*.iws
.idea/

# Specific files
app/src/main/java/com/miraclemessages/common/Settings.java
app/src/main/java/com/miraclemessages/utils/Util.java
app/google-services.json
app/build.gradle
22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

18 changes: 0 additions & 18 deletions .idea/gradle.xml

This file was deleted.

62 changes: 0 additions & 62 deletions .idea/misc.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

26 changes: 16 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,34 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-feature android:name="android.hardware.camera"
<uses-feature
android:name="android.hardware.camera"
android:required="true" />

<application
android:name=".MMApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".SplashActivity"
android:screenOrientation="portrait">
android:name=".ui.activities.SplashActivity"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.activities.LoginActivity" />
<activity
android:name=".MainActivity" />
<activity
android:name=".PreCameraActivity"
android:configChanges="orientation|screenSize"/>
android:name=".ui.activities.MainActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".PreCameraAboutActivity"
android:configChanges="orientation|screenSize"/>
android:name=".ui.activities.PreCameraAboutActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".ExportActivity"
android:name=".ui.activities.ExportActivity"
android:configChanges="orientation|screenSize">

<intent-filter>
Expand All @@ -49,6 +50,11 @@
android:name="com.amazonaws.mobileconnectors.s3.transferutility.TransferService"
android:enabled="true" />

<!-- For crashlytics -->
<meta-data
android:name="io.fabric.ApiKey"
android:value="" />

</application>

</manifest>
54 changes: 54 additions & 0 deletions app/src/main/java/com/miraclemessages/MMApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.miraclemessages;

import android.app.Application;

import com.amazonaws.mobileconnectors.s3.transferutility.TransferUtility;
import com.crashlytics.android.Crashlytics;

import io.fabric.sdk.android.Fabric;

import static com.miraclemessages.utils.GenericUtil.getS3Client;

/**
* This is a singleton application class.
* The onCreate for this is the first thing called when app starts.
* We can initialize one singleton things here.
* <p>
* Created by shobhit on 2017-08-06.
*/

public class MMApplication extends Application {

private static MMApplication mApplicationInstance = null;
private TransferUtility mTransferUtility;

@Override
public void onCreate() {
super.onCreate();
setInstance(this);
// Initialize Fabric
Fabric.with(this, new Crashlytics());
}

/**
* Gets an instance of the TransferUtility which is constructed using the
* given Context
*
* @return a TransferUtility instance
*/
public TransferUtility getTransferUtility() {
if (mTransferUtility == null) {
mTransferUtility = new TransferUtility(getS3Client(this), this);
}

return mTransferUtility;
}

public static MMApplication getInstance() {
return mApplicationInstance;
}

public static void setInstance(MMApplication applicationInstance) {
MMApplication.mApplicationInstance = applicationInstance;
}
}
Loading