Jump to content

42 posts in this topic

Recommended Posts

Updated

Hello,

Today I will teach you how to add toasts to your mods :)

 

What is a toast?

- Toast is a pop-up message that shows your text when you open the game. There are 2 types of toasts, and I'm going to show you how to implement them :)

 

 

Requirements

- Advanced  ApkTool

- Some Knowledge :D

 

Toast #1

- This toast only shows one line of text

 

mfOW6JP.png

 

Code:

const/4 v0, 0x1

const-string v1, "YOUR MESSAGE @ iOSGods.com"

invoke-static {p0, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

move-result-object v0

invoke-virtual {v0}, Landroid/widget/Toast;->show()V

 

 

 

Toast #2

- This toast creates a box that can be closed

 

eTH9wUl.jpg

 

Code:

new-instance v0, Landroid/app/AlertDialog$Builder;

invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

const-string v1, "Information"

invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

move-result-object v0

const-string v1, "YOUR MESSAGE @ www.iOSGods.com"

invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

move-result-object v0

const-string v1, "Visit US!"

const/4 v2, 0x0

invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

move-result-object v0

invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

 

Instructions:

1. Download Advanced ApkTool and paste your .APK file inside '2-In' folder

2. Open Advanced ApkTool and type '2' to decompile your .APK file

3. Wait until it fully decompiles

4. The decompiled .APK is located inside '3-Out' folder

5. Go inside that folder and you should see your decompiled .APK in folder form

6. Go inside it and you will find a file named 'AndroidManifest.xml'

7. Open that file and locate to the place where it shows this

 <activity android:configChanges="locale|fontScale|keyboard|keyboardHidden|layoutDirection|mcc|mnc|navigation|orientation|screenLayout|screenSize|touchscreen|uiMode" android:label="@string/icon_label" android:launchMode="singleTop" android:multiprocess="false" android:name="com.gameloft.android.ANMP.GloftA8HM.MainActivity" android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

8. If you pay attention above  <action android:name="android.intent.action.MAIN"/> there is 'android:name="com.gameloft.android.ANMP.GloftA8HM.MainActivity" '

9. This is the place where the toast is going to be placed; Toasts are always located inside smali folder, so the folder location will be /smali/com/gameloft/android/ANMP/GloftA8HM/MainActivity.smali

10. So go inside the those folder and you will see 'MainActivity.smali', open that file

11. Now search (CTR+F) for this: onCreate  and you should find something like this '.method public onCreate(Landroid/os/Bundle;)V'

12. Now copy the toast code and paste it under '.locals'  (If you don't paste it under .locals it wont work)

13. Remember the first Toast #1 works for all kind of apps but the second Toast #2 only works for 'MainActivity.smali or [Game]Activity' files.

14. After pasting the code, you can change the message to whatever you want to; Message is located here:  const-string v1, "YOUR MESSAGE @ www.iOSGods.com"

13. Now save the file and head back to Advanced ApkTool and type '3' to recompile your .APK

14. Choose your .APK file (Type the number that shows before the name)

15. Then type '2' to recompile and sign the .APK

16. Wait until its fully recompiled and signed (the box will close)

17. You are done implementing the toast :)

 

Toast #1: Works for all kinds of games, mostly used in Unity Games

Toast #2: Only works with MainActivity types of games, usually the games that contain binary files

 

 

Credits:

- @ZahirSher

  • Like 4
  • Winner 2
  • Thanks 6
  • Informative 1
Posted

in case something is missing, you must add these packages to make a poppup toast.

import Android.widget.toast;

Duration of a toast also can be set up using these codes :

LENGTH_SHORT
LENGTH_LONG
  • Informative 1
Posted

in case something is missing, you must add these packages to make a poppup toast.

import Android.widget.toast;
Duration of a toast also can be set up using these codes :

LENGTH_SHORT
LENGTH_LONG

Thanks! Was looking for what's missing!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Run! Goddess v1.0.22 [+4 Jailed Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4



      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
      • 93 replies
    • Run! Goddess v1.0.22 [+4 Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4

       

      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
       
      • 80 replies
    • Alien Survivor: Survival Arena v1.38.1 [ +7 Cheats ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4
       

      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      • 15 replies
    • Alien Survivor: Survival Arena v1.38.1 [ +7 Jailed ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4


      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 26 replies
    • Legend of Survivors V1.2.8 [ +17 Jailed ] Currency Max
      Modded/Hacked App: Legend of Survivors By ABI GLOBAL LTD.
      Bundle ID: com.abi.legendofsurvivors
      iTunes Store Link: https://apps.apple.com/us/app/legend-of-survivors/id6489580730?uo=4


      Hack Features:

      - NO ADS

      - Gems 

      - Gold

      - Energy 

      - Material

      - Health Max [ Equip & Upgrade ]

      - Damage [ Equip & Upgrade ]

      - Skill Cooldown

      - EXP + Level [ Patrol Reward ]

      - Patrol Reward [ Claim Unlimited ]

      - Growth Pack Unlock

      - Growth Pack [ Claim Unlimited ]

      - Monthly card Pack Unlock

      - Monthly card Pack [ Claim Unlimited ]


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 48 replies
    • Legend of Survivors V1.2.8 [ +17 Cheats ] Currency Max
      Modded/Hacked App: Legend of Survivors By ABI GLOBAL LTD.
      Bundle ID: com.abi.legendofsurvivors
      iTunes Store Link: https://apps.apple.com/us/app/legend-of-survivors/id6489580730?uo=4


      Hack Features:
      - IAP Free [ Buy Anything - Gems Gold Ads Premium Packs ]

      - NO ADS

      - Gems 

      - Gold

      - Energy 

      - Material

      - Health Max [ Equip & Upgrade ]

      - Damage [ Equip & Upgrade ]

      - Skill Cooldown

      - EXP + Level [ Patrol Reward ]

      - Patrol Reward [ Claim Unlimited ]

      - Growth Pack Unlock

      - Growth Pack [ Claim Unlimited ]

      - Monthly card Pack Unlock

      - Monthly card Pack [ Claim Unlimited ]
      • 132 replies
    • Kitchen Masters v15.0.0 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Kitchen Masters By Bigger Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.bigger.kitchenmasters
      iTunes Store Link: https://apps.apple.com/ph/app/kitchen-masters/id6474870266?uo=4


      🤩 Hack Features

      - Coins

      - Cash

      - Lives

      - Tile Cost 0
      • 6 replies
    • Kitchen Masters v15.0.0 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Kitchen Masters By Bigger Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.bigger.kitchenmasters
      iTunes Store Link: https://apps.apple.com/ph/app/kitchen-masters/id6474870266?uo=4
       

      🤩 Hack Features

      - Coins

      - Cash

      - Lives

      - Tile Cost 0
      • 10 replies
    • Score Masters v2.2 [ +7 Jailed ] Always Win
      Modded/Hacked App: Score Masters By SKYLOFT YAZILIM BILISIM VE TICARET ANONIM SIRKETI
      Bundle ID: com.bh.hypergoal
      iTunes Store Link: https://apps.apple.com/us/app/score-masters/id6473402760?uo=4


      🚀 Hack Features

      - Auto ADS Disable

      - Gems [ Mission Rewards ]

      - Coins [ Mission Rewards ]

      - Player Score 20 Max

      - Always Win Player

      - AI Score 0

      - AI Miss
      • 5 replies
    • Score Masters v2.2 [ +7 Cheats ] Always Win
      Modded/Hacked App: Score Masters By SKYLOFT YAZILIM BILISIM VE TICARET ANONIM SIRKETI
      Bundle ID: com.bh.hypergoal
      iTunes Store Link: https://apps.apple.com/us/app/score-masters/id6473402760?uo=4


      🚀 Hack Features

      - Auto ADS Disable

      - Gems [ Mission Rewards ]

      - Coins [ Mission Rewards ]

      - Player Score 20 Max

      - Always Win Player

      - AI Score 0

      - AI Miss
      • 8 replies
    • Adventure Bay - Farm Games v1.42.14 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Adventure Bay - Farm Games By Gamegos Teknoloji A.S.
      Bundle ID: com.gamegos.adventure.bay.paradise.farm
      iTunes Store Link: https://apps.apple.com/us/app/adventure-bay-farm-games/id1578449819?uo=4
       

      🤩 Hack Features

      - Gems
      - Coins
      - Energy
      - Avatar Unlock
      • 19 replies
    • Adventure Bay - Farm Games v1.42.14 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Adventure Bay - Farm Games By Gamegos Teknoloji A.S.
      Bundle ID: com.gamegos.adventure.bay.paradise.farm
      iTunes Store Link: https://apps.apple.com/us/app/adventure-bay-farm-games/id1578449819?uo=4


      🤩 Hack Features

      - Gems
      - Coins
      - Energy
      - Avatar Unlock
      • 25 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines