• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Studio suddenly "Cannot find AVD system path"

Hi all.

New to Android development, and I did a forum search on this BTW.

After some Android Studio updates, it suddenly complains

Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

I've never set an environment variable for this, and was able to run projects just fine. I'm reluctant to set one and have the version be stuck at a hard-coded point.

I should also point out that I'm trying to run on a real phone, not the emulator.

Thanks for any insight.

Thought this news warranted its own thread...


After sitting dormant since 1999, The Far Side‘s webpage was updated suddenly and without warning (which we first learned about at The Daily Cartoonist). It features a new cartoon of an explorer using a blowtorch to melt some of the strip’s most iconic characters from a large block of ice. Below it reads, “Uncommon, unreal, and (soon-to-be) unfrozen. A new online era of The Far Side is coming!”

Not registered on network

I have a Galaxy S5 mini, it has been working fine for months, then I couldn't make and receive calls. it showed several bars of service, but wasn't connected. If I tried to make a call it said 'Not registered on network'

I found one way of making it 'work' was switching to 2G only then it makes and receives calls however data is then limited to 2G, not ideal.

I am on giffgaff network in UK. SIM worked ok in a different phone and connected straight away, so assume it must be a phone problem. Tried factory reset. Tried selecting O2 settings instead of giffgaff. Maybe a hardware issue?

Attached is a screenshot showing several parameters from the Service Mode screen, does that shed any light?

Any help appreciated!

Attachments

  • servicemodescreen.jpg
    servicemodescreen.jpg
    954.8 KB · Views: 266

Motion Event only inside the button view, and unable to be clicked more than once

I have two questions right now:

1) Using the code below this works great to show where the touch event is happening from the user on screen, however whenever the "Auto" button is clicked it only sends a motion event inside of the button view at the dimensions (X: 300, Y: 300) which is technically correct! However, I want it to send the motion event outside of the button's view dimensions.

2) Whenever the "Auto" button is clicked it only appears to send the motion events what looks like twice in quick succession and then the button is unable to be clicked again unless the app is closed and re-started.

Code:
class MainActivity : AppCompatActivity() {

   override fun onCreate(savedInstanceState: Bundle?) { //On creation of the activity this code runs
       super.onCreate(savedInstanceState)
       setContentView(R.layout.activity_main);

       editText.isFocusable = false
       editText.isFocusableInTouchMode = false

       editText2.isFocusable = false
       editText2.isFocusableInTouchMode = false
   }


   private var isTouch = false

   @SuppressLint("SetTextI18n")
   override fun onTouchEvent(event: MotionEvent): Boolean {

       val X = event.x.toInt()
       val Y = event.y.toInt()

       val eventaction = event.action


       editText.setText("X: $X")
       editText2.setText("Y: $Y")
       return true
   }


fun button (view: View) {
   Toast.makeText(this, "AutoClicked", Toast.LENGTH_SHORT).show()
}


fun auto (view: View) {

   // Obtain MotionEvent object
   val downTime = SystemClock.uptimeMillis()
   val eventTime = SystemClock.uptimeMillis() + 100
   val x = 300.0f
   val y = 300.0f
// List of meta states found here:     developer.android.com/reference/android/view/KeyEvent.html#getMetaState()
   val metaState = 0
   val motionEvent = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, metaState)
   val motionEvent2 = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, metaState)


// Dispatch touch event to view
   view.dispatchTouchEvent(motionEvent)
   view.dispatchTouchEvent(motionEvent2)
}

}

I have posted code above and a picture with a quick summary of what happens in the picture linked below.

(1.jpg)

I have seen ideas on how to make a layout that this motion event references, but it doesn't seem to make sense to me for this implementation of code I currently have.

Attachments

  • 1.jpg
    1.jpg
    28.5 KB · Views: 355

Android 10 security updates via play store

So Google have at last seen sense and are pushing security updates to all Android 10 phones via the Play Store. I'm just wondering if it's for 3 years like with Android one phones, or whether Google are mofing to more of a Windows 10 style of support with ongoing security updates and yearly or half yearly 'feature updates'.
It could be part of a 'green initiative' to reduce plastic , along with a reappearance of replaceable batteries..

Reading mmaped buffer in JNI without using fast message queue

Hi Everyone,

I have a device which generate video and audio data.
We have implemented a custom data source for Exoplayer to read the AV data.
Now, we are reading the data from kernel buffer to fast message queue.
Then, we are copying it from FMQ to JNI (java buffer).
This inturn is read in to player's buffer, when the player performs a read.
But, we want to improve it's performance.

We have implemented a mmap interface for the driver from which we get direct access(virtual address) to kernel buffer.
Is there a way to access/copy from mmaped kernel buffer directly to JNI buffer without using FMQ.
I couldn't find any such interface in HIDL implementation site.

Thanks & Regards,
Sooraj

Wakelocks?

I've been especially pleased with the battery life on my V40, untill recently.
Battery stats indicate that "Held Awake" percentages are increasing.
No new apps recently to explain the increase in wakelocks either.

What do I look for to find out what's happening. I had thought I had my settings right.

Did I miss something?

Nova Launcher

This is one of the most popular third party home screens for the Android ecosystem. This brings advanced features to enhance the android devices' home screens. So there you can overhaul your home screens using this launcher. So another thing is this can clean and faster your home launcher because of this a powerful, customizable and versatile home screen replacement for Android devices.

Rhythm Machine App?

i am ISO of an app that lets me create rhythm music to go with jazz chants that I use to teach English. The app must be able to synthesize a stringed bass, snare drum, hihat, and other percussion instruments. I need to be able to record it (remember) and be able to change the speed when I am playing it back. Any suggestions?

Help Setting up Do Not Disturb for a large array of numbers

I will be working night shift on call next weekend. I'd like to just nap throughout the day and perhaps a bit a night without my phone going off at all unless it's from work.
Ideally I would just turn on DND mode and add my works number to the "exceptions' list to ring at full blast.
Unfortunately my work can call from anywhere in the building all with their own different numbers. BUT they all start with the same 6 digits, so is there a way to add a contact to my phone that would be like (123)456-**** which would cover every number from (123)456-0000 to (123)456-9999?
Would be great to just add that as a Do Not Disturb exception. I've added the numbers that do call me to my contacts as they come but there are just too many of them and I don't want to manually add 9,999 numbers to one contact.
Thanks,
-Toph

InstagramApi - Retrofit

Hi friends, I want to develop an application using the following api. When I test api on chrome, json data is returned if any instagram account is logged in. I know how to use retrofit. But there is no access_token section in the url. How do I get the user to login when using these URLs with retrofit? Please help me.

// Returns user information if logged in
https://i.instagram.com/api/v1/users/26352342/info/
// Returns users followed by the user if logged in
https://www.instagram.com/graphql/query/?query_id=17874545323001329&id=26352342&first=20

Help Use USB for ... > now out of charge. Help!

In order to attach my phone (Nokia 7.1 on Android Pie) to a DAC/headphone amp, I set my phone via developer options to "use USB as audio".
I thought I'd changed it back to "use USB as charge", but perhaps I didn't. :-(
Anyway, the phone has now run out of charge, and will not re-charge or turn back on. I'm now pretty stuck. The battery is non-removable and does not charge wirelessly.
Any ideas?

WestCoastRomS For Google Devices

HI all ive been slowly working on a custom Rom that will drop next week, Base source is available now and custom vendor/tweaks will soon be ready. Based on AOSP and Lineage, along with a few others, adding your device via local_manifest.xml will be a breeze.

You can find some scripts put together on my personal git hub ill post the links.

https://github.com/WestCoastRomS

https://github.com/Centurion83/local_manifest.xml.git
For the newer Compilers getting there feet wet for the first time visit the Centurion83 page and grab those setup scripts. Cheers!

Attachments

  • Screenshot from 2019-09-22 13-57-11.png
    Screenshot from 2019-09-22 13-57-11.png
    359.6 KB · Views: 182

Bluetooth Serial Monitor for Arduino

Hello. I have made an arduino project that uses a keypad and OLED display to save the user's input for date, price, litres and miles for my car so I can track MPG. I have done this so it saves the data to an SD card like this (Date, Price, Litres, Miles):

020819, 12.18, 15.14, 121.4
100819, 12.18, 15.14, 121.4
160819, 12.18, 15.14, 121.4
310819, 12.18, 15.14, 121.4

This is fine for a manual extract of the SD card and then just dropping the txt file into excel on my PC, I can plot a graph for MPG over time like this fine.

But I have now implemented Bluetooth to my project just to expand my coding knowledge and to eliminate the need to extract the SD card.

My question is, could you help me try to make or find an android app to either save the incoming serial data to a .txt file (basically copying the txt file on the SD card to my phone), that I can then use excel on my phone to view; or to expand my knowledge even further to try and code an app of my own that simply looks at the serial monitor to then plot a graph and copy the txt file on the SD card as well maybe.

Is there a way that I could use the MIT app inventor? The only mildly related information I could find so far is a spanish video that I am finding hard to follow:

Filter

Back
Top Bottom