How do you change package name in ai2 sources?

I have seen many topics but they are not about changing in ai2 sources i found 2 topics but they dont give exact solution to it.

  1. Change Package Name Structure
  2. Custom Package Name Problem

So can someone help me with changing package name :sweat_smile:

4 Likes

Not sure, if this still works:
https://puravidaapps.com/packagename.php

But this works. I did it several times.
(But it's a bit tricky.)

Example:

Note:
Of course I know that you can change the packageName at Kodular. But sometimes the (old) tough method is needed to make everything work properly.

6 Likes
6 Likes

Or use AI2Offline.

grafik

3 Likes

hi @Anke actually i want to know how to change in ai2 sources itself
and @Know_About_IT i know about StringUtils.java file but as per 2 topics i gave one says it does not work

2 Likes

We need to change two files one is StringUtil.java and another is blockly.js C:\AI2\AI2U\AI\WEB-INF\classes\com\google\appinventor\client\editor\youngandroid\blockly.js

We need to change on this place

  };

/**
 * Generate the beginning Yail code for an APK compilation (i.e., not the REPL)
 * 
 * @param {String} packageName  the name of the package for the app
 *     (e.g. "appinventor.ai_somebody.myproject.Screen1")
 * @param {String} formName  (e.g., "Screen1")
 * @returns {String} Yail code
 * @private
*/
Blockly.Yail.getYailPrelude = function(packageName
1 Like

umm i dont get why change in blockly.js as per me it is for changing the position of the places right? like changing the order first - form and then package and all

2 Likes

You need to do a lot of changes, which I did and it didn't go the way I thought.


I was able to change package name but APK crashed on the launch because android was looking for package name+ .Screen1 while it got same old activity name(with appinventor.ai_) which means activities were still getting added in old pattern.

4 Likes

However, https://sourceforge.net/u/ramiro-pa/ implemented it.

3 Likes

Well I'll not say that a complete implementation of custom package name.
It would be nice if there will be property to specify package name so that developer can change package name completely.

2 Likes

Actually i wanna make a video on it many people asking me for it :sweat:

4 Likes

@ewpatton can you help in this???

2 Likes

Actually, I too want to implement like this but in a developer custom way, means the dev. chooses the custom package name...

2 Likes

Hallo Every One.
i wanna add My APK Minifest.xml to Package Name Like This
Appinventor.ai_UserEmailName.AppName

how to du it.?

Which Java file do I need to change?

I made some changes to the file, including the compiler .Java. But there is no difference. See This

i wanna My APK Minifest.xml like this

How to du It. I edit. comiler.java, form java, and any tell me what's the code i need? Any One Can Help Me?

I felt that there was no answer to my latest question.
see this my sample pic

I now moved your post to the latest thread about the same topic
Taifun

2 Likes

AppInventor package name is appinventor.ai_useremailname.appname so why you need to change

It's a secret :smiley: :smiley:
i wanna change package name. but i think need this aria to defult package name
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:name="Must Incude PkgName.Screen1" android:windowSoftInputMode="stateHidden

like this appinventor.ai.test.AppName
in apk file minifest.xml

I ask how to build a platform the way it gets there

Oh, I do not know how do that

1 Like

I think I have succeeded now. :thinking:

11 Likes