1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[TUTORIAL]How to add a popup toast message in game startup

Discussion in 'Tutorials' started by HannCreator, Sep 23, 2016.

  1. HannCreator

    HannCreator i r noob

    Joined:
    Sep 21, 2016
    Messages:
    4
    Likes Received:
    1
    BEFORE WE START THE TUTORIAL PLEASE READ
    DON'T STEAL OTHER MODDER WORK AND REPLACE CREDIT TO YOU
    [Requirements]
    0. A working brain
    1. A Computer
    2. The apk file, obviously
    3. dex/Apk decompiler with xml decoding support eg.(Apktool)
    4. Text editor (Notepad++, Sublime Text, Atom, notepad)

    [Info]
    What exactly are we trying to do?
    toast.png surelock-toast-messages.png

    *see image* Pretty much looks like that, but you may notice some moded games here show up with custom text like "diHacked oleh Aku sayang", "Hacked by Me" etc.

    [Body]
    1. Decompile apk with tools that mentioned above
    2. Open AndroidManifest.xml, look for <action android:name="android.intent.action.MAIN"/>

    Code:
    <activity android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:label="@string/app_name" android:launchMode="singleTop" android:name="net.circleous.domtweaks.StartActivity" android:screenOrientation="landscape">
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
    </activity>
    if you read that carefully and see on top of it(<action android:name="android.intent.action.MAIN"/>) -> android.name="net.circleous.domtweaks.StartActivity"
    You have to find StartActivity.smali file at smali/net/circleous/domtweaks/
    3. If you found the StartActivity.smali file, open it.
    4. Search the word "onCreate" it'il be look like this.

    Code:
    .method protected onCreate(Landroid/os/Bundle;)V
    .locals
    5. Add this under .locals

    Code:
    const/4 v0, 0x1
    
    const-string v1, "YOUR MESSAGE"
    
    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
    
    #OTHER CODE THAT YOU MAY NOT TOUCH IT
    
    6. If you notice in line 2

    Code:
    const-string v1, "YOUR MESSAGE"
    Change "YOUR MESSAGE" to everything what you want.
    7. Recompile, sign and install the apk

    [Credit]
    HannCreator
    iAndroHacker
     

    Attached Files:

    MUSTAQHEEM likes this.
  2. NEMESIS

    NEMESIS Rooted Member

    Joined:
    Sep 25, 2015
    Messages:
    1,472
    Likes Received:
    967
    @HannCreator, lol so finally u managed to made a toast. nice..:ghost:
     
  3. stelau4

    stelau4 EMT
    Exclusive Modding Team

    Joined:
    Sep 2, 2015
    Messages:
    3,733
    Likes Received:
    4,785
    best to search for
    .method protected onCreate
    if you just search onCreate you will get tons of results so with .method protected onCreate it narrows it down

    hope this helps just a little bit
     
    Cheene and HannCreator like this.
  4. NEMESIS

    NEMESIS Rooted Member

    Joined:
    Sep 25, 2015
    Messages:
    1,472
    Likes Received:
    967
    any recommendation tools for decompile-recompile apk? since apktools is not proprly decompile/recompile the apk..

    bump
     
  5. Cheene

    Cheene Advance Member

    Joined:
    Mar 11, 2016
    Messages:
    326
    Likes Received:
    134
    stelau4 Your Modded Games Have Picture ? Is Their Any Tut`s For It ?

     
  6. Fallschirmjäger

    Fallschirmjäger i r noob

    Joined:
    Oct 19, 2016
    Messages:
    4
    Likes Received:
    7
    I dont really know why you put your name on credit and removed the actual person who made that >> Riu. While the content entirely copy-pasta and deleted some line. Though, all my lousy tutorial was generally licensed under CC 4.0 ¯\_(ツ)_/¯
     
    Skyline769 likes this.
  7. vadeh

    vadeh i r noob

    Joined:
    Jun 22, 2016
    Messages:
    18
    Likes Received:
    0
    I need the code for my toast:

    " visit us mysite"

    mysite = red color with hex
     
    #7 vadeh, Dec 19, 2016
    Last edited: Dec 19, 2016
  8. fahadxmb

    fahadxmb i r noob

    Joined:
    Dec 27, 2016
    Messages:
    14
    Likes Received:
    4
    useful tut
     
  9. Blackdon

    Blackdon i r noob

    Joined:
    Oct 14, 2016
    Messages:
    4
    Likes Received:
    4
    dont leech here too
     
  10. HackerSyndicate

    HackerSyndicate Advance Member

    Joined:
    May 28, 2015
    Messages:
    407
    Likes Received:
    158
    Lol this tut. Was from riu , dont leech it .
     
  11. fahadxmb

    fahadxmb i r noob

    Joined:
    Dec 27, 2016
    Messages:
    14
    Likes Received:
    4
    shutup who are you to say me this only moderators can read this forums guideline

    and who are you
     
  12. valdz

    valdz i r noob

    Joined:
    Oct 7, 2017
    Messages:
    4
    Likes Received:
    1
    hiiii i follow your tutorial. but when i install it i cant open the app? any idea?
     

    Attached Files:

Loading...
Similar Threads - [TUTORIAL]How popup toast
  1. RAR File 32
    Replies:
    1
    Views:
    128
  2. Yilmaz
    Replies:
    0
    Views:
    139
  • About Us

    Android Republic - Android Game Mods - Offering only the most advanced and exclusive android mods, protections like Xigncode are easily bypassed by our team.

    Exclusive Android Mods, android protections are no problem for us, only the best available games, here you will find only the best games such as Kritika, Summoners War, Raven, Dragon Striker, Avabel, Evil Bane, 7knights and seven knights, Darkness Reborn, Soul Seeker all fully modded and waiting for you! easy xigncode and dxshield bypass too!
  • Like us on Facebook