Jump to content

How to add a Toast/Popup to your Android Mods!


Zahir

41 posts in this topic

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   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.

  • Our picks

    • Dragons: Rise of Berk v1.83.11 +6 Cheats
      Modded/Hacked App: Dragons: Rise of Berk By Jam City, Inc.
      Bundle ID: com.ludia.dragons
      iTunes Store Link: https://apps.apple.com/us/app/dragons-rise-of-berk/id667461862?uo=4


      Hack Features:
      - Free Shopping (shows original cost but able to purchase regardless)
      - Free Skipping
      - Free Odin's Market Shopping
      - Odin's Market Packs Never Reduce
      - Currency Hack [Spend to Gain - reverts to zero on next launch]
      - Enable Rider's Club


      Non-Jailbroken & No Jailbreak required hack(s):  https://iosgods.com/topic/79228-dragons-rise-of-berk-v1794-4-cheats-for-jailed-idevices/


      iOS Hack Download Link: https://iosgods.com/topic/139612-dragons-rise-of-berk-v1794-6-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 583 replies
    • Toram Online v4.0.29 - [ Custom Move Speed & More ]
      Modded/Hacked App: Toram Online By ASOBIMO,Inc.
      Bundle ID: com.asobimo.toramonline
      iTunes Store Link: https://itunes.apple.com/us/app/toram-online/id988683886?mt=8&uo=4&at=1010lce4
       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Custom Move Speed
      - God Mode 
      - Fast Attack Speed
      - Fast Cast Speed
      - Always Critical Chance
      - Never Miss Hit 
      - Mobs/Bosses Can't Avoid & Guard 
      - Quick Draw
      - Armor Break
      - Magic Wall - Stun + Full Map Hack 
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,393 replies
    • Shadow Fight 2 v2.34 Cheats +3
      Modded/Hacked App: Shadow Fight 2 By MOBILNYE IGRY OOO
      Bundle ID: com.nekki.shadowfight
      iTunes Store Link: https://apps.apple.com/us/app/shadow-fight-2/id696565994?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Unlimited gold
      - Unlimited gem
      - Max level
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 75 replies
    • Shadow Fight 2 v2.34 Cheats +3
      Modded/Hacked App: Shadow Fight 2 By MOBILNYE IGRY OOO
      Bundle ID: com.nekki.shadowfight
      iTunes Store Link: https://apps.apple.com/us/app/shadow-fight-2/id696565994?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Unlimited gold
      - Unlimited gem
      - Max level


      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 497 replies
    • Abyss - Roguelike ARPG v1.92 Cheats +4
      Modded/Hacked App: Abyss - Roguelike ARPG By Pyro Entertainment Limited
      Bundle ID: com.titans.abyss
      iTunes Store Link: https://apps.apple.com/us/app/abyss-roguelike-arpg/id6443793989?uo=4

       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Stupid enemies
      - AOE atk
      - Always combo
      - Fast atk
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 22 replies
    • Abyss - Roguelike ARPG v1.92 Cheats +6 [semi-autoupdate]
      Modded/Hacked App: Abyss - Roguelike ARPG By Pyro Entertainment Limited
      Bundle ID: com.titans.abyss
      iTunes Store Link: https://apps.apple.com/us/app/abyss-roguelike-arpg/id6443793989?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Enermies no atk
      - Stupid enemies
      - Speed move
      - AOE atk
      - Always combo
      - Fast atk
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 65 replies
    • Idle Ninja Online v2060 Cheats +15
      Modded/Hacked App: Idle Ninja Online By Puzzle Monsters Inc.
      Bundle ID: com.puzzlemonsters.growninja
      iTunes Store Link: https://apps.apple.com/us/app/idle-ninja-online/id1559182313?uo=4


      Hack Features:
      - no cool skill
      - no need mana
      - speed
      - max level
      - fast shot
      - penetration
      - multi shot
      - far FOV (in setting)
      - can move 
      - reduce animation
      - skin dame (need show damege skin in setting, from 1 to 23)
      - antiban (not sure 100%) 


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 507 replies
    • Basketball Arena - Sports Game v1.109 Cheats +3
      Modded/Hacked App: Basketball Arena - Sports Game By MASOMO LIMITED
      Bundle ID: com.masomo.basketballarena
      iTunes Store Link: https://apps.apple.com/us/app/basketball-arena-sports-game/id1491198695?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Speed move
      - Skip transition
      - Unlimited mana
      - Dump AI
        • Haha
        • Like
      • 5 replies
    • Basketball Arena - Sports Game v1.109 Cheats +4
      Modded/Hacked App: Basketball Arena - Sports Game By MASOMO LIMITED
      Bundle ID: com.masomo.basketballarena
      iTunes Store Link: https://apps.apple.com/us/app/basketball-arena-sports-game/id1491198695?uo=4

       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Speed move
      - Skip transition
      - Unlimited mana
      - Dump AI
        • Thanks
        • Like
      • 7 replies
    • Critical Strike CS: Online FPS v12.805 +3 Jailed Cheats [ Unlimited Ammo ]
      Modded/Hacked App: Critical Strike CS: Online FPS By VERTIGOGAMES OU
      Bundle ID: com.vertigo.criticalforce
      iTunes Store Link: https://apps.apple.com/us/app/critical-strike-cs-online-fps/id1467648713?uo=4


      Hack Features:
      - Unlimited Ammo -> Will not decrease.
      - All Weapon Skins Unlocked
      - All Gloves Unlocked


      Jailbreak required hack(s): [Mod Menu Hack] Critical Strike CS: Online FPS v12.709 +6 Cheats [ Damage + More ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Like
      • 24 replies
    • Critical Strike CS: Online FPS v12.805 +6 Cheats [ Damage + More ]
      Modded/Hacked App: Critical Strike CS: Online FPS By VERTIGOGAMES OU
      Bundle ID: com.vertigo.criticalforce
      iTunes Store Link: https://apps.apple.com/us/app/critical-strike-cs-online-fps/id1467648713?uo=4


      Hack Features:
      - Damage Multiplier
      - Fire Rate Multiplier
      - Move Speed Multiplier
      - Unlimited Ammo -> Will not decrease.
      - All Weapon Skins Unlocked
      - All Gloves Unlocked


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Critical Strike CS: Online FPS v12.709 +3 Jailed Cheats [ Unlimited Ammo ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 27 replies
    • College: Perfect Match v1.0.53 +100++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: College: Perfect Match By RANGOSIOUS HOLDINGS LIMITED
      Bundle ID: com.amrita.college
      iTunes Store Link: https://apps.apple.com/us/app/college-perfect-match/id6469139716?uo=4


      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Jailbreak required hack(s): [Mod Menu Hack] College: Perfect Match v1.0.41 +100++ Cheats [ Debug Menu ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Winner
        • Like
      • 15 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