| 
														
															@@ -226,9 +226,14 @@ begin 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 end;
 
														 | 
														
														 | 
														
															 end;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 class function TAndroidHelperEx.HasAssocApp(const Intent: JIntent): Boolean;
 
														 | 
														
														 | 
														
															 class function TAndroidHelperEx.HasAssocApp(const Intent: JIntent): Boolean;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+var
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  LList: JList;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 begin
 
														 | 
														
														 | 
														
															 begin
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  Result :=  Activity.getPackageManager.queryIntentActivities(Intent,
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    TJPackageManager.JavaClass.MATCH_DEFAULT_ONLY).size > 0;
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  // Android 6+ APP LINK closed Will cause list is null.
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  // Activity with <action android:name="android.intent.action.VIEW" />
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  LList := Activity.getPackageManager.queryIntentActivities(Intent,
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    TJPackageManager.JavaClass.MATCH_DEFAULT_ONLY);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  Result := (LList <> nil) and (LList.size > 0);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 end;
 
														 | 
														
														 | 
														
															 end;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 class function TAndroidHelperEx.HasAssocApp(const URI: string): Boolean;
 
														 | 
														
														 | 
														
															 class function TAndroidHelperEx.HasAssocApp(const URI: string): Boolean;
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -319,9 +324,7 @@ end; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 class function TAndroidHelperEx.StartActivity(Intent: JIntent; const Code: Integer): Boolean;
 
														 | 
														
														 | 
														
															 class function TAndroidHelperEx.StartActivity(Intent: JIntent; const Code: Integer): Boolean;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 begin
 
														 | 
														
														 | 
														
															 begin
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   Result := False;
 
														 | 
														
														 | 
														
															   Result := False;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  //Checks if there is at least one application capable of receiving the intent.
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  if Activity.getPackageManager.queryIntentActivities(Intent,
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      TJPackageManager.JavaClass.MATCH_DEFAULT_ONLY).size > 0 then begin
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  if HasAssocApp(Intent) then begin
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if Code = -1 then
 
														 | 
														
														 | 
														
															     if Code = -1 then
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       Activity.startActivity(Intent)
 
														 | 
														
														 | 
														
															       Activity.startActivity(Intent)
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     else
 
														 | 
														
														 | 
														
															     else
 
														 |