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
zeekner
Jul 14, 2007

Suran37 posted:

I am trying to figure out ActionBarSherlock for an app I am working on. I am currently trying to add a button that opens a new activity, I tried following the Action Provider sample, but I seem to be stuck on the intent. The sample opens the phone settings menu, and I have been struggling to try and modify it to open my activity. My code so far can be seen here: http://pastebin.com/cc4pN6qF

If I leave it how it is, it displays the icon and opens the phone settings perfectly. If I try to move the intent after the constructor and change the intent to Intent(mContext, AddPilot.class) it doesn't show the icon, but it says "Add Pilot" which is the title I assigned to it, however it doesn't open the new activity it displays the toast "Handling in onOptionsItemSelected avoided." Maybe I am following the wrong sample, I don't know. Any help would be appreciated.

Any reason you're using an ActionProvider over a simple menu item? Are you familiar with how ICS actionbar or pre-ICS menus work?

Glimm, you should add a link to Awful for Android's source to the OP. It's a good example of a modern Actionbar(sherlock) based app with tablet functionality.

zeekner fucked around with this message at 04:52 on Jun 22, 2012

Adbot
ADBOT LOVES YOU

zeekner
Jul 14, 2007

NoDamage posted:

Just curious, how are you guys dealing with this? 90% of devices are still below 3.0.

Are we stuck using ActionBarSherlock and the compatibility library? It seems like I might as well pretend that Honeycomb/Ice Cream Sandwich/Jelly Bean don't even exist, if I'm pretty much forced to code against 2.3 anyway.


For me it's pretty much ActionbarSherlock, maintaining 2-3 UI styles isn't worth it. Check out Awful Betamax (link in op) to get an idea.

zeekner
Jul 14, 2007

NoDamage posted:

Since ActionBarSherlock requires me to compile against Android 4.0 but I want to target 2.3, is there a way to have Eclipse tell me if I've accidentally used an API not available in 2.3? I seem to remember reading this was possible but can't find the source again.

ActionbarSherlock is great, but there is a big gotcha you need to watch out for:
Whenever you have the Sherlock version of a class available, use it instead of the official android one. This'll bite you if your not careful. For example, you have to use Sherlock's Window.FLAG_XXX instead of the official android one, because their "Activity.addFlag()" function takes a long instead of an int (they couldn't override the method).

Don't let that stop you, just watch your import list. Seriously, ActionbarSherlock makes a unified, compatible UI so much easier.

zeekner
Jul 14, 2007

Karthe posted:

I installed the most recent 4.1 SDK from scratch and set up a virtual device with the WXGA800-7in preset to emulate developing on a Nexus 7. Aside from giving the device a name, I left everything as-is. Unfortunately, whenever I start it up, it fails to run and spits out the following message:


Google searches have revealed some people getting around this by lowering the device's RAM to 512 (the preset gives 1024MB) but that didn't work for me. What's going on? Why is my AVD crashing when I start it up?

I have the same issue trying to emulate most XHDPI screens (like the Galaxy Nexus, 1280x720@320ppi). I can't find any info other than I might be exceeding some kind of framebuffer limit. That theory makes sense because I can bypass the problem by setting the resolution lower, but that prevents me from testing layouts for the newest phones.

e: I have 8gb of ram, i3-3120, Radeon HD6850 on Win7 x64. I doubt it's computer specs.

zeekner
Jul 14, 2007

R.java is recreated during compile, but eclipse auto-compiles it as you go, since you need it to reference against to keep autocomplete/intellisense from freaking out.

A common cause for it failing to compile is the wrong java compiler compliance level. In eclipse, right click project -> properties, under Java Compiler, check the compliance level, it should be 1.6, with the default settings box under it checked.

e:
Also, if you tend to use sub-folders for separating out your code (like com.package.appname.subfolder), in those folders you can't indirectly reference the R class, you had to import it (import com.ferg.awfulapp.R;). At least you couldn't a while ago, I don't know if they ever fixed that.

zeekner fucked around with this message at 05:18 on Aug 19, 2012

zeekner
Jul 14, 2007

Glimm posted:

Doctor w-rw-rw- your post of horrors gives me a sad. Supporting older OS versions is probably the most frustrating part of Android development.

I especially like this part:

Doctor w-rw-rw- posted:

But yeah. This is Android for you. Years of bullshit you'll never escape, fixes that stare you in the face and tantalize you with their presence only on high version numbers, and compatibility libraries that bridge some of the gap.

Because that sums the whole experience up quite nicely. I'd take Apple's artificial feature segmentation over the very real and disruptive API fragmentation we have now.

Doc, I feel ya. WebView is my white whale, just as VideoView is to you.

zeekner
Jul 14, 2007

Glimm posted:

OAK - "OAK is a powerful kit of tools and components to use in your Android project (Compatible with API Level 8+)" (image caching, pinned header list view, section adapter, auto-resizing textview,, encrypted shared prefs, some other stuff).

Definitely going to give this one a try, been looking for a decent image caching solution.

A recommandation for anyone looking to parse HTML, try jSoup, it's pretty nice.

zeekner
Jul 14, 2007

Glimm posted:

I haven't personally used OAK yet so I'm not sure how it handles, but I've used AQuery in the past and it's fantastic. I'd probably try that first unless you're interested in other features OAK provides as well.

I already use AQuery for imageviews, but I need something that can provide bitmaps directly. AQuery works great, but it's image code is pretty much focused on ImageViews, so it's hacky to use it for anything else.

zeekner
Jul 14, 2007

I recently did a fresh install of the SDK on a new system, and I gotta say the hardware-accelerated Intel emulator is really loving sweet. I'm able to run Awful with gifs playing at full speed. No extra effort unless you run native code (then you have to add the intel build target).

Just make sure to actually run the HAX installer in the extras folder.

I don't think the actual atom-based devices will catch on very well, but at least Intel put some serious effort into their emulator module.

zeekner
Jul 14, 2007

CapnAndy posted:

I decided to get into Android development and I'm already pretty good at c# and visual studio, so I got MonoDroid. At first glance, it's super neat. But I want that frigging title bar to go away! I did this:
code:
[Activity(Label = "AndroidFirst", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
	int count = 1;

	protected override void OnCreate(Bundle bundle)
	{
		base.OnCreate(bundle);

		// Set our view from the "main" layout resource
		SetContentView(Resource.Layout.Main);

		// Get our button from the layout resource,
		// and attach an event to it
		Button button = FindViewById<Button>(Resource.Id.HelloButton);

		button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };

		this.Window.AddFlags(WindowManagerFlags.Fullscreen);
		this.RequestWindowFeature(WindowFeatures.NoTitle);
	}
}
But it fails, and the only error I get is the extremely unhelpful "Android.Util.AndroidRuntimeException:". The Fullscreen flag was working, it just started being a pain in the rear end when I tried requesting no title. What stupidly basic newbie mistake am I making?

You have to add window flags and request window features before you call setContentView, since it takes those flags into consideration when it creates the layout.

zeekner
Jul 14, 2007

I keep running into convenience functions that were added in API 8/9/11. I hate spending time re-implementing poo poo that should have existed in API 1.

String.isEmpty() - added in API 9 :wtc:

gently caress.

There should not be twice as many phones with 2.1 than 4.1.

zeekner
Jul 14, 2007

CapnAndy posted:

Okay, answer another newbie question? I'm still playing with MonoDroid and I want to learn to draw things. I found about making my own view and overriding its OnDraw event, but that's okay for, y'know, drawing something once and then it never moves again, and also I lose Main.axml which would be a shame. I want to do something really basic, like draw a box and have it change colors or resize every time I click a button or on a Timer tick.

It seems like what I need to do is get the canvas object of the current ContentView, right? Then I could just pass that into a function and have it draw on the canvas. Am I right so far, and if I am, how do I friggin' do that?

You have to call invalidate() to cause the onDraw to refresh again. If you are animating or drawing anything dynamically you should look into a SurfaceView instead, that will let you grab the canvas whenever you want.

Murodese posted:

Every single time I have to dig into Android to do something weird, I find yet another bug introduced by some idiot loving manufacturer (HTC, you should know better :mad:) who decided to do their own thing and use their own broken loving bluetooth stack / date/time implementation / literally anything, never updates it, never fixes it and makes it impossible to work around.

gently caress you, you are everything that's wrong with open source.

Yup, just ran into something weird with how the newest RAZR handles Cursors in Awful.apk, it's auto-closing them while they are still in use. It's causing constant crashes for one specific phone model. We handle cursors using the newest API and have zero issues with that code on every other phone out there.

gently caress that poo poo.

zeekner
Jul 14, 2007

CapnAndy posted:

HA! I guessed that! I made a SurfaceView!

I can't figure out how to grab its canvas. :(
You'll need to get the surface holder using getHolder(), then you can use the lock canvas method if you are working from a separate thread. I think there is a different method if you are working in the UI thread, just check the surface holder documentation.

Also make sure to look into the surface holder callback interface, it'll let you gracefully handle size changes.

zeekner
Jul 14, 2007

CapnAndy posted:

I don't follow. I lock the canvas so nothing else can touch it, but I still don't have access to the canvas itself, so how can I draw on it?

Maybe what I've actually written will help:

This doesn't work.

You don't create the canvas directly, you let the OS generate the canvas when you call lockCanvas().

Here's a basic example:
code:
public void onCreate(ect) {
\\ect
surfaceView = (SurfaceView) findViewById(R.id.game_surface);
surfaceHolder = surfaceView.getHolder();
}

public void iWantToRedraw(){
Canvas canvas = surfaceHolder.lockCanvas();
//drawing stuff here
canvas.drawRect(x,x,x);//ect
//when finished, unlock that canvas and it will display the result.
surfaceHolder.unlockCanvasAndPost(canvas);
}
The lock/unlock half can be run from a secondary thread, and there is no need to invalidate anything.

You'll want to look at the SurfaceHolder.Callback interface if you want to handle lifecycle changes better (like the surface getting created/destroyed/resized). This is technically optional, but strongly recommended. For now you can just check to see if the canvas you get from lockCanvas() is null before you use it.

zeekner
Jul 14, 2007

CapnAndy posted:

Okay, it's been a bit because I had actual projects to do and those come before learning new stuff, but I'm back to this, and the canvas I get from lockCanvas() is always null. I tried doing this:
C# code:
SurfaceView surface = new SurfaceView(this);
layout.AddView(surface);
Canvas c = surface.Holder.LockCanvas();
c.DrawColor(Color.Green);
surface.Holder.UnlockCanvasAndPost(c);
But that fails because c is null. If I do this:
C# code:
SurfaceView surface = new SurfaceView(this);
layout.AddView(surface);
Canvas c = surface.Holder.LockCanvas();
c = new Canvas();
c.DrawColor(Color.Green);
surface.Holder.UnlockCanvasAndPost(c);
It fails on the UnlockCanvasAndPost, presumably because c has a Height and Width of 0. I'm guessing about why this one's failing, though. All I get is "Java.Lang.IllegalArgumentException".

You're really making this a lot more complicated for yourself by trying to use MonoDroid. If you check the documentation for lockCanvas() you'll see "A null is returned if the surface has not been created or otherwise cannot be edited." Even though you added the child view, it still hasn't actually created the layout for that surface. The actual surface creation is done asynchronously outside the onCreate function, and you'll get a callback if you use the SurfaceHolder.Callback interface to monitor the surface.

You're completely skipping XML layouts, which significantly reduce the complexity of creating the surfaceview.

In the second half you just override your existing canvas, which makes no sense. The first canvas is null for the reasons listed above.
Canvas c = surface.Holder.LockCanvas();
c = new Canvas();

Honestly, I would highly recommend just taking the plunge and using regular Java and look at the huge number of practical examples they give you. The LunarLander example is exactly what you need to learn how to handle a SurfaceView, and digging through the other examples will give you a much better idea about how Android works.

zeekner
Jul 14, 2007

Hot Yellow KoolAid posted:

I took an android class this summer (though I don't have a phone, planning on buying one for christmas) and I don't know how to install the .apk file from a finished project onto an android device. I have read so far that the file can be sent to a device as an attachment to an email, but I'm not sure how to install it/where the file is stored on the device from there. Is there an easy way to install an app from an .apk file?

There are plenty of easy ways to do it, but I typically just use ES File Manager. It can connect to a Windows file share or Dropbox, then you just tap the apk file and it'll offer to install it.

Alternatively, you can email the file or a link to the file hosted online somewhere. If you download it to the external/SD storage on the phone, you can tap the notification entry for that file to automatically install it.

Either way, make sure to enable the "Unknown Sources" in the phone's development options beforehand.

zeekner
Jul 14, 2007

Giant Goober posted:

I downloaded the sdk's and managed to get a few of the samples running last night. I noticed in JetBoy that there is a lot of subclasses in the view and that the members on objects are all public with no getters and setters. Is this standard practice for android development, or it quick implementation of the samples?

I prefer giving each class it's own file as I find it much easier to follow.

They try to minimize the size of those examples, to make it easier to figure out. It is pretty normal to use anonymous inner classes for little things like OnClickListeners and such. But yea, just follow whatever Java style guide you feel is best for you, you won't run into any real issues.

I shudder every time I see Enterprise™ quality code in an android app. Google put a lot of effort into making Dalvik a simple, straightforward Java.

zeekner
Jul 14, 2007

Doctor w-rw-rw- posted:

I am somewhat guilty of this, having just discovered IntentServices and (Detachable)ResultReceivers as a substitute for using AsyncTasks to make network calls with a callback-like pattern. It's not awesome, but it's sufficient, and still works when specifying the service to run in its own process.

Live and learn. Can't build something good without building a few horrors along the way, I suppose.

That's pretty reasonable for network calls though, we use a message-passing service to do them in Awful (since 2.2) and it simplified the hell out of networking and failure fallbacks.

zeekner
Jul 14, 2007

Doctor w-rw-rw- posted:

:frogsiren: :frogsiren: HOLY loving poo poo :frogsiren: :frogsiren:

https://github.com/jfeinstein10/SlidingMenu

Compile the example and try it out, or install it from the App Store: https://play.google.com/store/apps/details?id=com.slidingmenu.example

This actually works.
Amazingly well, in fact.
Even on 2.1.

As an Android developer I can't understate just how much this library will improve my quality of life. Dunno if anyone else is as thrilled by the existence of this library as I am.

God drat, I wish I knew about this a few weeks ago. This is going in Awful, gonna throw out the split-screen code I just barely added.

zeekner
Jul 14, 2007


This man speaks truth.

I've lost pretty much all the respect I had for Google over the last two years. Even as they slowly catch up, they still fail to fix many fundamental issues and then introduce new issues on top. Then you get into API fragmentation and OEM fuckery :smithicide:

zeekner
Jul 14, 2007

Ranma posted:

This seems suited to the current rants:
I'm trying to use the Google Maps API for Android.

That looks like you hit every point, but last time I used the Maps API it was with v1 and they didn't require the package name to sign up. I can't tell what's wrong there.

e: Can you try to generate a normal signing key, authorize it, and build the final app with it?

zeekner
Jul 14, 2007

amishpurple posted:

Can anyone better explain the purpose of using putExtra() in this section of the tutorial? I just don't understand what it does and subsequently why it's needed.

It's explained further down in that example, when they pull the message from the intent.

code:
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
Extras are just a convenient method for sending some data to the new activity, typically to give it some starting context. You can pass primitives and Parcelable objects.

Don't rely on this to send everything; if you have a lot of data that you need to use throughout your app, look into Services or ContentProviders.

zeekner
Jul 14, 2007

Karthe posted:

I tried compiling an older app (it targets API8) today via the command line as per a write-up on the app's Google Code page. Unfortunately, compilation errors out when the build process attempts to call the (I've come to find out) deprecated apkbuilder tool in android-sdk\tools.

What are my options at this point? I'm new to Android dev, let alone command line compiling, so I'm not sure what I can do from here to get the app compiled so I can test it.

You can run "android update project" from the command line to update the ant build files for that project. You can also import the project into Eclipse and build it using the export function (right click project -> export -> android).

Just make sure they didn't do any weird customization in the build.xml, it'll get replaced when you run the update.

zeekner
Jul 14, 2007

You should use Log.e/Log.w/ect, it makes that sort of testing really easy and unambiguous. I doubt the TextView has anything to do with the problem, I would look at your DownloadText function. Android is a pretty good clone of Java 6, it's not perfect. Some libraries are missing or don't function the exact same way.

Here's a simple GET to String example (using the Apache HTTP and IO libraries):
code:
        StringWriter textBuffer = new StringWriter();
        HttpGet get = new HttpGet(location);
        HttpResponse response = httpClient.execute(get);
        HttpEntity result = response.getEntity();
        if(result != null){
            InputStream input = result.getContent();
            IOUtils.copy(input,textBuffer);
            IOUtils.closeQuietly(input);
        }
	Log.d("MyApp", "Result: "+textBuffer.toString());
You can strip out the Apache HTTP libs and just use the URL.openStream() function:
code:
        StringWriter textBuffer = new StringWriter();
	URL dest = new URL("http://pastebin.com/raw.php?i=ZvBPhbEA");
        InputStream get = dest.openStream();
        IOUtils.copy(get, textBuffer);
        IOUtils.closeQuietly(input);
	Log.d("MyApp", "Result: "+textBuffer.toString());

zeekner
Jul 14, 2007

Pseudo-God posted:

If I wanted to program a simple roulette wheel or audio visualizer(just bars), do I have to use OpenGL, or is the canvas view suitable?

If it's just 2d and you won't need to animate more than 20fps, you can try a SurfaceView. Look at the LunarLander example code to see how it's implemented (get it here). It'll let you run a secondary thread to animate the view.

If you run into performance issues, you can try to swap that for a GLSurfaceView. If you need more performance than that you'll want to look into the NDK+opengl.

You could run a custom View and just override onDraw, but that method has a lot of limitations (especially for animation). You'll have to call invalidate() every time you want to refresh. Those invalidate calls are processed on a queue, so it's can get choppy if you're trying to animate motion.

zeekner
Jul 14, 2007

getView() is null until you return from onCreateView(). The view you create there is the one that getView returns. Use getActivity to get a context.

zeekner
Jul 14, 2007

Karthe posted:

Someone finally explained CursorLoader to me in a way I could understand. I promptly realized that I never "got" them because I'd been trying to cram a square peg into a round hole.

I'm creating a database app and need to be able to query the database with whatever word the user is looking up. My understanding of how CursorLoader works is that you need one for each query you want to make, and that each query is set in stone the moment you set up the loader. I switch between three possible queries based on whatever word is entered in the search box, so I need to be able to cycle through them freely. My end goal is simply to move the querying into a separate thread to keep the UI responsive. Is that possible?

I tried using LoaderEx but it has the same limitations above as regular CursorLoader.

In addition to all that, while trying to diagnose some skipped frames, I turned on STRICT MODE and was presented with some errors like this telling me about my improper cursor usage:
An easy way to change query arguments with CursorLoaders is to just call restartLoader, and it'll call the onCreateLoader method again where you can return a new CursorLoader with the new query.

Karthe posted:

If I set a cursor to close after I finish setting it to a ListView, the app crashes with the following error:

I was trying to address this issue with CursorLoaders but obviously that failed so now I'm double stuck. Where the hell do I go from here? I spent most of the day trying to figure these two problems out and now I'm feeling way overwhelmed by all of this :sigh:
You need to close the cursor when you are completely finished with it. It's still in use as long as the listadapter has control over it. If you are manually managing the cursor, you just need to close the cursor at the opposite point in the lifecycle from where you created it. CursorLoaders simplify this a lot, since you can just call destroyLoader in onDestroy, then put adapter.swapCursor(null) in the onLoaderReset callback.

It's critical that you remove the cursor from the adapter before you close it.

zeekner
Jul 14, 2007

Sorry, I should have been more specific. I was saying he should only close it if he was managing the cursor himself (no loaders, ect).

zeekner
Jul 14, 2007

admiraldennis posted:

Is there some kind of updated go-to guide to dealing with assets for Android? Things like resolution, etc.

Very recently I've somehow become lead developer on an in-progress barely-beta Android app that is targeting -8 and above, all smartphone screen sizes (but bigger/newer phones are priority), horizontal and vertical. And I'm going crazy working with our designer and trying to figure out how to handle resources and screen sizes. I want to be able to tell him "give me x, y and z, designed for these resolutions, proportioned for these sizes" but I don't even know what to ask for when it comes to deliverables, or the best way to manage it on my end.

The designs are very graphics heavy, and kind of iOS-like.

Get to know 9-patch really well. They are a major timesaver, and it's pretty easy to convert existing PNG files to 9patch. Ignore Google's 9patch utility, just use Paint.net or something to resize for one extra pixel border, then save the file with .9.png.

Since you are in control of asset creation, you can have the designer target all three major DPI levels (MDPI/HDPI/XDPI). The other DPI levels aren't really worth targeting, MDPI can scale down to LDPI without issue and I don't think the 480dpi level (XXHDPI) will matter for a long time. I haven't even been able to find a XXHDPI phone to see the difference.

Honestly, in a pinch you can usually get away with targeting XHDPI and let the scaling handle it, but that can leave noticeable artifacts for XHDPI->HDPI. If you need a quick and dirty iOS to Android port, converting @2x resources is pretty handy. Just make sure to convert stretchable resources (buttons, backgrounds, ect) to 9patch.

zeekner
Jul 14, 2007

Ethereal posted:

Anyone with IntelliJ experience here?

I've got a project with three modules.

An App module -A
An android library module -B
A regular java library module-C

They all have a variety of dependencies modeled as a Project level library -D

How do I get this poo poo to compile and run (scopes and exports)?

I'm getting top level exceptions when compiling into a dex file. With some work, I can get it to compile but not run because its missing the runtime dependencies in D. I'm going crazy and would prefer to keep my dependencies explicit for each module. Any ideas?

I ditched Eclipse for IntelliJ, it's really nice.

How are you configuring the Project Structure section?

You can use the Libraries section to reference regular jars, so it should have pretty much have everything from the libs folder. This combines all those libraries into a single reference.

Under modules, the app module should have compile scope on the Library group and each of the Android library modules. The Android library module is mostly the same, it should reference module D if needed, and any jars thar are required for that library (ex: ActionBarSherlock references the support jar).

If you get any duplicate definition errors, that's caused by having the same JAR referenced in two modules. Set the scope for that JAR to 'Provided' on everything but the first module that references it.

Another gotcha that you may hit is that sometimes it'll fail to detect that an Android library project is a library, you can go to the Facets section and check the "Library module" box on that module.

zeekner
Jul 14, 2007

Ethereal posted:

So there is no libs folder which complicates things. We have a language agnostic dependency resolution system that has collated all of our dependencies D into a project library.

A, the main app, has D as provided, B as compile, and C as provided.

B, the android library, has D as provided, C as provided. It is a library module in the facets section.

C, the java library, has D as provided.

Somehow, D is not being packaged in at runtime, which makes sense given how everything is modeled. But if I set it to compile, it causes a top level exception when compiling the dex file. None of the modules are checked for export.

I am getting a NoClassDefFoundError with Slf4j when running the app.

I can get everything building and running just fine in eclipse. I'd rather kill myself than use eclipse though.

Well, when you include D in the compile scope of A, it should work fine as long as there isn't any kind of overlap in class definitions. See what class is referenced in the top-level exception. Somehow you are including it twice. The most common cause is a second android-support-v4 sneaking in there, or v4 and v13 overlapping.

In a traditional structure, you would have most of the libraries you need compiled in the main app. Then you can just set any overlapping references to provided and you are set. It sounds like you'll need to work backwards to find the overlap here.

E:
This kind of TOP-LEVEL-EXCEPTION is one of the things that the ant build system won't fix for you, unlike Eclipse. Eclipse kinda works around certain build issues, like mismatched JARs and duplicate class definitions. If you fix this for IntelliJ, you'll also be a lot closer to having a proper Ant build and setting up a Jenkins build server.

zeekner fucked around with this message at 06:48 on Apr 3, 2013

zeekner
Jul 14, 2007

Sab669 posted:

Heh, well, I have absolutely no idea what I'm doing. I downloaded this sample and tried to mod it to fit my needs.

...

I don't like this demo though, because it looks like when I hit the button it will simply launch the camera, then I'll need to hit Record within the camera... then stop recording within the camera to return back to this App at which point it would do the email.

That example is oriented for applications looking to quickly integrate a grab-video function, but it doesn't really record video like you want. You'll need to actually use the MediaRecorder class and follow this guide to get what you are really looking for.

I haven't done any real work with video though, so I don't have much else to give here.

zeekner
Jul 14, 2007

What kind of issues are you guys running into that is forcing you to set minimum at 4.0? I just recently jumped up to 2.2, for push and other features.

I've mostly had to contend with phone-specific bugs or Cyanogen/ROM-introduced issues, but otherwise I haven't had that much trouble maintaining backwards compatibility.

zeekner
Jul 14, 2007

j4on posted:

This is a cross-release of an iOS app (sorry!)

This is pretty much my entire project roadmap for the next year, so nothing to be sorry about.

Does adobe air actually work worth a drat? Last time I heard someone use it to port an app over, it ended up a giant mess.

zeekner
Jul 14, 2007

Glimm posted:

edit: I'm an idiot

Huh? I saw the response before you deleted it, it was perfectly normal?

I really look forward to the day we can completely forget about 2.x.

zeekner
Jul 14, 2007

Karthe posted:

Thanks to version control I discovered that the problem was entirely due to PEBKAC. The two class files are in com.example.helpers, and I didn't realize that I was already importing my app's R in them before I updated the package name. :downsbravo:

Is IntelliJ more reliable for Android development? It seems to have good Android support, but I haven't had a chance to install and play around with it. I've just been using Eclipse because that's what comes with the ADK.

I love IntelliJ, it's pretty nice and handles almost everything I need. The only issue I ran into is that their logcat does not filter by app package, so I use the monitor from the SDK.

e: Just to give an idea of how well it's integrated, it'll detect if the activity isn't being referenced in the manifest and do the unused highlight on the class name.

zeekner
Jul 14, 2007

I'm curious what the relationship is here. If this is Google working with Jetbrains, then all this stuff will just end up in the full version.

If they are just forking the community version and none of it will end up in the full version I'll be pretty annoyed.

zeekner
Jul 14, 2007

It looks like most of the Android Studio functionality will make it in IntelliJ 13, but that's not out till December.

http://blogs.jetbrains.com/idea/2013/05/intellij-idea-13-early-preview-is-out/

Guess I'll have to try Studio and see if it's worth switching, hopefully the workspace config transfers over.

zeekner
Jul 14, 2007

They just posted the recorded Volley video if anyone missed it. I'm really excited to try this, it'll replace a ton of code and libraries for me.

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

Adbot
ADBOT LOVES YOU

zeekner
Jul 14, 2007


Haha, nice.

I'm going through the volley library now. It seems pretty cool, but the lack of examples is pretty annoying. It'll be nice to ditch the network service pattern I've been using.

Switching existing code to the new structure is pretty straightforward, I'll probably switch for my current project.

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