Giter VIP home page Giter VIP logo

django-acra's Introduction

#Django-ACRA ####Ready To Go Helper!

Django Model, View and Admin Panel for ACRA (Application Crash Reports for Android).

##Installation

Assuming that the project name is my_android_server copy the folder acra to the project and then edit settings.py and urls.py.

  • In the settings.py file just add:
INSTALLED_APPS = (
    'django.contrib.auth',
	'django.contrib.contenttypes',
	'django.contrib.sessions',
    '...'
	'my_android_server.acra',
)
  • In the urls.py make sure to include this:
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
import settings

urlpatterns = patterns('',
    ...
	url(r'^acra/', include("my_android_server.acra.urls")),
	url(r'^admin/', include(admin.site.urls)),
    ...
)
  • Finally sync the database
$ python manage.py syncdb
  • Create a Django user in your admin page (to get a username and password) and set the acra permissions('acra.add_crashreport', 'acra.change_crashreport' and 'acra.delete_crashreport') to this new user.

##Android Snippet

  • Application Class
package com.pathonproject.testacra;

import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;

@ReportsCrashes(
        formUri = "http://pathonproject.com/acra/_design/acra-storage/_update/report/"),
        reportType = HttpSender.Type.JSON,
        formUriBasicAuthLogin = "<username>",
        formUriBasicAuthPassword = "<password>"
)
public class TA extends Application
{

	public void onCreate()
	{
	    super.onCreate();
	    ACRA.init(this);
	    
	    //ACRA.getErrorReporter().handleException(null);
	    ACRA.getErrorReporter().checkReportsOnApplicationStart();
	    //ACRA.getErrorReporter().handleException(null);
	}
}
  • AndroidManifest.xml
    <!-- Debug Acra -->
    <uses-permission android:name="android.permission.READ_LOGS"></uses-permission>
    
    <application
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.Sherlock.Light.DarkActionBar" 
        android:name="com.pathonproject.testacra.TA">
        <activity
            android:name="com.pathonproject.testacra.Init"
            android:label="@string/app_name"
            android:noHistory="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

##Screenshot

Screenshot

##Version

##Tech

  • ACRA - Application Crash Reports for Android
  • License - Module License

##Author

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.