How to install google play services automatically with my android application - google-play-services

I have an android application that needs google play services. Is there a option to put code inside my application to download and install google play services automatically if missing. I don't want users to download and install google play services separately and then install my application instead want to install both in a single go. Please let me know.
Thanks,
Rajeev

I think the correct way to do it is checking if the services are enable from within your app with isGooglePlayServicesAvailable(android.content.Context).
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(ctx) == ConnectionResult.SUCCESS) {
// do your stuff (play service is available)
}
if the test doesn't pass, this will automatically display a button to download google play services
Then, you could test on :
onResultActivity
if it were installed, and run your app

as mentioned in comment , This is not "automatically" and also is not possible for the Play Services Framework except via software piracy.
if ur application can run and only after that u need google play service functionality :
Just do these step:
1, Download file use Asynctask or Service. Solution here
2, Pass downloaded file to package installer.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")), "application/vnd.android.package-archive");
startActivity(intent);
It's simple set path to downloaded file and mime type. More detail here. You can also look to the right. There is a list of related questions like yours
answer comes from "Jul" in this post :
How to download & install .apk file in Android application?

Related

How do I update a Google Sheets Add-On

I have made changes to my (already published) Google Sheets Add-On (in the Script Editor).
I have created a new version and pressed "Publish > Deploy as Add-On" which says
You must configure the G Suite Marketplace SDK to publish an add-on.
When I click on the link G Suite Marketplace opens (and I see the currently published products catalog entry) but no way of specifying a new version.
.
When I click OK nothing happens.
The entire Google Sheets add-on deployment workflow is one hot mess. Do not use Publish -> Deploy as Sheets add-on... to update an already-deployed AppScript. It does not work.
Instead, first create a version of the script File -> Manage version. Then go to the G Suite Marketplace SDK page in the Google Cloud Platform console (console.cloud.google.com). Under the Configuration tab, scroll down to find Editor Add-on extensions where Sheets add-on extension should already be checked (if you followed the publication directions earlier and have already successfully published the add-on).
There you will see a field for the script version number. Increment it to the latest version, and Save changes. As far as I can tell this takes effect immediately.
Answer:
Google is currently migrating add-ons from the Chrome Web Store to the G Suite Marketplace, so now need to be published there rather than the legacy marketplace.
Further Information:
In order to publish an Apps Script project as an addon, as specified in your message, the G Suite Marketplace SDK must be configured. You can find an article detailing the migration process here.
You will need to enable the G Suite Marketplace SDK in your Google Cloud Platform (GCP) project. You can follow the information on the Getting Started page for Google Cloud.
References:
All add-ons now in the G Suite Marketplace
Publish to the G Suite Marketplace
Getting Started with Google Cloud
The new GSM publishing flow for Editor Add-ons as described https://developers.google.com/gsuite/add-ons/how-tos/editor-publish-overview is now available.
This means that all updates now needs to be done through GSM. Please make sure to complete all the fields in both the configuration and publish section of the marketplace SDK and click on the 'Publish' button.

IBM Ready Healthcare app migration from v6.3 to v8.0 issue

I am trying to migrate the IBM Ready Healthcare app (https://github.com/IBM-MIL/IBM-Ready-App-for-Healthcare) from v6.3 to v8.0.
I ran "mfpmigrate client ..." command from 'healthcare-mfpf' folder (folder structure shown below), and I got "No supported platforms were detected to migrate" error. Next, I ran the command "mfp add environment" in order to add the environment, that would add the platform. However, I get an error saying that there needs to be a hybrid app available to add environment. I had no luck on running the commands from apps folder as well (folder structure shown below).
Would anyone please kindly let me know the folder I should run the command from, or do I need to go through some extra steps before I can run the "mfpmigrage client ..." command.
Folder structure
Notice: please note that the Ready Apps are no longer maintained by IBM. Just take this under considerations
This project is a Hybrid app, meaning you need to first add it to MobileFirst Studio and then add a supported environment. The project does not come with environments by default.
Only once you do this step will the migration tool find a platform (= environment) to migrate from...
Looking at the file structure you've provided, it's wrong.
It shows:
Apps
- android
- iphone
It's supposed to be:
Apps
- some app
--- android
--- iphone
--- common
It could be that they call the app in the platform name, but that doesn't matter, it still needs to have the environment folder, so maybe to "Android" you need to add the "Android environment" (right-click > add environment...).
It could be because you thought this is Cordova app and used mfp add environment in the wrong filesystem location (also looks like you're trying to use a CLI instead of Studio?).
Looking at the GitHub repository, this whole structure is unconventional and it's not clear why they did it this way.
The links to the documentation there are also dead. This looks like a dead project.

How to develop Shopify themes locally?

I'm going to work on a Shopify theme, and I want to figure out how to run/edit it locally. I'd like to be able to the following, if possible:
Pull all the Shopify theme code from the site to my local computer (ideally a single command line tool)
Make edits locally, and run them locally or in a staging environment
Push all the edits to the main Shopify site, again using a command line tool
Is this at all possible?
There are quite a few workflows you can use here.
1. Task runners
If you're using either Gulp or Grunt locally for development, there are libraries out there that will upload your files to the store through API credentials of a Private App that you have to create. Most work by uploading the files you change, using a watcher.
grunt-shopify
grunt-shopify-upload
gulp-shopify-upload (it's my favourite since I use Gulp but has a known issue that sometimes it stops uploading files and you have to restart it).
2. Official Shopify Theme Kit
Theme Kit is a cross-platform CLI tool that was built by Shopify Employees. It can run on windows/linux/OS X. You can read more about it on Shopify Blog or download it directly. The alternative previously mentioned of Desktop Theme Editor is deprecated and has been replaced by Theme Kit.
3. Third-party SaaS Applications
Instead of watching for changes, these will work with a continuos integration workflow, where your latest push on a certain branch gets uploaded to the theme you've selected.
Beanstalk. More specific information can be found on their landing page for Shopify, here.
DeployBot. Their help article on Shopify has some information on how to get started.
Both options are from the same company. Here's a comparison of both they've did on their blog.
4. Third-party libraries
There's also an alternative not officially supported by Shopify which is a TextMate Bundle in case you use that OSX editor.
There's an unofficial extended cli similar to theme kit but with further functionality called Quickshot, which I've just found out based on Matt's response and seems pretty awesome. Some of the features they highlight are:
Supports uploading to multiple Shopify stores and themes
Easy to use configuration wizard
Uploads/downloads in parallel greatly reducing transfer times
Supports autocompiling scss locally before uploading to Shopify
Supports autocompiling Babel/ES6 into modules which are easily used by - Requirejs and others
Can use with .gitignore files or a custom .quickshotignore file.
Can download/upload Shopify Blogs, Pages and Products! Easily transfer them between stores! Even the metafields! And edit them locally in your favorite editor.
Shopify recently released Slate, a new tool for theme development.
https://github.com/Shopify/slate
As of 2020, Shopify has stopped support Slate so you can now use Themekit - https://shopify.github.io/themekit/
2022 update
Currently it is not possible to run Shopify locally. There are only solutions, mentioned in other answers to edit files locally and upload it to Shopify. It makes the development hard.
I am working on a solution to emulate Shopify locally making development similar to WordPress, React or Angular. So you will see changes immediately, even without reloading the page and without the need to upload files to Shopify each time.
You can read more here: https://link.medium.com/6SGd1kcVdnb
Juan's answer is spot on.
There's one more I know of which I believe is a little more advanced than Themekit (which I use) called Quickshot: https://quickshot.readme.io/v2.1/docs
Shopify have built a tool for Mac that allows you to develop your theme locally, and sync with your store https://apps.shopify.com/desktop-theme-editor
I don't know of anything for windows/Linux etc.
If you're looking for completely offline development, it's unfortunately not possible at this time. While the Slate/ThemeKit CLIs lets you code in your favorite text editor, an internet connection is still required because it likes to keep everything in sync at all times.
Install the state package by running the following commands:
npm install -g #shopify/slate
slate theme theme-name

Issue while Integrating Finder Sync in Cocoa using Objective C

I am trying to integrate Finder Sync Extension in my Cocoa Application to show badge in files and folders. But i faced some query:
1) Problem of to run the application means i want to run extension using my host application. Refer the below screen shots of that:
See the run pop-up menu, If i run app through FinderSyncExtension then it is added to Extension in System Preference but when i run my app through my host app like see blue menu item then it won't create extension.
2) FinderSync.m class is called only first time then it won't call so what is the issue of that?
Please give me brief idea related to integrate the FinderSync Extension.
And I refered the Apple official document of FinderSync.
Any help is appreciated..!
1.On developing you can run FinderSync extension by selecting "FinderSyncExt" from product-->Scheme. In my knowledge there is no direct connection between containing app and extension.
To stop your running Extension use "Stop" option from Product instead of button given to stop running application.On running a extension it initialise two process so to stop you have to press "Stop" twice(from product).
And before you run Extension in Xcode make sure that your extension is unchecked from extensions list(System preference--> Extensions).
Hope it will help you.

LUA windows: How do I launch windows metro app with Unified Remote script

I'm trying to make a custom remote for unified remote server in windows 8.1
The sample scripts have os.start(command). It works for something like calc, but I'm trying to launch a metro app 'netflix://' and Lua doesn't seem to want to accept it - I think it's not taking the front slashes.
Is there a way to get Lua to launch a metro app in windows? Thanks
Assuming you mean os.execute() command, to run commands that open files and run based on protocol association, you need to use start command:
os.execute("start http://google.com")
If you need to put the parameter in quotes, then make sure to include a pair of empty quotes as the first parameter:
os.execute([[start "" "netflix://..."]])
For os.start(), it seems that you have to pass the whole path to a command. The Unified Remote API states that it should match installed applications, but I believe it might only be applicable to applications with binaries in the PATH, which is why their example of calc works.
With this in mind, and knowing that start works well directly from PoweShell, this command does what we need:
os.start("C:\\WINDOWS\\system32\\cmd.exe", "/c", "start", "netflix:");
Answering this old question since it's the top google hit when looking for launching windows10 apps with Lua for Unified Remote
As a side note, due to limitations on the Netflix Win10 app, I ended up simply opening Firefox and giving it the Netflix URL. Assuming default installation:
os.start("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.netflix.com");