Quantcast
Jump to content

Cómo Usar el Samsung In-App Purchase SDK en sus Juegos Creados con Unity


STF News
 Share

Recommended Posts

2020-09-16-01-banner.jpg

En este video del Programa para desarrolladores de Samsung, aprenda cómo integrar el SDK de compras en la aplicación (IAP) de Samsung en sus juegos de Unity.

Puede obtener más información en https://developer.samsung.com/iap

El proceso general para publicar su juego, cuando incluye pagos y microtransacciones por medio del Samsung IAP SDK es el siguiente:
Proceso de Publicación

1- Registro en el Portal

Para crear su cuenta y publicar en la Galaxy Store puede ir a http://seller.samsungapps.com

Haga clic en la esquina superior para crear su cuenta. Si ya tiene una cuenta de Samsung, puede ingresar con ella.
Haga Clic Aquí

2- Solicitar el Status de Vendedor

Una vez que haya creado su cuenta en el portal de desarrollo, puede solicitar su estatus de vendedor haciendo clic en el botón indicado en la imagen. Esto es necesario para poder vender diferentes artículos desde su aplicación.
Solicitar Status de vendedor

3- Registrar su Aplicación/Juego

Para ver todo el detalle de cómo registrar su aplicación en el portal de ventas, puede ver el video que se encuentra en https://youtu.be/fil7DmD1v3g

En general, se le va a solicitar que ingrese la información de su juego, como el nombre, descripción e imágenes promocionales.

4- Registro de los Artículos en Venta
Cuando su cuenta ha sido aprobada como una cuenta de vendedores, podrá tener acceso a la sección de “In App Purchase”.

Registrar los artículos a vender

Aquí podrá registrar los diferentes artículos que va a vender, como vidas ilimitadas, poderes especiales, u opciones de personalización para los personajes de su juego.

En el video podrá ver un poco más de detalle de cómo registrar cada uno de los artículos.

Plugin para Unity

Para poder usar el kit de desarrollo de la Samsung IAP, debe seguir los siguientes pasos:

1- Descargar desde https://developer.samsung.com/iap/samsung-iap-unity-plugin.html
2- Instalar el Plugin

  • a. En Unity haga clic en Assets -> Import Package -> Custom Package
    Adicionando el plugin en Unity

3- Arrastrar el Script en un objeto del juego

  • a. Este puede ser cualquier objeto de la UI, o como se ve en el video, un personaje de su juego.

Una vez que haya incluido el Script, puede revisar la documentación (https://developer.samsung.com/iap/samsung-iap-unity-plugin.html) para ver en detalle cómo llamar la SDK desde el código de su juego, pero aquí tiene los conceptos básicos:

Modo de operación

Para que la Galaxy Store sepa si su juego está realizando pruebas, o si ya està en modo de producción, debe usar el método SetOperationMode.

SamsungIAP.Instance.SetOperationMode(OperationMode.OPERATION_MODE_TEST);

Los posibles valores para el parámetro son OperationMode.OPERATION_MODE_TEST, OperationMode.OPERATION_MODE_TEST_FAILURE, y OperationMode.OPERATION_MODE_PRODUCTION.

Solicitar información de los artículos disponibles en venta

Para saber qué artículos se pueden ofrecer desde el juego, debe invocar el método GetProductDetails.

SamsungIAP.Instance.GetProductDetails("com.mygame.product1, com.mygame.product2,com.mygame.product3", OnGetProductsDetails);

En este ejemplo se está solicitando la información de los productos 1, 2, y 3, ya que se está enviando los identificadores de esos productos, separados por comas.

SamsungIAP.Instance.GetProductDetails("", OnGetProductsDetails);

En este ejemplo se esta pidiendo la información de todos los productos disponibles, ya que no se está enviando ningún identificador de productos.

Iniciar un pago

Para poder empezar la compra de un producto se debe invocar el método StartPayment.

SamsungIAP.Instance.StartPayment("com.mygame.product1", "pass_through_value", OnPayment);

En este ejemplo se está iniciando la transacción para el “com.mygame.product1”.
Usted puede especificar el valor del segundo parámetro y utilizarlo para verificar el éxito de la compra.

Y por último se especifica el “callback”, que es el método que se va a invocar cuando se finalice la transacción, sin importar si esta fue exitosa o no.

Artículos Consumibles

Usted puede usar el método ConsumePurchasedItems para reaprovisionar productos consumibles. Así el jugador puede comprar energía en su juego cuantas veces quiera, por ejemplo.

El primer parámetro es el identificador de la compra del artículo.

SamsungIAP.Instance.ConsumePurchasedItems(purchase_id, OnConsume);

Y el segundo parámetro es el método OnConsume que se activa cuando el proceso ha terminado, y este contiene información sobre el artículo consumido y el procesamiento de llamadas a la API.

Consultar productos adquiridos anteriormente

Para obtener la lista de todos los productos que un jugador ha comprado, puede usar el método GetOwnedList.

SamsungIAP.Instance.GetOwnedList(ItemType.all, OnGetOwnedList);

El primer parámetro puede ser ItemType.all, ItemType.item, o ItemType.subscription.

Con ItemType.all el método devuelve todos los artículos no consumibles comprados, los artículos consumibles que no se han consumido y los artículos de suscripción con suscripciones activas.

Con ItemType.item el método devuelve todos los artículos no consumibles comprados y los artículos consumibles que no se han consumido.

Y por último, con ItemType.subscription el método devuelve todos los artículos de suscripción comprados con suscripciones activas.

El segundo parámetro, es el método que se activará cuando el proceso ha finalizado.

Para obtener más tutoriales, visite Samsung Developers. (http://developer.samsung.com/)

View the full blog at its source

Link to comment
Share on other sites



  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Similar Topics

    • By BGR
      The Galaxy S22 series is Samsung’s best-selling Galaxy S version in recent years, according to the company’s own remarks. However, the Galaxy S22 has also been at the center of a few unfortunate controversies that buyers need to know about before purchasing the flagship. Now, there’s yet another problem to add to the pile of Galaxy S22 issues, an audio-video sync bug that Samsung has yet to fix.
      Don't Miss: Monday deals: AirPods, Apple Watch, kids toys, star projector, more The Galaxy S22’s many problems
      To recap the recent Galaxy S22 controversies and issues that prospective buyers should be aware of, we’ll remind you that Samsung has been misleading customers regarding a few key features.
      The Galaxy S22 and Galaxy S22 Plus do not have a dynamic refresh rate as good as initially advertised. The Plus and the Galaxy S22 Ultra do not actually recharge much faster using the optional 45W fast charger.
      Then, Galaxy S22 phones were found to throttle performance and cheat on benchmark tests. There’s a software fix for this one in some regions, but not in the US. Samsung was quick to address the issue after many people criticized the Galaxy S22 in Korea.
      That’s to say that Samsung can fix software issues, like the new audio-video problem that users discovered.
      Finally, some Galaxy S22 units ran into GPS connectivity issues, another problem that software might fix.
      Samsung Galaxy S22 Ultra smartphone. Image source: Samsung The audio-video sync issue
      Unlike the throttling issue that Samsung hurried to patch, there’s no telling when the audio-video sync problem will be fixed. Also, unlike the Galaxy S22 performance slowdown, there’s no telling how widespread the audio problem is.
      Per SamMobile, “many” Galaxy S22 users had to deal with the audio-video sync issues.
      The problem impacts both the Snapdragon and Exynos variants of the phone. Notably, the throttling issue seemed to primarily affect the Exynos 2200 models.
      The Galaxy S22 audio-video sync issue can appear with or without wireless earbuds. The wireless earbuds seem to trigger it even more, however.
      The blog says there are some types of actions on the phone that can cause audio-video sync issues. The problem can happen in the Gallery app and also in YouTube or Chrome.
      In the Gallery, unmuting a video might lead to the image freezing, but the audio continues playing. Changing resolutions in YouTube can also cause audio and video to fall out of sync.
      Interestingly, SamMobile says the “Processing speed” toggle that fixes throttling doesn’t impact the audio-video sync bugs. They occur regardless of whether it’s on or off. Also, the audio problem affects both Snapdragon and Exynos phones. However, the sync issues might have appeared after Samsung fixed the throttling problem, the blog says.
      Your mileage might vary but if you experience audio-video sync issues on your Galaxy S22, you’re not alone. Samsung will hopefully fix the problem at some point in the future. But for the time being, there’s no way to fix it yourself.
      The post Galaxy S22 has audio-video sync problems that Samsung hasn’t fixed appeared first on BGR.
      View the full article
    • By STF News
      On March 30, Samsung Electronics held its virtual Unbox & Discover 2022, at which the company introduced its very latest Samsung Neo QLED 8K along with the remastered Samsung Smart Hub and other user-first innovations set to redefine the role of the screen and provide users with all-new viewing experiences.
       
      If you weren’t able to catch the event live, take a look at the video below for a replay of the Unbox & Discover event in its entirety, and be sure to stay tuned to Samsung Newsroom for all the latest details on Samsung’s newest products.
       
      View the full article
    • By STF News
      Ahead of the livestream broadcast of their 2022 Unbox & Discover event, Samsung Electronics has released a brief preview of the event in the form of a teaser video. Take a look at the video below for a sneak peak into how Samsung is set to redefine the role of the screen on March 30, along with the new viewing experiences set to be heralded by the all-new Neo QLED 8K lineup.
       
       
      Be sure to tune in to Samsung’s Unbox & Discover 2022 event on either Samsung Newsroom or Samsung.com on March 30 at 11 p.m. KST to learn more about the future of the screen experience.
      View the full article
    • By Alex
      DALLAS—Parks Associates has released consumer research showing that in Q3 2021, 27% of US broadband subscribers reported that smart TV’s using the Samsung Tizen operating system were their primary device for consuming video content. 
      The data highlighted the fact that more “changes are coming for the video entertainment market in 2022," said Eric Sorensen, senior contributing analyst, Parks Associates. "The smart TV will cement its status as the default streaming platform in the households. We will see many more content partnerships and service acquisitions among providers and manufacturers. Content creators will leverage their ability to reach audiences directly, while service and content providers will adapt their business models to anticipate higher levels of churn than in previous years."
      Acquisitions and consolidations are becoming key options for streaming firms to compete in the face of limited material and the constant demand for more new content, Parks also reported.  
      It’s OTT Video Tracker found that the average churn rate for SVODs increased to 45% in 2021, a 5.5 percentage point jump from 2020. Consumers hold on to the services they use the most and jump among the others, paying for a program or season and then canceling when they are finished, Parks reported. The number of subscriptions may rise and fall over time, indicating that churn rates will continue to be elevated in 2022.
      Parks Associates also reported that streaming media providers will face increasing competition from digital and social content producers in 2022. Popular online content creators are circumventing established distribution models and building their streaming applications from the ground up. For instance, KevOnStage Studios, created by comedian and multi-viral content producer Kevin Fredericks, whose stage name is KevOnStage, is very successful with his YouTube channel.
      "Streaming apps provide new revenue opportunities, especially with the chance to retain content ownership rights," Sorensen said. "Digital content creators can monetize content and build audiences collected from social networking and video sharing platforms to their streaming applications and websites."
      The OTT Video Market Tracker, an annual service from Parks Associates, features monthly updates on trends and market activities in the OTT video space, including comprehensive tracking of existing and emerging players and quarterly subscriber estimates. 
      Source: https://www.tvtechnology.com/news/samsungs-tizen-os-for-smart-tvs-is-the-primary-video-viewing-device-in-27-of-us-broadband-homes
    • By STF News
      Samsung designed the Odyssey Neo G9 not just for gamers who prize high-end specs and a smooth gaming experience, but also for those who are interested in taking their gaming space to the next level.
       
      To highlight the gaming monitor’s stunning details and unique style, Samsung partnered with Clay Artisan Jay, a professional clay sculptor who’s known for creating outstanding works of art. Check out the video below to see how Clay Artisan Jay brought the Odyssey Neo G9 to life.
       
      View the full article





×
×
  • Create New...