Example usage for android.view View INVISIBLE

List of usage examples for android.view View INVISIBLE

Introduction

In this page you can find the example usage for android.view View INVISIBLE.

Prototype

int INVISIBLE

To view the source code for android.view View INVISIBLE.

Click Source Link

Document

This view is invisible, but it still takes up space for layout purposes.

Usage

From source file:com.ptts.fragments.BusLocation.java

private void makeProgressBarDisappear() {
    ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBar);
    progressBar.setVisibility(View.INVISIBLE);
}

From source file:net.networksaremadeofstring.rhybudd.ViewZenossEventFragment.java

@Override
public void onActivityCreated(Bundle bundle) {
    if (null != bundle) {
        //Log.e("Saving","Found a bundle!!!!");

        if (bundle.containsKey("eventStateAcknowledged") && bundle.getBoolean("eventStateAcknowledged")) {
            ackIcon.setImageResource(R.drawable.ic_acknowledged);
            isAcknowledged = true;/*from  ww w  .j a v a  2 s . c o m*/
        }

        if (bundle.containsKey("Title"))
            Title.setText(bundle.getString("Title"));

        if (bundle.containsKey("Component"))
            Component.setText(bundle.getString("Component"));

        if (bundle.containsKey("EventClass"))
            EventClass.setText(bundle.getString("EventClass"));

        if (bundle.containsKey("Summary"))
            Summary.setText(Html.fromHtml(bundle.getString("Summary"), null, null));

        if (bundle.containsKey("FirstTime"))
            FirstTime.setText(bundle.getString("FirstTime"));

        if (bundle.containsKey("LastTime"))
            LastTime.setText(bundle.getString("LastTime"));

        if (bundle.containsKey("EventCount"))
            EventCount.setText(bundle.getString("EventCount"));

        if (bundle.containsKey("agent"))
            agent.setText(bundle.getString("agent"));

        if (bundle.containsKey("LogEntries")) {
            try {
                String[] LogEntries = bundle.getStringArray("LogEntries");
                int LogEntryCount = LogEntries.length;

                for (int i = 0; i < LogEntryCount; i++) {
                    TextView newLog = new TextView(getActivity());
                    newLog.setText(Html.fromHtml(LogEntries[i]));
                    newLog.setPadding(0, 6, 0, 6);
                    logList.addView(newLog);
                }
            } catch (Exception e) {
                e.printStackTrace();
                BugSenseHandler.sendExceptionMessage("ViewZenossEventFragment", "oncreate bundle", e);
            }
        }

        if (bundle.containsKey("img")) {
            try {
                img.setImageBitmap((Bitmap) bundle.getParcelable("img"));
                img.invalidate();
            } catch (Exception e) {
                e.printStackTrace();
                BugSenseHandler.sendExceptionMessage("ViewZenossEventFragment", "oncreate bundle image", e);
            }
        }

        progressbar.setVisibility(View.INVISIBLE);
    } else {
        //Log.e("Saving","Didn't find any data so getting it");
        preLoadData();
    }

    super.onActivityCreated(bundle);
}

From source file:com.google.android.apps.paco.ExploreDataActivity.java

private void showRelationshipForVarsInSameExperiment(Long experimentId, long xAxisInputId, long yAxisInputId) {
    Experiment experiment = getFullyLoadedExperiment(experimentId);
    if (experiment == null) {
        Toast.makeText(ExploreDataActivity.this, R.string.experiment_does_not_exist_warning, Toast.LENGTH_SHORT)
                .show();/*from   ww w . j  a  v  a2 s  .com*/
    } else {
        setContentView(R.layout.feedback);

        final Map<String, String> map = new HashMap<String, String>();
        String experimentJsonResults = convertExperimentResultsToJsonString(experiment);
        map.put("xAxisData", experimentJsonResults);
        map.put("yAxisData", experimentJsonResults);
        map.put("xAxisInputId", Long.toString(xAxisInputId));
        map.put("yAxisInputId", Long.toString(yAxisInputId));

        rawDataButton = (Button) findViewById(R.id.rawDataButton);
        rawDataButton.setVisibility(View.INVISIBLE);

        webView = (WebView) findViewById(R.id.feedbackText);
        webView.getSettings().setJavaScriptEnabled(true);

        env = new Environment(map);
        webView.addJavascriptInterface(env, "env");

        setWebChromeClientThatHandlesAlertsAsDialogs();
        WebViewClient webViewClient = createWebViewClientThatHandlesFileLinksForCharts();
        webView.setWebViewClient(webViewClient);

        webView.loadUrl("file:///android_asset/relationships.html");
    }
}

From source file:com.example.camera360.ui.ImageDetailActivity.java

private void handleImageDetailView() {
    HashMap<String, String> map = arrayList.get(currentIndex);

    if (Integer.parseInt(map.get("count")) == 0) {
        checkStatus();/*from www. j av  a2 s. c o  m*/
    } else {
        if (mImageDetailView.getVisibility() == View.INVISIBLE) {
            mImageDetailView.setVisibility(View.VISIBLE);
            showDetailView(0, 1);
        } else {
            showDetailView(1, 0);
        }
    }
}

From source file:com.safecell.HomeScreenActivity.java

private void recentTripLog() {
    TripJourneysRepository tripJourneysRepository = new TripJourneysRepository(HomeScreenActivity.this);
    TripRepository tripRepository = new TripRepository(HomeScreenActivity.this);

    Cursor cursorTripJounery = tripJourneysRepository.SelectTrip_journeys();
    startManagingCursor(cursorTripJounery);
    tripJourneysRepository.SelectTrip_journeys().close();

    float totalPositivePoints = tripJourneysRepository.getPointsSum();
    // Log.v("totalPositivePoints", ""+totalPositivePoints);
    float totalSafeMilePoints = tripJourneysRepository.getSafeMilePointsSum();
    // Log.v("totalSafeMilePoints", ""+totalSafeMilePoints);

    float grade = 0;

    if (totalPositivePoints > 0) {
        grade = totalSafeMilePoints / totalPositivePoints;

    }//  w w w .j  ava  2  s .  c om
    grade = grade * 100;
    // Log.v("grade", "" + grade);
    int ratioInt = Math.round(grade);
    if (ratioInt < 0) {
        ratioInt = 0;
    }

    Cursor cursorTotalPointsMiles = tripJourneysRepository.sumOfPointsMiles();
    startManagingCursor(cursorTotalPointsMiles);
    tripJourneysRepository.sumOfPointsMiles().close();
    cursorTotalPointsMiles.moveToFirst();

    ProfilesRepository profileRepository = new ProfilesRepository(HomeScreenActivity.this);
    tvUserName.setText(profileRepository.getName() + "");

    if (cursorTotalPointsMiles.getCount() > 0 && !cursorTotalPointsMiles.isNull(0)) {
        cursorTotalPointsMiles.moveToFirst();

        overallTotalPoints = cursorTotalPointsMiles.getString(0);

        totalTrips = tripRepository.getTripCount();
        tvTotalMiles.setText("" + (int) totalSafeMilePoints);
        tvTotalTrips.setText("" + totalTrips);
        tvGrade.setText("" + ratioInt + "%");
    }
    cursorTotalPointsMiles.close();

    pointsArray = new int[cursorTripJounery.getCount()];
    milesArray = new String[cursorTripJounery.getCount()];
    tripRecordedDateArray = new String[cursorTripJounery.getCount()];
    tripIdArray = new int[cursorTripJounery.getCount()];

    if (cursorTripJounery.getCount() > 0) {
        noTripsSavedTextView.setVisibility(View.INVISIBLE);
        cursorTripJounery.moveToFirst();
        do {
            int tripIdIndex = cursorTripJounery.getColumnIndex("trip_journey_id");
            int milesIndex = cursorTripJounery.getColumnIndex("miles");
            int pointsIndex = cursorTripJounery.getColumnIndex("points");
            int trip_dateIndex = cursorTripJounery.getColumnIndex("trip_date");

            int tripId = cursorTripJounery.getInt(tripIdIndex);
            String miles = "" + Math.round(Double.valueOf(cursorTripJounery.getString(milesIndex)));
            int points = cursorTripJounery.getInt(pointsIndex);
            long tripDate = cursorTripJounery.getLong(trip_dateIndex);

            String formatTripDate = DateUtils.dateInString(tripDate);
            Log.e(TAG, "(Milli)tripDate: " + tripDate + " formatedTripDate: " + formatTripDate);
            pointsArray[arrayIndex] = points;
            milesArray[arrayIndex] = miles + " Total Miles";
            tripRecordedDateArray[arrayIndex] = formatTripDate;
            tripIdArray[arrayIndex] = tripId;
            arrayIndex = arrayIndex + 1;

        } while (cursorTripJounery.moveToNext());

        cursorTripJounery.close();

        tripNameArray = tripRepository.SelectTripName();

    }

}

From source file:com.t2.compassionMeditation.Graphs1Activity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.i(TAG, this.getClass().getSimpleName() + ".onCreate()");

    // We don't want the screen to timeout in this activity
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

    this.requestWindowFeature(Window.FEATURE_NO_TITLE); // This needs to happen BEFORE setContentView
    setContentView(R.layout.graphs_activity_layout);
    mInstance = this;

    sharedPref = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

    mLoggingEnabled = SharedPref.getBoolean(this, "enable_logging", true);
    mDatabaseEnabled = SharedPref.getBoolean(this, "database_enabled", false);
    mAntHrmEnabled = SharedPref.getBoolean(this, "enable_ant_hrm", false);

    mInternalSensorMonitoring = SharedPref.getBoolean(this, "inernal_sensor_monitoring_enabled", false);

    if (mAntHrmEnabled) {
        mHeartRateSource = HEARTRATE_ANT;
    } else {//  w  ww  .java 2 s.  c  o  m
        mHeartRateSource = HEARTRATE_ZEPHYR;
    }

    // The session start time will be used as session id
    // Note this also sets session start time
    // **** This session ID will be prepended to all JSON data stored
    //      in the external database until it's changed (by the start
    //      of a new session.
    Calendar cal = Calendar.getInstance();
    SharedPref.setBioSessionId(sharedPref, cal.getTimeInMillis());

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss", Locale.US);
    String sessionDate = sdf.format(new Date());
    String userId = SharedPref.getString(this, "SelectedUser", "");
    long sessionId = SharedPref.getLong(this, "bio_session_start_time", 0);

    mDataOutHandler = new DataOutHandler(this, userId, sessionDate, mAppId,
            DataOutHandler.DATA_TYPE_EXTERNAL_SENSOR, sessionId);

    if (mDatabaseEnabled) {
        TelephonyManager telephonyManager = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
        String myNumber = telephonyManager.getLine1Number();

        String remoteDatabaseUri = SharedPref.getString(this, "database_sync_name",
                getString(R.string.database_uri));
        //            remoteDatabaseUri += myNumber; 

        Log.d(TAG, "Initializing database at " + remoteDatabaseUri); // TODO: remove
        try {
            mDataOutHandler.initializeDatabase(dDatabaseName, dDesignDocName, dDesignDocId, byDateViewName,
                    remoteDatabaseUri);
        } catch (DataOutHandlerException e) {
            Log.e(TAG, e.toString());
            e.printStackTrace();
        }
        mDataOutHandler.setRequiresAuthentication(false);

    }

    mBioDataProcessor.initialize(mDataOutHandler);

    if (mLoggingEnabled) {
        mDataOutHandler.enableLogging(this);
    }

    if (mLogCatEnabled) {
        mDataOutHandler.enableLogCat();
    }

    // Log the version
    try {
        PackageManager packageManager = getPackageManager();
        PackageInfo info = packageManager.getPackageInfo(getPackageName(), 0);
        mApplicationVersion = info.versionName;
        String versionString = mAppId + " application version: " + mApplicationVersion;

        DataOutPacket packet = new DataOutPacket();
        packet.add(DataOutHandlerTags.version, versionString);
        try {
            mDataOutHandler.handleDataOut(packet);
        } catch (DataOutHandlerException e) {
            Log.e(TAG, e.toString());
            e.printStackTrace();
        }

    } catch (NameNotFoundException e) {
        Log.e(TAG, e.toString());
    }

    // Set up UI elements
    Resources resources = this.getResources();
    AssetManager assetManager = resources.getAssets();

    mPauseButton = (Button) findViewById(R.id.buttonPause);
    mAddMeasureButton = (Button) findViewById(R.id.buttonAddMeasure);
    mTextInfoView = (TextView) findViewById(R.id.textViewInfo);
    mMeasuresDisplayText = (TextView) findViewById(R.id.measuresDisplayText);

    // Don't actually show skin conductance meter unless we get samples
    ImageView image = (ImageView) findViewById(R.id.imageView1);
    image.setImageResource(R.drawable.signal_bars0);

    // Check to see of there a device configured for EEG, if so then show the skin conductance meter
    String tmp = SharedPref.getString(this, "EEG", null);

    if (tmp != null) {
        image.setVisibility(View.VISIBLE);
    } else {
        image.setVisibility(View.INVISIBLE);
    }

    // Initialize SPINE by passing the fileName with the configuration properties
    try {
        mManager = SPINEFactory.createSPINEManager("SPINETestApp.properties", resources);
    } catch (InstantiationException e) {
        Log.e(TAG, "Exception creating SPINE manager: " + e.toString());
        e.printStackTrace();
    }

    try {
        currentMindsetData = new MindsetData(this);
    } catch (Exception e1) {
        Log.e(TAG, "Exception creating MindsetData: " + e1.toString());
        e1.printStackTrace();
    }

    // Establish nodes for BSPAN

    // Create a broadcast receiver. Note that this is used ONLY for command messages from the service
    // All data from the service goes through the mail SPINE mechanism (received(Data data)).
    // See public void received(Data data)
    this.mCommandReceiver = new SpineReceiver(this);

    int itemId = 0;
    eegPos = itemId; // eeg always comes first
    mBioParameters.clear();

    // First create GraphBioParameters for each of the EEG static params (ie mindset)
    for (itemId = 0; itemId < MindsetData.NUM_BANDS + 2; itemId++) { // 2 extra, for attention and meditation
        GraphBioParameter param = new GraphBioParameter(itemId, MindsetData.spectralNames[itemId], "", true);
        param.isShimmer = false;
        mBioParameters.add(param);
    }

    // Now create all of the potential dynamic GBraphBioParameters (GSR, EMG, ECG, EEG, HR, Skin Temp, Resp Rate
    //       String[] paramNamesStringArray = getResources().getStringArray(R.array.parameter_names);
    String[] paramNamesStringArray = getResources().getStringArray(R.array.parameter_names_less_eeg);

    for (String paramName : paramNamesStringArray) {
        if (paramName.equalsIgnoreCase("not assigned"))
            continue;

        GraphBioParameter param = new GraphBioParameter(itemId, paramName, "", true);

        if (paramName.equalsIgnoreCase("gsr")) {
            gsrPos = itemId;
            param.isShimmer = true;
            param.shimmerSensorConstant = SPINESensorConstants.SHIMMER_GSR_SENSOR;
            param.shimmerNode = getShimmerNode();
        }

        if (paramName.equalsIgnoreCase("emg")) {
            emgPos = itemId;
            param.isShimmer = true;
            param.shimmerSensorConstant = SPINESensorConstants.SHIMMER_EMG_SENSOR;
            param.shimmerNode = getShimmerNode();
        }

        if (paramName.equalsIgnoreCase("ecg")) {
            ecgPos = itemId;
            param.isShimmer = true;
            param.shimmerSensorConstant = SPINESensorConstants.SHIMMER_ECG_SENSOR;
            param.shimmerNode = getShimmerNode();
        }

        if (paramName.equalsIgnoreCase("heart rate")) {
            heartRatePos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("resp rate")) {
            respRatePos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("skin temp")) {
            skinTempPos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("EHealth Airflow")) {
            eHealthAirFlowPos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("EHealth Temp")) {
            eHealthTempPos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("EHealth SpO2")) {
            eHealthSpO2Pos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("EHealth Heartrate")) {
            eHealthHeartRatePos = itemId;
            param.isShimmer = false;
        }

        if (paramName.equalsIgnoreCase("EHealth GSR")) {
            eHealthGSRPos = itemId;
            param.isShimmer = false;
        }

        itemId++;
        mBioParameters.add(param);
    }

    // Since These are static nodes (Non-spine) we have to manually put them in the active node list
    Node mindsetNode = null;
    mindsetNode = new Node(new Address("" + Constants.RESERVED_ADDRESS_MINDSET)); // Note that the sensor id 0xfff1 (-15) is a reserved id for this particular sensor
    mManager.getActiveNodes().add(mindsetNode);

    Node zepherNode = null;
    zepherNode = new Node(new Address("" + Constants.RESERVED_ADDRESS_ZEPHYR));
    mManager.getActiveNodes().add(zepherNode);

    // The arduino node is programmed to look like a static Spine node
    // Note that currently we don't have  to turn it on or off - it's always streaming
    // Since Spine (in this case) is a static node we have to manually put it in the active node list
    // Since the 
    final int RESERVED_ADDRESS_ARDUINO_SPINE = 1; // 0x0001
    mSpineNode = new Node(new Address("" + RESERVED_ADDRESS_ARDUINO_SPINE));
    mManager.getActiveNodes().add(mSpineNode);

    final String sessionName;

    // Check to see if we were requested to play back a previous session
    try {
        Bundle bundle = getIntent().getExtras();

        if (bundle != null) {
            sessionName = bundle.getString(BioZenConstants.EXTRA_SESSION_NAME);

            AlertDialog.Builder alert = new AlertDialog.Builder(this);
            alert.setTitle("Replay Session " + sessionName + "?");
            alert.setMessage("Make sure to turn off all Bluetooth Sensors!");

            alert.setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int whichButton) {

                    try {
                        mDataOutHandler.logNote("Replaying data from session " + sessionName);
                    } catch (DataOutHandlerException e) {
                        Log.e(TAG, e.toString());
                        e.printStackTrace();
                    }

                    replaySessionData(sessionName);
                    AlertDialog.Builder alert1 = new AlertDialog.Builder(mInstance);
                    alert1.setTitle("INFO");
                    alert1.setMessage("Replay of session complete!");
                    alert1.show();

                }
            });
            alert.show();
        }

    } catch (Exception e) {
        Log.e(TAG, e.toString());
        e.printStackTrace();
    }

    if (mInternalSensorMonitoring) {
        // IntentSender Launches our service scheduled with with the alarm manager 
        mBigBrotherService = PendingIntent.getService(Graphs1Activity.this, 0,
                new Intent(Graphs1Activity.this, BigBrotherService.class), 0);

        long firstTime = SystemClock.elapsedRealtime();
        // Schedule the alarm!
        AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime, mPollingPeriod * 1000,
                mBigBrotherService);

        // Tell the user about what we did.
        Toast.makeText(Graphs1Activity.this, R.string.service_scheduled, Toast.LENGTH_LONG).show();

    }

    //testFIRFilter();

    //       testHR();

}

From source file:fi.mikuz.boarder.gui.internet.InternetMenu.java

private void setLoggedOutView() {
    mInternetLoginLogout.setText(LOGIN_TEXT);
    mInternetRegisterSettings.setText(REGISTER_TEXT);
    mInternetFavorites.setVisibility(View.INVISIBLE);
}

From source file:com.repkap11.repcast.activities.LocalPlayerActivity.java

private void updateControllersVisibility(boolean show) {
    if (show) {//  ww  w .j a  v  a2 s  .c  om
        getSupportActionBar().show();
        mControllers.setVisibility(View.VISIBLE);
    } else {
        if (!Utils.isOrientationPortrait(this)) {
            getSupportActionBar().hide();
            hideSystemUI();
        }
        mControllers.setVisibility(View.INVISIBLE);
        ;
    }
    //onConfigurationChanged(getResources().getConfiguration());
}

From source file:com.example.nezarsaleh.shareknitest.RegisterNewTest.java

@Override
public void onClick(View v) {

    if (v == both_toggle) {
        both_toggle_active.setVisibility(View.VISIBLE);
        passenger_toggle_active.setVisibility(View.INVISIBLE);
        driver_toggle_active.setVisibility(View.INVISIBLE);
        usertype = "Both";
    }/* w  ww. j av a2  s.c  om*/

    if (v == passenger_toogle) {
        passenger_toggle_active.setVisibility(View.VISIBLE);
        driver_toggle_active.setVisibility(View.INVISIBLE);
        both_toggle_active.setVisibility(View.INVISIBLE);
        usertype = "Passenger";
    }

    if (v == driver_toggle) {
        driver_toggle_active.setVisibility(View.VISIBLE);
        passenger_toggle_active.setVisibility(View.INVISIBLE);
        both_toggle_active.setVisibility(View.INVISIBLE);
        usertype = "Driver";
    }

    //        if (v == male_female) {
    //            male_female.setVisibility(View.INVISIBLE);
    //            female_male.setVisibility(View.VISIBLE);
    //            i = 'F';
    //        } else if (v == female_male) {
    //            i = 'M';
    //            female_male.setVisibility(View.INVISIBLE);
    //            male_female.setVisibility(View.VISIBLE);
    //        }
}

From source file:com.facebook.android.friendsmash.HomeFragment.java

private void sendFilteredChallenge() {
    // Okay, we're going to filter our friends by their device, we're looking for friends with an Android device

    // Show the progressContainer during the network call
    progressContainer.setVisibility(View.VISIBLE);

    // Get a list of the user's friends' names and devices
    final Session session = Session.getActiveSession();
    Request friendDevicesGraphPathRequest = Request.newGraphPathRequest(session, "me/friends",
            new Request.Callback() {
                @Override/*from w  ww  .  java  2  s  .  c o m*/
                public void onCompleted(Response response) {
                    // Hide the progressContainer now that the network call has completed
                    progressContainer.setVisibility(View.INVISIBLE);

                    FacebookRequestError error = response.getError();
                    if (error != null) {
                        Log.e(FriendSmashApplication.TAG, error.toString());
                        ((HomeActivity) getActivity()).handleError(error, false);
                    } else if (session == Session.getActiveSession()) {
                        if (response != null) {
                            // Get the result
                            GraphObject graphObject = response.getGraphObject();
                            JSONArray dataArray = (JSONArray) graphObject.getProperty("data");

                            if (dataArray.length() > 0) {
                                // Ensure the user has at least one friend ...

                                // Store the filtered friend ids in the following List
                                ArrayList<String> filteredFriendIDs = new ArrayList<String>();

                                for (int i = 0; i < dataArray.length(); i++) {
                                    JSONObject currentUser = dataArray.optJSONObject(i);
                                    if (currentUser != null) {
                                        JSONArray currentUserDevices = currentUser.optJSONArray("devices");
                                        if (currentUserDevices != null) {
                                            // The user has at least one (mobile) device logged into Facebook
                                            for (int j = 0; j < currentUserDevices.length(); j++) {
                                                JSONObject currentUserDevice = currentUserDevices
                                                        .optJSONObject(j);
                                                if (currentUserDevice != null) {
                                                    String currentUserDeviceOS = currentUserDevice
                                                            .optString("os");
                                                    if (currentUserDeviceOS != null) {
                                                        if (currentUserDeviceOS.equals("Android")) {
                                                            filteredFriendIDs.add(currentUser.optString("id"));
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }

                                // Now we have a list of friends with an Android device, we can send requests to them
                                Bundle params = new Bundle();

                                // Uncomment following link once uploaded on Google Play for deep linking
                                // params.putString("link", "https://play.google.com/store/apps/details?id=com.facebook.android.friendsmash");

                                // We create our parameter dictionary as we did before
                                params.putString("message", "I just smashed " + application.getScore()
                                        + " friends! Can you beat it?");

                                // We have the same list of suggested friends
                                String[] suggestedFriends = { "695755709", "685145706", "569496010",
                                        "286400088", "627802916", };

                                // Of course, not all of our suggested friends will have Android devices - we need to filter them down
                                ArrayList<String> validSuggestedFriends = new ArrayList<String>();

                                // So, we loop through each suggested friend
                                for (String suggestedFriend : suggestedFriends) {
                                    // If they are on our device filtered list, we know they have an Android device
                                    if (filteredFriendIDs.contains(suggestedFriend)) {
                                        // So we can call them valid
                                        validSuggestedFriends.add(suggestedFriend);
                                    }
                                }
                                params.putString("suggestions", TextUtils.join(",", validSuggestedFriends
                                        .toArray(new String[validSuggestedFriends.size()])));

                                // Show FBDialog without a notification bar
                                showDialogWithoutNotificationBar("apprequests", params);
                            }
                        }
                    }
                }
            });
    // Pass in the fields as extra parameters, then execute the Request
    Bundle extraParamsBundle = new Bundle();
    extraParamsBundle.putString("fields", "name,devices");
    friendDevicesGraphPathRequest.setParameters(extraParamsBundle);
    Request.executeBatchAsync(friendDevicesGraphPathRequest);
}