1
0
mirror of https://github.com/tijder/SmsMatrix.git synced 2024-10-27 18:24:01 +00:00

Compare commits

..

No commits in common. "master" and "v0.0.13" have entirely different histories.

11 changed files with 14 additions and 73 deletions

View File

@ -15,14 +15,14 @@ As currently there is no end-to-end encryption implemented in this app, for priv
</a>
# Set up
- Create an account on a homeserver
- Create a acount on a homeserver
- Install this app (apk can be found by [releases](https://github.com/tijder/SmsMatrix/releases) or from [f-droid](https://f-droid.org/app/eu.droogers.smsmatrix))
- Give the app the app permission
- Type in the needed info in the app
- Bot Username: is the username of the just created user
- Bot Password: is the password of the just created user
- Homeserver url: is the url of the homeserver where the user is created
- Your username: is where you want to forward all your text messages to
- Your username: is where you want to forward all yous text message to
- Devicename: is the devicename wich the api will use
- Press save
- Now all your text messages will be bridged

View File

@ -10,8 +10,8 @@ android {
applicationId "eu.droogers.smsmatrix"
minSdkVersion 23
targetSdkVersion 29
versionCode 16
versionName "0.0.16"
versionCode 13
versionName "0.0.13"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@ -44,8 +44,10 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
/************* Matrix SDK management **************/
implementation 'com.github.Bubu:matrix-android-sdk:v0.9.30-no-webrtc'
implementation(name: 'matrix-sdk', ext: 'aar')
implementation(name: 'matrix-sdk-core', ext: 'aar')
implementation(name: 'matrix-sdk-crypto', ext: 'aar')
implementation(name: 'olm-sdk', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.squareup.retrofit2:retrofit:2.6.0'

Binary file not shown.

Binary file not shown.

BIN
app/libs/matrix-sdk.aar Normal file

Binary file not shown.

BIN
app/libs/olm-sdk.aar Normal file

Binary file not shown.

View File

@ -7,8 +7,6 @@
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
tools:replace="allowBackup,label"
@ -33,9 +31,6 @@
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<service android:name="eu.droogers.smsmatrix.MatrixService" />

View File

@ -1,22 +1,14 @@
package eu.droogers.smsmatrix;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Build;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;
/**
* Created by gerben on 7-10-17.
*/
@ -32,7 +24,6 @@ public class MatrixService extends Service {
private String syncDelay;
private String syncTimeout;
private MMSMonitor mms;
private String mChannelId = "";
@Override
public void onCreate() {
@ -41,21 +32,6 @@ public class MatrixService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
if (mChannelId.isEmpty()) {
mChannelId = createNotificationChannel("sync", "Sync Service");
}
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, mChannelId);
Notification notification = notificationBuilder.setOngoing(true)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentText(getApplicationInfo().loadLabel(getPackageManager()))
.setPriority(NotificationCompat.PRIORITY_MIN)
.setCategory(Notification.CATEGORY_SERVICE)
.build();
startForeground(1, notification);
}
SharedPreferences sp = getSharedPreferences("settings", Context.MODE_PRIVATE);
botUsername = sp.getString("botUsername", "");
botPassword = sp.getString("botPassword", "");
@ -100,22 +76,9 @@ public class MatrixService extends Service {
}
@RequiresApi(api = Build.VERSION_CODES.O)
private String createNotificationChannel(String channelId, String channelName){
NotificationChannel chan = new NotificationChannel(channelId,
channelName, NotificationManager.IMPORTANCE_NONE);
chan.setLightColor(Color.BLUE);
chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
NotificationManager service = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
service.createNotificationChannel(chan);
return channelId;
}
@Override
public void onDestroy() {
if (mx != null) {
mx.destroy();
}
mx.destroy();
this.mms.stopMMSMonitoring();
this.mms = null;
super.onDestroy();

View File

@ -6,9 +6,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.telephony.TelephonyManager;
import androidx.core.content.ContextCompat;
import android.util.Log;
import java.util.HashMap;
import java.util.Map;
@ -26,10 +24,6 @@ public class ReceiverListener extends BroadcastReceiver {
} else if (intent.getAction().equals("android.intent.action.PHONE_STATE")) {
handleIncomingCall(context, intent);
}
else if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED")) {
Intent intentServ = new Intent(context, MatrixService.class);
ContextCompat.startForegroundService(context, intentServ);
}
}
private void handleIncomingSMS(Context context, Intent intent) {

View File

@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.4.20'
ext.kotlin_version = '1.3.10'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.realm:realm-gradle-plugin:5.8.0"
@ -19,19 +19,6 @@ buildscript {
allprojects {
repositories {
// For Matrix Android SDK.
// This has to be declared first, to ensure that Matrix Android SDK library is not downloaded from another repo
maven {
url 'https://jitpack.io'
content {
// Use this repo only for matrix SDK library
includeGroupByRegex "com\\.github\\.Bubu"
// Also add subgroups, due to SDK split into modules
includeGroupByRegex "com\\.github\\.Bubu\\.matrix-android-sdk"
// And Olm library
includeGroupByRegex "org\\.matrix\\.gitlab\\.matrix-org"
}
}
google()
jcenter()
}

View File

@ -1,6 +1,6 @@
#Mon May 03 19:17:08 EDT 2021
#Fri Oct 11 22:28:14 EEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip