File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
app/src/main/java/org/fossasia/phimpme/gallery/activities Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11package org .fossasia .phimpme .gallery .activities ;
22
3+ import android .content .ActivityNotFoundException ;
34import android .content .Context ;
45import android .content .Intent ;
56import android .content .pm .PackageManager ;
@@ -223,10 +224,14 @@ public void onClick(View view) {
223224 new View .OnClickListener () {
224225 @ Override
225226 public void onClick (View view ) {
226- Intent facebookIntent = new Intent (Intent .ACTION_VIEW );
227- String facebookUrl = getFacebookPageURL (getApplicationContext ());
228- facebookIntent .setData (Uri .parse (facebookUrl ));
229- startActivity (facebookIntent );
227+ try {
228+ Intent facebookIntent = new Intent (Intent .ACTION_VIEW );
229+ String facebookUrl = getFacebookPageURL (getApplicationContext ());
230+ facebookIntent .setData (Uri .parse (facebookUrl ));
231+ startActivity (facebookIntent );
232+ }catch (ActivityNotFoundException e ){
233+ cts .launchUrl ("https://www.facebook.com/phimpmeapp" );
234+ }
230235 }
231236 });
232237
You can’t perform that action at this time.
0 commit comments