Monday, November 7, 2016

How to add a Toast Pop-up for mod credits

What's up guys

today i wanna show you how to make a toast up for mod credits

this should be pretty simple

Now lets get into it
  1. Decompile The apk with Your Preferred apk decompiler
  2. Open AndroidManifest.xml,and Search for <action android:name="android.intent.action.MAIN"/>
Example:
<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.(The Smali File Might not be named "StartActivity" it all depends on the game)
4. Search the word "onCreate" it'il look like this.
.method protected onCreate(Landroid/os/Bundle;)V .locals
.locals
5.Add this under .locals
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
const-string v1, "YOUR MESSAGE"
Change "YOUR MESSAGE" to everything what you want.
7.Recompile, sign and install the apk

2 comments:

  1. hello i appreciate your efforts but i need to know about other toasts this one i know can u help me

    ReplyDelete
  2. Chill for a hour or somewhere in the vicinity, this shields the blend from running off the toast when seared.

    ReplyDelete