بروز خطا
[message]
اشتراک در سوال
رای ها
[dataList]
مشکل با سیستم crash reporter ( حل شد )
سلام دوستان تا حالا با ACRA کار کردین؟
طبق توضیحات خودش (http://acra.ch/) جلو رفتم...توی برنامه هم کرش بوجود میارم اما هیچی ریپورتی ارسال نمیکنه؟!
دوستان اگه تجربه کار با این سیستم ریپورت دهی رو دارن ممنون میشم راهنماییم کنن...
کلاسی که برای ارسال کرش ها معرفی کردم :
import org.acra.ACRA; import org.acra.ReportField; import org.acra.ReportingInteractionMode; import org.acra.annotation.ReportsCrashes; import android.app.Application; @ReportsCrashes(formKey = "", formUri = "http://www.xxxxxx.com/report/report.php", customReportContent = { ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT }, mode = ReportingInteractionMode.SILENT) public class ReportApp extends Application { @Override public void onCreate() { super.onCreate(); ACRA.init(this); } }
+1
0

توی فایل php خودتون دیتای ارسالی رپورت رو دریافت میکنین؟؟ یا اینکه به طور کل چیزی ارسال نمیشه؟ (10 سال پیش)
0
0

تو فایل php همون دستورات خودش رو گذاشتم که تو ایجادش گفته بود...هیچ فایلی متنی که توش باید توضیحات خطا باشه رو ایجاد نمیکنه...(تا اونجایی که میدونم کنار همین فایل php باید یه فایل متنی درست کنه و خطاها رو توش بنویسه) (10 سال پیش)
0
0

اگه امکانش هست کد های PHP رو هم قرار بدین. (10 سال پیش)
0
0

خودم به تنظیمات فایل منی فست شک دارم...میشه لطفا اون بخشش رو بگین... که تنظیمات درستش چیه... (10 سال پیش)
0
0

یه مشکل خیلی عجیب < برای من formKey رو نمیشناسه ! < The attribute formKey is undefined for the annotation type ReportsCrashes (10 سال پیش)
+1
0

criss@ : تو ورژن جدیدش نیازی به formKey نداره . formKey برای اتصال به google docs بود که دیگه پشتیبانی نمیشه (10 سال پیش)
0
0

من از لینک اموزشی این تاپیک لینک و از ورژن /acra-4.6.1.jar استفاده میکنم < بجای formKey از چی باید استفاده کنم ؟ (10 سال پیش)
+1
0

هیچی بجاش نمیخواد کلا پاکش کن و فقط formUri رو وارد کن (10 سال پیش)
برای این سوال 4 پاسخ وجود دارد.

پاسخ به سوال
RojaDev
10 سال پیش
0
0
محتویات فایل php:
<?php // Outputs all POST parameters to a text file. The file name is the date_time of the report reception $fileName = date('Y-m-d_H-i-s').'.txt'; $file = fopen($fileName,'w') or die('Could not create report file: ' . $fileName); foreach($_POST as $key => $value) { $reportLine = $key." = ".$value."\n"; fwrite($file, $reportLine) or die ('Could not write to report file ' . $reportLine); } fclose($file); ?>

پاسخ به سوال
BehrouZ.J
10 سال پیش
+2
0
$content = "Test File"; $fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/myReport.txt","wb"); fwrite($fp,$content); fclose($fp);

پاسخ به سوال
RojaDev
10 سال پیش
+1
0
یه اتفاق دیگه افتاد...
یه مرحله رو جا انداخته بودم...بعد از تصحیح مرحله و اجرای اپ ( و تصحیح فایل به حالت اولیه) : یه فایل error_log کنار فایل php ساخت با این متن :
[02-Nov-2014 15:59:50 UTC] PHP Parse error: syntax error, unexpected T_STRING in /home/xxxxxx/public_html/report/report.php on line 2

پاسخ به سوال
Criss
10 سال پیش
0
0
بعد از کرش برنامه دیالوگ باز میشه اما چیزی به فایل php ارسال نمیشه < فایل php هم بخوبی کار میکنه <
mport org.acra.ACRA;
import org.acra.ReportField;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
@ReportsCrashes(//formKey = "",
formUri = "http://android.domain.ir/report.php",
customReportContent = { ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT },
mode = ReportingInteractionMode.DIALOG,
resToastText = R.string.crash_toast_text, // optional, displayed as soon as the crash occurs, before collecting data which can take a few seconds
resDialogText = R.string.crash_dialog_text,
resDialogIcon = android.R.drawable.ic_dialog_info, //optional. default is a warning sign
resDialogTitle = R.string.crash_dialog_title, // optional. default is your application name
resDialogCommentPrompt = R.string.crash_dialog_comment_prompt, // optional. when defined, adds a user text field input with this text resource as a label
resDialogOkToast = R.string.crash_dialog_ok_toast // optional. displays a Toast message when the user accepts to send a report.
)
public class G extends Application {
public static Context context;
public static Activity currentactivity;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
ACRA.init(this);
}
}
این رو هم به منی فست اضاف کردم <
<activity
android:name="org.acra.CrashReportDialog"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Dialog" />
پرمیژن اینترنت هم وجود داره !
----------------------#ویرایش :
تغییرات رو بصورت زیر گذاشتم باز هم نشد !
@ReportsCrashes(//formKey = "",
formUri = "http://android.clientdomain.tinahost.ir/report.php",
customReportContent = { ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT },
mode = ReportingInteractionMode.SILENT
/* resToastText = R.string.crash_toast_text,
resDialogText = R.string.crash_dialog_text,
resDialogIcon = android.R.drawable.ic_dialog_info,
resDialogTitle = R.string.crash_dialog_title,
resDialogCommentPrompt = R.string.crash_dialog_comment_prompt,
resDialogOkToast = R.string.crash_dialog_ok_toast
*/
)
public class G extends Application {
public static Context context;
public static Activity currentactivity;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
ACRA.init(this);
}
}
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .