Other Manifest errors

DevBaby

Active Member
Licensed User
Longtime User
For my facebook library, i am directed to enter the following into the manifest editor...


B4X:
<activity android:name="com.facebook.FacebookActivity"
          android:configChanges=
                 "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
          android:theme="@android:style/Theme.Translucent.NoTitleBar"
          android:label="@string/app_name" />

I entered this into the manifest editor....

B4X:
AddActivityText(<android:name="com.facebook.FacebookActivity"
          android:configChanges=
                 "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
          android:theme="@android:style/Theme.Translucent.NoTitleBar"
          android:label="@string/app_name" />)


This is the error...line 30 = AddActivityText(<android:name="com.facebook.FacebookActivity"

B4X:
B4A version: 5.80
Parsing code.  (0.20s)
Compiling code.  Error
Error parsing manifest script:
Line = 30, Word = (
Two parameters expected.

Also...

Why is android:label="@string/app_name" relevant here?

and here...(another facebook manifest entry)

B4X:
<application android:label="@string/app_name" ...>
    ...
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
    ...
</application>
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Two parameters expected.
Compare your code with this (dont look at the content as it is different. But it is using TWO parameters!
B4X:
AddActivityText(Main,
        <!-- Activity that allows the user to send new SMS/MMS messages -->
        <activity android:name=".ComposeSmsActivity" >
            <intent-filter>
                <action android:name="android.intent.action.SEND" />             
                <action android:name="android.intent.action.SENDTO" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="sms" />
                <data android:scheme="smsto" />
                <data android:scheme="mms" />
                <data android:scheme="mmsto" />
            </intent-filter>
        </activity>)
 

DevBaby

Active Member
Licensed User
Longtime User
Compare your code with this (dont look at the content as it is different. But it is using TWO parameters!
B4X:
AddActivityText(Main,
        <!-- Activity that allows the user to send new SMS/MMS messages -->
        <activity android:name=".ComposeSmsActivity" >
            <intent-filter>
                <action android:name="android.intent.action.SEND" />          
                <action android:name="android.intent.action.SENDTO" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="sms" />
                <data android:scheme="smsto" />
                <data android:scheme="mms" />
                <data android:scheme="mmsto" />
            </intent-filter>
        </activity>)

The code I wrote is straight from facebook's directions, so I would not know what to add etc. Again, that is facebook's example for developers to use.

In your code, I can't tell what the 2 parameters are, is it the <action android:name line, <category android:name, or both distinct lines that make up the "2" parameters? And again, I would not know what to enter because the facebook example does not include any extra lines.
 

DonManfred

Expert
Licensed User
Longtime User
But b4a manifest-editor commands needs a second parameter. Doesn´t matter if it is Facebook, Microsoft or apple you want to add.
The command NEEDS a second parameter which YOU need to fill correctly to get this to work.

Just copying something from facebook site without understanding what you are doing does not help here.
 
Last edited:

DevBaby

Active Member
Licensed User
Longtime User
But b4a manifest-editor commands needs a second parameter. Doesn´t matter if it if Facebook, Microsoft or apple you want to add.
The command NEEDS a second parameter which YOU need to fill correctly to get this to work.

Just copying something from facebook site without understanding what you are doing does not help here.

But facebook directs us to enter this text verbatim here, I have done this with several other sdks with no problem. Most of other sdks directs developrs to do a (cut and paste) for the simple fact the developer may not be familiar with the more complicated entries required to get the sdk working.

Erel, are you able to comment? Again, this is the exact text that the facebook guide directs users to enter. Also Erel, this same manifest entry worked in the version 3 B4A prior to my upgrade to 5.8.
 

DevBaby

Active Member
Licensed User
Longtime User
Not sure what can I add. DonManfred already explained that AddActivityText expects two parameters. This was always the case.

Actually Erel you pointed out something that I did not gather form DonManfred's comments...

That it is the AddActivityText command that is expecting the 2 parameters and not the "manifest code" itself causing the error. In the prior version of B4A, I added this manifest code as text and did not use the AddActivityText function. I knew something was odd because other developers (using other IDEs) used the same manifest code with no problem. So I will be more aware in the future when using the AddActivity function.

Thanks Erel.
 

DonManfred

Expert
Licensed User
Longtime User
Actually Erel you pointed out something that I did not gather form DonManfred's comments...
Really?

In Post #3
Compare your code with this (dont look at the content as it is different. But it is using TWO parameters!

In Post #6
But b4a manifest-editor commands needs a second parameter. Doesn´t matter if it is Facebook, Microsoft or apple you want to add.
The command NEEDS a second parameter which YOU need to fill correctly to get this to work.

Just copying something from facebook site without understanding what you are doing does not help here.
 

DevBaby

Active Member
Licensed User
Longtime User


Yes, Really...

DonManfreed, your condescending tone, use of exclamation point etc. is not something that I am use to on this forum.

I purchased B4A about 3 years ago, asked many questions on this site (because I did not know what I was doing) and I had a positive experience from those who contributed.

Erel has always showed patience etc when dealing with novice programmers. In the future, I suggest that you let Erel respond to my questions on this board. Have a good day.
 
Last edited:

moster67

Expert
Licensed User
Longtime User
I actually must agree with @DonManfred . He rightly pointed out that the IDE manifest editor accepts commands. The other day I also had some problems with the manifest and I had to search the forum to understand it better. You could have done the same, right?
 
Top