Change datafield name (projectname?)

Based on source I have changed an existing datafield (with help from this forum, thnx!). I now want to use this new datafield alongside the orginal one. The original one is for an activity called roadrunning en the new one should be used for an activity called trailrunning.
I can sideload the new datafield, but as it currently has the same name as the original one, it overwrites the original.
How can I create an adjusted version of the datafield with another name; I suppose that is the way to solve this?

I tried creating a new project and then import everyting (the file structure of the original one). I kept the manifest.xml and project.xml from the newly made project. But it gave errors with compiling. Is there another way to achieve this?
  • I think having a different ID is more important than having a different name, but both are important.

    You're on the right track by using a new manifest.xml and .project. You just need to edit manifest.xml to point to the name of your old application class.

    For example:
    OriginalApp.mc
    class OriginalApp extends App.AppBase {


    manifest.xml:
    Unfortunately the forum won't let me post the relevant section to edit.

    In the iq:application tag, look at the following attributes:
    - entry should be the name of the app class for your original app: e.g. OriginalApp
    - id should be different than your original app id
    - name should point to a different name than your original app name.

    IOW, change AppName in strings.xml:

    resources/strings/strings.xml
    <strings>
    <string id="AppName">NewAppName<string>


  • You need to have different IDs (UUIDs) in the manifest.xml files. Check that. In eclipse, if you use New>project>Ciq proget, it will have a unique UUID.

    or you can get your own and edit the manifest.xml. See the programmer's guide.

    The name of the app doesn't come into play at all as all your apps could have the same name. They just need different UUIDs.

    The "over write" is because of the UUID. The name, may be in the manifest.xml or in a string resource (@Strings.AppName is common)
  • To clarify:
    - Yes, the UUID is what the watch cares about
    - The name is important to the user/developer. If you have two fields with the same name installed, how will you tell them apart when you are configuring the watch?
    - He already tried creating a new manifest.xml. I'm pretty sure the build failed because the new manifest.xml has a different application entry point, which is based on the name of the new project, which would be different than the name of the original project/app class. In order to get it working, he has to change the entry attribute in the iq:application tag to match the original app class name. (Or he could change the app class name.)

    In a nutshell, to create a "duplicate project" with the same source but a different identity, you need a new id (UUID), a new name (application name), but you need to keep the original entry (application entry point). Sure, changing the name is optional; good luck if you want to have both fields installed at the same time.

    Of course, if it's actually a modified project, you might want to change the name of the app class instead. But either way would work.
  • How can I create an adjusted version of the datafield with another name


    As others have indicated it is indeed important to have a unique uuid for your app.

    But I think you are asking the wrong question...

    As I understand you will be having 2 projects with all the same source code. What you're really after is the ability to link to other files and/or folders! And you can do this.

    So what you do?
    * Create a new project via File . New Project . this will handle having yourself a unique uuid and the project name of your choice
    * Make sure that the project you create is of the type you want . in your case a datafield . and support all the watches you want by ticking the right boxes
    * From the newly created project remove everything but resources\strings.xml and manifest.xml so that your project structure looks like this: . The strings.xml contains your appname



  • * Link files and folders to the new project by Link copying the content from the old project to the new project. Link copying is done by holding down the CTRL key while you drag the file or folder from your original to your new project. Be sure to choose the Link folders option in the popup.



    * Open the manifest.xml in your new project and change the entry to the new of your original Appname. In my example here this is changing entry="aApp" to entry="a2App"

    After you're done your structure should look like this:


    If you've done things right you should see the link icon on the items you linked.

    * Now you only have to change your source code once and it'll be automatically changed in the other project as well. You do have to export both the new and the old app of course when you want to publish.

    In case you want some files to differ between your projects know that you can do the link copy on file level instead of on folder level for that folder where you wish to have some deviation in content
  • Thanks everyone for the replies! Today I will be traveling (we're on holiday), but tonight I hope to be able to work on it. I tried editing the manifest and project files, but probably not the right way.
  • I think having a different ID is more important than having a different name, but both are important.

    You're on the right track by using a new manifest.xml and .project. You just need to edit manifest.xml to point to the name of your old application class.

    For example:
    OriginalApp.mc
    class OriginalApp extends App.AppBase {


    manifest.xml:
    Unfortunately the forum won't let me post the relevant section to edit.

    In the iq:application tag, look at the following attributes:
    - entry should be the name of the app class for your original app: e.g. OriginalApp
    - id should be different than your original app id
    - name should point to a different name than your original app name.

    IOW, change AppName in strings.xml:

    resources/strings/strings.xml
    <strings>
    <string id="AppName">NewAppName<string>




    This instruction did the trick, thanks! Linking, as described by Peter, wasn't really necessary. I am not the developer of the original datafield and I can just user the original datafield from the store and sideload the slightly different new datafield. However, it is nice to know that a codebase can be maintained when developing 2 apps with overlapping parts.
  • be aware that if you sideload the app you'll not be able to set app settings.
    what you can do in that case is upload your app with the switch just for testing on then it will be just available for you while you still have to ability to set settings.
  • be aware that if you sideload the app you'll not be able to set app settings.
    what you can do in that case is upload your app with the switch just for testing on then it will be just available for you while you still have to ability to set settings.


    That's something to do then, thanks for the tip! I now hard-coded the options, but that way it can stay more flexible.
  • That's something to do then, thanks for the tip! I now hard-coded the options, but that way it can stay more flexible.


    read the "new developer FAQ" sticky.

    And with side loads, you can actually generate a .set in the sim and copy that to your watch if you use app settings and want to change something. There's no reason to use the app store in that case. I just copy the .set for early testing when app-settings are used.