Include SPen SDK Library in Android app - android

When using an app that depends on the SPen SDK library, why must the user download the SPen SDK from the Google Play store first? Can't the SDK be included in the original app?

This must be something new. I don't remember that being the case when I played with it. Also, are you sure it's making you download it from Google Play and not from its own Samsung app store.
That being said, I can see a reason for doing that. By making the SDK library an application, Samsung can update the library code much more easily when it needs to change (instead of relying on the third party developer to do it).
I suppose Samsung could embed the library in its own custom ROM instead, but that update mechanism too would be at the mercy of the carriers.

This link answers the question I think.

Related

How can i use older version of google play services?

I'm using Google Cloud messaging through google play services. The things is it only works on the devices with last version of play services installed, in remaining devices i need to show a dialog to send user to google play to install new version witch i really don't want to do!
So how can i avoid this?! I'm trying to use an older version of play services (lets say from 2 years ago) to insure majority of my users don't need to update but it seems impossible with grade and android sdk since it already deleted older versions! So what should i do? Is there any way to use older versions?! and if do find a way to use an older version are newer versions compatible with older one?
I don't want to force my users to update because
GCM it's not essential to my app although i like to have it!
It's over 30 MB witch is a lot in third world countries were my users are.
Google play blocks some of my users from accessing google play due to international lows! and i have to do update manually my self!
There is a solution for android studio:
1.Close your project
2.Browse to the folder where your projects has been saved
3.Go to folder 'app' and open the file 'build.gradle'
find this line :
compile 'com.google.android.gms:play-services:7.3.0'
and change the version (here 7.3.0) to an older one (like 6.5.87).
You can find out available versions by looking at sdk/extras/google/m2repository/com/google/android/gms/play-services
5.open the project again
Unfortunately Google Cloud Messaging was only added to the Play Services API in version 7.5, which was released end of May 2015 (see this Android Developers Blog post).
So, if you manage to find a copy of the v7.5 API (see my question regarding that here) or if the suggestion above by #Babak is safe (still investigating that one... and you can only go down to 7.5.0 before you lose GCM support), you might be able to gain a few months, but it will likely not make a huge difference...
Actually, I just noticed that your question was also posted end of May... So you probably won't be able to gain anything. But you may reduce support of you move to a new API version later!

Is there a good reason we should not always use Google API SDK?

So far, I used the regular SDK in most projects, and used Google API SDK only when the project will utilize some of Google's feature.
I am now wondering is there a good reason I should NOT always use Google API SDK?
There are devices without Google services installed. In this case the Google API is not available. By not using the Google API SDK, your app can still run on these devices.
E.g. consider the Kindle Fire, it doesn’t have the Play store installed, as well as various low-budget tablets and Chinese phones. Custom builds from the open-source code such as Cyanogenmod also don’t have the Google apps installed (although many users add them manually).
Although Android itself is open-source, the Google apps require the vendor to get a license from Google. I know this because custom builds were asked by Google to not include their apps. Also having their own store instead of the Play Store is attractive for some manufacturers because then they get a share of the revenue instead of letting Google have all the profits. This is why not all devices have them.
One potential reason is this: why should you include something if you aren't using it? When you write a new class, do you import the entirety of the Android framework? No, you wouldn't, because at worst it could cause problems in your code, and even in the best case it takes up extra space in your resulting APK.
I'm not sure how much additional space would be taken up in memory/storage by building your app using the Google API SDK, but I can't imagine it's 0, and in mobile development you can't really afford not to be judicious with resource usage.

Is there a way to know in code from where the application downloaded on Android

I need to know how can I know from where to application apk downloaded from so I can make layout changes according to the download source?
Is there a way knowing it?
No. You cannot get from the android system where the APK is downloaded from.
But you could use different signatures for different sources and do as I explained here:
Supporting Amazon and Android market (Google Play) links inside application
What I explain in the above question is specific to an app for amazon and an app for Android Market, but the same approach applies - as far as checking signatures and things.

Supporting Multiple Android Versions using the Google APIs Add On

I am just about complete building an application. I've tested it on 1.6-2.3 android versions. My concern is how to distribute it. Does each phone already have the google apis installed? In particular one portion of my application is using the com.google.android.maps.* features. When developing I have to use a separate google apis library for each android version. Do I need to bundle the library for each version with my application?
Thanks in advance for any insight into this matter.
Does each phone already have the google apis installed?
No. However, I have not encountered any device that has the Android Market and does not have Google Maps. Hence, AFAIK, if you are only distributing via Android Market, most if not all of your users will have Google Maps.
When developing I have to use a separate google apis library for each android version.
No, you don't.
The target you choose in your build process (e.g., the target option in Eclipse) needs to be one with Google Maps, so your references to MapActivity and such resolve. Beyond that, set your target to match the highest API you are trying to use.
Do I need to bundle the library for each version with my application?
You are never bundling the library. The library is on the device.

Android minSdkVersion

I've programmed my app with Eclipse and android 2.2. However I think that my app would work for previous version and so it would allow more users to use my app. The problem is that I'm not sure... for instance I'm using Gestures which I think is a more recent feature... but otherwise I'm just using some Button, ListView, and WebView.
So is there a way to detect automatically the Minimum Sdk Version needed ( by checking which function my app is using) ?
I can't download the SDK of each previous version of android and test it until it doesn't work ...
Thanks
I can't download the SDK of each previous version of android and test it until it doesn't work ..
Why cant you? This is what the rest of us do. Create various different Emulators and test it out. I've released many apps by testing this way.
Take a look at the Compatibility page on Android's developer website.
It has some great information on how to make sure your application will work on different versions of Android and how to stop users from downloading the application if they do not have the right features on their device. In your case that would be the gestures feature.
To manage this, Android defines
feature IDs. Every capability has a
corresponding feature ID defined by
the Android platform. For instance,
the feature ID for compass is
“android.hardware.sensor.compass”,
while the feature ID for Live
Wallpapers is
“android.software.live_wallpapers”.
Each of these IDs also has a
corresponding Java-language constant
on the PackageManager class that you
can use to query whether feature is
supported at runtime.
To be totally sure you have to test your app against every platform version you target. Otherwise users of your app will do it for you (and that might be not good for app rating).
On the https://developer.android.com/about/dashboards/index.html page you can see the latest up-to-date platforms share info. So just decide how many potential users you're going to leave without your app :)

Categories

Resources