Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

PiCroft posted:

This is largely for my own sanity, but I'm curious about something. We want to gather touch data for an app and write the type of touch to a database. While we can get the touch type easily enough, I noticed there was a very handy looking function called actionToString() in MotionEvent that translates the touch type directly to a sensible string. For somer reason, any attempt to use it failed; intellisense didn't detect it, manually calling it results in unrecognized error and I can confirm it was indeed there in the source code (its build-in Android stuff).

On researching it, it turns out this call is hidden on earlier version of Android SDK (pre 19 I think), despite the fact that literally all it does is perform a switch statement and returns a string with the action type.

Does anyone know why the hell this is hidden?

If it's not publicly available, you CANNOT rely on an OEM not loving it up. This has bitten me in the past.

If it's public now, you can always git blame the reason from AOSP.

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

HardDisk posted:

I'm developing an application that depends on a webservice that it is still undeployed and as such, it is only running on my local machine on localhost:5000. So far so good.

In the chrome://inspect/#devices page, I can set up port forwarding (I set up 5000 to localhost:5000) and in Chrome it works quite well. The Devices page also warns that Chrome must remain open for the forwarding to work, but that's OK, I guess.

The problem that I'm having is that when I switch out from Chrome to my application, the forwarding stops working and Chrome stops showing up on the Devices page on the host computer. My best guess is that Chrome must be always in the foreground if I need the forwarding to work, but then I can't test my application this way.

Is there any way for that to work? Having Chrome open in the background is fine, but I can't test my application if it has to be open on the foreground.

Of course, I can just deploy the webservice, but :effort:

adb forward lets you port forward if that's the bottleneck. Otherwise, run an emulator on your desktop if you can do the hardware acceleration and virtualization.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

HardDisk posted:

Thanks, didn't know about adb forward.

judicious use of adb commands also allows neat stuff like wireless debugging :science:

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

kitten smoothie posted:

Is there any on-device way to simulate a poo poo network? I know you can do this in the official emulator, but I want to do this on a real device. If it needs to be rooted, that's fine, my development device already is.

I like how iOS has the Network Link Conditioner built into the phone. I'm almost about to just go buy a prepaid T-Mobile SIM and lock the phone to EDGE only.

Facebook put out something recently to simulate awful network conditions with latency and packet loss, though I don't know how well it works.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

more like dICK posted:

Coming back to Android after spending a long time with Java on the server. I have an existing Java client for a REST API that uses Apache HttpComponents, is there any issue using this instead of okhttp/retrofit? Related question, is there a good place to stay up to date on Android libraries and design?

The apache libraries were deprecated in Android a couple years ago and will not be maintained going forward. Use the new hotness libraries instead.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Sereri posted:

Does anyone have a good idea for implementing something like this aside from a PopupWindow containing a Viewpager with 2 Fragments?



I vaguely remember there being a library for this, but it might have been even pre-HC, so a PopupWindow with a ViewPager and 2 Fragments (or 2 Views even) might be your best bet.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

edmund745 posted:

Yea it did install it. :D It just has a generic icon (I didn't provide any icon). And the page doesn't say it installed it.

Other people asking this question always get referred to this page: http://developer.android.com/tools/device.html
but that page doesn't mention that the app gets installed upon running it on the device....

I never had any android device before a couple days ago, and so a lot of aspects seem,,,,, odd. Like, why is there no file explorer program on there?.... Or is there?
(I know you can get file explorer apps, but it would seem to be a necessary thing to have anyway, so why is one not already there?)

When you connect it to the PC it is detected as a USB storage device and you can put files on it that way, but then [apparently] Android can't do anything with them. I don't get the reasoning here --- ????:>|

I did notice however that all of the apps it came pre-loaded with, were 'cloud' stuff. As in, NOTHING you do gets stored on the tablet. You have to open an account with whatever-website the thing works with, and all your sh*t gets stored online somewhere.

There's no concept of an installer vs a standalone binary such as in the Windows or OS X world; everything is packaged into your application, which you install via telling the device's package manager to install it (which you do via clicking "run" in Android Studio, or by clicking "install" in the Play store, etc). When you're "test-running" the app, you're installing it, or re-installing it if it was already installed.

I'm not quite sure what you mean by "Android can't do anything with them." Android definitely can do something with them, but in the mobile world the concept of file browsers is somewhat archaic; applications know what files they need to know about and run them. Android, in particular, handles this design by having applications specify what kind of files they handle via intent filters (see the data tag you put in the intent-filter tags). A calling application will "open" a file by creating an Intent with a VIEW action (or whatever action is most appropriate) and the file as a uri. If you've installed a file browser application, attempting to open files will do exactly this. Additionally, content is registered with the MediaStore (either explicitly or passively), which exposes it to other applications who can find it by querying the MediaStore for content (Music, Photos, etc). This is how the Gallery apps work; they don't scan your filesystem, they're vended a ContentProvider with a list of image uris to display to the user.

As far as things being stored online, well, it really just depends on the apps. Your camera stores its photos/videos locally. You can/should download your music and store it locally. If you install Kindle, Audible, etc, that content gets downloaded. But, we are in general moving towards a world that lives more and more online. Mobile just happens to be the leading edge here.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

edmund745 posted:

I got my idiot game thing working, sort of. As far as I've gotten into it anyway....

One question: I keep getting errors in the Android Studio editor because I get capitalizations wrong in the Java language.
,,,
Like for example, trying to use "If" instead of 'if' in an if-else statement,,, and then spending five minutes trying to figure out why it says "this 'else' statement requires an if statement"

Is there any setting to get it to autocorrect capitalization errors for Java-language keywords? It tries to warn me about spelling errors in my chosen variable names, but it is ignoring the keyword capitalizations and just flagging them as an error.
I looked around in the editor/default settings/java options but didn't see anything as simple as this. :|
(I did google this matter but there is fifty million page results about people trying to get the auto-capitalization on their Android devices either turned on or turned off,,, so I could not find anything relevant)

This is probably a "tough cookies" kind of situation. The general rule of thumb is that language syntax is always lowercase, classes are CamelCase (first letter uppercase), and methods are camelCase (first letter lowercase). After a little while, you'll get used to the expected syntax and this will cease to be a problem.

You should be getting a nice red squiggly under your if statement's line, so look there.

There's the Oracle and Google (and Android!) style guides, which you can try following to keep the rest of your code consistent.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Doghouse posted:

So for our final college project, our 3-person group, for some reason, decided to do an Android application, which none of us have ever worked on. So we are in a bit over our heads.

But basically the first iteration is going to be close to the "Tabata HIIT Timer" app - just a few screens, where you pick a workout routine and then when you start it, there is a timer for each exercise.

Kind of a random question, but does anyone have any general suggestions on how to break up the work among three people? I think the way the group lead proposed might not make any sense.

While you have an android app, it may make more sense to ask this in the general programming problems thread. You can always decide what your app skeleton structure is and assign parts to people to fill in the blanks.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

My adviser wants me to build a simple Android app that logs the accelerometer and location data. I copied the layout and main activity code from here (please tell me if that's horrible code to start with), so now I have start and stop buttons. I know I want to do the logging and sensor polling off the UI thread, but I don't really have any idea how to separate them. I think once I know that, I can read the documentation for polling sensors, and I can probably figure out how to write to a text file in Java.

Check the documentation, but I think that the Location and Sensor callbacks occur off of the UI thread anyway. You said "polling". Is that what you want to do, or do you want your callbacks to just update your UI as appropriate?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

I do appreciate the help. I'd just used the search box at developers.google.com/android, since I didn't realize there's also developer.android.com. Which is annoying.

... How did you download the SDK? :psyduck:

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Suran37 posted:

I'm working on an audio player app, because the few I have used in the past were slowly becoming buggy or have annoying "features".
Anyway, what would be the best way to manage the MediaPlayer object? I was tempted at first to use a singleton, but my research seems to suggest that it would be a bad idea to do so for various reasons. Any tips would be appreciated.

Are you sure that MediaPlayer is going to be sufficient? If it is, why were you mucking with 3rd party libraries? Consider whether you're going to have to mess with AudioTrack at some point.

Use a Service to manage your player, or whatever you use to play audio, along with setting the service as a foreground service if it's long lived. Bind to your service from your activities for controls, etc.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

speng31b posted:

Just released an update to the latest app I've been working on, a prototyping/design tool. Previously we just had simple wireframe support (think super-simple vector art). Now we've added interactive screen links sort of like POP, but without having to take pictures and whatnot. Anyhow I made up a dynamic transition system for the screen links that makes for a pretty neat video:

https://www.youtube.com/watch?v=R6JpEXdHtnc

That's... Impressive.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
In the SDK controls, you should be able to download the source for your target, as well as the images etc.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Yeah, you're looking at the decompiled SDK target "source" (i.e. the stubs), when you should be looking at the sources you can download separately with your target. Your IDE should be able to target a different set of source files, but Android Studio should handle doing that already.

Volmarias fucked around with this message at 19:00 on Jul 3, 2015

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

I don't think I quite understand how TextViews work. I'm able to read data from the accelerometer and send it to the log, but I can't get it to display. I have an activity that's called when the user presses the "start" button on the main activity; here's its layout:

XML code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.example.spart_000.accel_demo.DisplayData">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minLines="1"
        android:id="@+id/xCoord" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minLines="1"
        android:id="@+id/yCoord"
        android:layout_below="@+id/xCoord"
        android:layout_alignParentStart="true" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minLines="1"
        android:id="@+id/zCoord"
        android:layout_below="@+id/yCoord"
        android:layout_alignParentStart="true" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/button_stop"
        android:onClick="stopCollect"
        android:layout_gravity="center_vertical"
        android:id="@+id/stop_button"
        android:layout_below="@+id/zCoord"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="119dp" />

</RelativeLayout>
For now, I just want to print the x, y, and z values from the accelerometer in three separate TextViews. I figured that each time the sensor changed, if it's been more than 100 ms since the last time the text was updated, it should be updated again. Here's the code from the above activity's onSensorChanged method:

Java code:
public void onSensorChanged(SensorEvent event){
    Sensor mySensor = event.sensor;

    if(mySensor.getType() == Sensor.TYPE_ACCELEROMETER){
        float x = event.values[0];
        float y = event.values[1];
        float z = event.values[2];

        Log.d(TAG, "x = " + Float.toString(x));

        long curTime = System.currentTimeMillis();

        if((curTime - lastUpdate) > 100){
            lastUpdate = curTime;
            mXTextView.setText(Float.toString(x));
            mYTextView.setText(Float.toString(y));
            mZTextView.setText(Float.toString(z));
        }
    }
}
However, nothing's being displayed in the TextViews. Why is that?

What's lastUpdate's starting value? Add a log line to the inside of that if block, or better yet a breakpoint. Does it reach there?

Are your textviews visible? If you give them starting values, do you see them?

Also, does your callback happen on the UI thread? Do you need to call postInvalidate for some reason?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

baka kaba posted:

Well they're both hitting the same last update timestamp, right? Also you can set different update speeds when you register the sensor, remember

What's your end goal here? If you're trying to do something like display the device orientation, you might be better using something like the orientation sensor or whatever, than trying to wrangle the individual sensors it uses yourself

e- orientation not rotation. I love how the android dev site is completely unreadable on mobile devices :catstare:

Well you're not coding via the mobile device sooo... :ironicat:

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Use layout weights. Your bottom layout with buttons has height wrap_content and weight 0, your scroll view has height 0 and weight 1.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Edit: never mind

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Hiding in app private storage. You don't have permissions to view /data. Write your file to external storage instead.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Several things.

1) Without knowing what directory getDataStorageDir is putting your file, we can't really help you with that.
2) openFileOutput opens a file in app private storage. Lets assume that getDataStorageDir is providing an externally visible directory.

code:
File myFile = getDataStorageDir("MotionCapture");
You're then getting the name of the file, not the path

code:
String filename = myFile.getName();
And opening an outputStream to a file with that name in app private storage.

code:
outputStream = openFileOutput(filename, Context.MODE_WORLD_READABLE);
WORLD_READABLE doesn't help if you don't have the absolute path. If you do, you may actually be able to pull it directly via adb pull. Regardless, I strongly advice you to use getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS) in this particular case as your root directory.

To open the file for writing, I'd recommend using FileOutputStream with a file argument directly, e.g.

code:
File myFile = Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS);
FileOutputStream fos = new FileOutputStream(myFIle);
...

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

Ah, didn't read the documentation on that! This is going great. The only thing now is that it wrote the same motion data several times at the end of the file, but that's not a large concern. Thanks for all the help!

Did you register your listener multiple times? Make sure you mirror your registrations with deregistrations.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

I found the Handler constructor kitten smoothie was talking about, but suddenly I'm getting an error when I try to run my app over ADB: "Error: The activity 'MainActivity' is not declared in AndroidManifest.xml". I haven't changed that file in at least a couple days, and here it is:

XML code:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.user.accel_demo" >

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main"
            android:exported="true"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".DisplayData"
            android:label="@string/title_activity_display_message"
            android:parentActivityName=".MainActivity" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.example.user.accel_demo.MainActivity" />
        </activity>
    </application>

</manifest>

What got borked? Or is it something else?

Something else broke. Uninstall your package, clean your build, and restart your device.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Your file is in app private storage. Gmail doesn't have permission to access it. You can either change the permissions, or use a FileProvider to vend the file securely.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
I'm not even going to try to diagnose this. Just put your file in publicly visible external storage.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

How would that help? The URI seems to be accessible, it was just getting put in the wrong part of the intent.


This worked like a charm, thank you.

If you use a public external storage directory, there's no per-app permissions, so you wouldn't need a FileProvider, you could just give the file uri from there.

Glad to hear you got it working though!

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

I'm working with another student on this app, and he's mainly doing the data analysis stuff. He told me today that sometimes the same simple movement (perhaps sliding the phone in one axis on the table) will appear on different axes in his visualizations, and other times different movements will appear on the same axis. We've both looked at the linear acceleration documentation, and it doesn't say anything about this. Where should we start looking to figure this out?

Look at the orientation of your phone as you move it. If you move it sideways, that will give you a different bump than moving it longways.

I also would not be surprised in the slightest at an OEM screwing up which axis gets reported.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Oh man, you just heard about that? A friend of mine still works for Samsung, and had to explain Unix permissions to their security team and why this was such a bad thing. I poo poo you not.

Apparently they've gotten a little better since then, though apparently not by much.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Subjunctive posted:

Yeah, I haven't been paying attention to Android for a couple of years, and now I feel like I need to go back and binge-watch all the episodes.

It's definitely entertaining in a train wreck sort of way. The current issue of the month is vulnerabilities in the stagefright media library allowing to RCE at system level via a well hung crafted MMS message to most devices, the realization of what exactly a carrier driven emergency security patch schedule looks like, and the fact that there are some devices that will probably never be patched.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

kitten smoothie posted:

Oh, and don't forget that the patch didn't fully patch the problem.

I'm really curious how many full time Android developers carry iPhones as their personal device, because we have a bigger window into the sausage factory.

I actually have both a personal iPhone and a work Android phone. The iPhone has never quietly crashed in my pocket, unlike my Nexus 6, and the battery life is simply superior. The Android phone has fewer restrictions and let me do really fun and neat stuff, but at a price of letting everyone under the sun gently caress things up.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
That said, the media scanner may automatically scan things you don't want included, hence the requirement of adding a .nomedia file to directories with content that shouldn't get scanned.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

Is there a way to debug an app on a phone far away from me that's better than having the user install Android Studio and using TeamViewer to remote in to their machine?

If the user is technical, you can have them enable wifi debugging and then ssh tunnel your adb connection to their host machine, but I feel like the number of users who could handle that and couldn't just follow instructions themselves to run adb bugreport > bugreport.txt is pretty tiny.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

PiCroft posted:

I have a quick question on the Android Location framework - I notice it has a getTime() method.

When testing, I noticed that if I set the device clock forward 6 hours and waited for a location update, the system time reported my current time +6 hours (unsurprisingly) but the location time reported my current, correct time.

My question is, where does the getTime() come from? Does it come from the satellite? If so, how reliable is it when it comes to giving a time for the users' current location? I ask because we are looking into ways of verifying the device has the correct time for the current user and if we can use this, we might not need to use a time server which relies on WiFi.

It uses whatever generated the fix used for that Location object. This means that it's also using whatever vendor code was written to generate the fix, up to and including the OEM that "enhanced" the hardware on someone's phone.

I somewhat advise against relying on it (or anything else really), unless you can whitelist the devices you'll be using. It's PROBABLY fine, until you end up with the HTC Shitbird "helpfully" offsetting for DST or something.

hooah posted:

I did have them send a bug report from the settings menu, but my app shows up on logcat like three times, so that's not too helpful (assuming the person installed the verbose version). This'll be fun!

Use a logging framework that allows you to log to disk, have them send the log file.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Subjunctive posted:

The API description seems pretty clear that it's UTC and has to be. If the fix were based on the system clock, then the location would be catastrophically wrong whenever the system clock drifted or was reset specifically; GPS depends on high-reliability timing to function.

It doesn't seem like this API would be any less reliable across implementations than any other arbitrary Android API. Is there a history of problems with it that I don't know about?

Manufacturers make mistakes that break CTS, then push out an update never several months after public discovery. There's nothing particular to this one, I just advise caution on assuming that a manufacturer hasn't invalidated a fundamental assumption in a place like this. Look out for some devices that always return zero here, I've seen that happen for sure, I haven't seen an otherwise inaccurate timestamp however.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

quote:

Interesting, thanks. I guess it's also annoying that you can't reliably find out how old the fix is, since there's no way to get the current time as seen by the location system. (Which seems like the whole point of the fix time, but I guess it has other uses as well.)

This was actually an obnoxious bug for me to deal with when writing GPS Notification. OEM sends two callbacks at a time (hell if I know why), one with the correct time and one with 0 and filled with junk. My solution was to discard any fixes with zero. Then, you get callbacks for like two minutes since the last actual fix but with the time that fix was at. OK, fine, discard fixes older than a minute.

Then, you get the carrier giving your phone a time a couple minutes in the past, so the fixes are correct but there's a constant delta. Uggghhhh OK fine compare the timestamp against timestamps on the previous fix.

Again, everything is technically up to spec, but weird behaviors cause problems.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
The application package name is probably com.company.myapp, not com.company.myapp.activities, although it's kind of poor form of them to put their activities into their own package. You'll want to do -n com.company.myapp/com.company.myapp.activities.SplashActivity

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Subjunctive posted:

Why is that? I came across something else that said that recently, but didn't say what problem it avoided. I'm just getting back into Android development, so these sorts of gathered lore are interesting to me.

There's no technical reason to do it or not to do it. I just feel like you shouldn't segregate your code out of the top level package for your project. That said my app does exactly that, but it's for build reasons alone, not by choice.

Regarding the intent to start your activity, you should verify what the packagename is for your application via aapt dump badging, and make sure that your explicit intent uses that. Your application packagename might be something totally bonkers and unrelated.

You may also wish to do adb lolcat ActivityManager:V *:F and then start your activity via the device launcher, which might be enlightening.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hooah posted:

I have my project stored on Google Drive and I'm using Android Studio. This is apparently a problem now when it wasn't a couple months back when I last worked on the project, since Google Drive insists on putting desktop.ini files everywhere, and AS chokes on them. Is the only solution to move the project out of my Google Drive folder?

Maybe? You should definitely be using some sort of version control, and git is pretty ideal for cases where you're transferring the repo over a weird storage layer. Your filesystem is not an adequate version control solution.

Yes, you should even be using version control for piddly projects and when learning.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Subjunctive posted:

So putting a git repo on Drive will work? Wouldn't it also get the desktop.ini files sprinkled in?

You can basically back up a git repo into a single file, which you could place onto drive. It depends on how crappy you want your mechanism of source remotes to be.

If you can use something like github, or have a shell somewhere, that's definitely the way to go.

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Robolectric and Espresso. Robolectric is especially useful when possible, since the tests run directly on your computer via normal byte code, so they're VERY fast to compile and run.

You should mandate tests regardless. See about generating coverage numbers too.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply