HWZ Forums

Login Register FAQ Mark Forums Read

Usage of Android Studio

Reply
 
LinkBack Thread Tools
Old 07-02-2019, 07:09 PM   #1
Senior Member
 
Join Date: Jul 2014
Posts: 1,059
Usage of Android Studio

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 by twinbaby; 07-02-2019 at 08:01 PM..
twinbaby is offline   Reply With Quote
Old 29-03-2019, 12:02 AM   #2
Junior Member
 
Join Date: Mar 2019
Posts: 11
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)
ztleee is offline   Reply With Quote
Old 01-06-2019, 08:54 PM   #3
Senior Member
 
Join Date: Jul 2014
Posts: 1,059
Yes, I was creating my first android application:
https://developer.android.com/traini...eating-project

Its helps me to understand better.
twinbaby is offline   Reply With Quote
Old 01-06-2019, 08:59 PM   #4
Member
 
Join Date: Mar 2005
Posts: 439
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
qifatt is offline   Reply With Quote
Old 10-07-2019, 11:14 PM   #5
Junior Member
 
Join Date: Oct 2014
Posts: 11
Talking 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
cookiemo is offline   Reply With Quote
Old 28-07-2019, 08:03 PM   #6
Senior Member
 
Join Date: Jul 2014
Posts: 1,059
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?
twinbaby is offline   Reply With Quote
Old 16-08-2019, 03:53 AM   #7
Junior Member
 
Join Date: Aug 2019
Posts: 2
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?
johndoee91 is offline   Reply With Quote
Old 18-08-2019, 11:01 AM   #8
Master Member
 
kuma-mon's Avatar
 
Join Date: Apr 2017
Posts: 3,773
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/traini...ra/photobasics

There are many ways to send text file to web server. Volley is one example.
kuma-mon is offline   Reply With Quote
Old 18-08-2019, 12:17 PM   #9
Senior Member
 
ronronleelee's Avatar
 
Join Date: Aug 2019
Posts: 596
Agree - You can use sms api to automatically read the code from SMS
ronronleelee is offline   Reply With Quote
Reply
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. Forum members and moderators are responsible for their own posts.

Please refer to our Terms of Service for more information.


Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On