Here you can find the source of getApplicationMarketPage( @Nonnull String packageName)
Parameter | Description |
---|---|
packageName | A full, valid Google Play application package name |
@Nonnull public static Intent getApplicationMarketPage( @Nonnull String packageName)
//package com.java2s; /*/*from ww w .ja v a 2 s . co m*/ * Copyright 2013 Luluvise Ltd * Copyright 2013 Marco Salis - fast3r(at)gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import javax.annotation.Nonnull; import android.content.Intent; import android.net.Uri; public class Main { /** * Returns an {@link Intent} with action {@link Intent#ACTION_VIEW} to open * the Google Play page for the passed package name. * * @param packageName * A full, valid Google Play application package name */ @Nonnull public static Intent getApplicationMarketPage( @Nonnull String packageName) { return getViewUrlIntent("market://details?id=" + packageName); } /** * Creates an {@link Intent} to open the passed URI with the default * application that handles {@link Intent#ACTION_VIEW} for that content. * * @param uri * The URI string (must be non null) * @return The created intent */ @Nonnull public static Intent getViewUrlIntent(@Nonnull String uri) { return new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); } }