Skip to content

Commit

Permalink
release: mifos-passcode first release
Browse files Browse the repository at this point in the history
  • Loading branch information
therajanmaurya committed Mar 25, 2018
1 parent 8d771a4 commit 57dc48b
Show file tree
Hide file tree
Showing 38 changed files with 158 additions and 149 deletions.
62 changes: 55 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,57 @@
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

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

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.idea
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json
19 changes: 0 additions & 19 deletions .idea/gradle.xml

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation project(':mobile-passcode')
// implementation project(':mifos-passcode')
implementation 'com.mifos.mobile:mifos-passcode:0.3.0'
}
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ buildscript {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'


dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -19,6 +20,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/mifos/maven/' }
}
}

Expand Down
File renamed without changes.
75 changes: 75 additions & 0 deletions mifos-passcode/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apply plugin: 'com.android.library'

ext {
bintrayRepo = 'maven'
bintrayName = 'mifos-passcode'

publishedGroupId = 'com.mifos.mobile'
libraryName = 'mifos-passcode'
artifact = 'mifos-passcode' // artifact name and library name should be same.

libraryDescription = 'A Library as feature of passcode'

siteUrl = 'https://github.com/openMF/mobile-passcode'
gitUrl = 'https://github.com/openMF/mobile-passcode.git'

libraryVersion = '0.3.0'

developerId = 'mifos'
developerName = 'Mifos Initiative'
developerEmail = '[email protected]'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

android {
compileSdkVersion 26

defaultConfig {
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "0.3.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:design:26.1.0"
implementation 'com.android.support:appcompat-v7:26.1.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}

// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

// Used this article to release the library
// https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en

// Add these line in local.properties to direct release on bintray
//bintray.user=YOUR_BINTRAY_USERNAME
//bintray.apikey=YOUR_BINTRAY_API_KEY
//bintray.gpg.password=YOUR_GPG_PASSWORD
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ public void skip(View v) {

/**
* Saves the passcode by encrypting it which we got from {@link MifosPassCodeView}
* @param view Passcode View
*/

public void savePassCode(View v) {
public void savePassCode(View view) {
if (isPassCodeLengthCorrect()) {
if (isPassCodeVerified) {
if (strPassCodeEntered.compareTo(mifosPassCodeView.getPasscode()) == 0) {
Expand All @@ -138,7 +138,7 @@ public void savePassCode(View v) {

/**
* It is a callback for {@link MifosPassCodeView}, provides with the passcode entered by user
* @param passcode
* @param passcode Passcode that is entered by user.
*/
@Override
public void passCodeEntered(String passcode) {
Expand Down Expand Up @@ -232,9 +232,9 @@ public void clickedBackSpace(View v) {
}

/**
* Changes PasscodeView to text if it was hidden and vice a versa
* @param view PasscodeView that changes to text if it was hidden and vice a versa
*/
public void visibilityChange(View v) {
public void visibilityChange(View view) {
mifosPassCodeView.revertPassCodeVisibility();
if (!mifosPassCodeView.passcodeVisible()) {
ivVisibility.setColorFilter(ContextCompat.getColor(MifosPassCodeActivity.this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ protected void onDraw(Canvas canvas) {
if (!isPasscodeVisible) {
canvas.drawCircle(xPosition, getHeight() / 2, 8f, fillCirclePaint);
} else {
canvas.drawText(passwordList.get(i - 1), xPosition , getHeight() / 2 +
canvas.drawText(passwordList.get(i - 1), xPosition, getHeight() / 2 +
getHeight() / 8, fillCirclePaint);
}
} else {
canvas.drawCircle(xPosition , getHeight() / 2, 8f, emptyCirclePaint);
canvas.drawCircle(xPosition, getHeight() / 2, 8f, emptyCirclePaint);
}
xPosition += getWidth() / PASSWORD_LENGTH;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class PassCodeNetworkChecker {
/**
* Get the network info
*
* @param context
* @return
* @param context Context
* @return NetworkInfo
*/
public static NetworkInfo getNetworkInfo(Context context) {
ConnectivityManager cm = (ConnectivityManager)
Expand All @@ -26,8 +26,8 @@ public static NetworkInfo getNetworkInfo(Context context) {
/**
* Check if there is any connectivity
*
* @param context
* @return
* @param context Context
* @return state of network
*/
public static boolean isConnected(Context context) {
NetworkInfo info = PassCodeNetworkChecker.getNetworkInfo(context);
Expand All @@ -37,9 +37,8 @@ public static boolean isConnected(Context context) {
/**
* Check if there is any connectivity to a Wifi network
*
* @param context
* @param type
* @return
* @param context Context
* @return state if wifi connection
*/
public static boolean isConnectedWifi(Context context) {
NetworkInfo info = PassCodeNetworkChecker.getNetworkInfo(context);
Expand All @@ -50,9 +49,8 @@ public static boolean isConnectedWifi(Context context) {
/**
* Check if there is any connectivity to a mobile network
*
* @param context
* @param type
* @return
* @param context Context
* @return mobile connected to network or not
*/
public static boolean isConnectedMobile(Context context) {
NetworkInfo info = PassCodeNetworkChecker.getNetworkInfo(context);
Expand All @@ -63,8 +61,8 @@ public static boolean isConnectedMobile(Context context) {
/**
* Check if there is fast connectivity
*
* @param context
* @return
* @param context Context
* @return connection is fast or not
*/
public static boolean isConnectedFast(Context context) {
NetworkInfo info = PassCodeNetworkChecker.getNetworkInfo(context);
Expand All @@ -75,9 +73,9 @@ public static boolean isConnectedFast(Context context) {
/**
* Check if the connection is fast
*
* @param type
* @param subType
* @return
* @param type Type of connection
* @param subType SubType of Connection
* @return connection is fast or not
*/
public static boolean isConnectionFast(int type, int subType) {
if (type == ConnectivityManager.TYPE_WIFI) {
Expand Down
File renamed without changes.
Loading

0 comments on commit 57dc48b

Please sign in to comment.