Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions PieMessage-Android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,35 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".PieMessageApplication"
android:name="com.ericchee.bboyairwreck.piemessage.PieMessageApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MessageActivity"
android:name="com.ericchee.bboyairwreck.piemessage.MessageActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ChatsActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme.NoActionBar">
</activity>

<service
android:name=".ReceiveMessagesService"
android:exported="false" />

<activity android:name=".MainActivity"
<activity
android:name="com.ericchee.bboyairwreck.piemessage.ChatsActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
android:theme="@style/AppTheme"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".PiePreferenceActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme"
/>
<service
android:name=".Legacy.ReceiveMessagesLegacyService"
android:exported="false" />
<service
android:name="com.ericchee.bboyairwreck.piemessage.ReceiveMessagesService"
android:exported="false" />

</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class ChatsActivity extends AppCompatActivity implements ReceiveMessagesS
ReceiveMessagesService receiveMessagesService;
private boolean boundReceiveService = false;

private static final int SETTINGS_RESULT = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -150,8 +148,6 @@ public boolean onOptionsItemSelected(MenuItem item) {

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
Intent piePreferenceIntent = new Intent(this, PiePreferenceActivity.class);
startActivityForResult(piePreferenceIntent, SETTINGS_RESULT);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Created by eric on 12/8/15.
*/
public class Constants {
public static final String socketAddress = "127.0.0.1"; // INSERT YOUR PUBLIC IP HERE linked to OSX Client

public static final String chatROWID = "chat_rowid";
public static final String chatHandlesString = "chatHandlesString";
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import android.app.Application;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;

import java.util.TreeMap;
Expand Down Expand Up @@ -41,14 +39,6 @@ public void onCreate() {
chatsMap = new TreeMap<>();
dbHelper.getAllChats();

SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);

if (sharedPreferences.contains(getString(R.string.pref_socket_address_key))) {
startReceieveMessagesService();
}
}

public void startReceieveMessagesService() {
Intent receiveService = new Intent(this, ReceiveMessagesService.class);
startService(receiveService);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Binder;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.util.Log;
Expand Down Expand Up @@ -69,9 +67,7 @@ protected void onHandleIntent(Intent intent) {

Log.i(TAG, "onHandleIntent");
try {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
String socketAddress = sharedPreferences.getString(getString(R.string.pref_socket_address_key), "127.0.0.1");
socket = new Socket(socketAddress, 5000);
socket = new Socket(Constants.socketAddress, 5000);
PrintWriter output = new PrintWriter(socket.getOutputStream(), true);
BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream()));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.ericchee.bboyairwreck.piemessage;

import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.preference.PreferenceManager;
import android.util.Log;

import org.json.JSONException;
Expand Down Expand Up @@ -35,9 +33,7 @@ protected Object doInBackground(Object[] objects) {

try {
Log.i(TAG, "Entering Client");
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this.activity);
String socketAddress = sharedPreferences.getString(activity.getString(R.string.pref_socket_address_key), "127.0.0.1");
socket = new Socket(socketAddress, 5000);
socket = new Socket(Constants.socketAddress, 5000);
PrintWriter output = new PrintWriter(socket.getOutputStream(), true);
BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream()));

Expand Down
66 changes: 0 additions & 66 deletions PieMessage-Android/app/src/main/res/layout/activity_main.xml

This file was deleted.

2 changes: 0 additions & 2 deletions PieMessage-Android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
<string name="title_activity_conversation">ConversationActivity</string>

<string name="hello_world">Hello world!</string>
<string name="pref_socket_address_key">prefSocketAddress</string>
<string name="welcome_title">Welcome to\nPie Message!</string>
</resources>
10 changes: 0 additions & 10 deletions PieMessage-Android/app/src/main/res/xml/user_settings.xml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The [Android client](./PieMessage-Android/) connects to a socket that whose IP a
1. Open the Messages application and add your iCloud account in Messages > Preferences > Accounts.
2. Clone the PieMessage project onto your OSX Device.
3. Edit the *socketAddress* value in [PieOSXClient/src/Constants.java](./PieOSXClient/src/Constants.java) to your public IP address that is linked to your OSX device.
4. Edit the *socketAddress* value in [/app/.../Constants.java](./PieMessage-Android/app/src/main/java/com/ericchee/bboyairwreck/piemessage/Constants.java) to your public IP address that is linked to your OSX device.

You can do either terminal or GUI setup from here. If you will be working on this you will eventually need to set it up in IntelliJ/Android Studio or get it to work in your IDE of choice.

Expand Down