She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

Hi I have a problem, i already updated the cordova from 3.7.1 to 4.1.1, but i cant compile the project, any knowledge here?

Image

please check it my project name is EDS Realtime Attendance Viewer

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

please someone help me out, my client is angry now and they need the update -_-

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Google Play warning: You are using a vulnerable version of Apache Cordova

Hello,

Please delete edited (blue colored) files on Source tab and click Undo all source changes on folder with edited files.

Please note that functionality added via Source tab will be lost and you would need to edit source files again in order to add it back, thus we would recommend that you save project backup before that.

Here (https://docs.appery.io/docs/appbuilde...) is more information about Source files editing.

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

ty sergiy i have another problem to my another project which has a GCMIntentService, yes this solution help me out to my project named EDS Realtime Attendance, but not in my project name EDS BRIDGE

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

this is the GCM INTENT
code
/*

  • Copyright 2012 Google Inc.
    *

  • Licensed under the Apache License, Version 2.0 (the "License");

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at
    *

  • http://www.apache.org/licenses/LICENSE-2.0
    *

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an "AS IS" BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.
    */
    package io.appery.project448324;
    import android.annotation.SuppressLint;
    import android.app.Notification;
    import android.app.NotificationManager;
    import android.app.PendingIntent;
    import android.content.Context;
    import android.content.Intent;
    import android.media.Ringtone;
    import android.media.RingtoneManager;
    import android.net.Uri;
    import android.util.Log;

    import com.google.android.gcm.GCMBaseIntentService;
    import com.phonegap.plugins.pushnotifications.Constants;
    import com.phonegap.plugins.pushnotifications.gcm.PushManager;

    /**

  • IntentService responsible for handling GCM messages.
    */
    public class GCMIntentService extends GCMBaseIntentService {

    private final static String TAG = "GCMIntentService&quot

    public GCMIntentService() {
    super(PushManager.mSenderId);
    }

    @Override
    protected void onRegistered(Context context, String registrationId) {
    Log.d(TAG, "onRegistered: " + registrationId);
    displayMessage(context, Constants.EVENT.REGISTER, registrationId);
    }

    @Override
    protected void onUnregistered(Context context, String registrationId) {
    Log.d(TAG, "onUnregistered: " + registrationId);
    displayMessage(context, Constants.EVENT.UNREGISTER, registrationId);
    }

    @Override
    protected void onMessage(Context context, Intent intent) {
    Log.d(TAG, "onMessage");
    String message = intent.getExtras().getString(Constants.EXTRA.MESSAGE);

    Code: Select all

     displayMessage(context, Constants.EVENT.MESSAGE_RECEIVED, message); 
     generateNotification(context, message); 

}

Code: Select all

 @Override 
 protected void onDeletedMessages(Context context, int total) { 
     Log.d(TAG, "onDeletedMessages"); 
     String message = getString(R.string.gcm_deleted, total); 
     generateNotification(context, message); 
 } 

 @Override 
 public void onError(Context context, String errorId) { 
     Log.d(TAG, "onError: " + errorId); 
     displayMessage(context, Constants.EVENT.REGISTER_ERROR, errorId); 
 } 

 @Override 
 protected boolean onRecoverableError(Context context, String errorId) { 
     Log.d(TAG, "onRecoverableError: " + errorId); 
     displayMessage(context, Constants.EVENT.REGISTER_ERROR, errorId); 
     return super.onRecoverableError(context, errorId); 
 } 

 /** 
  * Issues a notification to inform the user that server has sent a message. 
  */ 
 @SuppressWarnings("deprecation") 
 public static int MY_NOTIFICATION_ID = 0; 
 private static void generateNotification(Context context, String message) { 
     if (PushManager.mAlert) { 
         int icon = R.drawable.ic_stat_gcm; 
         long when = System.currentTimeMillis(); 
         NotificationManager notificationManager = (NotificationManager) context 
                 .getSystemService(Context.NOTIFICATION_SERVICE); 
         Notification notification = new Notification(icon, message, when); 
         String title = context.getString(R.string.app_name); 
         Intent notificationIntent = new Intent(context, PhoneGapActivity.class); 
         // set intent so it does not start a new activity 
         notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); 
         notificationIntent.putExtra(Constants.EVENT.MESSAGE_RECEIVED, message); 
         MY_NOTIFICATION_ID++; 
         PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); 
         notification.setLatestEventInfo(context, title, message, intent); 
         if (PushManager.mSound) { 
             notification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); 
         } 
         notification.flags |= Notification.FLAG_AUTO_CANCEL; 
         MY_NOTIFICATION_ID++; 
         notificationManager.notify(MY_NOTIFICATION_ID, notification); 
     } else if (PushManager.mSound) { 
         Uri ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); 
         Ringtone ringtone = RingtoneManager.getRingtone(context, ringtoneUri); 
         ringtone.play(); 
     } 
 } 

 /** 
  * Notifies UI to display a message. 
  * <p> 
  * This method is defined in the common helper because it's used both by the UI and the background service&#46; 
  *  
  * @param context 
  *            application's context&#46; 
  * @param message 
  *            message to be displayed&#46; 
  */ 
 public static void displayMessage(Context context, String event, String message) { 
     Intent intent = new Intent(Constants&#46;DISPLAY_MESSAGE_ACTION); 
     intent&#46;putExtra(event, message); 
     context&#46;sendBroadcast(intent); 
 } 

}
/code

this is my old Android Manifest.xml
code
<?xml version="1&#46;0" encoding="utf-8"?>
<manifest xmlns:android="http:&#47;&#47;schemas&#46;android&#46;com/apk/res/android"
android:versionCode="29"
android:versionName="v1&#46;1&#46;23" package="io&#46;appery&#46;project284608">
<!-- GCM requires Android SDK version 2&#46;2 (API level 8) or above&#46; -->
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>

<supports-screens android:largeScreens="true"
android:normalScreens="true" android:smallScreens="true"
android:resizeable="true" android:anyDensity="true" />

Code: Select all

 <permission android:name="io&#46;appery&#46;project284608&#46;permission&#46;C2D_MESSAGE" 
     android:protectionLevel="signature" /> 
 <!-- Creates a custom permission so only this app can receive its messages&#46; --> 
 <uses-permission android:name="io&#46;appery&#46;project284608&#46;permission&#46;C2D_MESSAGE" /> 

<uses-permission android:name="com&#46;google&#46;android&#46;c2dm&#46;permission&#46;RECEIVE"/>

<uses-permission android:name="android&#46;permission&#46;ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android&#46;permission&#46;ACCESS_FINE_LOCATION" />
<uses-permission android:name="android&#46;permission&#46;ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android&#46;permission&#46;ACCESS_NETWORK_STATE" />
<uses-permission android:name="android&#46;permission&#46;GET_ACCOUNTS" />
<uses-permission android:name="android&#46;permission&#46;INTERNET" />
<uses-permission android:name="android&#46;permission&#46;MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android&#46;permission&#46;READ_CONTACTS" />
<uses-permission android:name="com&#46;android&#46;browser&#46;permission&#46;READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="android&#46;permission&#46;READ_PHONE_STATE" />
<uses-permission android:name="android&#46;permission&#46;RECEIVE_SMS" />
<uses-permission android:name="android&#46;permission&#46;RECEIVE_WAP_PUSH" />
<uses-permission android:name="android&#46;permission&#46;RECORD_AUDIO" />
<uses-permission android:name="android&#46;permission&#46;VIBRATE" />
<uses-permission android:name="android&#46;permission&#46;WAKE_LOCK" />
<uses-permission android:name="android&#46;permission&#46;WRITE_CONTACTS" />
<uses-permission android:name="android&#46;permission&#46;WRITE_EXTERNAL_STORAGE" />

<application android:icon="@drawable/appicon" android:label="@string/app_name" android:debuggable="true">
<activity android:name="&#46;PhoneGapActivity" android:launchMode="singleTop" android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="io&#46;appery&#46;project284608&#46;MESSAGE"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
<intent-filter>
<action android:name="android&#46;intent&#46;action&#46;MAIN" />
<category android:name="android&#46;intent&#46;category&#46;LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="org&#46;apache&#46;cordova&#46;DroidGap" android:label="@string/app_name">
<intent-filter>
</intent-filter>
</activity>
<!-- ZXing activities -->
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;CaptureActivity"
android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme&#46;NoTitleBar&#46;Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden"
>
<intent-filter>
<action android:name="io&#46;appery&#46;project284608&#46;barcodescanner&#46;SCAN" />
<category android:name="android&#46;intent&#46;category&#46;DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;HelpActivity"
android:screenOrientation="user">
<intent-filter>
<action android:name="android&#46;intent&#46;action&#46;VIEW"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;PreferencesActivity">
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;share&#46;ShareActivity"
android:screenOrientation="user" >
<intent-filter>
<action android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;SHARE"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;encode&#46;EncodeActivity" >
<intent-filter>
<action android:name="io&#46;appery&#46;project284608&#46;barcodescanner&#46;ENCODE"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
<!-- This allows us to handle the Share button in Contacts&#46; -->
<intent-filter>
<action android:name="android&#46;intent&#46;action&#46;SEND"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
<data android:mimeType="text/x-vcard"/>
</intent-filter>
<!-- This allows us to handle sharing any plain text &#46; -->
<intent-filter>
<action android:name="android&#46;intent&#46;action&#46;SEND"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;book&#46;SearchBookContentsActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;SEARCH_BOOK_CONTENTS"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;wifi&#46;WifiActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden">
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;share&#46;BookmarkPickerActivity">
<intent-filter>
<action android:name="android&#46;intent&#46;action&#46;PICK"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com&#46;google&#46;zxing&#46;client&#46;android&#46;share&#46;AppPickerActivity"
android:configChanges="orientation">
<intent-filter>
<action android:name="android&#46;intent&#46;action&#46;PICK"/>
<category android:name="android&#46;intent&#46;category&#46;DEFAULT"/>
</intent-filter>
</activity>
<!-- Push notifications message activity -->
<activity android:name="com&#46;phonegap&#46;plugins&#46;pushnotifications&#46;gcm&#46;MessageActivity"/>

Code: Select all

  <!-- 
       BroadcastReceiver that will receive intents from GCM 
       services and handle them to the custom IntentService&#46; 

       The com&#46;google&#46;android&#46;c2dm&#46;permission&#46;SEND permission is necessary 
       so only GCM services can send data messages for the app&#46; 
     --> 
     <receiver 
         android:name="com&#46;google&#46;android&#46;gcm&#46;GCMBroadcastReceiver" 
         android:permission="com&#46;google&#46;android&#46;c2dm&#46;permission&#46;SEND" > 
         <intent-filter> 
             <!-- Receives the actual messages&#46; --> 
             <action android:name="com&#46;google&#46;android&#46;c2dm&#46;intent&#46;RECEIVE" /> 
             <!-- Receives the registration id&#46; --> 
             <action android:name="com&#46;google&#46;android&#46;c2dm&#46;intent&#46;REGISTRATION" /> 
             <category android:name="io&#46;appery&#46;project284608" /> 
         </intent-filter> 
     </receiver> 

     <!-- 
       Application-specific subclass of GCMBaseIntentService that will 
       handle received messages&#46; 

       By default, it must be named &#46;GCMIntentService, unless the 
       application uses a custom BroadcastReceiver that redefines its name&#46; 
     --> 
     <service android:name="&#46;GCMIntentService" /> 

</application>

</manifest>

/code

how do i add this to the new cordova 4.1.1? please help me thanks

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

im stuck at this, this was working on the old version of cordova.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google Play warning: You are using a vulnerable version of Apache Cordova

If you're using Libraries version 3.1 in App Settings External resources the Cordova 4.1.1 is included for Android binaries.

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

so what should i suppose to do? to keep that GCMIntentservice?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google Play warning: You are using a vulnerable version of Apache Cordova

As I can see you had intensely edited your source file in that project, please follow the instructions that Sergiy has suggested you above.

If you need custom modifications in your project, you can make such changes outside the Appery.io platform by exporting your project source files.

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

Google Play warning: You are using a vulnerable version of Apache Cordova

Hi Illya,
Thank you for replying, so it means that my previous version is all trash? and i will recreate it again from the scratch? I only need is that GCMIntentService is to stay on the project.

Return to “Issues”