How do we know about APK install source - samsung-mobile

I came to know that, Android Play Store is not only a place where we can deploy APK files and there are quite a few.
Now I am planning to deploy my APK on following:
1) Amazon AppStore
2) Opera Mobile Store
3) Samsung Apps Store
4) NokiaX.
5) Android Play Store (Already deployed, also tracking)
Now the question is How to I know the source of installs of my App?
I wanted to see, if the app is installed from the Android Play Store, Amazon Appstore, Opera Mobile Store or Samsung Apps store etc ....
The below link may help for Amazon App installs:
Android install source
Any help is appreciated.

There is no API for that. You cannot know if apk is sideloaded or installed from store. Not 100% sure if some of stores have some kind of client database for that but not all stores are having it.

Assuming you use Gradle, you could use different product flavor for each store. You could create a resource file for each flavor and then on runtime you read a value of that resource to detech which flavor you are running. It only requires one additional resource XML file per flavor and defining those flavors in your build.gradle. Building your application wfter those modifications will result in 1 APK per store that are identical except for that one resource value.
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors
Something like this... Add these to your build.gradle:
android {
productFlavors {
amazon {}
opera {}
samsung {}
nokiax {}
google {}
}
}
And the you add a resource file per flavor app/src/FLAVOR/res/values/store.xml (e.g. app/src/nokiax/res/values/store.xml)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="store_identifier">nokiax</string>
</resources>
Now when you read the value of resource "store_identifier" you can detect which flavor you are running and thus deduce the store it was installed from. You might want to use integer resource instead of string though.
With those modifications building the app will result in 5 APK files (e.g. app_nokiax_release.apk, app_google_release.apk ...) and you can deploy each to their respective store

You can check the install source on API level 30 and above using InstallSourceInfo
val sourceInfo = applicationContext.packageManager.getInstallSourceInfo(applicationContext.packageName)
val installSourcePackageName = sourceInfo.initiatingPackageName

Related

Does a desktop-bridge app auto-update through the Microsoft store

I have a traditional Win32 desktop app written in C++/MFC that I have packaged as a UWP app for the Microsoft store using the desktop-bridge facility in Visual Studio 2019. It is currently published on the store, and users have been downloading it successfully.
I now need to release an update. I have incremented the Version numbers in the Packaging tab of the Package.appxmanifest and have a package just-about ready to submit to the Store. I hope (expect?) that current users will get their existing copy of the app automatically updated if they have set that choice in the Store app itself, or if they manually check the Store for updates. However, I am not sure whether that is actually true. Do I need to do anything within my program itself to make that happen?
Thanks for any help.
Yes, desktop bridge apps published in the Store update automatically.

How do I run MyLocationDemoActivity.java?

How do I run MyLocationDemoActivity.java? I got this file from GitHub this is the link:
https://github.com/googlemaps/android-samples/tree/master
I am completely new to Android Studio, what are the steps to run this file?
On the getting started subtitle when you scroll down on the GitHub site, it tells says to create a file on the "root directory" called secure. properties. I am sorry, but I have no clue what or where the root directory is located and how to create the file. But I did get an Google Maps API key.
I also did import the project, but how do I add an emulator. I have downloaded the emulator and it works because on a different project I created a Google Maps Activity Project and just ran the sample code putting a marker on Sydney. I am not sure how to add the emulator to the project I downloaded from github though. I tried to add a template configuration for an android app, but it says no module. How do I add that? In summary, I am just looking for a step by step way to run this file.
(Also, I am sorry if this seems like a mess of questions, but I really have no idea what I am doing)
You question sounds too generic, so I will give some suggestions:
demo activity could not be run separately, you have to create a full environment of android and open the main activity, then open this demo activity
Don't use emulator for developing Map features, use a real device. In fact, I always use "Real Device" when developing, because "emulator" seems lots of bug, and its speed is very slow.
when studying a new tech/skill/feature, bit by bit. e.g.
3.1 you should know some knowlege about android main activity, android basics
3.2 play with emulator and real device, and know adb commands
3.2 play with DemoActivity
good luck!

Is there a tutorial that explains how the sandbox completes the 'source' with the sdk and executable code?

New guy here. I walked through the 'Cassandra data analytics demo' in the sandbox and was up and running in no time (using the recommended hardware, Raspberry Pi and DHT11 sensor).
Now I want to take it to the next step. I installed an instance of Kaa (not the sandbox anymore) and followed the same tutorial which explained setting up the schemas and log appenders etc (https://www.youtube.com/watch?v=VHwJLHQjl50) and exported the sdk to the Raspberry Pi. The issue I'm running into is understanding exactly what all was done for me in the sandbox, for instance, all of these steps performed when I click "Source":
Assembling sources for 'Cassandra data analytics demo' project... SDK
profile id of project: 10 Getting SDK for requested project...
Successfuly got SDK. Processing project archive...
CCassandraDataAnalyticsDemo/ CCassandraDataAnalyticsDemo/src/
CCassandraDataAnalyticsDemo/src/dht11/
CCassandraDataAnalyticsDemo/CMakeLists.txt
CCassandraDataAnalyticsDemo/src/dht11/dht11.h
CCassandraDataAnalyticsDemo/src/dht11/dht11.c
CCassandraDataAnalyticsDemo/src/kaa_demo.c
CCassandraDataAnalyticsDemo/build.sh Compressing source project
archive... CCassandraDataAnalyticsDemo/
CCassandraDataAnalyticsDemo/libs/
CCassandraDataAnalyticsDemo/libs/kaa/
CCassandraDataAnalyticsDemo/libs/kaa/kaa-c-ep-sdk-wcknkllgn6TIg3OjUlumWqcZSCw.tar.gz
CCassandraDataAnalyticsDemo/src/
CCassandraDataAnalyticsDemo/src/dht11/
CCassandraDataAnalyticsDemo/src/dht11/dht11.c
CCassandraDataAnalyticsDemo/src/dht11/dht11.h
CCassandraDataAnalyticsDemo/src/kaa_demo.c
CCassandraDataAnalyticsDemo/CMakeLists.txt
CCassandraDataAnalyticsDemo/build.sh Source project archive
compressed. Succesfully prepared project data!
-------- CLICK OK TO START DOWNLOAD PROJECT SOURCES --------
Finished!
My question is, once I download the c-sdk from my instance of kaa (not the sandbox), moved it to the Raspberry Pi and built it, what do I need to do, or what glue code is required to get the Pi to start logging a sensor's data and reporting back to my instance?
There is no tutorial that explains how the sandbox completes the 'source' with the SDK and executable code.
Kaa Sandbox is a preconfigured virtual environment designed for the users who want to use their private instance of Kaa platform for educational, development, and proof-of-concept purposes.
The Sandbox also includes a selection of demo applications that illustrate various aspects of the platform functionality.
When you click "Source", you got sample project with generated SDK for specified platform and language. See your first Kaa application guide for details.
For example, if you want to run the 'Cassandra data analytics demo' without the Kaa Sandbox, you should do the next:
Create an application.
Add this log schema (you can use Upload from file at Add log schema window in Kaa Admin Console).
Add "sensor_per_row", "sensor_per_date" and "sensor_per_region" log appenders using configuration from corresponding sensor_per_*_cassandra_appender.json located here
(you can use Upload from file at Add log appender window in Kaa Admin Console).
Download "c" folder from here.
Create folders "libs/kaa" (project files structure as in downloaded Cassandra data analytics demo from the Kaa Sandbox).
Add SDK profile for your application.
Generate SDK for C target platform.
Save SDK into the libs/kaa folder.
Follow the installation steps for Cassandra data analytics demo from Sandbox to run client application (for now you don't need to download the source code by clicking the "Source" button).

Build Windows Phone app picking appropriate assets based on the build configuration selected

I am working on a Windows Phone 8 application which i have to provide for around 40 clients.
Each client will have specific data and UI which i will be processing and creating from a Zip file i create for each client.
Now with single code base i want to generate build for each client with appropriate ZIP and other resources.(like app icons and splash )
How do i do that ?
Xcode supports this feature by multiple targets.How do i achive the same with visual studio ?
i would need to have Client specific resources which includes Zip File,app Icons and splash to go into the build by selecting the Client Specific configuration ( May be Build configuration created for each client)
simply generate build with client specific data.
Any help is appreciated.
For achieving my purpose i used MSBuild with required options for generating build.Created a Windows Forms application with Simple UI to Select a client.Managed the resources specific to client by replacing the existing resources with resources specific to Client Selected..

Parsing a SWF file in Linux

We would like to write some automated process of fetching data from quiet a few SWF (Flash ActionScript 3) files.
Aside from that, we would like it to run automatically as a part of our automated-deployment-script (written in Ant, runs on Linux).
Do you guys know of any SWF-parsing tools that allow to check for instance-data-per-frame ? (Adobe AIR won't run in a console-linux, as far as I saw in Google)
Ideas ? :)
With Adobe AIR
We've done this using the Adobe AIR SDK. The AIR SDK versions 2.6 and earlier support Linux.
You don't need to go all the way to packaging your app for Linux desktop, just use the adl tool to run your application.
First, write an ActionScript application that loads and parses data from your SWFs and compile it as loader_app.swf
Then create an application descriptor xml, such as:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
<id>HelloWorld</id>
<versionNumber>0.0.1</versionNumber>
<filename>HelloWorld</filename>
<initialWindow>
<content>loader_app.swf</content>
</initialWindow>
<supportedProfiles>extendedDesktop</supportedProfiles>
</application>
To run this application under Linux, simply run:
> /<path_to_air_sdk>/bin/adl app.xml
Notes:
I vaguely recall that it is possible to run air in headless mode, but our workaround was to run a dummy VNC server on X display :99 and set DISPLAY=:99 to get adl to use that X server so we could run it from cron.
If you want multiple instances of your AIR app to run simultaneously, you'll need to change the field in the app.xml. AIR only creates one instance per id.
Let me know if you'd like clarifications on any step.
Without Adobe AIR
Another possibility is to use redtaramin which claims to allow running actionscript from the commandline. Unfortunately I have no experience with this tool.

Resources