Jump to content

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
https://iosgods.com/topic/30895-how-to-add-a-toastpopup-to-your-android-mods/
Share on other sites

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

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!

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

    • Modded/Hacked App: Archer Hunter: Roguelike Game By Suga Pte. Ltd.
      Bundle ID: co.imba.archero
      iTunes Store Link: https://apps.apple.com/us/app/archer-hunter-roguelike-game/id1543119725?uo=4

       

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Gems [ Revive To Get Disable After Hack ]
      - Coins [ Weapon Up To Get Disable After Hack ]
      - HP [ Check Status ]
      - ATK [ Check Status ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
      • 6 replies
    • Archer Hunter: Roguelike Game v0.28.444 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Archer Hunter: Roguelike Game By Suga Pte. Ltd.
      Bundle ID: co.imba.archero
      iTunes Store Link: https://apps.apple.com/us/app/archer-hunter-roguelike-game/id1543119725?uo=4



      🤩 Hack Features

      - Gems [ Revive To Get Disable After Hack ]
      - Coins [ Weapon Up To Get Disable After Hack ]
      - HP [ Check Status ]
      - ATK [ Check Status ] 


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack
      • 4 replies
    • Modded/Hacked App: Dream Master-Travel Puzzle By F.O.G LIMITED
      Bundle ID: com.match.busters.free.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-master-travel-puzzle/id6636480682?uo=4


      🤩 Hack Features

      - Auto Win

      - Coins [ Disable After Hack ]

      - Stars [ Disable After Hack ]

      - Lives 0 Play Unlimited

      - Booster


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack
      • 1 reply
    • Dream Master-Travel Puzzle  v2.90 [ +5 Jailed ] Auto Win
      Modded/Hacked App: Dream Master-Travel Puzzle By F.O.G LIMITED
      Bundle ID: com.match.busters.free.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-master-travel-puzzle/id6636480682?uo=4

       

      🤩 Hack Features

      - Auto Win

      - Coins [ Disable After Hack ]

      - Stars [ Disable After Hack ]

      - Lives 0 Play Unlimited

      - Booster


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
      • 1 reply
    • 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


      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:

      - 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/


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App
      • 16 replies
    • Legend of Survivors V1.1.23 [ +15 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


      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:
      - 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 ]


      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/


      iOS Hack Download Link:

      Hidden Content

      Download Hack
      • 107 replies
    • Modded/Hacked App: Poker Hero - Joker Legend By Gemini Network
      Bundle ID: com.gemini.dash.deck
      iTunes Store Link: https://apps.apple.com/us/app/poker-hero-joker-legend/id6498983199?uo=4



      Hack Features:
      - Energy Freeze 

      - ATK Power [ Choose 1 Card Only Win Battle ]

      - Spell Power 

      - Always FullHouse [ Select Any Cards ]

      - Always Flush [ Select Any Cards ]

      - Always Straight [ Select Any Cards ]


      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/
      • 53 replies
    • Poker Hero - Joker Legend v1.6.9 [ +6 Jailed ] Easy Win
      Modded/Hacked App: Poker Hero - Joker Legend By Gemini Network
      Bundle ID: com.gemini.dash.deck
      iTunes Store Link: https://apps.apple.com/us/app/poker-hero-joker-legend/id6498983199?uo=4



      Hack Features:

      - Energy Freeze 

      - ATK Power [ Choose 1 Card Only Win Battle ]

      - Spell Power 

      - Always FullHouse [ Select Any Cards ]

      - Always Flush [ Select Any Cards ]

      - Always Straight [ Select Any Cards ]


      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/
      • 12 replies
    • Modded/Hacked App: Galaxiga - Classic 80s Arcade By ONESOFT GLOBAL PTE. LTD.
      Bundle ID: com.os.space.force.galaxy.alien
      iTunes Store Link: https://apps.apple.com/us/app/galaxiga-classic-80s-arcade/id1519367184?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:

      - Premium Pass [ Rewards Only ]

      - Energy Unlimited [ Linked Premium Pass ]

      - Plane Unlocked [ Tire 1 Tire 2 ] 

      - Drone Unlocked [ Tire 1 Tire 2 ]

      - Stone Unlocked [ Tire 1 Tire 2 ] 

      - Unlock Gem Cost 0 [ Plane Drone Stone ]

      - Easy Kill [ Only SP - No PVP ] 

      - Win PvP Select Higher Rank [ Plane Drone Stone ] Easy To Win PvP NO Bannnn


      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/


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App
      • 25 replies
    • Galaxiga - Classic 80s Arcade V10.75 [ +7 Cheats ] Energy Max
      Modded/Hacked App: Galaxiga - Classic 80s Arcade By ONESOFT GLOBAL PTE. LTD.
      Bundle ID: com.os.space.force.galaxy.alien
      iTunes Store Link: https://apps.apple.com/us/app/galaxiga-classic-80s-arcade/id1519367184?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:
      - Premium Pass [ Rewards Only ]

      - Energy Unlimited [ Linked Premium Pass ]

      - Plane Unlocked [ Tire 1 Tire 2 ] 

      - Drone Unlocked [ Tire 1 Tire 2 ]

      - Stone Unlocked [ Tire 1 Tire 2 ] 

      - Unlock Gem Cost 0 [ Plane Drone Stone ] Maybe Effect PvP 

      - Easy Kill [ Only SP - No PVP ] 

      - Win PvP Select Higher Rank [ Plane Drone Stone ]

      Not3:- Don't Abuse The Hack Incase Banned Lower Chances Maybe


      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/


      iOS Hack Download Link:

      Hidden Content

      Download Hack
      • 60 replies
    • Modded/Hacked App: Hello Town By Springcomes Co., Ltd.
      Bundle ID: com.spcomes.hellotown
      iTunes Store Link: https://apps.apple.com/us/app/hello-town/id6737850281?uo=4

       

      Hack Features

      - Diamonds
      - Gold
      - Energy Freeze



      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/
      • 4 replies
    • Hello Town v1.9 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Hello Town By Springcomes Co., Ltd.
      Bundle ID: com.spcomes.hellotown
      iTunes Store Link: https://apps.apple.com/us/app/hello-town/id6737850281?uo=4

       

      Hack Features

      - Diamonds
      - Gold
      - Energy Freeze



      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 5 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