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
6 changes: 6 additions & 0 deletions res/layout/entry_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"/>
<Button android:id="@+id/entry_telepass"
android:text="@string/telepass"
android:layout_width="100sp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/entry_edit"
android:layout_alignParentBottom="true"/>
<ImageView android:id="@+id/entry_divider2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
Expand Down
6 changes: 6 additions & 0 deletions res/layout/entry_view_v4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"/>
<Button android:id="@+id/entry_telepass"
android:text="@string/telepass"
android:layout_width="100sp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/entry_edit"
android:layout_alignParentBottom="true"/>
<ImageView android:id="@+id/entry_divider2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
Expand Down
2 changes: 2 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@
<string name="warning_read_only">Your sd card is currently read-only. You may not be able to save changes to your database.</string>
<string name="warning_unmounted">Your sd card is not currently mounted on your device. You will not be able to load or create your database.</string>
<string name="version_label">Version:</string>
<string name="telepass">TelePass</string>
<string name="telepass_err">Could not open TelePass, please install the com.a29apps.telepass app.</string>

<string-array name="clipboard_timeout_options">
<item>30 seconds</item>
Expand Down
17 changes: 17 additions & 0 deletions src/com/keepassdroid/EntryActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
Expand Down Expand Up @@ -72,6 +73,8 @@ public class EntryActivity extends LockCloseActivity {
public static final int NOTIFY_USERNAME = 1;
public static final int NOTIFY_PASSWORD = 2;

final Context context = this;

public static void Launch(Activity act, PwEntry pw, int pos) {
Intent i;

Expand Down Expand Up @@ -110,6 +113,20 @@ public void onClick(View v) {
}

});

Button telepass = (Button) findViewById(R.id.entry_telepass);
telepass.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.a29apps.telepass", "com.a29apps.telepass.TelePassActivity"));
intent.putExtra(Intent.EXTRA_TEXT, mEntry.getPassword());
try {
startActivity(intent);
} catch (ActivityNotFoundException ex) {
Toast.makeText(context, R.string.telepass_err, Toast.LENGTH_LONG).show();
}
}
});
}

@Override
Expand Down