Java 在官方android市场上创建付费应用程序
我想在google play store中创建一个付费应用程序。有人能告诉我怎么做吗这里是我的主要活动Java 在官方android市场上创建付费应用程序,java,android,eclipse,webview,Java,Android,Eclipse,Webview,我想在google play store中创建一个付费应用程序。有人能告诉我怎么做吗这里是我的主要活动 `public class MainActivity extends Activity { //private Button button; private WebView webView; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setConte
`public class MainActivity extends Activity {
//private Button button;
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Get webview
webView = (WebView) findViewById(R.id.webview);
webView.loadUrl("file:///android_asset/Index.html");
// Open previous opened link from history on webview when back button pressed
@Override
// Detect when the back button is pressed
public void onBackPressed() {
if(webView.canGoBack()) {
webView.goBack();
} else {
// Let the system handle the back button
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId() == R.id.disclaimer) {
Intent k = new Intent(this, Webscreen.class);
k.putExtra(cf.droiddev.oursolarsystem.Webscreen.URL,
"file:///android_asset/Disclaimer.html");
startActivity(k);
return true;
}
if(item.getItemId() == R.id.about) {
Intent j = new Intent(this, About.class);
startActivity(j);
return true;
}
if(item.getItemId() == R.id.exit) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
MainActivity.this);
// set title
alertDialogBuilder.setIcon(android.R.drawable.ic_dialog_alert).setTitle("Exit App");
// set dialog message
alertDialogBuilder
.setMessage("Do you want to exit")
.setCancelable(false)
.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,int id) {
// if this button is clicked, close
// current activity
MainActivity.this.finish();
}
})
.setNegativeButton("No",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,int id) {
// if this button is clicked, just close
// the dialog box and do nothing
dialog.cancel();
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
return true;
}
return super.onOptionsItemSelected(item);
}
}`
这里是我的主要activity.xml
`
`
任何帮助都将不胜感激。我尝试了谷歌的文档,但它给出了我的项目错误付费应用程序与免费应用程序没有区别。当您在中提交应用程序时,您将能够指定其价格-无论是0美元还是更高。你不能提交它作为免费的,并使其支付后
如果你想在应用程序中拥有付费内容(比如在大多数游戏中购买更多的生命),这有点不同。它需要从Google Play控制台更改实现和配置。是此类交易的官方文档。我已将其升级,以取消愚蠢的否决票(没有评论)。您需要发布应用程序(),然后在您的挂牌价格中指定。@RohitGupta没有否决票,但否决票不需要评论,也不愚蠢。它们是意见。仅仅为了取消某人的意见而投票是不好的做法。这个问题很糟糕,因为代码与实际问题无关,而这个问题可以通过谷歌的文档来回答。@SamiKuhmonen,真的,没有评论的向下投票如何帮助任何人;最不重要的是,他怎么知道自己做错了什么?如果这个问题可以通过谷歌文档来回答,那么为什么不告诉他并投票决定这个问题的答案呢?这比争论我的观点更有成效。:-)@罗希特古普塔:我不争辩,当然最好发表评论。但是投票是为了问题的价值,而不是说你不同意别人的投票。
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</RelativeLayout>`