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
Ethereal
Mar 8, 2003
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?

Adbot
ADBOT LOVES YOU

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.

Ethereal
Mar 8, 2003

Salvador Dalvik posted:

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.

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.

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

kitten smoothie
Dec 29, 2001

http://developer.android.com/about/dashboards/index.html

So they've changed the way they count device versions. Before it was based on devices' automatic check-ins over a 2-week period, so basically every device out in the field. Now it's based on devices where the user actually opened the Play store.

I can't tell if this is goalpost-moving or if this actually is a better metric. It does seem to more accurately reflect the user base of one of my apps, for whatever it's worth.

Sereri
Sep 30, 2008

awwwrigami

kitten smoothie posted:

http://developer.android.com/about/dashboards/index.html

So they've changed the way they count device versions. Before it was based on devices' automatic check-ins over a 2-week period, so basically every device out in the field. Now it's based on devices where the user actually opened the Play store.

I can't tell if this is goalpost-moving or if this actually is a better metric. It does seem to more accurately reflect the user base of one of my apps, for whatever it's worth.

It doesn't reflect the actual Android world anymore since a lot of the old devices maybe get used to check gmail or as a phone but not to download and play Angry Bird 12. On the other hand it offers a better overview for developers since people that don't open the market at all (and thus don't have to be targeted anyway) don't appear in the graph. Since the site is for developers I think it's for the better though I guess they did it because it looks better on them.

Geno
Apr 26, 2004
STUPID
DICK
Has anyone tried getting ADB to work via Bluetooth? The only thing I've found related is this https://coderwall.com/p/pfuq4g that I'll try tomorrow .

At work, I'm debugging this usb peripheral that goes on my S3 so I'm assuming I have to do something with ADB. Unfortunately, at my work my phone and laptop are on two different networks so I haven't had any luck with ADB wirelessly.

Ethereal
Mar 8, 2003

Salvador Dalvik posted:

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.

I was able to figure it out. Our dependency resolution system plugin for intelliJ aggregated our runtime and test dependencies into one library which caused conflicts for certain 3rd party libraries. It looks like the eclipse variant is a bit more robust. Normally the dependency resolution is amazing for non-android work (mostly backed and front end web dev), but in this case it didn't work as well as it should have. Thanks for the input though, you helped me re-evaluate every part of the build process.

Murodese
Mar 6, 2007

Think you've got what it takes?
We're looking for fine Men & Women to help Protect the Australian Way of Life.

Become part of the Legend. Defence Jobs.

Geno posted:

Has anyone tried getting ADB to work via Bluetooth? The only thing I've found related is this https://coderwall.com/p/pfuq4g that I'll try tomorrow .

At work, I'm debugging this usb peripheral that goes on my S3 so I'm assuming I have to do something with ADB. Unfortunately, at my work my phone and laptop are on two different networks so I haven't had any luck with ADB wirelessly.

I had a similar situation when I was doing some Android-based sensor networking stuff - phone and laptop were on different connections and USB was being used. I ended up just using a wifi hotspot on the phone and connected the laptop, using 3g for internet.

Small White Dragon
Nov 23, 2007

No relation.
Is it possible to scale a view in Android? If so, how?

For those of you familiar with iOS, I'm asking about something similiar to self.layer.transform = [3d matrix], although just a 2D transform will be sufficient.

I googled around, and a few people asked this question only to get "Did you try just setting the width/height?" which is NOT what I'm looking for.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Small White Dragon posted:

Is it possible to scale a view in Android? If so, how?

For those of you familiar with iOS, I'm asking about something similiar to self.layer.transform = [3d matrix], although just a 2D transform will be sufficient.

I googled around, and a few people asked this question only to get "Did you try just setting the width/height?" which is NOT what I'm looking for.

That is strange advice, Android Views don't have width/height directly - those are calculated based on top/bottom/left/right. You could animate those values though.

Could you use a ScaleAnimation?

http://developer.android.com/reference/android/view/animation/ScaleAnimation.html

Something like:
code:
ScaleAnimation a = new ScaleAnimation(fromXscale, toXscale, fromYscale, toYscale);
myView.startAnimation(a);

Sab669
Sep 24, 2009

Hey guys, I'm looking for a particular app that doesn't quite seem to exist so I thought I'd try to make it myself. I've got a good bit of C# experience but very very little with Java and mobile development.

All I want it to do is this:

pre:
-Press button
  -Start recording a video
  -Maybe actually display the video as it records
-Pres button
  -Stop recording video
  -Upload video file to an FTP, or possibly just email it as an attachment
  -Delete the local video
It would be for personal use only so it doesn't need to be flexible (ie. change FTP / email) or pretty. How difficult would something like this be? It sounds pretty darn simple.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Sab669 posted:

Hey guys, I'm looking for a particular app that doesn't quite seem to exist so I thought I'd try to make it myself. I've got a good bit of C# experience but very very little with Java and mobile development.

All I want it to do is this:

pre:
-Press button
  -Start recording a video
  -Maybe actually display the video as it records
-Pres button
  -Stop recording video
  -Upload video file to an FTP, or possibly just email it as an attachment
  -Delete the local video
It would be for personal use only so it doesn't need to be flexible (ie. change FTP / email) or pretty. How difficult would something like this be? It sounds pretty darn simple.

That sounds really simple to me.

You might look into using Xamarin Studio (http://xamarin.com/studio) and just writing the app in C# if that's what you're familiar with. I haven't used it but from what I understand you don't need a license to create small applications (I don't know what the cutoff is exactly but it sounds like you would not come close to it).

Sab669
Sep 24, 2009

I've considered using Xamarin but figured I should probably brush up on my Java skills because I need a new loving job. I don't think Xamarin really makes it any easier to develop ultimately. And with the free license you can build apps and test them on a virtual device but you can't actually publish them I believe. I briefly used it to emulate a barcode reader for work but never got far with it :v:

Downloaded the JDK to start playing around, as someone who doesn't know anything about Android development it seemed pretty complicated to set up a simple button that starts recording video, let alone stopping then sending the file.


Edit; Well, Looking around at Xamarin again they actually have a demo app that starts & stops the camera to record video. I'm trying to adapt it to email the file as an attachment which seems simple enough but the emulator keeps crashing so I can't very well test it. Even if it wasn't, what the hell would the camera do on a virtual device.

Sab669 fucked around with this message at 21:47 on Apr 10, 2013

Glimm
Jul 27, 2005

Time is only gonna pass you by

Sab669 posted:

I've considered using Xamarin but figured I should probably brush up on my Java skills because I need a new loving job. I don't think Xamarin really makes it any easier to develop ultimately. And with the free license you can build apps and test them on a virtual device but you can't actually publish them I believe. I briefly used it to emulate a barcode reader for work but never got far with it :v:

The old Xamarin suite (MonoTouch?) worked that way, but the new one (Xamarin Studio) does allow you to work on actual hardware (this I've seen) and from what I understand you can even publish apps under a certain size (32k of IL code according to http://xamarin.com/monoforandroid - doesn't sound like much but I think it would fit your use case).

Doing it in Java isn't a bad idea, I just suggested Xamarin given your C# background. I don't think it would take too long to do what you're trying, if you get hung up feel free to post some code and ask for advice.

Sab669
Sep 24, 2009

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 changed the main.xml layout to have only 1 button, and then the Video View to display the camera.

It's ugly, but I'll be using it on the road so big rear end buttons are fine. By default the demo app supports taking different resolution photos or videos. So I stripped out all of the code in reference to taking photos and am left with just the video stuff.

Then let's see...

  • Button.OnClickListener - calls dispatchTakeVideoIntent method
  • dispatchTakeVideoIntent simply just creates the intent to capture video and starts the activity for result
  • onAcitivityResult - calls handleCameraVideo and passes it an Intent
  • handleCameraVideo - performs a "getData()" on the intent that was passed

It looks like that's the "end" of it. There's a lot of other code but nothing that seems directly relevant. So I guess within the "onActivityResult" method (what would be the proper term for this chunk of code? In C# Id say an event handler) is where I'd just make a call to my method that would attach this video to an email, and if I can automatically send it, do so. Creating an emailing and setting attachments is simple enough, I've looked that up already.


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.

I think I'll just have to go out and sit down with my Android book at some time and really crack down on all the terminology and everything.


I dicked around with Xamarin a little bit at work :ssh: but didn't have much better luck, because at the end of it all I'm still unfamiliar with the Android framework either way. Though the familiar IDE is a big plus, because I loving hate Eclipse and Netbeans.

Sab669 fucked around with this message at 05:31 on Apr 11, 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.

Sab669
Sep 24, 2009

Thanks :)

I'm glad my suspicion of how it behaves was at least right!

Off to a good start following their tutorial, I think. I don't want to go to work now! :argh:

Sab669 fucked around with this message at 13:14 on Apr 11, 2013

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Why doesn't gUriMatcher.addURI("content://com.example.appname.provider", "detailsReading/#", DETAILS_READING) match content://com.example.appname.provider/detailsReading/83715? This is my first time messing with ContentProviders and URI's and so I'm sure I'm missing something obvious.

Edit: I figured it out, I'm not supposed to put "content://" when I specify the AUTHORITY :downs:

IAmKale fucked around with this message at 16:47 on Apr 18, 2013

j4on
Jul 6, 2003
I fix computers to pick up chicks.
Is there really no other way to exclude older/slower devices from buying your app on the Play store aside from manually excluding hundreds of device models via checkboxes? My failed attempts to google an answer make me think I'm missing something really obvious.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

j4on posted:

Is there really no other way to exclude older/slower devices from buying your app on the Play store aside from manually excluding hundreds of device models via checkboxes? My failed attempts to google an answer make me think I'm missing something really obvious.

Does the Play Store not check an app's minimum SDK level and auto-exempt devices that are running an earlier version of Android?

Glimm
Jul 27, 2005

Time is only gonna pass you by

Karthe posted:

Does the Play Store not check an app's minimum SDK level and auto-exempt devices that are running an earlier version of Android?

It does. This is generally a good way of excluding older devices. I generally target 2.3+ now, and am really considering moving to 4.0+.

You could check over the filters documentation for filtering on other things which might help:
http://developer.android.com/google/play/filters.html

j4on
Jul 6, 2003
I fix computers to pick up chicks.

Glimm posted:

It does. This is generally a good way of excluding older devices. I generally target 2.3+ now, and am really considering moving to 4.0+.

You could check over the filters documentation for filtering on other things which might help:
http://developer.android.com/google/play/filters.html

Appreciate the answers. It does, and I've set mine up to 4.0 just to cut down on incompatibility issues. I'm worried about older devices like the Samsung Tab 7.0 which can run android 4.0 but still crash when using my app. Likewise, I have a terrible knockoff samsung G3 from china that really has no business running 4.0 but somehow does anyway. The other manifest filters all deal with device capabilities like GPS, microphones, etc.

The official answer is probably that our app should support all these devices--and it probably should--but.. well, you know.

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.

j4on
Jul 6, 2003
I fix computers to pick up chicks.

Salvador Dalvik posted:

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.

It's actually an adobe air executable (sorry!), so it's compatible to 2.3. But it's a pretty heavy app and it runs slow/crashes in older devices that we've tested. This is a cross-release of an iOS app (sorry!) so we're mainly concerned with making sure that everyone gets a smooth user experience over wide availability. We're just setting it to 4.0 to try to screen out some older devices.

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.

j4on
Jul 6, 2003
I fix computers to pick up chicks.

Salvador Dalvik posted:

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.

It's perfect for what I need, because I'm working very closely with a non-technically minded animator who is used to working in flash. So I can treat his animations as native objects as opposed to dealing with sprite sheets and so forth. I've actually had relatively few problems with it, though the performance hit is noticable (I really should be blitting) and hard to diagnose. And porting to multiple platforms was quite easy (including to the web if we wanted to do that). I'm confident that if we didn't use flash it would have taken us twice as long to do the project.

The big downside is that there's very little documentation or community. Some stuff is non-intuitive and frustrating. You're also cut off from a lot of nice native / 3rd party libraries and the built-in gesture implementation isn't very good. Ah, and bundling assets is strange; I might be doing it wrong.

General feel: everything that is something you'd be happy doing in Flash on a website is easy and nice. 2D graphics are super easy. Everything that is tablet/OS specific is awkward and bolted on.

Glimm
Jul 27, 2005

Time is only gonna pass you by

edit: I'm an idiot

Glimm fucked around with this message at 00:21 on Apr 24, 2013

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.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Salvador Dalvik posted:

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.

After I wrote it I re-read the posts and figured you were asking j4on directly. My spergtastic nature required removal of my post.

I'm excited to leave 2.x behind. Thankfully for most of our apps installs on 2.x are down to about 35%. Yay for progress!

I always feel bad for the Android folks (I mostly do iOS dev at work) when I get to bump up my minimum SDK for cool feature X (ARC and weak references hallelujah) and they have to just deal with it. Like you said though backwards compatibility isn't terribly difficult to maintain in Android, still a bit of a pain though.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION
I wonder if anyone here can offer some general advice. I'm not particularly new to programming in general, but I'm fairly new to Android and basically virginal when it comes to game development. I'm mostly able to get through tutorials and understand generally what's going on programmatically, but my lack of understanding concerning graphical terminology is making me uncomfortable as I feel like I'm just repeating what I'm reading without understanding what I'm actually doing.

For the sake of example, take this example code which implements a TMX tiled map. https://code.google.com/p/andengineexamples/source/browse/src/org/anddev/andengine/examples/TMXTiledMapExample.java

I'm able to read through that and understand what it's doing, but then I see lines like this:

code:
final TMXLoader tmxLoader = new TMXLoader(this, this.mEngine.getTextureManager(), TextureOptions.BILINEAR_PREMULTIPLYALPHA, new ITMXTilePropertiesListener() {
And I realise that even though I know what that's doing (creating a TMXLoader so it can then be used to load the TMX map asset) I have no idea at all what "BILINEAR_PREMULTIPLYALPHA" means beyond understanding that it has something to do with how the textures are displayed. What I mean is, if I was writing my own code, I would have no idea what mode I should use and why.

Basically I'm wondering if anyone knows of any books, tutorials, web sites etc that cover this kind of topic - graphics in games - at a reasonably abstract, language agnostic level?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Gnack posted:

Basically I'm wondering if anyone knows of any books, tutorials, web sites etc that cover this kind of topic - graphics in games - at a reasonably abstract, language agnostic level?

http://forums.somethingawful.com/showthread.php?threadid=2692947

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Why the hell is Eclipse now bitching that R can't be resolved? I renamed my application package in AndroidManifest.xml, updated all of my class package names by hand, and cleaned the project, and now Eclipse can't resolve R in two classes...all of my other classes seemed to have figured things out, so why the hell aren't these two other classes getting along? I've even created a whole new Android project and took to recreating the files individually, but Eclipse still wants me to add import my.application.R to the top of these classes. :argh:

I've commonly experienced this issue when I make a mistake in a layout XML file, but literally nothing changed during the rename except for the package name in the manifest and at the top of my class files. Is Eclipse really this lovely?

IAmKale fucked around with this message at 21:51 on Apr 24, 2013

jkyuusai
Jun 26, 2008

homegrown man milk

Karthe posted:

Why the hell is Eclipse now bitching that R can't be resolved? I renamed my application package in AndroidManifest.xml, updated all of my class package names by hand, and cleaned the project, and now Eclipse can't resolve R in two classes...all of my other classes seemed to have figured things out, so why the hell aren't these two other classes getting along? I've even created a whole new Android project and took to recreating the files individually, but Eclipse still wants me to add import my.application.R to the top of these classes. :argh:

I've commonly experienced this issue when I make a mistake in a layout XML file, but literally nothing changed during the rename except for the package name in the manifest and at the top of my class files. Is Eclipse really this lovely?

Especially with Android, it seems like poo poo gets real weird with automagic renaming of stuff via Eclipse. I quit using the convenience "New Android Layout/Activity/Fragment" bullshit after having my manifest file get thoroughly hosed by it more than once. I'm not terribly surprised it didn't catch a few import statement changes. I spent 30 minutes trying to figure out an R file issue one time, only to realize I had ctrl+shift+O'd and somehow Eclipse decided to import android.R instead of my own R file. :shepicide:

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

jkyuusai posted:

Especially with Android, it seems like poo poo gets real weird with automagic renaming of stuff via Eclipse. I quit using the convenience "New Android Layout/Activity/Fragment" bullshit after having my manifest file get thoroughly hosed by it more than once. I'm not terribly surprised it didn't catch a few import statement changes. I spent 30 minutes trying to figure out an R file issue one time, only to realize I had ctrl+shift+O'd and somehow Eclipse decided to import android.R instead of my own R file. :shepicide:
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.

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.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Somewhat cringe inducing but otherwise informative video from Google on the in-app purchase API:

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

QuarkJets
Sep 8, 2008

Does anyone here use Python for writing Android apps? Is it relatively easy to design simple apps or is this just for something specialized?

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
What component does the Play app use to allow for left-to-right swiping between categories? I want to implement something similar but I'm not sure what I should be looking for. I thought it was a spinner, but I found out that's just Android's drop-down list. Is it an alternate form of the action bar's navigation tabs?

Adbot
ADBOT LOVES YOU

Glimm
Jul 27, 2005

Time is only gonna pass you by

Karthe posted:

What component does the Play app use to allow for left-to-right swiping between categories? I want to implement something similar but I'm not sure what I should be looking for. I thought it was a spinner, but I found out that's just Android's drop-down list. Is it an alternate form of the action bar's navigation tabs?

You're looking for the ViewPager, which is in the support library:
http://developer.android.com/reference/android/support/v4/view/ViewPager.html

The new Play store uses its own implementations of some things the ViewPager gives by default, you can read about it here:
https://plus.google.com/108761828584265913206/posts/Cwk7joBV3AC

Looks like someone made an implementation based on the above post already that should be pretty much drop in:
https://github.com/astuetz/PagerSlidingTabStrip

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