playMaker

Author Topic: Android LVL  (Read 5256 times)

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Android LVL
« on: August 04, 2011, 05:36:56 AM »
Well time to finish the game. So far i have not bother so much about this, but I guess I need to.
Its no problem for me to sign the app and that kind.
What i did find out that Unity3D dont do any automatic check on the license.
So it would be very good if I could use a FSM for this so I could just set it up and use it on all places I need.

This code should work with android( have not checked it yet)

Code: [Select]
function Start(){
   //Put this code where you want your game to check for the crack and do something
   //Like in your main menu
var shameOnYouPicture : GUITexture;   //use a picture with a written message that shames the cracker :P
    shameOnYouPicture.enabled = false;


   if (iPhoneUtils.isApplicationGenuine == false){
     shameOnYouPicture.enabled = true;
     StopEverything();  // a custom method for examples that handles stopping the game;
   }
}


So how should I do this with playmaker?
Maybe we need an action for this, but I have no clue how to fix it.
But I guess this is one problem for all that develop on android and want to sell the stuff on the market.
So it should be a very good action script for playmaker.
Like checking if its genuine.
If its not then show a "bad" picture and then exit the program.
Can it be done???


giyomu

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 108
    • View Profile
    • blog
Re: Android LVL
« Reply #1 on: August 04, 2011, 05:53:40 AM »
Well simple way, will be to just code a playmaker action that check this, and send an event based on waht you get, from there you do what you want.

Should not be hard to code, looking a simple code action already in as reference.

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Re: Android LVL
« Reply #2 on: August 04, 2011, 06:28:41 AM »
Well simple way, will be to just code a playmaker action that check this, and send an event based on waht you get, from there you do what you want.

Should not be hard to code, looking a simple code action already in as reference.

No it should not be hard to do.
It shall check this first: iPhoneUtils.isApplicationGenuineAvailable
Just to see that the app has been added the right way so it has that status.
Then if that is true it should check the other code.

If its genuine you should be able to send it to an event.
Well it can send a event on all values for then you can do what you want.
So i guess its much simpler then i did think first. lol

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Re: Android LVL
« Reply #3 on: August 06, 2011, 02:31:42 PM »
mm almost forgot this.
Only this is left so I can release my game.
I wish I could do it my self for I know its an simple thing to do.
Hope someone can fix it today  ::)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Android LVL
« Reply #4 on: August 08, 2011, 07:49:15 AM »
Did you get this working?

You would need to find the Android functions that you need to check. Then it would be easy to write you an action.

Q

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Re: Android LVL
« Reply #5 on: August 08, 2011, 11:50:10 AM »
The function is no problem to get to work, but the action to do it is different story.
But for now i did solve it to write a js code an just put it on the camera.
So it will check it and load up a different scene and then close down the app.

But it would be nice with a action script that do this.
But i had no time to learn how they work.

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Android LVL
« Reply #6 on: August 08, 2011, 12:22:32 PM »
Well if you want to try some time just let me know. Maybe we could create the Action.

But i would probably need your JS file

Q

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Re: Android LVL
« Reply #7 on: August 08, 2011, 01:52:49 PM »
Well the code is very simple.
First it does check if the app has the genuine settings.
If not then it will not check the app.
If has then it check if the app is genuine.
If its broken it show a different image and wait 5 seconds before it quit the program.


Code: [Select]
var bgImage : Texture;

function OnGUI ()
{
StartCoroutine(WaitASek(5.0));


}


function WaitASek (waitTime : float)
{
if (iPhoneUtils.isApplicationGenuineAvailable == true)
{
if (iPhoneUtils.isApplicationGenuine == false)
{
  GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height), bgImage);
yield WaitForSeconds (waitTime);
Application.Quit();
}
}   
}

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Android LVL
« Reply #8 on: August 09, 2011, 12:43:59 PM »
I can try to have a closer look at this later.. Not being a real programmer it takes me a bit to wrap my head around some things.

These are iPhone commands? Why is this in the Android Platform folder? Does it work for both?

Q

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Re: Android LVL
« Reply #9 on: August 09, 2011, 02:05:37 PM »
I can try to have a closer look at this later.. Not being a real programmer it takes me a bit to wrap my head around some things.

These are iPhone commands? Why is this in the Android Platform folder? Does it work for both?

Q

Lol.
For me its other way around..

Yes many commands is Iphone, but they do work well on android to.
Funny thing about this is that android use it but not iphone.
So i have no clue way they have not change it.

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Android LVL
« Reply #10 on: August 09, 2011, 02:18:37 PM »
That is funny...

i will look at it later.. my head is full right now.

Q

Isaiah

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Android LVL
« Reply #11 on: November 24, 2011, 11:10:32 PM »
Has anyone submitted an APK to androidtapp for review that has LVL code in it?

I really don't feel comfortable handing out APK's without the LVL in it.. but for them to get a valid response and be able to run the code they would need to be in my test users list otherwishe when they try to run the APK they should be rejected correct?

Also, I am thinking of signing the APK I would send them with an expiration of a few days or weeks at most. Is this appropriate?

Does anyone have any thoughts on this? I don't see anything on the submission pages about what emails to add to your test users reguarding the LVL check etc.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Android LVL
« Reply #12 on: November 25, 2011, 07:02:09 AM »
Hi,

 sorry, haven't seen that post, but I did a custom action regards checking if the app is genuine and all that. It might come handy even now. Not sure if that can help the lvl tho.

http://hutonggames.com/playmakerforum/index.php?topic=618.0

Bye,

 Jean