A new android manifest file attribue android:installLocation can be used to install application to sdcard or phone memory. It can have a value "auto" . What's that mean ?
It means you have no preference for where the application is installed; it can be installed in either the sdcard or the main memory, depending on the device's preferences.
Related
I create a system tray icon on MacBook. And I connect a screen with Mac. When I run this program,the system tran icon on the monitor is squashed.
QSystemTrayIcon *m_tTrayIcon = new QSystemTrayIcon(this);
m_tTrayIcon->setIcon(QIcon(QPixmap("/Users/xxx/Downloads/pic.png")));
m_tTrayIcon->show();
when the monitor is not focused, the icon is squashed.
and when I click the desktop of the monitor, the monitor is focused, the icon is also become normal.
This is a known bug in Qt with new verisons of MacOS. Check out this bugreport.
Solution would be either use fixed versions (they claim to fix it in 5.12.11 and 6.1.0) or compile cocoa plugin by your own and ship it with your application instead of one provided by Qt.
Fix is just a one line of code that you need to apply. The easiest way is:
download qtbase (for example from github) and checkout version you need
In case you will use Qt < 6.0.0 (i.e. building with qmake rather than with CMake) - copy .qmake.conf from root to qtbase/src/plugins/platforms/
you go to qtbase/src/plugins/platforms/cocoa and open cocoa.pro or CMakeLists.txt (depends on what version of Qt you have checked out)
you apply patch and compile the plugin
From now on you should use cocoa plugin you have just compiled instead of one shipped with Qt (either replace it in Qt installation or every time you deploy your application)
We have 4 mac applications that form part of a 'suite', each for use with a different scientific instrument connected via USB.
My colleagues on Windows have developed a splash screen app that lets you choose one of the four separate programs to run, depending on what instrument you are using. On Windows this splash screen app is in the same folder as the other executables and all the dependencies and libraries are included in the same folder as well. So its as easy as clicking the required radio button and then that program will launch.
What I was hoping to do on Mac OS X was to bundle the 4 separate programs into one app bundle and also the splash screen, so that when the application is launched the user will be presented with the splash screen, then when you choose the appropriate app it gets launched automatically.
The dependencies and libraries are common for all the apps.
I'm comfortable building an app bundle with all the dependencies using the mac deployment tool but i'm unsure if its possible to build multiple binaries into one app bundle, and how to set the default app to be launched (the splash screen).
Thanks in advance :)
Mitch
Yes, multiple app bundles inside another app bundle is possible.
how to set the default app to be launched
As you're probably aware, when you build a bundle, the main executable binary file is resident in the bundle's Contents/MacOS folder.
Also in the bundle is the Info.plist file, which is a manifest that OS X uses, amongst other things, to know which binary to execute when the user runs the application. In this case, the key CFBundleExecutable names the binary in the Contents/MacOS folder.
If you copy the other application bundles to the Resources folder, you can then locate them from the Splash Screen app and execute as required.
I have a Project Tango development Kit. I am interested in working on the depth data from the sensors.
I have ADB setup on my machine. But the Eclipse android emulator doesn't detect the Tango Development tablet.
Can anyone suggest me how to set things up for the device!.
Thank you in advance.
Please ensure that USB debugging is enabled in order to enter ADB, go to Settings > About tablet > Build number and then press Build number seven times. Then press back and go to Developer options > USB debugging.
Go to your device manager (if on Windows) and look for Android Composite ADB Interface (under Android Device).
I found the driver for this at http://developer.android.com/sdk/win-usb.html
Right click Android Composite ADB Interface, go to the driver tab, and click update driver. Then select Browse my computer for driver software and point it to the location where you extracted the usb driver package.
After doing this confirm that ADB can see your device by opening a command prompt, navigate your android sdk folder, and then go into a folder called platform-tools. Then run the command "adb.exe devices". If the tango is listed there then your drivers are correctly installed and adb can see the Tango.
I had the same issue on Windows 7 and it only saw the Tablet as a storage device. I had enabled developer options in the tablet as described above, but I had missed the step on turning on USB debugging. The moment I did that it appeared as a ADB device and I installed the Google USB driver and then I could see it and deploy onto it from Android Studio.
I previously had issues with the Peanut but if you followed the instructions for that EXACTLY it would work You have to specify the device driver file exactly,
not let windows chose one for you or let it tell you that its driver is better :-)
You need to update the driver in your device manager.
Click start
Right-click "Computer"
Select "Manage"
Select "Device Manager"
Find your device
Right-click "Update Driver Software"
Choose "Browse my computer"
Now search for the Android SDK you installed (on mine it is in c:\users\MyName\AppData\Local\Android\SDK) and select the sub folder Extras\Google\USBDriver
I'm a newbie at mac osx development. I would like to know if there's any way to override the mac desktop security settings to allow an application - which is not registered in the Mac App Store, to be installed?
The setting should come from the app that I'm trying to install. That means, whenever I install the app to any mac computer, regardless of its security settings as the following,
Allow applications downloaded from:
Mac App Store
Mac App Store and identified developers
Anywhere
The app should set the settings to Anywhere, allowing it to be installed.
Any help would be very much appreciated.
Launch System Preferences from the Apple menu.
Choose “Security & Privacy” and then click the “General” tab, followed by clicking the lock icon in the corner to unlock the settings.
Look for “Allow applications downloaded from:” and choose “Anywhere”.
Accept the security warning and allow.
Note that you should be careful and aware that now the job of protecting the system from malicious apps belongs to you instead of the OS.
Right click the (app) icon and click 'open' in contextual menu - no need to disable the OS security.
This is not possible. The existence of that setting is intended to protect users from malicious executables. If there were a way for any arbitrary executable to override that setting, what protection would it offer? Malicious executables would simply change the setting to "Anywhere" like you suggest, bypassing the security features of Mac OS X.
You need to sign your application using a Mac Developer certificate, which you can obtain from Apple. That will mark your app as built by an "identified developer" and it will launch just fine without changing any settings.
Control Click the app icon to override this security feature. This is a one off, you don't have to change your settings, you can do it per-app.
There is one other way...
All you have to do to do it manually is to open up Terminal, cd into the .app application, cd into the Contents folder, then cd into the MacOS folder, then type ./YourAppNameHere and execute by typing Enter.
iPhone Apps built for the simulator are stored here:
/Users/<username>/Library/Application Support/iPhone Simulator/User/Applications
Is it possible to copy the <GUID>.sb and <GUID> directory and install them on a different computer (with Development tools installed)?
This would be very useful for testing/demoing with out having to buy iPhones for all the managers and external clients.
I found a way that requires just a little more setup, but is much easier for non-developers:
Instructions for your users/testers:
Install Xcode following Apple's instructions
Double-click the attached application - the iPhone simulator will launch, install the app and start it automatically.
How to set it up:
Download and unzip (to a folder on your desktop or wherever) 'Simulator Bundler' from: http://github.com/landonf/simlaunch/downloads
Set your XCode build target to the required Simulator configuration (iPad/iPhone/which iOS version)
Do a 'Build and archive'
Find it: select 'Archived applications' in the Organizer, right click the relevant build, select "Reveal archived application in Finder"
Drag the application (yourAppName, no extension) onto the Simulator Bundler app
Done. This will create a self-contained Mac OS X yourAppDisplayName.app file in the same folder (with your app's icon as the icon) that you can stick up on an FTP server or email to your users/testers.
--
I think it's much neater/slicker than having to explain where to copy files, how to launch the simulator and so on.. And if anything gets messed up they can just uninstall via the familiar tap-and-hold + (x) gesture in the simulator UI, then double-click the app you sent them again.
You can also produce several of these packages changing the bundle identifier between builds, allowing them to be installed side by side in your testers' simulators; say for getting some user feedback on different UI designs, or configure one for Production and one for Staging/QA servers, so your content editors can check their changes before they go live or whatever..
The ability to reinstall the app from a desktop icon is also very convenient for localisation testing: launch the simulator, uninstall the app if present, set the required region format and language, double click the icon on your desktop, test; repeat for each required locale. (guarantees a fresh install each time, I've found that switching language with the app installed can result in all sorts of strange behaviour)
Yes, if you send those files to another person, and they put them into that directory, they can test the applications in the iPhone Simulator as well :)