Application name with two words divided by a space with URL Scheme on Andorid, can this be done using tiapp.xml manifest?

You must Login before you can answer or comment on any questions.

Application name with two words divided by a space with URL Scheme on Andorid, can this be done using tiapp.xml manifest?

Example: On Android, if the project name in is set to Test

<name>Test</name>
and I place the following code in between the manifest tags in tiapp.xml
<manifest android:versionCode="3" android:versionName="1.2.2">
        <supports-screens android:anyDensity="false"></supports-screens>
    <application android:debuggable="false" android:icon="@drawable/appicon" android:label="Testdata" android:name="TestApplication">   
                <activity android:name=".TestActivity" android:label="Testdata" android:theme="@style/Theme.Titanium" android:configChanges="keyboardHidden|orientation">
                    <intent-filter>
                        <action android:name="android.intent.action.VIEW" />
                        <category android:name="android.intent.category.DEFAULT" />
                        <category android:name="android.intent.category.BROWSABLE" />
                        <category android:name="android.intent.category.LAUNCHER" />
                        <data  android:scheme="mytesturlscheme" />
                    </intent-filter>
                </activity>
             </application>
</manifest>

Build it

Then everything works fine except that there is no longer an application icon and name placed under application on android. I have tried this on several phones with different versions of Android same result

The only way to start the application is via URL Scheme, in this example mytesturlscheme://

Observation

If I uninstall the application there is an icon og text entry for the application, so it can be uninstalled.

My problem

My objective was to have a launch icon with text where the first part of the name is in uppercase dived by a space and a second text in lower case for the product name.

EG: COMPANYNAME product

As an example if I change the name to:

<name>TEST test</name>
Notice that now there is a space between "TEST test", this just breaks everything, except when I remove the URL scheme definition between the manifest tags

Now I have a an icon with an application name which works with the first word being in upper case split by a space and a second word in lower case but no URL scheme

In constrast the iOS implementation works a dream I just change the icons home screen names using i18n and the URL Scheme entry is automactically placed within the plist

can anyone explain...

regards

Gary

1 Answer

You can use the internationalization mechanism to add spaces (or any other special characters) in your app's name.

There is a section in the Titanium Guides that explains just that.

Hope this helps.

— answered 8 months ago by Christian Brousseau
answer permalink
2 Comments
  • BAD DOCUMENTATION

    The documentation is either very old or very poorly written

    I found a solution to my problem with the Internalization strings on Android, see My solution below.

    URL Scheme is still not working as explained in this post above

    I am unable to add a URL Scheme, so if anyone knows what needs to be added to the Android manifest section in tiapp.xml would be appreciated.

    I have tried adding:

    <data  android:scheme="mytest" />
    within the same <intent-filter> but then my application name and icon disappear from the Application folder on android.

    My solution for Internationalization strings on Android

    Place your appname in each language strings file like you do for iOS e.g.: english would be in the /i18n/en/strings.xml

    I placed the following code in my tiapp.xml file and it works like a charm

    <android xmlns:android="http://schemas.android.com/apk/res/android">
     
            <manifest android:versionCode="3" android:versionName="1.2.2">
                <supports-screens android:anyDensity="false"></supports-screens>
     
    <!-- Added the following here start-->  
            <application android:debuggable="false" android:icon="@drawable/appicon" android:label="@string/appname" android:name="TestApplication">
     
                <!-- TI_APPLICATION -->
                <activity android:name=".TestActivity" android:label="@string/appname" android:theme="@style/Theme.Titanium" android:configChanges="keyboardHidden|orientation">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN" />
                        <category android:name="android.intent.category.LAUNCHER" />
                    </intent-filter>
                </activity>
            </application>
    <!-- Added the following here end-->        
     
             </manifest>
     
        </android>

    — commented 8 months ago by Gary Smith

  • Seems like a rocker

    — commented 8 months ago by Perminder Singh Bhatia

Your Answer

Think you can help? Login to answer this question!