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...

Tunga posted:

Like you, I also attended the Terrible School Of Let's Make Them Use Netbeans That'll Be Funny. Sorry about that. You'll get over it, just give it time.

Yeah, I'd go with Android Studio then. The default keybinds are stupid (which is IntelliJ's fault) but other than that there is no particularly compelling reason to favour Eclipse. Google have made it clear that they will continue to support both but it's obvious where their focus lies.

As well as the official ones from Google, I also found Lars Vogel's tutorials useful:
http://www.vogella.com/tutorials/Android/article.html
https://developer.android.com/training/basics/firstapp/index.html

Be careful with the Vogel tutorials, I've found that they can be outdated or outright wrong in some cases.

Adbot
ADBOT LOVES YOU

PiCroft
Jun 11, 2010

I'm sorry, did I break all your shit? I didn't know it was yours

I'm having trouble resolving an error with an Android project in IntelliJ.

I've downloaded a project from GitLab and am preparing it to work on, but when attempting to build, it gives the following compilation errors:

code:
    Error:Error:line (6)android-apt-compiler: [project] C:\Development\project\res\values\styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.Sherlock.Light.ActionBar'.
    Error:Error:line (11)android-apt-compiler: [project] C:\Development\project\res\values\styles.xml:11: error: Error: No resource found that matches the given name: attr 'background'.
    Error:Error:line (7)android-apt-compiler: [project] C:\Development\project\res\values\styles.xml:7: error: Error: No resource found that matches the given name: attr 'titleTextStyle'.
    Error:Error:line (14)android-apt-compiler: [project] C:\Development\project\res\values\styles.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Sherlock.Widget.ActionBar.Title'.
    Error:Error:line (22)android-apt-compiler: [project] C:\Development\project\res\values\styles.xml:22: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.Sherlock.Light.DarkActionBar'.
    Error:Error:line (34)android-apt-compiler: [project] C:\Development\project\res\values\styles.xml:34: error: Error: No resource found that matches the given name: attr 'actionBarStyle'.
I've seen from Google that the way to solve this problem is make sure my Android SDK is level 15 or higher but as far as I can see I'm using level 19 (4.4.2). My project is set to use level 19 but the error persists. Can anyone tell me what else might be causing the issue?

Thom Yorke raps
Nov 2, 2004


Do you have the Actionbar Sherlock dependency defined correctly in the module set up? What sdk level is the module set to?

revolther
May 27, 2008
At 15 should he/she need ABS? Have you actually had SDK manager update and grab 19?

PiCroft
Jun 11, 2010

I'm sorry, did I break all your shit? I didn't know it was yours

Ranma posted:

Do you have the Actionbar Sherlock dependency defined correctly in the module set up? What sdk level is the module set to?

The module SDK is Android SDK 4.2.2, which is also what the project SDK is set to. As for the dependency, I'm afraid I don't know, I've never used IntelliJ before. If there is another step to set up the dependencies, I'd appreciate any info on how to set that up.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
I'm putting the finishing touches on an app I developed for a company as a freelancer. I'm trying to figure out the best way to set up initial distribution of the app and future updates to their devices.

I'm leaning towards setting up a Beta group through the Play Store and having them sign up all of their tablets with a single Google account. However, because of the nature of the app (it'll be collecting attendee info at conventions in an offline environment) I'm wondering if it'd be better to set them up with some kind of install script/package that can be run via whatever computer they're hooking the devices up to. That'd have the added benefit of letting them reinstall the app should something go wrong when they're at a show. I could also resort to e-mailing their devices' Gmail account with a link to an APK file and enabling installs from on Unknown Sources...

Any thoughts on these? This is the first time I've been in this situation and I'm worried I'll set them up with something that works well only in the short term.

kitten smoothie
Dec 29, 2001

Using a script to install packages just sounds like it would be trouble later since you'd have to have ADB (and appropriate drivers, if a Windows machine) installed on it to really trigger an install. Do you want to have to support setting up ADB on a new computer when they want to use a different one as the "home base" machine?

I'd just go for your initial approach of a beta group. If you post an update, just tell them to get the tablets on a wifi network and update them on the store.

Evil_Greven
Feb 20, 2007

Whadda I got to,
whadda I got to do
to wake ya up?

To shake ya up,
to break the structure up!?
If privacy of the release isn't a major concern and if accuracy of the data collection wouldn't be hindered, you could just make it a public release on the Play Store. That avoids a lot of issues you seem concerned with.

Unless it's advertised or gets picked up by some group, most folks aren't going to be stumbling into it.

Otherwise I'd say the single-account Beta group would be a good bet. I've done that before for multiple users, though not on a large scale.

Evil_Greven fucked around with this message at 05:21 on Aug 15, 2014

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

kitten smoothie posted:

Using a script to install packages just sounds like it would be trouble later since you'd have to have ADB (and appropriate drivers, if a Windows machine) installed on it to really trigger an install. Do you want to have to support setting up ADB on a new computer when they want to use a different one as the "home base" machine?
That was exactly what I was thinking. I don't mind going through all that obviously, but I wanted something a little more turnkey.

kitten smoothie posted:

I'd just go for your initial approach of a beta group. If you post an update, just tell them to get the tablets on a wifi network and update them on the store.

Evil_Greven posted:

Otherwise I'd say the single-account Beta group would be a good bet. I've done that before for multiple users, though not on a large scale.
Yeah, thinking on it some more this appears to be the better option.

On that note, is there a downside to distributing it through MY Play Store account versus having them pony up the $25 for a developer account of their own? Using my account would obviously be easier, but maybe that's integrating things too closely? Or maybe it's another avenue for a monthly revenue stream :clint:

PiCroft
Jun 11, 2010

I'm sorry, did I break all your shit? I didn't know it was yours

I solved my issue with the Sherlock widget stuff - I needed to add a dependecy to my gradle config.

I've now got some new errors:

code:
C:\Users\PiCroft\AndroidstudioProjects\project\project\src\main\res\layout\tablet_fragment.xml
Error:(17) No resource identifier found for attribute 'radius' in package 'com.project.test'
Error:(17) No resource identifier found for attribute 'fillColor' in package 'com.project.test'
Error:(17) No resource identifier found for attribute 'pageColor' in package 'com.project.test'
Error:(17) No resource identifier found for attribute 'strokeColor' in package 'com.project.test'
This is my tablet_fragment.xml:

code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@drawable/leather_background_no_stretch"
     >
    
    <android.support.v4.view.ViewPager 
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        />
    
    <com.viewpagerindicator.CirclePageIndicator
        android:id="@+id/indicator"
        android:paddingBottom="10dip"
        android:paddingRight="10dip"
        android:paddingLeft="10dip"
        android:paddingTop="2dp"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        app:radius="5dp"
        app:fillColor="@color/background"
        app:pageColor="@android:color/transparent"
        app:strokeColor="@color/background"
        app:strokeWidth="1dp"
        />

</LinearLayout>
I'm not sure what I need to do here exactly. I assume its looking for the attributes "radius", "fillColor" etc. in the app somewhere, but I don't know where to add them, assuming they haven't already.

kitten smoothie
Dec 29, 2001

Karthe posted:

On that note, is there a downside to distributing it through MY Play Store account versus having them pony up the $25 for a developer account of their own? Using my account would obviously be easier, but maybe that's integrating things too closely? Or maybe it's another avenue for a monthly revenue stream :clint:

I'd have them sign up and pay the $25, and add you as an authorized user on their Play Store distributor account so you can upload binaries.

Volmarias
Dec 31, 2002

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

kitten smoothie posted:

I'd have them sign up and pay the $25, and add you as an authorized user on their Play Store distributor account so you can upload binaries.

Yeah, I have to agree with this. If this is contract work where you don't own the deliverable, have them deploy under their account. This way, if they stop using you, it's not weird on everyone since they would have to ask you to do deploys.

Suran37
Feb 28, 2009
OK, I'm working on a little game in my free time. On one activity most of the screen is used to display an image and the user is asked to describe it. When they go to type the keyboard takes up about half the screen pushing the rest of the image up the screen. Obviously on tablets there is enough real estate that a solution should be easy to make with fragments and what not, but I'm not sure of an elegant solution for phone sized screens.

Has anyone else had to deal with this and have any pointers or seen an app that deals with it elegantly?

PiCroft
Jun 11, 2010

I'm sorry, did I break all your shit? I didn't know it was yours

Okay, I'm having major problems with building my project.

My project is getting built in Android Studio, and the directory is like so:

code:
root
-project
--build
--libs
--src
---java
----com
-----company.project
------<All this projects source>
-projectutils
--build
--src
---main
----java
-----com.company.utils
------<All this projects source>
"project" is the main app, and it includes projectutils as a dependency. It uses Gradle to build, and I've added the correct includes to the root settings.gradle, and the correct dependencies to project.

No matter what I do, it always gives the error Error:(4, 34) error: package com.company.utils.database does not exist, even though I've added the correct dependency and the Android auto-complete can see and parse the import command, so obviously Android studio is able to see it correctly. There are a ton more errors, but they are all fundamentally the same: It can't seem to find com.company.utils and I have no idea what else I need to do.

I've spent all day trying to get this thing set up just to get it running and this is the biggest brick wall so far. I have literally no idea what I could be missing to cause these errors. I've fixed a bunch of similar errors with Facebook and Kumulos but this one won't work no matter what I try. Could anyone give me some pointers?

PiCroft
Jun 11, 2010

I'm sorry, did I break all your shit? I didn't know it was yours

I managed to get it building, turns out it was my .gradle files. Now I'm having a problem centre-aligning my Action bar logo and text.

I'm aware Google guidelines say not to do this but I don't have say in the matter. From looking at Stack Overflow, the consensus is I need to make a custom Action Bar and while I've had varying degrees of success, I cannot for the life of me get it to respond to any attempt to centre-justify the icon and text.

My custom_layout.xml:

code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:maxLines="1"
        android:ellipsize="end"
        android:text="@string/app_name"
        android:textAppearance="?android:attr/textAppearanceMedium"/>

</RelativeLayout>
and my setup in onCreate():

code:
getSupportActionBar().setDisplayShowCustomEnabled(true);
        getSupportActionBar().setDisplayShowTitleEnabled(false);
        getSupportActionBar().setIcon(R.drawable.app_icon);
        LayoutInflater inflator = (LayoutInflater) this
                .getSystemService(LAYOUT_INFLATER_SERVICE);
        View v = inflator.inflate(R.layout.custom_layout, null);

        TextView titleTV = (TextView) v.findViewById(R.id.title);

        getSupportActionBar().setCustomView(v);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
I'm not sure what else to try. I've seen examples of this working but simply cannot get it to work for myself.

Infomaniac
Jul 3, 2007
Support Cartographers Without Borders

Evil_Greven posted:

If privacy of the release isn't a major concern and if accuracy of the data collection wouldn't be hindered, you could just make it a public release on the Play Store. That avoids a lot of issues you seem concerned with.

Unless it's advertised or gets picked up by some group, most folks aren't going to be stumbling into it.

Otherwise I'd say the single-account Beta group would be a good bet. I've done that before for multiple users, though not on a large scale.

I've done the same for a single client, but I have to assume that you're referring to the alpha testing Google Play publishing option, rather than the beta.

I set up a special google plus group for them. When they join the group they can get the app.

I would suggest that it would be preferable to set up the group with the IT department of the company as the GOD administrator , and have them approve you as a moderator with privileges if they deem it appropriate.

This way, the IT department/ client company is ultimately responsible for inviting and approving users and if you are done with your contact, they can sever you from the group and app distribution without affecting the distribution of their internal app. And you as the contract developer are "clean" from distribution support from day one.

From my research, beta options allow you only to limit the number of users, not the users themselves.

Infomaniac fucked around with this message at 05:40 on Aug 17, 2014

Kenishi
Nov 18, 2010
I'm trying to figure out if the way I'm using this AsyncTask is causing references to be maintained somewhere and causing the thread to not exit/be GCed.

code:
class Foo extends AsyncTask<String, Void, Boolean) {
   private static final Logger = ...;
   private static final int port = 9999;

   protected doInBackground(String...data) {
       boolean result = sendData(data);
       return Boolean.valueOf(result);
   }

   public static boolean sendData(Bar obj) {
        String data = obj.getData();
        return new Foo.execute(data).get().booleanValue();
   }
   
   private static boolean sendData(String data) {
       // Do UDP socket stuff
       // Close socket
       return true;
   }
}
Every time I do the action that causes this to run, a new AsyncTask is made and it runs no problem, but then I see in the debugger that it still has "Running" status. Is that normal or is the static stuff causing problems?

Volmarias
Dec 31, 2002

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

Kenishi posted:

I'm trying to figure out if the way I'm using this AsyncTask is causing references to be maintained somewhere and causing the thread to not exit/be GCed.

code:

class Foo extends AsyncTask<String, Void, Boolean) {
   private static final Logger = ...;
   private static final int port = 9999;

   protected doInBackground(String...data) {
       boolean result = sendData(data);
       return Boolean.valueOf(result);
   }

   public static boolean sendData(Bar obj) {
        String data = obj.getData();
        return new Foo.execute(data).get().booleanValue();
   }
   
   private static boolean sendData(String data) {
       // Do UDP socket stuff
       // Close socket
       return true;
   }
}

Every time I do the action that causes this to run, a new AsyncTask is made and it runs no problem, but then I see in the debugger that it still has "Running" status. Is that normal or is the static stuff causing problems?

Is this all your async task is doing? If so, just use a threadpool or thread. Async tasks are really more for doing UI before and after in a safer way.

Speaking of which, async tasks are run on a threadpool, so it's probably fine. Pause on one with the debugger if you want to make sure that it's not blocked.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
What's the cleanest/smoothest way to set your app's theme if you let the user choose between them (like between a Light and Dark theme)? Right now my app switches between themes just fine except for the fact that, from a cold start, the app temporarily loads the default Light theme in AndroidManifest before reading the Preference and switching to the Dark theme.

Here's how I'm switching between themes:
Java code:
@Override
protected void onCreate(Bundle savedInstanceState)
{
	super.onCreate(savedInstanceState);

	// Set the theme
	Boolean useDarkMode = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(FragmentPreferences.PREF_USE_DARK_THEME, false);
	if(useDarkMode)
	{
		setTheme(R.style.AppThemeDark);
	}
	else
	{
		setTheme(R.style.AppThemeLight);
	}
}
Ideally, if the user has chosen to use the dark theme, the app would immediately load the dark theme even from a cold start. Am I forgetting to do something?

Glimm
Jul 27, 2005

Time is only gonna pass you by

Karthe posted:

What's the cleanest/smoothest way to set your app's theme if you let the user choose between them (like between a Light and Dark theme)? Right now my app switches between themes just fine except for the fact that, from a cold start, the app temporarily loads the default Light theme in AndroidManifest before reading the Preference and switching to the Dark theme.

Ideally, if the user has chosen to use the dark theme, the app would immediately load the dark theme even from a cold start. Am I forgetting to do something?

Have you tried doing this in onCreate of your Application object instead? (I've never tried this, not sure if it would work)

Another option might be having an intermediate Activity which is just blank/grayed out and have it set the theme then go into your first Activity, which may or may not be a nice effect.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

Glimm posted:

Have you tried doing this in onCreate of your Application object instead? (I've never tried this, not sure if it would work)

Another option might be having an intermediate Activity which is just blank/grayed out and have it set the theme then go into your first Activity, which may or may not be a nice effect.
I should have specified, that's in all of my Activities since they extend this Activity helper class:

Java code:
package com.gshoapp.helpers;

import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.FragmentActivity;

import com.gshoapp.FragmentPreferences;
import com.gshoapp.R;

public class ThemedFragmentActivity extends FragmentActivity
{
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);

		// Set the theme
		Boolean useDarkMode = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(FragmentPreferences.PREF_USE_DARK_THEME, false);
		if(useDarkMode)
		{
			setTheme(R.style.AppThemeDark);
		}
		else
		{
			setTheme(R.style.AppThemeLight);
		}
	}
}

Rothon
Jan 4, 2012
A solution I found that seemed to work reasonably well was to set the default theme to something with the Action Bar turned off. That way it loads up with a blank white screen and then flips directly to the correct theme once your onCreate method is called.

Space Kablooey
May 6, 2009


What's the usual go-to SQLite ORM for Android?

revolther
May 27, 2008
Oh man, a situation I could actually help resolve with code if my Dev box wasn't still down from moving.

I learned themes from this stack overflow article, which breaks it down pretty well, and implemented saving the choice through a default shared pref that is checked in onCreate.

Meridian Rizing
Sep 4, 2007
This might be better suited for the game development thread as it involves Unity, but most of the problem involve the NDK and NAtiveActivity so it might fit better here.

I've been developing an Android plugin for Unity. The plugin displays the text box and the onscreen keyboard through JNI. The problem occurs when I attempt to dismiss the the keyboard with the back button. When pressed the back button does not respond and causes an ANR error. Some googling seems to indicate that this android bug is the cause, and this stack overflow response appears to be a workaround. The problem with the solution as I understand it is that it assumes that you are able to modify the source native activity you are using directly as it require modifying the native_app_glue which I cannot do directly.

I have two potential solutions, one is the create a new activity that inherits from the UnityPlayerNativeActivity but I'm not quite sure how to combine the custom inherited activity library with the one unity must use, also this would not be an ideal solution as this would interfere with other android plugins a user might want to use with Unity. The other would be finding a way to access android_app->inputPollSource.process as described in the solution. But I'm not entirely sure the best way to go about it or if it is even possible to do outside of the android_main function described in the answer.

I have one other relatively minor problem. When the autocorrect bar appears on the text underneath the text box, the textbox gets pushed up and all the content in the unity activity gets pushed up as well. I want the text bar to be completely over the top unity view and not interfering with the unity view in any way. How do I go achieving that?

Any help would be much appreciated.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Is there a way to force a method's int parameter to be a reference to a Drawable/Style/etc... instead of just a plain ol' integer? I'd like to be able to force an error if I forget to pass in a R.style.style_name when I call the function.

Volmarias
Dec 31, 2002

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

Karthe posted:

Is there a way to force a method's int parameter to be a reference to a Drawable/Style/etc... instead of just a plain ol' integer? I'd like to be able to force an error if I forget to pass in a R.style.style_name when I call the function.

No, I don't think you can parameterize that, unless you want to write a bunch of wrapper classes and transform your codebase :(

speng31b
May 8, 2010

Karthe posted:

Is there a way to force a method's int parameter to be a reference to a Drawable/Style/etc... instead of just a plain ol' integer? I'd like to be able to force an error if I forget to pass in a R.style.style_name when I call the function.

You could call getResources().getResourceTypeName(int) on the int param, check if it's the right resources type, catch the Resources.NotFoundException, and throw an IllegalArgumentException to fail fast. Sounds like a lot of overhead for something that should probably never be a real issue. You're not going to forget to pass an int referencing a style to a method that clearly asks for it, and if you do, when you try to use the invalid resource id you'll almost definitely get a pretty obvious crash from it, netting the same end result.

Only reason I'd consider something like this is if you actually don't want to fail fast and want a method that behaves differently depending on what type of resource id you pass to it. Then you could use this logic to branch and do one thing if you pass a style, another if you pass a drawable, etc.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Hey guys, FYI, starting on September 30th Google's going to require app developers that charge for their apps or offer IAPs in their apps to post physical addresses. These addresses will be visible to all users on Google Play. Don't believe me? Check out your publishing console:



What the hell, Google? :suicide:

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Karthe posted:

Hey guys, FYI, starting on September 30th Google's going to require app developers that charge for their apps or offer IAPs in their apps to post physical addresses. These addresses will be visible to all users on Google Play. Don't believe me? Check out your publishing console:



What the hell, Google? :suicide:

That really blows for all the one-guy publishers out there that just coded a neat app from the comfort of their bedroom and make a little scratch selling no-adds for them. Maybe it's a conspiracy with the USPS to drive up PO box purchases.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
It looks like it's in response to a recent consumer protection law that came into effect in the EU. The relevant bit is here:

quote:

The information about the seller must include a geographical address if payment is taken. When you place an order, the seller becomes obliged by law to provide further information in writing or by email.

I guess Google decided to apply this to everyone because of the international nature of the Play Store.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
This is a shameful double post from the Inspect your Gadgets Android thread.


My girlfriend dropped her galaxy ace 2 phone and it's got a crack horizontally through the screen. The touch screen is working above the crack but not below. This has left her unable to unlock the phone.

She has had a couple of missed calls on the phone since, and I'm hoping to figure out how I can get the information behind those missed calls - eg, who called. It's somewhat urgent, since she just started as a substitute teacher, is expecting on-call work, and doesn't want to make bad first impressions of not returning calls.

Suggestions? I'm capable of installing that android port of eclipse or something to that effect if there's an easy bridge for me to access the data, but I've never touched any android programming so I probably won't be able to do anything too fancy.

Any consumer tools for this sort of thing?

Volmarias
Dec 31, 2002

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

Newf posted:

This is a shameful double post from the Inspect your Gadgets Android thread.


My girlfriend dropped her galaxy ace 2 phone and it's got a crack horizontally through the screen. The touch screen is working above the crack but not below. This has left her unable to unlock the phone.

She has had a couple of missed calls on the phone since, and I'm hoping to figure out how I can get the information behind those missed calls - eg, who called. It's somewhat urgent, since she just started as a substitute teacher, is expecting on-call work, and doesn't want to make bad first impressions of not returning calls.

Suggestions? I'm capable of installing that android port of eclipse or something to that effect if there's an easy bridge for me to access the data, but I've never touched any android programming so I probably won't be able to do anything too fancy.

Any consumer tools for this sort of thing?

Unless she happened to have USB debugging enabled, you are almost certainly out of luck, sorry. If she did, you could probably write something that acquires the screen guard unlock and doesn't release it.

Apps installed via remote purchase still require the user to manually open them first before they accept any other signals.

Edit: your phone company knows who called you, use their website.

Volmarias fucked around with this message at 22:55 on Oct 1, 2014

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Volmarias posted:

Unless she happened to have USB debugging enabled, you are almost certainly out of luck, sorry. If she did, you could probably write something that acquires the screen guard unlock and doesn't release it.

Apps installed via remote purchase still require the user to manually open them first before they accept any other signals.

Edit: your phone company knows who called you, use their website.

Bleh. Going to buy a new phone at the mall. The phone company has been pretty helpful but unfortunately their own access to the call history only updates every 24 hours. Thanks for the info though :)

Volmarias
Dec 31, 2002

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

Newf posted:

Bleh. Going to buy a new phone at the mall. The phone company has been pretty helpful but unfortunately their own access to the call history only updates every 24 hours. Thanks for the info though :)

No problem. Replacement screens won't be that expensive, stop by the phone repair kiosk your mall almost certainly has and see what they say they can do on short notice.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

Newf posted:

This is a shameful double post from the Inspect your Gadgets Android thread.


My girlfriend dropped her galaxy ace 2 phone and it's got a crack horizontally through the screen. The touch screen is working above the crack but not below. This has left her unable to unlock the phone.

She has had a couple of missed calls on the phone since, and I'm hoping to figure out how I can get the information behind those missed calls - eg, who called. It's somewhat urgent, since she just started as a substitute teacher, is expecting on-call work, and doesn't want to make bad first impressions of not returning calls.

Suggestions? I'm capable of installing that android port of eclipse or something to that effect if there's an easy bridge for me to access the data, but I've never touched any android programming so I probably won't be able to do anything too fancy.

Any consumer tools for this sort of thing?

Have her call the phone provider (using your phone) and get the details on the latest calls.

edit: Oh just saw your reply that the info isn't there. drat, that's annoying.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
Her parents were the missed calls. Expecting a new phone in a couple of days. In the meantime will just have to be vigilant to 'look at' the phone quickly when it rings - it does display the incoming caller while ringing, it just won't let you pick up.

Jeez, phones.

Sir_Substance
Dec 13, 2013
I'm doing some entry level stuff here, and I've stumbled across something I feel should be obvious, but isn't.

I would like to pass an object from one activity to another. However, the putExtra function does not allow the passing of arbitrary objects.

Correct if I'm wrong, but the two most commonly proposed workarounds, implementing seralizable and parcelable, both copy the object. I would like to pass the object itself (it would be a reference to the object if this were c++) so that any changes I make to it in that activity will be available to the rest of the app.

The third most popular alternative seems to be using global variables. Is there no better way of doing this simple thing?

Volmarias
Dec 31, 2002

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

Sir_Substance posted:

I'm doing some entry level stuff here, and I've stumbled across something I feel should be obvious, but isn't.

I would like to pass an object from one activity to another. However, the putExtra function does not allow the passing of arbitrary objects.

Correct if I'm wrong, but the two most commonly proposed workarounds, implementing seralizable and parcelable, both copy the object. I would like to pass the object itself (it would be a reference to the object if this were c++) so that any changes I make to it in that activity will be available to the rest of the app.

The third most popular alternative seems to be using global variables. Is there no better way of doing this simple thing?

There is not. It is expected that you are passing flat data between activities, because intents are meant to launch activities/services both in process and OUT of process.Naturally, passing java objects between different java processes would be problematic, to say the least. How would you pass your object to the email client, for example?

Using a global store of some kind is definitely the least unreasonable way to do this. Typically, you'll have a map somewhere, and you'll pass a key to that map to reference your object. That said, given that your activity/application can be killed and recreated, usually you'll want your objects to live somewhere more persistent.

Adbot
ADBOT LOVES YOU

Sir_Substance
Dec 13, 2013
Well, that's frustrating. It definitely sounds like they took two separate jobs (passing data around within a single app and passing data between apps) and needlessly crushed them together.

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