Add aar support
This commit is contained in:
parent
4d7bd88731
commit
43b0a4b696
|
|
@ -23,7 +23,7 @@ LG Launcher<br/>
|
|||
HOW TO USE
|
||||
===================================
|
||||
<br/>1. Download the ShortcutBadger-aar.zip and put it into your project.
|
||||
<br/>2. Add the repositories path in your build.gradle "lib" in your Android project.
|
||||
<br/>2. Add the repositories path in your build.gradle.
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
|
|
@ -34,7 +34,7 @@ HOW TO USE
|
|||
<br/>3. Add dependencies for Shortcutbadger
|
||||
|
||||
dependencies {
|
||||
compile 'me.leolin:ShortcutBadger:1.0.1'
|
||||
compile 'me.leolin:ShortcutBadger:1.0.1@aar'
|
||||
}
|
||||
|
||||
<br/>4. Add the codes below:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
|
|
@ -29,5 +29,5 @@ android {
|
|||
|
||||
|
||||
dependencies {
|
||||
compile 'me.leolin:ShortcutBadger:1.0.1'
|
||||
compile 'me.leolin:ShortcutBadger:1.0.1@aar'
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
956f2fd7993112d4ae4141f9b2b9788d
|
||||
d37e343efa6bccbfbe826057b37e9078
|
||||
|
|
@ -1 +1 @@
|
|||
97cadb848d188f24f9c69583d47b60facb5ad4c1
|
||||
464610ae0b1357dafc5769d78873a2b6992c7852
|
||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
56a1f63ad114900f8e53045989cf01f9
|
||||
|
|
@ -1 +0,0 @@
|
|||
febd3f6b399c0250391f4281ff43bcd8773a89e8
|
||||
|
|
@ -5,4 +5,5 @@
|
|||
<groupId>me.leolin</groupId>
|
||||
<artifactId>ShortcutBadger</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<packaging>aar</packaging>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
c199c317eed25c5fb28491555493b5c1
|
||||
f2cd741243e1f8064c079321955670d5
|
||||
|
|
@ -1 +1 @@
|
|||
cc93eb1117b1390bf3218d7f72060562a26205fe
|
||||
efe50046c838fe458c9db05d7f44015514c34376
|
||||
|
|
@ -7,6 +7,6 @@
|
|||
<versions>
|
||||
<version>1.0.1</version>
|
||||
</versions>
|
||||
<lastUpdated>20141012010240</lastUpdated>
|
||||
<lastUpdated>20141012012516</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3847cc70a19e1aed86a2533097910691
|
||||
6a743525fd17f4eb26efbca62fdec289
|
||||
|
|
@ -1 +1 @@
|
|||
ce1ccb6ba0abcbf8e321a5a6b1453d5872db62f2
|
||||
830d365f23a04e8ebd321a78d278c6fdbab29c44
|
||||
|
|
@ -1,12 +1,3 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.12.2'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
apply plugin: 'maven'
|
||||
group = 'me.leolin'
|
||||
|
|
@ -14,11 +5,12 @@ version = '1.0.1'
|
|||
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "20.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.shortcutBadger"
|
||||
applicationId 'me.leolin.shortcutbadger'
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 19
|
||||
versionCode 1
|
||||
|
|
@ -33,18 +25,6 @@ android {
|
|||
|
||||
}
|
||||
|
||||
android.libraryVariants.all { variant ->
|
||||
def name = variant.buildType.name
|
||||
if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
|
||||
return; // Skip debug builds.
|
||||
}
|
||||
def task = project.tasks.create "jar${name.capitalize()}", Jar
|
||||
task.dependsOn variant.javaCompile
|
||||
task.from variant.javaCompile.destinationDir
|
||||
artifacts.add('archives', task);
|
||||
}
|
||||
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.shortcutBadger"
|
||||
android:versionCode="3"
|
||||
android:versionName="1.1">
|
||||
package="me.leolin.shortcutbadger"
|
||||
>
|
||||
|
||||
<!--for android-->
|
||||
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/>
|
||||
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS"/>
|
||||
|
||||
|
||||
<!--for Samsung-->
|
||||
<uses-permission android:name="com.sec.android.provider.badge.permission.READ"/>
|
||||
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>
|
||||
|
|
|
|||
|
|
@ -24,15 +24,16 @@ public class NewHtcHomeBadger extends ShortcutBadger {
|
|||
|
||||
@Override
|
||||
protected void executeBadge(int badgeCount) throws ShortcutBadgeException {
|
||||
Intent intent = new Intent(INTENT_UPDATE_SHORTCUT);
|
||||
intent.putExtra(PACKAGENAME, getContextPackageName());
|
||||
intent.putExtra(COUNT, badgeCount);
|
||||
mContext.sendBroadcast(intent);
|
||||
|
||||
Intent intent1 = new Intent(INTENT_SET_NOTIFICATION);
|
||||
ComponentName localComponentName = new ComponentName(getContextPackageName(), getEntryActivityName());
|
||||
intent1.putExtra(EXTRA_COMPONENT, localComponentName.flattenToShortString());
|
||||
intent1.putExtra(EXTRA_COUNT, badgeCount);
|
||||
mContext.sendBroadcast(intent1);
|
||||
|
||||
Intent intent = new Intent(INTENT_UPDATE_SHORTCUT);
|
||||
intent.putExtra(PACKAGENAME, getContextPackageName());
|
||||
intent.putExtra(COUNT, badgeCount);
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue