2017-06-14 636 views
0

我已經Android應用程序用Delphi firemonkey創建,我想我的應用程序打開Play商店和直接到我的應用頁面,當我擊出了一些按鈕如何打開Play商店中,並直接到我的應用程序頁面

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

您可以將此作爲提示https://stackoverflow.com/q/18873699/8041231 – Victoria

+0

您到現在爲止嘗試過什麼? – RBA

回答

0

試試這個:

Intent := TJIntent.Create; 
Intent.setAction(TJIntent.JavaClass.ACTION_VIEW); 
Intent.setData(StrToJURI('market://details?id=PACKAGE_NAME')); 
SharedActivity.startActivity(Intent); 

其中PACKAGE_NAME是您在應用商店中註冊的應用程序包。 例如com.mypackage.myapp

+0

謝謝你,作品magiccc .... – iboy15

+0

很高興幫助你 –

相關問題