我有使用delphi firemonkey创建的android应用程序,我希望我的应用程序打开播放商店并直接到我的应用程序页面时,我点击一些按钮
unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
begin
//open playstore and direct to my apps page
end;
end.
答案 0 :(得分:0)
试试这个:
Intent := TJIntent.Create;
Intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
Intent.setData(StrToJURI('market://details?id=PACKAGE_NAME'));
SharedActivity.startActivity(Intent);
PACKAGE_NAME是您在Play商店注册的应用包。 例如com.mypackage.myapp