Android - Issue with .apk file - android

I do understand that a .apk file is created in the bin folder of an android project, when the project is run.
I have a question about this: is it possible that there would be any difference in the functionality of an app installed via eclipse (as in connecting the phone to the computer and uploading and installing the app on the phone) versus installing the app by downloading a .apk placed on a secure server?
The reason I ask this question is that I usually put up the .apk file on a secure server and the testing team downloads and installs the app for testing purposes. The testing team has started to report app crashes when accessing this app. However, I don't seem to be seeing the any such problems (even while replicating the same scenarios) with the app when I install it on the phone via a cable connected to the computer.

You might be falling into a caching issue. Make sure you get the QA team a new filename of the apk on the server to ensure that they never get a cached apk when downloading it. Also maybe create a md5 sum of the apk locally and run md5 on the apk on the server after upload to ensure it is the same.
e.g. use
md5 yourapk.apk > yourapk.md5
on your machine and the server..
Most likely you QA team has found issues that are specific to the device or Android platform version they test with. Try with your apk with the same hardware in your dev environment.

I don't see how that would possible. The Eclipse ADT plugin just calls the executables in the specified Android SDK location on your hard drive and the .apk gets generated only once when you use Eclipse to install the application to your plugged phone.
Unless you're packaging the two versions in a different way, that shouldn't be possible. My guess is that your testing team has just found bugs specific to the runtime environment (the phone). Maybe a different version of Android, conflicting custom ROM, etc.

No, there is no difference , if the apk on the secure server is as latest as you have on your computer.
I would recommend you to clean your project before uploading the apk to the server.
Regarding the crashes, i guess there are some location based problems.
Also check if you are uploading the apk from your workspace. or some other older version which is located in different place that you are not using anymore.

Related

Can't Install after sharing it another mobile

I made an Android app using Android studio, deployed and ran it directly by using my mobile running Oreo.
It installed successfully. But later I tired to share the APK from my mobile to other mobiles. But none of them are able to Install it.
However, if I build the APK and share the app-debug.apk to other mobiles. It Installs successfully.
I can't build APK and share app-debug.apk it everyone.
I usually deploy it in my mobile, share APK(which used to work before)
Can anyone please help
Please excuse typos, I have typed from mobile.
There might be a signing issue. Is your app signed? The default signing is the debug signing. When you just build and deploy or run it on a connected device, it is signed by default as a debug sign.
If it is not uniquely signed, then running or installing on other devices might not be possible. Look at the app signing instruction and guide by Google, here, if you wish to distribute your app on other devices.
Another problem might be in the security authorization of other devices. Your device on which you are building has the developer options turned on. To run and install unsigned apps you'll need to activate the developer options in the device you want to run it on. Look at this link about Developer Options and how to turn it on.
by default the Android Studio packages just the needed files and installs the app in your mobile. If you share to other mobiles, the app will not install in few devices due to a few reasons like OS version, files mismatch, SHA keys mismatch, etc.
However, if you build the APK and share, the APK is equipped to be installed in any device starting from the minimum SDK version to the target SDK version.

Will different machine installed Android app (via Android Studio) get a different signature?

I have an old app that I've written for personal use only, and never made as release to the Play Store. I installed it to my phone via Android Studio using run app command.
Many years later I want to modify the app, I try to pick up the app and run it again, this time using a different computer. I get the error saying:
"Installation failed since the device already has an application with the same package but a different signature. In order to proceed, you have to uninstall the existing application."
I definitely don't want to uninstall my app, this would cause me lost all the data I've entered to it. So I want to ask that isn't the debug keystore used by Android Studio to install app on device would create app of the same signature? Why it would be different? Is a different machine caused this issue? Thank you very much!
It sounds like you were using your debug certificate when you originally installed the app. This is unique to each machine when you install Android Studio.
You can copy the debug certificate from your old machine to your new one.
The file is located in your [userhome]\.android\debug.keystore

test android application by not developer

What the best way (in terms of efforts) to test android application by ordinary users (that have no ability to install android sdk, connect usb cable and so on things)?
I see two variants:
Google Play + alpha/beta versions restricted only for several users, but according to this delay may be several hours, and it is too long for me.
Is it possible to reduce this time delay to several minutes? Is it possible to automate, so our CI upload apk file after each commit?
Publish apk file on our web server, so user can install it via download. But I tried this way by myself, and for some reason apk file was openned by program that can open zip files, and this program not suggest install it, I have to install additional file manager, find apk file in download folder and install it with help of file manager. Is it expected behaviour for android, when I open external apk file?
may be there is more variants?

How can my friends test my Android application?

I am developing an Android application and it is not finished. I would like to test it on multiple devices, locations with various users that are not near me. How can I achieve this? Is there an APK I can send them? Is there a way that is as simple as plugging my phone in and then running the application from Eclipse? Or would I have to make an installer of some sort (I don't know)?
Obviously you can plug your phone(s) into the machine you are developing on and run it from eclipse. This will allow you to test and debug on the devices you have access to.
You can also export an apk from eclipse (see the android pages for instructions). You could put this up on a file sharing site and make it available to your friends. They could then install it, as long as they have authorised "unsigned" apks to be installed in their phone settings.
Assuming you have deployed the app at least once from within Eclipse to debug and test yourself, you will most likely have an APK under the bin directory in your Eclipse project. The file should be .apk. This APK will have been signed automatically by Eclipse with your debug key. This is obviously not the key you use for publishing but for testing among friends I think it's fine.
What I often do is just e-mail that APK file as an attachment to my friends to an e-mail account they have setup on their phone. Then all they need to do on their phone is make sure they have the system setting to allow installation of non-market apps (i.e. not from Google Play), which maybe named something slightly different like "allow 3rd party apps". Then they can simply click on the app attachment in their e-mail, download it and run it and they should automatically be prompted with instructions to install it.
I just used MyAppSharer. (I believe there are other similar apps out there - this is just the one I've used and is very simple/easy:
...you can share by market link or directly share APK (App's full
package)
I just used that, and sent my app via apk file to my coworkers. Can't get much simpler.
Just install the app on your phone via Eclipse, then run this AppSharer, and voila - share it w/ anyone!
You can can easily export your project as an APK in eclipse
File -> Export -> Export Android Project

Android and Unity 3D game development

I am starting to explore the game development using unity 3d for android. I have downloaded the trial version of unity 3.3. I went through few tutorials.
I have one question that is not answered. In the normal apps which we develop using eclipse, we can deploy onto mobile by copying the apk file. What about unity 3d? How do I get the game onto my phone. I don't want to publish on market.
It is possible to transfer your assets to Eclipse. When it's integrated you can debug via your android phone. Be sure to read the tutorial on Unity's homepage. There is a step by step start-up guide and some more. Following links are worth looking at:
Getting started with Unity and Android
Official - Integrating Unity with Eclipse
Alternative link - Integrating Unity with Eclipse
It would seem that the official "integration" link is broken so I updated with a forum post that covers the same topic. However I recommend to try with the official link first.
Yes, you can simply copy the apk to your device and install it. Unity builds an apk file (and will optionally sign it using a keystore that you provide or let it generate for you). Once it has built that apk you can deploy it normally. You can even have it include a customized manifest in the apk that it builds if you want to (but it generates a nice one from your settings in the unity project by default).
There are two methods for this, as far i understand,
Using Build Settings--> Build, It builds the apk file that can be installed on your device using adb install <apk file path and name>
Using Build Settigs--> Build and Run. Which automatically installs the apk built apk file on your device if connected
go to file
-build
-select android platform(your pc has to have android development kit)
-save your apk
As it is still unanswered I try to close this question
First of all, current version of Unity 5.2 is much more powerfull than version 3.3. mentioned in original question.
What about unity 3d? How do I get the game onto my phone. I don't want to publish on market.
The same way. Unity allows you to publish build as *.apk on ocal machine and then you can just copy it to your phone and install it.
What is more cool, now you can debug your application running on phone. You have to install Unity Remote to the phone and run. Now you can set breakpoints and debug as normally.
If you change your mind and go to publish on Market - Unity will sign your *.apk
Hope this helps someone, good luck!
The Same way you generate the apk through Eclipse like that in unity you need to build the project. For that android sdk and jdk should be installed in your system and u need to show those path in the unity Preferences then u need a google keystore and need to sign in with that key store in the Publisher settings and then u are able to build the apk which will be store in your local system and you can copy that to your mobile and install the apk file.

Categories

Resources