├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── layout │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── dialog_token.xml │ │ │ │ └── fragment_main.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ ├── xml │ │ │ │ └── preferences.xml │ │ │ └── values-zh │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── baishuai │ │ │ │ └── github │ │ │ │ └── io │ │ │ │ └── smsforward │ │ │ │ ├── forward │ │ │ │ ├── slack │ │ │ │ │ ├── SlackResult.kt │ │ │ │ │ ├── SlackApi.kt │ │ │ │ │ └── SlackRepo.kt │ │ │ │ ├── feige │ │ │ │ │ ├── FeigeResult.kt │ │ │ │ │ ├── FeigeApi.kt │ │ │ │ │ └── FeigeRepo.kt │ │ │ │ ├── ForwardRepoApi.kt │ │ │ │ ├── ForwardComponent.kt │ │ │ │ ├── directsms │ │ │ │ │ └── DirectSmsRepo.kt │ │ │ │ ├── ForwardModule.kt │ │ │ │ └── ForwardRepo.kt │ │ │ │ ├── injection │ │ │ │ ├── ActivityContext.kt │ │ │ │ ├── ApplicationContext.kt │ │ │ │ ├── ActivityScope.kt │ │ │ │ ├── ApplicationScope.kt │ │ │ │ ├── component │ │ │ │ │ ├── ActivityComponent.kt │ │ │ │ │ └── ApplicationComponent.kt │ │ │ │ └── module │ │ │ │ │ ├── ActivityModule.kt │ │ │ │ │ └── ApplicationModule.kt │ │ │ │ ├── ui │ │ │ │ ├── base │ │ │ │ │ └── BaseActivity.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── MainFragment.kt │ │ │ │ └── PrefsFragment.kt │ │ │ │ ├── IApp.kt │ │ │ │ └── service │ │ │ │ ├── InSmsListener.kt │ │ │ │ └── ForwardService.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── baishuai │ │ │ └── github │ │ │ └── io │ │ │ └── smsforward │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── baishuai │ │ └── github │ │ └── io │ │ └── smsforward │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── docs ├── app-home.png ├── bot-token.png ├── app-setting.png ├── channel-setting.png ├── fir-im-release.png ├── invite-to-channel.png ├── slack-custom-integrations.png ├── setup_feige.md └── setup_slack.md ├── .idea ├── copyright │ └── profiles_settings.xml ├── markdown-navigator │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── misc.xml └── markdown-navigator.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── .gitignore ├── README.md ├── gradlew.bat ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /docs/app-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/app-home.png -------------------------------------------------------------------------------- /docs/bot-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/bot-token.png -------------------------------------------------------------------------------- /docs/app-setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/app-setting.png -------------------------------------------------------------------------------- /docs/channel-setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/channel-setting.png -------------------------------------------------------------------------------- /docs/fir-im-release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/fir-im-release.png -------------------------------------------------------------------------------- /docs/invite-to-channel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/invite-to-channel.png -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/slack-custom-integrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/docs/slack-custom-integrations.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baishuai/SmsForward/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/forward/slack/SlackResult.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.forward.slack 2 | 3 | /** 4 | * Created by bai on 17-5-1. 5 | */ 6 | data class SlackResult(val ok: Boolean, val channel: String) 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/forward/feige/FeigeResult.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.forward.feige 2 | 3 | /** 4 | * Created by bai on 17-4-29. 5 | * FeigeResult data of feige api 6 | */ 7 | 8 | data class FeigeResult(val code: Int, val msg: String) 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Dec 01 20:50:24 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/injection/ActivityContext.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.injection 2 | 3 | import javax.inject.Qualifier 4 | 5 | /** 6 | * Created by bai on 17-4-29. 7 | */ 8 | 9 | @Qualifier 10 | @Retention(AnnotationRetention.RUNTIME) 11 | annotation class ActivityContext -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/injection/ApplicationContext.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.injection 2 | 3 | import javax.inject.Qualifier 4 | 5 | /** 6 | * Created by bai on 17-4-29. 7 | */ 8 | @Qualifier 9 | @Retention(AnnotationRetention.RUNTIME) 10 | annotation class ApplicationContext -------------------------------------------------------------------------------- /docs/setup_feige.md: -------------------------------------------------------------------------------- 1 | # 设置 飞鸽快信 账户并获取 `uid` 和 `token` 2 | 3 | 4 | * 注册 飞鸽快信 大众版,大众版每个月可以免费发送8000条消息 5 | 6 | * token,飞鸽后台管理中 `用户中心` -> `查看密钥` 7 | 8 | * 查看飞鸽快信的 [使用说明](https://u.ifeige.cn/docs/help.pdf) ,在微信上关注对应的公众号并且订阅对应的帐号 9 | 10 | * uid, 飞鸽后台管理中 `群组管理` -> `人员管理`,刚才你使用的微信账户的 ID 11 | 12 | 13 | 好了,这里就结束了,飞鸽快信的设置比slack简单很多 -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/injection/ActivityScope.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.injection 2 | 3 | import javax.inject.Scope 4 | 5 | /** 6 | * Created by bai on 17-4-29. 7 | */ 8 | 9 | @MustBeDocumented 10 | @Scope 11 | @Retention(AnnotationRetention.RUNTIME) 12 | annotation class ActivityScope -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/injection/ApplicationScope.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.injection 2 | 3 | import javax.inject.Scope 4 | 5 | /** 6 | * Created by bai on 17-4-29. 7 | */ 8 | @MustBeDocumented 9 | @Scope 10 | @Retention(AnnotationRetention.RUNTIME) 11 | annotation class ApplicationScope -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/forward/ForwardRepoApi.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.forward 2 | 3 | import io.reactivex.Single 4 | 5 | /** 6 | * Created by bai on 17-5-1. 7 | */ 8 | interface ForwardRepoApi { 9 | fun forward(body: String, from: String): Single 10 | fun checkTokenAndSave(): Single 11 | fun name(): String 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/baishuai/github/io/smsforward/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.assertEquals; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/forward/ForwardComponent.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.forward 2 | 3 | import baishuai.github.io.smsforward.forward.feige.FeigeApi 4 | import baishuai.github.io.smsforward.forward.slack.SlackApi 5 | import dagger.Subcomponent 6 | import javax.inject.Singleton 7 | 8 | /** 9 | * Created by bai on 17-5-1. 10 | */ 11 | 12 | @Singleton 13 | @Subcomponent(modules = arrayOf(ForwardModule::class)) 14 | interface ForwardComponent { 15 | 16 | fun feigeApi(): FeigeApi 17 | 18 | fun slackApi(): SlackApi 19 | } -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/forward/slack/SlackApi.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.forward.slack 2 | 3 | import io.reactivex.Single 4 | import retrofit2.http.POST 5 | import retrofit2.http.Query 6 | 7 | /** 8 | * Created by bai on 17-5-1. 9 | */ 10 | interface SlackApi { 11 | 12 | @POST("api/chat.postMessage") 13 | fun forward(@Query("token") token: String, 14 | @Query("channel") channel: String, 15 | @Query("text") text: String, 16 | @Query("username") username: String, 17 | @Query("as_user") as_user: Boolean): Single 18 | } -------------------------------------------------------------------------------- /app/src/main/res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/injection/component/ActivityComponent.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.injection.component 2 | 3 | import baishuai.github.io.smsforward.injection.ActivityScope 4 | import baishuai.github.io.smsforward.injection.module.ActivityModule 5 | import baishuai.github.io.smsforward.ui.MainActivity 6 | import dagger.Component 7 | 8 | /** 9 | * Created by bai on 17-4-29. 10 | */ 11 | 12 | 13 | @ActivityScope 14 | @Component(dependencies = arrayOf(ApplicationComponent::class), 15 | modules = arrayOf(ActivityModule::class)) 16 | interface ActivityComponent { 17 | fun inject(mainActivity: MainActivity) 18 | } -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/forward/feige/FeigeApi.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.forward.feige 2 | 3 | 4 | import io.reactivex.Single 5 | import retrofit2.http.POST 6 | import retrofit2.http.Query 7 | 8 | /** 9 | * Created by bai on 17-4-29. 10 | */ 11 | interface FeigeApi { 12 | 13 | @POST("api/user_sendmsg") 14 | fun forward(@Query("uid") uid: String, 15 | @Query("secret") secret: String, 16 | @Query("key") key: String, 17 | @Query("title") title: String, 18 | @Query("content") content: String, 19 | @Query("remark") remark: String): Single 20 | } -------------------------------------------------------------------------------- /app/src/main/java/baishuai/github/io/smsforward/injection/module/ActivityModule.kt: -------------------------------------------------------------------------------- 1 | package baishuai.github.io.smsforward.injection.module 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import baishuai.github.io.smsforward.injection.ActivityContext 6 | import dagger.Module 7 | import dagger.Provides 8 | 9 | 10 | /** 11 | * Created by bai on 17-4-29. 12 | */ 13 | @Module 14 | class ActivityModule(private val activity: Activity) { 15 | 16 | @Provides 17 | fun provideActivity(): Activity { 18 | return activity 19 | } 20 | 21 | @Provides 22 | @ActivityContext 23 | fun providesContext(): Context { 24 | return activity 25 | } 26 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 17 | 18 |