Windows store application icon has invalid format and margins - windows-10

I'm using makeappx along with a manifest.appx to generate an application package for the Windows store.
My uap:VisualElements goes like this:
<uap:VisualElements DisplayName="tevolution"
Description="tevolution is a Remote Video Screen for Motion Freedom."
Square44x44Logo="44.png"
Square150x150Logo="150.png"
BackgroundColor="#323232">
<uap:DefaultTile Square71x71Logo="71.png"
Square310x310Logo="310.png"
Wide310x150Logo="wide.png"/>
</uap:VisualElements>
With the following visual resources:
Now, for some reason I'm getting a weird icon with additionnal margins on the start menu and the task bar:
After publishing to the Windows store, I was expecting margin-less icons and got weird margins with the provided BackgroundColor in both the start menu and the task bar.
I'm not exactly sure where those margins come from and how to fix them. If someone found a way I'd appreciate it.

Okay, so I had to copy the following in an assets folder at the root of the project.
icon.png (512x512)
icon.scale-100.png (50x50)
icon.scale-125.png (63x63)
icon.scale-150.png (75x75)
icon.scale-200.png (100x100)
icon.scale-400.png (200x200)
Square44x44Logo.scale-100.png (44x44)
Square44x44Logo.scale-125.png (55x55)
Square44x44Logo.scale-150.png (66x66)
Square44x44Logo.scale-200.png (88x88)
Square44x44Logo.scale-400.png (176x176)
Square44x44Logo.targetsize-16.png (16x16)
Square44x44Logo.targetsize-24.png (24x24)
Square44x44Logo.targetsize-32.png (32x32)
Square44x44Logo.targetsize-48.png (48x48)
Square44x44Logo.targetsize-256.png (256x256)
Square44x44Logo.altform-unplated_targetsize-16.png (16x16)
Square44x44Logo.altform-unplated_targetsize-24.png (24x24)
Square44x44Logo.altform-unplated_targetsize-32.png (32x32)
Square44x44Logo.altform-unplated_targetsize-48.png (48x48)
Square44x44Logo.altform-unplated_targetsize-256.png (256x256)
Square44x44Logo.altform-lightunplated_targetsize-16.png (16x16)
Square44x44Logo.altform-lightunplated_targetsize-24.png (24x24)
Square44x44Logo.altform-lightunplated_targetsize-32.png (32x32)
Square44x44Logo.altform-lightunplated_targetsize-48.png (48x48)
Square44x44Logo.altform-lightunplated_targetsize-256.png (256x256)
Square150x150Logo.scale-100.png (150x150)
Square150x150Logo.scale-125.png (188x188)
Square150x150Logo.scale-150.png (225x255)
Square150x150Logo.scale-200.png (300x300)
Square150x150Logo.scale-400.png (600x600)
SmallTile.scale-100.png (71x71)
SmallTile.scale-125.png (89x89)
SmallTile.scale-150.png (107x107)
SmallTile.scale-200.png (142x142)
SmallTile.scale-400.png (284x284)
LargeTile.scale-100.png (310x310)
LargeTile.scale-125.png (388x388)
LargeTile.scale-150.png (465x465)
LargeTile.scale-200.png (620x620)
LargeTile.scale-400.png (1240x1240)
WideTile.scale-100.png (310x150)
WideTile.scale-125.png (388x188)
WideTile.scale-150.png (465x225)
WideTile.scale-200.png (620x300)
WideTile.scale-400.png (1240x600)
Then, added the following to AppxManifest.xml:
<uap:VisualElements DisplayName="tevolution"
Description="tevolution is a Remote Video Screen for Motion Freedom."
Square44x44Logo="assets/Square44x44Logo.png"
Square150x150Logo="assets/Square150x150Logo.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="assets/SmallTile.png"
Square310x310Logo="assets/LargeTile.png"
Wide310x150Logo="assets/WideTile.png"/>
</uap:VisualElements>
Then, I ran the following at the root folder of my project:
makepri createconfig /cf priconfig.xml /dq "en-US"
makepri new /pr . /cf priconfig.xml
I have no idea why anyone wouldn't figure that out.

Related

Remove terminal icon in node notifier

I am using the https://github.com/mikaelbr/node-notifier package to show notifications in shell.
This is my code:
var notifier = require('node-notifier');
var path = require('path');
notifier.notify({
title: 'My awesome title',
message: 'Hello from node, Mr. User!',
icon: path.join(__dirname, 'coulson.jpg'), // absolute path (not balloons)
sound: true, // Only Notification Center or Windows Toasters
wait: true // wait with callback until user action is taken on notification
}, function (err, response) {
// response is response from notification
});
notifier.on('click', function (notifierObject, options) {
// Happens if `wait: true` and user clicks notification
});
notifier.on('timeout', function (notifierObject, options) {
// Happens if `wait: true` and notification closes
});
The notification comes like this:
As you can see a terminal icon is coming before the name.
Can you help me how to remove that icon?
It is known issue with node-notifier.
From issue #71:
mikaelbr:
No, I'm afraid that's how the notification work, as it's the terminal that initiates the message. The only way to avoid this is to use your custom terminal-notifier where the Terminal icon is swapped for your own. It's not a big task, and you can easily set customPath for notification center reporter.
kurisubrooks:
This happens because of the way notifications in OS X work. The notification will show the referring app icon, and because we're using terminal-notifier to push notifications, we have the icon of terminal-notifier.
To work around this, you'll need to compile terminal-notifier with your own app.icns. Download the source, change out the AppIcon bundle with your own in Xcode, recompile terminal-notifier and pop it into node-notifier. (/node-notifier/vendor/terminal-notifier.app)
Now that you have your own terminal-notifier inside node-notifier, remove all the icon references from your OS X Notification Center code, and run the notification as if it has no icon. If the old app icon is showing in your notifications, you need to clear your icon cache. (Google how to do this)
Another valuable comment from mikaelb:
That's correct. But keep in mind, node-notifier uses a fork of terminal-notifier (github.com/mikaelbr/terminal-notifier) to add option to wait for notification to finish, so this should be used to add your own icon. A easy way to do it is to copy/paste from the vendor-folder and use customPath to point to your own vendor.
I tried #Aleksandr M's steps but it didn't seem to work for me. Maybe I didn't understand the steps well enough. Here's how it worked for me.
I cloned https://github.com/mikaelbr/terminal-notifier . Then opened the project with xcode and deleted the Terminal.icns file and replaced it with my custom icon Myicon.icns.
Then edited terminal-notifier/Terminal Notifier/Terminal Notifier-Info.plist by setting the key icon file to Myicon.
After doing this, simply building the project did NOT work. I had to change the values of the build version and build identifier (any new value would do) see this.
Afterwards I just built the project with xcode and then copied the built .app file (you can find it by clicking the Products directory of the project from xcode Products > right click the file > show in finder) to my electron project
e.g your final path may look like this. electron-project/vendor/terminal-notifier.app.
Then I set customPath as #Aleksandr M suggested.
Here's what mine looked like
var notifier = new NotificationCenter({
customPath: 'vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier'
});
And THEN it worked! 🙂
This solved my problem and you only need to have your icns file ready:
run this command in terminal after downloading :customise-terminal-notifier
** path/customise-terminal-notifier-master/customise-terminal-notifier -i path/Terminal.icns -b com.bundle.identifier

Why are Log.d() and Log.v() not printing

I have the following test code in my Activity:
#Override
public void onStart() {
super.onStart();
Log.e(CLASS_NAME, "ERROR onStart()");
Log.w(CLASS_NAME, "WARN onStart()");
Log.i(CLASS_NAME, "INFO onStart()");
Log.d(CLASS_NAME, "DEBUG onStart()");
Log.v(CLASS_NAME, "VERBOSE onStart()");
On the logcat view in Android Studio, it only prints:
02-10 15:56:10.190 6194-6194/org.example.my_app E/MyActivity﹕ ERROR onStart()
02-10 15:56:10.190 6194-6194/org.example.my_app W/MyActivity﹕ WARN onStart()
02-10 15:56:10.190 6194-6194/org.example.my_app I/MyActivity﹕ INFO onStart()
On top of the box, the menu is set to Log level: “Verbose”, and if I go into the menu next to it, choose “Edit filter configuration”, “by Log Level” is also set to “Verbose”. Why are the Log.d() and Log.v() not printing anything? What might I am missing? Any suggestions would be appreciated.
Accepted answer not working
My solution:
when your Log.d is not working then Log.wtf is work
It's working for me, may be this is helpful to other, who find solution
Android Studio filters lines that have already been logged but Log itself may filter some levels when logging. See Log.isLoggable:
The default level of any tag is set to INFO.
(However on many phone it is actually set to DEBUG or VERBOSE.)
Fix For meizu phone
Settings -> Accessibility -> Developer options -> advanced
logging->set "Allow all"
For Meizu MX4(Flyme 6.1.0.0), M2(Flyme 6.1.0.0G), M5(Flyme 6.3.0.0G) :
Settings->Accessibility - > Developer Options -> Performance
optimization -> Advanced logging -> set "Allow all"
Huawei, logcat not showing the log for my app?
For other phone search in "developers options": option "logging" and set "all".
Turn off your Developer Option then Restart Your Phone After that on developer option It definitely works by sure!!
I've faced also to the same issue. Even following the previous answers, I didn't find the way to show logs in the Logcat.
After many tries done on my own, here is the (other) way to get logs shown:
Just selecting "Show only selected application" in the combobox did the job. Priorly, it was "Firebase" which was selected.
Hopefully, you will see your logs ;-)
I was trying everything. From log.d to log.wtf. But nothing worked.
Then I restarted my Android Studio. After that, the debugger started working again.
Hope this helps to someone.
For me the issue was that I had actually disabled the logger buffer in my developer settings so go to Settings -> Developer options -> Logger buffer size and set it to anything that isn't 'off'.
I had similar problem to this one. However in my case the problem was empty first string. It worked in older version of Android Studio, but stopped working in Android Studio ver 5.6 after update.
When I used:
Log.d(string1, string2); in my logging wrapper class,
then whenever string1 was "", the logcat would ignore it. The solution was to add
if(string1 == null || string1 == "") {
string1 = "defaultString";
}
before
Log.d(string1, string2);
I hope this helps anyone with this problem.
This started happening with me in Android Studio 3. I was getting old Log.v's printing, but when I added a new one nothing happened. Ditto with debugger breakpoints.
Cleaning the solution and restarting Android Studio worked for me, but there was a simpler solution.
Disable Instant Run. It seems that Instant Run doesn't recognise new Log.v's or breakpoints.
Along the way I also added Gradle-aware Make to my Run/Debug configuration for the main activity. I don't know whether that was necessary, but I'm keeping it. ([Main Menu] Run -> Edit Configurations...)
i had the same problem. I switched off and on developer options and usb debugging and all logs worked. i also enabled gpu debug layers in developer options(i dont think that helped).

How can I make Plone portal registries find and cook new-style static resources?

All JS I register with an id such as ++theme++mythemename/js/myscript.js gives me the following error on portal_javascripts: (resource not found or not accessible)
I know the id is correct because I can access localhost/mysite/++theme++mythemename/js/myscript.js (even if Diazo is disabled).
If development mode is on the resource gets delivered on the final HTML. However on production mode cooking process fails silently. Or almost. Besides getting a different cachekey than the one showed on portal_javascripts/manage_jsComposition, I see the following error message by accessing the cooked file:
/* XXX ERROR -- access to '++theme++mythemename/js/myscript.js' not authorized */
Any hints on how to deal with those? Or will I really need to leave them uncooked?
Have you tried a browser:resourceDirectory instead of a plone:static ?
<browser:resourceDirectory
name="yourJsFolder"
directory="yourJsFolder"
layer=".interfaces.IThemeSpecific"
/>
and calling your js with :
++resource++yourJsFolder/yourJsFile.js
i added your observatorio.tema package to an existing plone 4.1 buildout and added a random js file to the js registry (positioned after collapsibleformfields.js so it gets properly cooked)
GS export looks like:
<javascript authenticated="False" cacheable="True" compression="safe"
conditionalcomment="" cookable="True" enabled="True" expression=""
id="++theme++observatorio/js/ui.js" inline="False" insert-after="collapsibleformfields.js"/>
no error in portal_jacascripts and the javascript file is included in /jquery-cachekey-e7bee35d43da7a91eb29c6586dcbd396.js
did you add cacheable="False" and cookable="False" for testing purposes?
https://github.com/observatoriogenero/observatorio.tema/blob/master/src/observatorio/tema/profiles/default/jsregistry.xml#L373
since plone:static internally is a resourceDirectory both should and do work with resourceregistries.
maybe there is some other code in your buildout that re-registers another (empty) directory for the same name (observatorio)?

How to autostart j2me application on foreground?

I'm trying to make my j2me application to auto-start when the phone is powered on. (The phone is Sonim XP1301.)
I added jad attribute "MIDlet-Launch-Power-On: yes", and now application starts automatically but stays on the background... This is useless for me because the application is UI-based and requires user interaction...
Is there any other jad attribute that would force the application to start in foreground, or some j2me command to bring the application to foreground?
Edit: At Sonim developer site I found this:
"We have our emulator library in which you can check whether the application is in background. Once you get the result you can bring it to foreground
JavaBackgroundMode.isRunningInBackground(Midlet m); is used to check whether the Midlet is in background. If it returns true then it means it is in the background.
JavaBackgroundMode.bringToForeground(this); is used to bring an app to foreground."
..But I have NO IDEA what this actually means... What "emulator library"? Where can I download it and how to use it? If I try just to add this line to my code:
JavaBackgroundMode.bringToForeground(this);
..NetBeans gives me error "Cannot find sybmol: Variable JavaBackgroundMode".
Any ideas?
Edit2: Tested "push registry", does not work. JAD file looks like this:
MIDlet-1: Contactless,,example.contactless.ContactlessDemo
MIDlet-Description: This is basic JSR257 Contactless Communication API demo.
MIDlet-Jar-Size: 7738
MIDlet-Jar-URL: Contactless.jar
MIDlet-Name: Contactless
MIDlet-Permissions: javax.microedition.io.Connector.file.read, javax.microedition.io.Connector.file.write, javax.microedition.io.Connector.http, javax.microedition.io.PushRegistry
MIDlet-Push-1: autostart://:, Contactless, *
MIDlet-Vendor: Oracle
MIDlet-Version: 1.0
Manifest-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
I never heard of MIDlet-Launch-Power-On before. Had to Google for it to learn that it is a Sprint specific JAD attribute.
Try using the standard way of auto-starting a MIDlet: Using PushRegistry.
Add these two lines in your JAD file instead, and remove the MIDlet-Launch-Power-On attribute.
MIDlet-Permissions: javax.microedition.io.PushRegistry
MIDlet-Push-1: autostart://:,NameOfMIDlet,*
See if that makes a difference.
Oracle-MIDlet-Autostart: 1
Oracle-MIDlet-Restart: false
Oracle-MIDlet-Restart-Count: 10
Just an additional answer to this question:
Every MIDlet that is started automatically needs to be configured via its jad file and the following properties:
Oracle-MIDlet-Autostart: [0-5], autostart order. 0 means no autostart. For MIDlets with
the same level the order is not defined.
Oracle-MIDlet-Restart: [true|false], if true the MIDlet is automatically restarted if it terminates non gracefully, e.g. by an uncaught exception.
Oracle-MIDlet-Restart-Count: [number], number of allowed MIDlets restarts before the
whole module is rebooted

Making TTLauncherView open animated items

I'm currently working with Three20 in an iOS project. I've got the TTLauncherView displaying with a few icons. However, I can't see to get them to open their views in an animated fashion as with the Facebook app. I've tried:
[[TTNavigator navigator] openURLAction:[[TTURLAction actionWithURLPath:#"sb://launcher"] applyAnimated:YES]];
as well as
[[TTNavigator navigator] openURLAction:[[TTURLAction actionWithURLPath:URL.absoluteString] applyTransition:UIViewAnimationTransitionCurlDown]];
I also can't find anything on this documentation: https://github.com/facebook/three20/blob/60340d76780ac5ab8a5dc853e3577b1c854eb6e0/src/Three20/TTNavigator.h
Any help?
Thanks!
This should work. I just tried this in my code and the curl down transition works like expected. Here is the code which gets executed when the user taps an icon in the launcher:
- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item {
[[TTNavigator navigator] openURLAction:[[[TTURLAction actionWithURLPath:item.URL] applyTransition:UIViewAnimationTransitionCurlDown] applyAnimated:YES] ];
}
Hope this helps.

Resources