App Testing

by zosq » Tue, 26 Jan 2010 18:48:54 GMT


Sponsored Links
 I have created an app which needs some testing done. I have tested it
on the HTC Hero (UK version) and the HTC Tattoo. Worked well on both
the devices. I wanted to test it on the newer android phones like the
Droid or the Nexus One. If anyone could help me out with the testing,
there is a link to the .apk file below.

This app does functions like silencing the ringtone when the phone is
flipped, switching on the speakerphone when in call etc.

 http://dl.dropbox.com/u/556550/FlipShake.apk 

Please do let me know if you have any suggestions or complaints. Thank
you.

--



App Testing

by zosq » Tue, 26 Jan 2010 18:51:42 GMT


 Do check out the help section in the app for more details of the
functions.

--


Sponsored Links


App Testing

by DanielleM » Thu, 10 Mar 2011 01:31:00 GMT


 Hello all:

I saw that some people on this forum were asking for the help of
others on here to test their apps on different devices and I was
hoping to also get some help with this.

You can download my app here:

 http://www.wusf.org/Android_App/WUSF_Android.html 

I've been having issues getting the live streams to play on some 2.2
devices, so if you are able to help me out can you please send back
specific info on what device and version of Android you are using?

I really appreciate any help anyone can provide.

Thanks,
DanielleM

-- 



Other Threads

1. Content Providers loading, but not firing onCreate

Hello,

I have 5 Content Providers for my 5 table SQLiteDatabase.  They are
named:

CoreActionProvider
CoreMovementProvider
CoreRoundsProvider
CoreChecksProvider
CoreTermsProvider

I have stepped through the startup process several times and have
confirmed that all 5 Providers are loading.  However, only
CoreTermsProvider and CoreChecksProvider are firing their onCreate()
methods.

The tables do not exist for for the other 3.  I have attempted to run
queries against them, and been greeted with the dreaded SQLException,
stating that the table does not exist.

Is there a limit to the number of custom providers?

I will post the code for CoreTermsProvider only, as all 5 providers
share the same code structure, just different table names:

package com.vortex.rules.providers;

import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;

public class CoreTermsProvider extends ContentProvider{

        public static final String PROVIDER_NAME =
"com.vortex.rules.providers.CoreTerms";

        public static final Uri CONTENT_URI = Uri.parse("content://"+
PROVIDER_NAME + "/terms");

        public static final String _ID = "_id";
        public static final String TITLE = "title";
        public static final String TEXT = "text";

        private static final int TERMS = 1;
        private static final int TERM_ID = 2;

        private static final UriMatcher uriMatcher;
        static{
                uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
                uriMatcher.addURI(PROVIDER_NAME, "terms", TERMS);
                uriMatcher.addURI(PROVIDER_NAME, "terms/#", TERM_ID);
        }

        //---for database use---
        private SQLiteDatabase rulesDB;
        private static final String DATABASE_NAME = "Rules.db";
        private static final String DATABASE_TABLE = "terms";
        private static final int DATABASE_VERSION = 1;
        private static final String DATABASE_CREATE =
                "create table if not exists " + DATABASE_TABLE +
                "(_id integer primary key autoincrement, "
                + "title text not null, text longtext not null);";

        private static class DatabaseHelper extends SQLiteOpenHelper{
                DatabaseHelper(Context context){
                        super(context, DATABASE_NAME, null, DATABASE_VERSION);
                }

                @Override
                public void onCreate(SQLiteDatabase db){
                        db.execSQL(DATABASE_CREATE);
                }

                @Override
                public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion){
                        Log.w("Content Provider Database",
                                        "Upgrading database from version " +
                                        oldVersion + " to " + newVersion +
                                        ", which will destroy all old data");
                        db.execSQL("DROP TABLE IF EXISTS terms");
                        onCreate(db);
                }
        }

        @Override
        public String getType(Uri uri){
                switch (uriMatcher.match(uri)){
                //---get all terms---
                case TERMS:
                        return "vnd.android.cursor.dir/vnd.vortex.rules.terms ";

                //---get a particular book
                case TERM_ID:
                        return "vnd.android.cursor.item/vnd.vortex.rules.terms 
";

                default:
                        throw new IllegalArgumentException("Unsupported URI: " 
+ uri);
                }
        }

        @Override
        public boolean onCreate(){
                Context context = this.getContext();
                DatabaseHelper dbHelper = new DatabaseHelper(context);
                rulesDB = dbHelper.getWritableDatabase();
                return (rulesDB == null)? false:true;
        }

        @Override
        public Cursor query(Uri uri, String[] projection, String selection,
                        String[] selectionArgs, String sortOrder){
                SQLiteQueryBuilder sqlBuilder = new SQLiteQueryBuilder();
                sqlBuilder.setTables(DATABASE_TABLE);

                if (uriMatcher.match(uri) == TERM_ID)
                        //---if getting a particular term---
                        sqlBuilder.appendWhere(_ID + "=" + 
uri.getPathSegments().get(1));

                if (sortOrder == null || sortOrder=="")
                        sortOrder = TITLE;

                Cursor c = sqlBuilder.query(rulesDB, projection, selection,
selectionArgs, null, null, sortOrder);

                //---register to watch a content URI for changes---
                c.setNotificationUri(getContext().getContentResolver(), uri);
                return c;
        }

        @Override
        public Uri insert(Uri uri, ContentValues values){
                //---add a new term---
                long rowId = rulesDB.insert(DATABASE_TABLE, "", values);

                //---if added successfully---
                if (rowId > 0)
                {
                        Uri _uri = ContentUris.withAppendedId(CONTENT_URI, 
rowId);
                        getContext().getContentResolver().notifyChange(_uri, 
null);
                        return _uri;
                }
                throw new SQLException("Failed to insert row into " + uri);
        }

        @Override
        public int delete(Uri arg0, String arg1, String[] arg2){
                // arg0 = uri
                // arg1 = selection
                // arg2 = se;ectionArgs
                int count = 0;
                switch (uriMatcher.match(arg0)) {
                case TERMS:
                        count = rulesDB.delete(DATABASE_TABLE, arg1, arg2);
                        break;

                case TERM_ID:
                        String id = arg0.getPathSegments().get(1);
                        count = rulesDB.delete(DATABASE_TABLE, _ID + "=" + id +
                                        (!TextUtils.isEmpty(arg1)? " AND (" +
                                                        arg1 + ')' : ""), arg2);
                        break;

                default:
                        throw new IllegalArgumentException("Unknown URI: " + 
arg0);
                }
                getContext().getContentResolver().notifyChange(arg0, null);
                return count;
        }

        @Override
        public int update(Uri uri, ContentValues values,
                        String selection, String[] selectionArgs)
        {
                int count = 0;
                switch (uriMatcher.match(uri)){
                        case TERMS:
                                count = rulesDB.update(DATABASE_TABLE, values, 
selection,
selectionArgs);
                                break;

                        case TERM_ID:
                                count = rulesDB.update(DATABASE_TABLE, values, 
_ID + "=" +
uri.getPathSegments().get(1) +
                                                (!TextUtils.isEmpty(selection) 
? " AND (" +
                                                                selection + ')' 
: ""), selectionArgs);
                                break;

                        default:
                                throw new IllegalArgumentException("Unknown 
URI: " + uri);
                }

        getContext().getContentResolver().notifyChange(uri, null);
        return count;
        }

}


As you can see, it is a basic Content Provider.

Any help on this issue would be greatly appreciated.  I would have
posted this on StackOverflow, but the "Ask A Question" link was
throwing errors.

Sincerely,
Michael Martin

-- 

2. Accessing resources from other packages

Hi,

I'd like to access resources from other packages installed. Is there
any better practice than
using getResources() combined with createPackageContext()? Another
question is how to
use resources from other packages in methods like Notification(int
icon, CharSequence
tickerText, long when), where 1st argument is just resource id?

-- 

3. Disabling Idle mode

4. finish() at onStop causes ANR

5. Understand the filesystem contents

6. Multiple concurrent versions of same app, filtered by minSdkVersion?

7. error getting editText from second activity's layout xml file saying No package identifier