Usage of Android Studio

twinbaby

Supremacy Member
Joined
Jul 8, 2014
Messages
5,417
Reaction score
1,499
Hi,

I got a few question about android studio.
I am doing some static code testing.

I need to know:
1) How to export the apk out and run to see if it is compatible or not?
2) How to connect via usb and load the program to see if it can run or not.
3) What is the difference between running API Level 23 and Level 24, how to determine if device using API level 24?

Also, I am running an exercise whereby, when a button on phone is pressed. This will be executed. dev_id_complete = tm.getDeviceId();. How, can I see the output in runtime when I am using a real phone instead of an emulator?

if (permissionCheck != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_PHONE_STATE}, REQUEST_READ_PHONE_STATE);
} else {
final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
String dev_id_complete;
dev_id_complete = tm.getDeviceId();
if (dev_id_complete == null){
dev_id_complete = "0000000000";
 
Last edited:

ztleee

Junior Member
Joined
Mar 28, 2019
Messages
11
Reaction score
0
I would suggest reading the android developer documentation, there is a page that teaches you how to run your app on your phone (you need to enable USB Debugging)
 

qifatt

Member
Joined
Mar 21, 2005
Messages
481
Reaction score
0
API level is to let u decided wat version of android u want to support.
For me developing android app in android studio is a bit difficult.
Type app inventor is easier
 

cookiemo

Junior Member
Joined
Oct 20, 2014
Messages
11
Reaction score
0
information on android studio

Hi,

Firstly, to export the apk out and run.
you need to click on the build tab at the top of the android studio and go to build bundle(s)/APK(s) > APK. Once done, a pop up will appear and click on locate. Then manually copy and paste the debug-app.apk to your phone folder and install in manually.

Secondly, we will just click on the play button which is located at the top of the android studio to transfer your application to your phone.
However, in order to do that, you will be require to enable the developer options by going to Settings > About device > Build number and tab on the Build Number until the developer option is enabled. Then enable your USB debugging. This will allow android studio to detect your phone. But do take note that you also must allow permission for your laptop/pc to access your phone.

Thirdly, the different between the API 23 and API 24 is the service and features. Example, API 24 will be using more advance features/Service like Bluetooth and voice control but the API 23 will be using similar but more basic features/service.

Lastly, to see the output of your application runtime you have to follow my 2nd instruction and then click on the logcat at the bottom after connecting your phone to the pc/laptop/etc.

Hope all those information will be useful and pardon my english. I just a NT student with interests in coding
 

twinbaby

Supremacy Member
Joined
Jul 8, 2014
Messages
5,417
Reaction score
1,499
Hi there

Does anyone know the code from the phone to retrieve SMS, take picture and send large amount of lines or a text file to a web server?
 

johndoee91

Junior Member
Joined
Aug 16, 2019
Messages
2
Reaction score
0
Hi there

Does anyone know the code from the phone to retrieve SMS, take picture and send large amount of lines or a text file to a web server?

Can give a bit more context what you trying to achieve? Take picture i presume is use camera take but do so programatically issit?
 

kuma-mon

Arch-Supremacy Member
Joined
Apr 16, 2017
Messages
10,453
Reaction score
5,166
Hi there

Does anyone know the code from the phone to retrieve SMS, take picture and send large amount of lines or a text file to a web server?

Hi,

You can use sms api to automatically read the code from SMS



Taking picture u can use capture intent to open the camera. It's self explanatory in google documentation

https://developer.android.com/training/camera/photobasics

There are many ways to send text file to web server. Volley is one example.
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top