Skip to content

Commit

Permalink
Merge pull request #121 from tpimh/master
Browse files Browse the repository at this point in the history
Update to cordova android 7.0.0
  • Loading branch information
taivo authored Nov 29, 2018
2 parents ee7d0f0 + d0944db commit 6d4575f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Advanced Configuration

The actual code that handles Parse platform initialization is in [ParsePushApplication.java](src/android/ParsePushApplication.java).

Android knows to use this class due to the attribute `android:name` in `<application>` in 'platforms/android/AndroidManifest.xml'.
Android knows to use this class due to the attribute `android:name` in `<application>` in 'platforms/android/app/src/main/AndroidManifest.xml'.
To preserve your customizations, this plugin sets `android:name="github.taivo.parsepushplugin.ParsePushApplication"`
if and only if `android:name` is not already defined. It does this during plugin installation. Similarly, when the plugin is
uninstalled, `android:name` will be removed only if its content matches `github.taivo.parsepushplugin.ParsePushApplication` exactly.
Expand All @@ -317,7 +317,7 @@ You can provide a property `ParseNotificationIcon` in `config.xml` to provide a
<preference name="ParseNotificationIcon" value="android_notification_icon" />
```

The icon has to be in folder `resources` in project root and with extension `.png`. The icon is then copied to `platforms/android/res/drawable/<PROVIDED-NAME>.png`. For details, how to design the icon have a look at https://clevertap.com/blog/fixing-notification-icon-for-android-lollipop-and-above/
The icon has to be in folder `resources` in project root and with extension `.png`. The icon is then copied to `platforms/android/app/src/main/res/drawable/<PROVIDED-NAME>.png`. For details, how to design the icon have a look at https://clevertap.com/blog/fixing-notification-icon-for-android-lollipop-and-above/

#### iOS:

Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<param name="android-package" value="github.taivo.parsepushplugin.ParsePushPlugin" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<config-file target="app/src/main/AndroidManifest.xml" parent="/manifest/application">
<service android:name="com.parse.PushService" />
<receiver android:exported="false" android:name="github.taivo.parsepushplugin.ParsePushPluginReceiver">
<intent-filter>
Expand All @@ -32,7 +32,7 @@
</intent-filter>
</receiver>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<config-file target="app/src/main/AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand Down
4 changes: 2 additions & 2 deletions scripts/afterAndroidPrepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function (context) {
var configXml = new ConfigFile(context.opts.projectRoot, null, './config.xml');

// find the meta-data node in AndroidManifest.xml
var androidPrjDir = path.join(context.opts.projectRoot, 'platforms/android');
var androidPrjDir = path.join(context.opts.projectRoot, 'platforms/android/app/src/main');
var androidManifest = new ConfigFile(androidPrjDir, 'android', 'AndroidManifest.xml');
var applicationNode = androidManifest.data.find('application');

Expand All @@ -25,7 +25,7 @@ module.exports = function (context) {

// COPY ICON
// create target path
var iconTargetPath = path.join(context.opts.projectRoot, 'platforms', 'android', 'res', 'drawable');
var iconTargetPath = path.join(context.opts.projectRoot, 'platforms', 'android', 'app', 'src', 'main', 'res', 'drawable');
try {
fs.mkdirSync(iconTargetPath);
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/beforeAndroidInstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function(context) {
var path = context.requireCordovaModule('path');
var ConfigFile = context.requireCordovaModule("cordova-common").ConfigFile;

var androidPrjDir = path.join(context.opts.projectRoot, 'platforms/android');
var androidPrjDir = path.join(context.opts.projectRoot, 'platforms/android/app/src/main');
var androidManifest = new ConfigFile(androidPrjDir, 'android', 'AndroidManifest.xml');

//
Expand Down
2 changes: 1 addition & 1 deletion scripts/beforeAndroidUninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function(context) {
var path = context.requireCordovaModule('path');
var ConfigFile = context.requireCordovaModule("cordova-common").ConfigFile;

var androidPrjDir = path.join(context.opts.projectRoot, 'platforms/android');
var androidPrjDir = path.join(context.opts.projectRoot, 'platforms/android/app/src/main');
var androidManifest = new ConfigFile(androidPrjDir, 'android', 'AndroidManifest.xml');


Expand Down

0 comments on commit 6d4575f

Please sign in to comment.