OnePunchMan
OnePunchMan

Reputation: 748

how to put share app option ( which is not publish yet ) in android

I am trying to publish app for the first time.

I want to put a share button in my app, when the user clicks it will open up all the messaging apps, and can share the link to others, when the other person clicks on it, it will take to my app in the google play store.

I have looked through here, I think this is the way I need to do.

Problem is how do I get the link for my app which is not yet publish in google play store.

Do I need to publish my app first without the SHARE option and then get the market link, like mentioned here, I am thinking the link might be like this market://details?id=package_name, and then release an update with the SHARE option?

Upvotes: 1

Views: 1826

Answers (3)

Rathod Vijay
Rathod Vijay

Reputation: 417

You can use this code

 "https://play.google.com/store/apps/details?id="+getApplicationContext().getPackageName()

work for me fine

I hope help this

Upvotes: 6

Zirk Kelevra
Zirk Kelevra

Reputation: 230

Just replace the package name with your package name / applicationId

You do not need to publish the app first, just keep the same applicationId when you eventually upload the app.

For example

https://play.google.com/store/apps/details?id=com.instagram.android

market://details?id=com.instagram.android

app/build.gradle:

android {
compileSdkVersion 19
buildToolsVersion "19.1"

defaultConfig {
    applicationId "com.instagram.android"
    minSdkVersion 15
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}

Upvotes: 1

MinnuKaAnae
MinnuKaAnae

Reputation: 1646

No need to update the app. First you can do it with a temp link with dynamic process. After your app publish, you can replace that link with playstore link.

Upvotes: 0

Related Questions