Skip to content

Commit

Permalink
Add README-kr.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lovedise committed Nov 20, 2015
1 parent 24fd171 commit 8be7208
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PermissionGen
# PermissionGen ([한글](https://github.com/lovedise/PermissionGen/blob/master/README-kr.md))

[ ![Download](https://api.bintray.com/packages/lovedise/maven/PermissionGen/images/download.svg) ](https://bintray.com/lovedise/maven/PermissionGen/_latestVersion)

Expand All @@ -12,14 +12,14 @@ Grab via Maven:
<dependency>
<groupId>com.lovedise</groupId>
<artifactId>permissiongen</artifactId>
<version>0.0.5</version>
<version>0.0.6</version>
</dependency>
```

or Gradle:

```Gradle
compile 'com.lovedise:permissiongen:0.0.5'
compile 'com.lovedise:permissiongen:0.0.6'
```

##Usage
Expand Down Expand Up @@ -47,7 +47,7 @@ PermissionGen.needPermission(ContactFragment.this, 100,
);
```

In onRequestPermissionsResult it is overridden in the activity or fragments, run this code.
Override the onRequestPermissionsResult in activity or fragment and input this code.

```java
@Override public void onRequestPermissionsResult(int requestCode, String[] permissions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* Created by namee on 2015. 11. 18..
* Register a method invoked when permission requests are denied.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ private static void requestPermissions(Object object, int requestCode, String[]
((Activity)object).requestPermissions(deniedPermissions.toArray(new String[deniedPermissions.size()]), requestCode);
} else if(object instanceof Fragment){
((Fragment)object).requestPermissions(deniedPermissions.toArray(new String[deniedPermissions.size()]), requestCode);
} else {
throw new IllegalArgumentException(object.getClass().getName() + " is not supported");
}

} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* Created by namee on 2015. 11. 17..
* Register a method invoked when permission requests are succeeded.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
Expand Down

0 comments on commit 8be7208

Please sign in to comment.