projects/vango/app/src/main/java/com/example/suharshs/vango/RunKeyActivity.java
/** Called when the user clicks the Remote Inspect button */
Called when the user clicks the Remote Inspect button
Called when the user clicks the Remote Inspect button
public void runRemoteInspect(View view) {
        String email;
        try {
            email = mRemoteInspectors.invite("helper", Duration.standardDays(7));
        } catch (VException e) {
            Toast.makeText(this, e.toString(), Toast.LENGTH_LONG).show();
            return;
        }
        final Intent intent = new Intent(Intent.ACTION_SEND);
        intent.setType("message/rfc822");
        intent.putExtra(Intent.EXTRA_SUBJECT, "Please look at vango");
        intent.putExtra(Intent.EXTRA_TEXT, email);
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivity(intent);
        } else {
            Toast.makeText(this, "No email client installed", Toast.LENGTH_LONG).show();
        }
    }
public void runRemoteInspect ( View view ) { String email ; try { email = mRemoteInspectors . invite ( "helper" , Duration . standardDays ( 7 ) ) ; } catch ( VException e ) { Toast . makeText ( this , e . toString ( ) , Toast . LENGTH_LONG ) . show ( ) ; return ; } final Intent intent = new Intent ( Intent . ACTION_SEND ) ; intent . setType ( "message/rfc822" ) ; intent . putExtra ( Intent . EXTRA_SUBJECT , "Please look at vango" ) ; intent . putExtra ( Intent . EXTRA_TEXT , email ) ; if ( intent . resolveActivity ( getPackageManager ( ) ) != null ) { startActivity ( intent ) ; } else { Toast . makeText ( this , "No email client installed" , Toast . LENGTH_LONG ) . show ( ) ; } }
Called when the user clicks the Remote Inspect button
Called when the user clicks the Remote Inspect button
// This whole app lives to be thrown away after testing, so don't worry about // using resource ids for the strings.