Introduction
Hello and Welcome to android app development guide. In this [guide] i will teachyou how to develop applications for the android platform using java and some simple tools. I will also teach you to add audio/video to your apps and also teach how to make them location aware by adding gps function to it
Click to expand...
Click to collapse
What You Should Know
Here I am just letting you all Know the pre-requisites of making an app. But then if you dont match the pre-requisites..... its OKAY !! I started it without this xD
Some Experience Of Object Oriented Programming
Some Experience of JAVA
Experience of Using ECLIPSE
Have An ANDROID phone so that you know the capabilities of Android
Click to expand...
Click to collapse
Preface:Guide to make an android app
Click to expand...
Click to collapse
Setting Up the System
Setting Up the System
Downloading The Basic Equipment For Android App Development
Click to expand...
Click to collapse
Overview
Android Architecture
Runs on Linux 2.6
Dalvik Virtual Machine, Which Is optimised for mobiles
Integrated Browser, based On Webkit Engine
Optimized Graphics with Open GL ES
SQLite Database for Data storage
Click to expand...
Click to collapse
Android Application Fundamentals
Applications are written in JAVA programming Language
Compiled Into Android Package file (.apk)
Each Application runs in its own sandbox and linux processes
Applications consists of Components, Resources and a Manifest file
Click to expand...
Click to collapse
Components:
Activities
Single Screen with a UI [a screen seen by a user, it is an activity. basically a single screen, seen by the user IS an ACTIVITY ]
Multiple Activities are required to make a user friendly application
When a new activity starts, old activity is pushed on to the Back Stack [ it becomes handy and fast if you press the back button on the phone. the activity on the back stack is not needed to be loaded again ! ]
UI can be built with either by XML ( recommended) or in Java ( I hate doing that )
You can manipulate the lifetime of the activities by certain call back methods. such as onStart[], onPause[], etc.
Click to expand...
Click to collapse
Services
They perform long-running operations in the background.
Doesn't contain ANY user interface
Useful for network operations, playing music, etc.
Runs independently of the component that created it ! --> [ say a service that launches a Service is closed. the service is still running ]
They can be bound to other application components. [ IF allowed ]
Click to expand...
Click to collapse
Content Providers
Used to store and retrieve data and make it accessible to any application.
Since, there is no way to share data across the applications, it is the only way !
Exposes a public URI that identifies the data set with some unique method or codes.
The data is exposed by a simple table on a database model concept.
Android contains many providers for things like contacts, media, etc.
Click to expand...
Click to collapse
Broadcast Recievers
A component that responds to system-wide broadcast announcement.
For Example, if the battery is low, Android Sends a system-wide broadcast, and the application that is listening to it, is responded by a Broadcast Reciever.
Applications can also initiate a broadcast that different applications can respond to ! example --> if an application, app1, is dependent on another application, app2, it can start a broadcast for app2. if the app2 exists, it can proceed else it will pop up a message like --- "app2 doesn't exist. plz download it from the market"
They, like services, contain no UI
Can be used to create Status Bar Notifications
Click to expand...
Click to collapse
Android Manifest File
All applications MUST have an AndroidManifest.xml in its root directory.
Presents the information about the application to the Android System.
Declares the Components used in the application
Also Declares the permissions required from the user to run the application.
Declares the Minimum Android API level to run that application. [ eg: GingerBread, HoneyComb, IceCreamSandwich, etc. ]
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Details About Some Folders
Have You ever Decompiled any apk file ?? If not, do it, cuz it is really important part of app making. since there are many relative things to this.
In here I will Explain about some folders you get to see in a folder named "res" when you decompile.
layout
In This Folder, You will find some xmls, which looks more like a web page source
And Gibberish until you take a CLOSE LOOK !
It actually stores in the Layout of your activity. You will get to be familiar with this as we are going to use this
Click to expand...
Click to collapse
drawable
In this folder, You will get the things that makes the app look beautiful !
Ha! This contains "pngs" that are used in themes. We Will come to this as time passes
Click to expand...
Click to collapse
xml
In here, Again, XMLs with someting Gibberish till you get a closer Look ! These xmls store your preference activities.
Click to expand...
Click to collapse
anim
This folder, again xmls, which seem more unreadable. This folder, as the name says, it stores the anim files that has instructions for your animations that you (will) use in the app.
Click to expand...
Click to collapse
values
This folder, again xmls, which seem even more unreadable. This folder, stores the values for different stuff, like ids, integers color hex's, etc (we will get to this later) .
Click to expand...
Click to collapse
colors
This folder, again xmls, as the name says, stores the colors that you (will be) using in the app (we will get to this later) .
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Activities And Explicit Intents
Activities & Explicit Intents
As I've already told you that Activities are one of the primary building blocks of your app. here, we will learn how to create actiities, declare them in AndroidManifest.xml and We will also learn How to go to another activity from one activity. Okay. So now open up Eclipse. and sart a new Android Project.
Click on File >> New >> Android Project
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part like this
make a new xml file by clicking
. Give a file name like... SecondActivity.xml or something you like Note: This Will be your Second Activity. and now click Finish
Now drag the " TextView " from the " form widgets" tab from the left side panel to the graphical editor of your second activity.
Now, Basically what i want to teach is Explicit Intents. Now what we want our app to do is the text written in the MainActivity should be shown to the user when he clicks the "go to second activity" button. So to do this, we need to declare and do something with JAVA !
navigate to the .java files -->
Double click the java file and you will et something like this ( gibberish... if you dont like java like me )
since we need to define the "EditText" field and the "Button" from the first activity !
Now, find this
Code:
setContentView(R.layout.main);
after that start typing
final EditText et = findView
now press ctrl+space (windows)
it will show you a list of commands. choose findViewById(id)
now it will automatically place you along the (id). now start typing ---> R.id.
and press ctrl+space (windows).
chose the EditText Value..... Now as you see, it will show an error there. press ctrl+1 to show quick fixes. Add a cast to EditText. Final text will be Like this
Code:
final EditText et = (EditText) findViewById(R.id.editText1);
Now do the same with the "Button"
Code:
Button b = (Button) findViewById(R.id.button1);
Now that you have defined the button. Now you will have to set an OnClickListener for that button. so the it allows User to go to the second activity.
now start typing
b.setOnclick... press ctrl+space and choose onClickListener. It will automatically place you in the "()" type there --> new OnClickListener press ctrl+space. you will get something like this
you will get an error. so go to the place ( marked red in the pic and put a semi-colon )
now, in the following method,
Code:
public void onClick(View arg0) {
// TODO Auto-generated method stub
}
start typing the following
Code:
Intent intent = newInt
press ctrl+space and choose this
It will automatically place you in packageContext.
NOTE:
packageContext == "The java file that is creating the Intent";
cls == " The java file to whom the Intent Should be passed";
so, edit it this way
Code:
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
NOTE:
MainActivity == "The java file that you are editing";
SecondActivity == " The java file That WILL represent the the SecondActivity.xml";
It will give you an error. press ctrl+1 and select--> create class "SecondActivity"
Fill in the details of the new java file and click finish. Now go back to previous java file.
Now, you have created an intent. But its not defined that what will that intent do !
So, now, Lets define that
start typing--> intent.putExtra and press ctrl+space. choose this.
now, you will be automatically placed in the "key". now for the key, you will have to type a string. i would like to call it "thetext". Now, Make sure you type the string WITHIN THE DOUBLE QUOTES..
For the value, you will have to give the reference of the "EditText" Field. here, i have given it as "et", i will type it this way.
intent.putExtra("thetext", et.getText().toString());
Click to expand...
Click to collapse
Now, you have successfully DEFINED what the intent does. but if you check the coding..... you will notice that the intent is never initialised ! now, to initialise it, type in this -->
startActivity(intent);
Click to expand...
Click to collapse
the final MainActivity.java should look like this.
Click to expand...
Click to collapse
Now, its almost done..... BUT.... ! what the hell is the use of the secondActivity.java ! ?
It is to be edited. only then the text written in the first activity by the user will be shown in the second activity. to do that, go to second activity. Now,
EASY PART
Find this in the first java file:
Copy all that stuff to the SecondActivity.java
Change the blue highlited text ( in eclipse ) to the name of the second xml file. (just dont add the extension)
Hard PART
Now, you gotta define the "TextView" on the SecondActivity.xml Since you have given the reference to the SecondActivity.xml by copying all that stuff.
so, start typing,
Code:
TextView tv = findView
NOTE: Here "tv" is the name you have assigned to the "TextView". You can change it if you want. BUT makesure you do the cahnges accordingly in the next steps.
hit ctrl + space. choose >> findViewById(id);
now again, as we already did that before, in the place of "id" just type in "R.id." hit ctrl+space and chose the "TextView"
Now, that You have defined it here, dosent mean that It will give you desired output....
You just have created an intent and have defined it and initialised it in the last java file.
But there is no-one to recieve that intent ! so, start typing the following:
And, in place of text, start typing "getI" and press ctrl+space. put a fullstop, type "getE" hit ctrl+space, put a fullstop again, start typing "getS", ctrl+space again now in the "()" put the string that you have defined in the last java file. since I have defined it as "thetext" i will type that in the "()" like this:
Code:
tv.setText(getIntent().getExtras().getString("thetext"));
Click to expand...
Click to collapse
Now, its done..... BUT.... ! .... AndroidManifest.xml
you didnt touch it till now. we have to register every activity there. or else, the app will cause a FC error. (Force Closes)
Now, open up the Androidmanifest.xml
go to the text editor :
and in the end before--> "</application>" add this
Code:
<activity
android:name="com.blksyn.explicitintents.SecondActivity">
</activity>
Click to expand...
Click to collapse
Now, its done. Lets start the emulator and Check this if it works !
Go to AVD Manager like this:
Start the AVD emulator.
click on run: and click on run again xD. Click on okay.
Bingo ! you have created an app which declares Explicit Intents and added a function to activities to catch that intent !
How to Make Android Apps: Explicit Intents
Click to expand...
Click to collapse
Implicit Intents
Implicit Intents
Now, you must have seen some applications with a "share" button. By clicking on this button, you can share a particular image/video/audio/etc....
What does that application actually do is send a message to other applications to search for the applications capable of handling such type of job. Then it pops up the list of such apps to the user. Now we can also have that list contain our app too !
Here is how.
Create a blank project. I gave it the name as "Implicit_intents". But you can choose whatever you want
Open up the "AndroidManifest.xml" file. (plz dont expect me to show how, cuz i have already shown that earlier and you should know that by now)
You will see something like this
Copy this from the main activity
Code:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
paste it again after the </intent-filter>
and change it to this
Code:
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
NOTE:
Code:
<action android:name="android.intent.action.SEND" />
(self explainatory)
Click to expand...
Click to collapse
Code:
<category android:name="android.intent.category.DEFAULT" />
This tells the android system waht the category of the intent is. If you dont know what the category really is, you should keep it DEAFAULT.
Click to expand...
Click to collapse
Code:
<data android:mimeType="image/*" />
This tells the Android system, What type of data can the application "SEND" (* reference to the first one). and "data/*" means that the application can handle any type of imge. Jpeg, png, bmp, etc....
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
So, this is how your AndroidManifest.xml should look like.
Now, go to the xml of your main activity and get rid of that text view. and add an "ImageView" from "Images and media" tab on the left
Now, go to your main java file and give a refernece to that ImageView
NOTE: "iv" is just a name given to the ImageView. so, you can change it if you want. But you will have to adapt to it and make changes in the steps accordingly.
Import the image view thing and add a cast by hitting ctrl+space
Now that you have specified the ImageView, you now have to set the ImageView to show the image the user wanna send. so, start typing in "iv.setImage" and press ctrl+space.
Now, since the image is IN the intent sent by the gallery after the user clicks the share button, we have to "get" the "EXTRAS" from the intent. So, start typing in in the "()". "getInt" press ctrl+space put a "." again type "getExt" choose the only option available, put a "." again and type "get" choose the first option. now, for the key, we are gonna use a constant from the INTENT class, that is called "EXTRA_STREAM". So ,just start typing in "Intent", put a ".", type "extra_" and choose "EXTRA_STREAM".
This "EXTRA_STREAM" is nothing but the "URI" to the image the user wants to send. You will have an error now in the line even after putting a ";" in the end. so press the quick fix combo "ctrl+1" and add a cast to (URI).
Click to expand...
Click to collapse
Now, you have successfully built an application that can handle the "share" kind of intent. now if you run this app in the emulator, you will probably have an FC. Since the app does not have any intent to process during the launch, it will FC. but if you go to gallery and click on share, you will get this app in the list. And also, if you click on this app, you will see the image you wanted to share.
So, this ends our chapter of Implicit Intents. You can now use your imaginations and use the combos of the previous and this chapter to build a pretty good basic app ! and the credit will be yours ! But dont forget to thank me for my efforts. haha... and also if i help you in some place.
And last but not the least in this chapter, If you have any questions, post a reply in this thread you will surely be answered :good:
How to Make Android Apps: Implicit Intents
Click to expand...
Click to collapse
Widgets
I am going to teach you how to make a widget.
This widget will go to a specified site !
So , make a new android application in eclipse
name it whatever you like !
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. Now, modify the activity_main.xml in the graphical part like this
You will get something like this:
Now Open Up the AndroidManifest.xml. and remove this part:
And add this part:
make a new xml file by clicking
. and change Resource type from Layout to "AppWidget Provider" and now click Finish
Note: This Will be your android:resource file. highlighted in the previous image.
Now Open up that xml. You will find it in the /res/xml directory. you will get something like this:
Now click on the "red" underlined part. you will get something like this:
Now, Basically we are making a 2x2 widget. You need to specify that somewhere right ? That is the place. but how do you specify ?? It can be calculated using this formula:
Code:
the min width =
[(number_of_cells) * 74] - 2
2x2
min widht = [2*74]-2 = 144
min height = 144 ! :)
so, fill in the details like this:
Now, the layout part of the widget is complete. What we want to do is the JAVA thing now. So, open up the MainActivity.java
Double click the java file and you will et something like this
since we Are making a widget, We cannot have Much functions in here. Unlike activities(which have loads of functions in it) widget restricts us to very few. So, we are not going to need all the stuff You are seeing in java file. so do one thing. delete all the things. Here is how it shoud look like:
Now, Since We are not making a regular activity, We are not going to extend activity. Now we are going to extend the "AppWidgetProvider"
Code:
public class MainActivity extends AppWidgetProvider {
Now "AppWidgetProvider" Does not allow "OnCreate" Methods. what we are allowed is onUpdate Method, Since this is going to be called every single time our widget updates (N/A in this widget, but still you have to write it)
In that method, start typing
Code:
onUpdate
now press ctrl+space (windows only)
You will have something like this:
Code:
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
// TODO Auto-generated method stub
super.onUpdate(context, appWidgetManager, appWidgetIds);
}
In this class you have to define everything. Now what we are going to do is we will have to define a for loop:
Code:
for(int i = 0; i<appWidgetIds.length; i++){
}
Now first thing in this for loop, we are gonna have to refer to our current appWidgetID. so,
Code:
int ID = appWidgetIds[i];
Done! now wahat we are goingg to do with this widget ??
ANS: We are going to launch a web site b opening our browser.
Okay, so how are we going to do it ??
Yes, exactly. like we did it before, we are going define an intent, like this:
Code:
Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse("URL_OF_YOUR_WEBSITE"));
Now, It still isnt going to launch anything. What we have to do, is, set a "PendingIntent".
A pending intent is actually an intent which gives access to, um, ur app (widget, in this case,). so, start typing in
Code:
Pending
press ctrl+space. name it what you want. then put " = " . again type "PendingIntent." and press ctrl+space and select this:
Code:
getActivity(context, requestCode, intent, flags)
Now, for context, it has olready defined in your context (onUpdate method).
requestCode = flags 0 (we aren't using them here)
and for intent, put your intents name like I've put in "in". it will look something like this:
Code:
PendingIntent pen = PendingIntent.getActivity(context, 0, in, 0);
NOW, SINCE THIS IS A WIDGET AND NOT A SIMPLE, REGULAR ACTIVITY, WE CAN'T USE THE "findViewById(id)" THING HERE, WE HAVE TO USE "RemoteViews" since these views are
in the widget and not public.
So, we are going to create new instance of this
type in,
Code:
RemoteViews view = new Re
and press ctrl+space an choose this:
Code:
RemoteViews(packageName, layoutId)
for package name:
for layoutId:
Code:
R.layout.activity_main
now, after this, like we set onClickListener, We have to set onClickPendingIntent
like this:
Now, give respective arguments in the brackets. The final thing should look like this:
Code:
view.setOnClickPendingIntent(R.id.imageButton1, pen);
NOW, Last thing. it is to set up an "appWidgetManager"
so, Start typing:
and give the respective arguments.
final MainActivity.java should look like this
It wil Never launch a browser yet,, think why ???
We havent yet given up the permissions yet !!!
So, open up the AndroidManifest.xml
Go to permissions tab, youll see something like this:
click on Add.
edit like this.
Click to expand...
Click to collapse
Now, its done. Lets start the emulator and Check this if it works !
Go to AVD Manager like this:
Start the AVD emulator.
click on run: and click on run again xD. Click on okay.
Bingo ! you have created aWidget !!
Audio/Video and multimedia
Audio
In this one, i will tell you how to use the "raw" folder to play audio(s) from the folder using MediaPlayer thingy. Okay. So now open up Eclipse. and start a new Android Project.
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part by adding a button to it and save it.
Now, in the project, right click on res folder, new>>folder. name the folder as "raw". THEY ALL SHOULD BE IN SMALLS. NONE OF THE LETTER SHOULD BE IN CAPS
Now, have a short mp3 file like the one in attachments, and drag it to the newly created folder.
Now, its all set, what our app will do is it will play that short mp3 file i the "raw" folder as soon as we press that button. Now, for that sake we are going to use MediaPlayer class. Open up the MainActivity.java fir this.
navigate to the .java files -->
Double click the java file and you will et something like this ( gibberish... if you dont like java like me )
we need to define the field and the "Button" from the first activity !
NOTE: as we advance in the tutorial, i will assume that you have done it from the start, hence i will not show such small things everytime, to make the tut short, sweet and simple. refer the first tutorial for this step.
It should look like this:
Code:
Button b = (Button) findViewById(R.id.button1);
Now that you have defined the button. Now you will have to set an OnClickListener for that button. so the it allows User to go to the second activity.
now start typing
b.setOnclick... press ctrl+space and choose onClickListener. It will automatically place you in the "()" type there --> new OnClickListener press ctrl+space. you will get something like this
you will get an error. so go to the place ( marked red in the pic and put a semi-colon )
now, in the following method,
Code:
public void onClick(View arg0) {
// TODO Auto-generated method stub
}
start typing the following
Code:
MediaPlayer mp = MediaPlayer.
press ctrl+space and choose this
It will automatically place you in "context".
NOTE:
context == "The java file that is creating the Intent";
resid == " The id of the resource (here, id of the mp3 file in the folder"raw")";
so, edit it this way
Code:
MediaPlayer mp = MediaPlayer.create(MainActivity.this, R.raw.beep);
NOTE:
MainActivity == "The java file that you are editing";
R.raw.beep == "Here , the name of the mp3 file in my "raw" folder is beep, it can be according to you";
So, we have just defined the mp class.
BUT, who is invoking it ?
Nobody, we need to invoke it ourselves. here, there is no relation or job to be done by "intent" like we did in earlier tutorials MediaPlayer class is totally different....
We need to do this in order to invoke.
Code:
mp.start();
NOTE:
mp == "the name that i gave to MediaPlayer object";
Code:
MediaPlayer [COLOR="SeaGreen"]mp[/COLOR] = MediaPlayer.create(MainActivity.this, R.raw.beep);
.
Click to expand...
Click to collapse
Save it and run it on your AVD
Now, its done. Lets start the emulator and Check this if it works !
Go to AVD Manager like this:
Start the AVD emulator.
click on run: and click on run again xD. Click on okay.
YAY ! it works !! click on that button
Click to expand...
Click to collapse
Video
In this one, I will tell you how to play video(s) which are already in your sdcard. Okay. So now open up Eclipse. and start a new Android Project.
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part by adding a button to it and save it.
Now, place a video in ur sdcard (wherever you want, will explain later).
NOTE:
Video should be in mp4 format, as android has built-in encoders for that.
Now, its all set, what our app will do is it will play that short mp4 video file in the sdcard as soon as activity is invoked. Now, for that sake we are going to use VideoView class.
Go to res/layout/activity_main.xml
Delete the text view and add a VideoView:
Save it
Open up the MainActivity.java like this.
navigate to the .java files -->
Double click the java file and you will see something like this ( gibberish... if you dont like java like me )
we need to define the VideoView class.
NOTE: as we advance in the tutorial, i will assume that you have done it from the start, hence i will not show such small things everytime, to make the tut short, sweet and simple. refer the first tutorial for this step.Its just like defining a button
It should look like this:
Code:
VideoView vv = (VideoView) findViewById(R.id.videoView1);
Now that you have defined the VV. Now you will have to set properties of the VV so that we can play the video and offer controls(rewind, play/pause, fast fwd) and etc.
now start typing
vv.setV... press ctrl+space and you will get something like this
choose that, and enter string path:
Code:
vv.setVideoPath("/sdcard/path/to/video.mp4");
note that the /sdcard is a must. it can also be written as /mnt/sdcard/ however. not all phones have this functionability.
so, its better to write /sdcard.
Since we need to have controls while playing the video, we need to instantiate that first, so,
Code:
vv.setMediaController(new MediaController(this));
Disstection:: MediaCOntroller, Name explains itself. since we didnt create the MediaController anywhere, we made a new controller
and passed in the context as "this"
-_- "java". lol
Now that we want to start it as soon as the activity is started.
we add this:
Code:
vv.start();
we also do not want the backlights to be down while playing the video so,
Code:
vv.requestFocus();
Save it and run it on your ACTUAL ANDROID DEVICE.
NOTE: Please do not test this on emulator.[/size]
Click to expand...
Click to collapse
Images and Camera
In this one, i will tell you how to use the Mediastore and device's camera to get the picture/photo from the camera. Okay. So now open up Eclipse. and start a new Android Project.
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part by adding a button to it and save it.
Now, its all set, what our app will do is it will click a picture using device's camera, and give you the picture. so, open up your main_activity.xml and delete the TextView. Add a button (which will initiate device's camera) and an ImageView (which will show you the pic that the user will click).
Then open up your MainActivity.java
navigate to the .java files -->
Double click the java file and you will et something like this ( gibberish... if you dont like java like me )
we need to define the field and the "Button" from the first activity !
NOTE: as we advance in the tutorial, i will assume that you have done it from the start, hence i will not show such small things everytime, to make the tut short, sweet and simple. refer the first tutorial for this step.
It should look like this:
Code:
Button b = (Button) findViewById(R.id.button1);
Now that you have defined the button. Now you will have to set an OnClickListener for that button. so the it allows User to go to the second activity.
now start typing
b.setOnclick... press ctrl+space and choose onClickListener. It will automatically place you in the "()" type there --> new OnClickListener press ctrl+space. you will get something like this
you will get an error. so go to the place ( marked red in the pic and put a semi-colon )
now, in the following method,
Code:
public void onClick(View arg0) {
// TODO Auto-generated method stub
}
Make an instance on Intent
Code:
Intent intent = new Intent();
now in the arguments, pass in "android.provider.MediaStore.ACTION_IMAGE_CAPTURE"
this allows us to actually launch the camera app(s) installed on the device. so as to
get a captured image.
Till now, we started intents just like starting any activity.
but in this particular case, we are starting another activity,
with an expectation of recieving some data back.
that is, result.
so, next, start typing "startAct...."
and choose this
Code:
startActivityForResult(intent, requestCode)
NOTE:
intent = "The Intent that we already created"; (since I've named it as "intent" , ill pass in
"intent")
requstCode == "we will not be using this, so, skip it, pass in a zero";
Code:
startActivityForResult(intent, 0);
now then, we are expecting a result.
so, we must set a reciever for it, right ?
lets do that first and then play with the ImageView
so, after the method, make a new method, start typing
Now, we have set the reciever.
now, we need to give an instance of ImageView.
so, declaration has to be before the onCreate method.
and definition can be in both the methods.
so, declare an ImageView outside the onCreate method
Code:
ImageView iv;
and in the onCreate method,
Code:
iv = (ImageView) findViewById(R.id.imageView1);
and lastly, in the onActivityResult method,
declare and define a bitmap, which will save the clicked pic.
Code:
Bitmap bm = (Bitmap) data.getExtras().get("data");
now, bm will save the clicked pic in itself.
and to display it, we use iv. so type in this:
Code:
iv.setImageBitmap(bm);
At The End, this is how the MainActivity.java should look like:
Code:
package com.example.camtut;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
public class MainActivity extends Activity {
ImageView iv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
iv = (ImageView) findViewById(R.id.imageView1);
Button b = (Button) findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 0);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
Bitmap bm = (Bitmap) data.getExtras().get("data");
iv.setImageBitmap(bm);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
[/hide]
Click to expand...
Click to collapse
Now, its done, Check this if it works !
P.S. do not use emulator for this, test it on actual device
Click to expand...
Click to collapse
https://www.youtube.com/watch?v=HpmjwddBdxY
Click to expand...
Click to collapse
Apology for the delay (over one year )
but I will start writing this off afresh will include something more too
stay tuned
Regards,
Nachiket.Namjoshi
Thank you all of you for your support...
Since there are MANY time issues right now,
I will be updating this guide whenever I get time...
I hope you all understand.
Reserved for GPS and stuff
Sent from my GT-S5360 using xda app-developers app
5 more to be reserved for the sake of finding them on one place
Sent from my GT-S5360 using xda app-developers app
4 more
Sent from my GT-S5360 using xda app-developers app
3 more
Sent from my GT-S5360 using xda app-developers app
2 more for really important stuff
Sent from my GT-S5360 using xda app-developers app
Done.... it's the last one
Sent from my GT-S5360 using xda app-developers app
great bro. You reserved a lot
thanks
The JRE and JDK link is not working. Also downloading the JDK alone contains the JRE package, and downloading JRE separately is not needed.
Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html (JDK6 is recommended to use with Android development, as JDK7 has compatibility issues)
coolsandie said:
The JRE and JDK link is not working. Also downloading the JDK alone contains the JRE package, and downloading JRE separately is not needed.
Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html (JDK6 is recommended to use with Android development, as JDK7 has compatibility issues)
Click to expand...
Click to collapse
Thanks bro... I did it from the xda app. So plz forgive...
Sent from my GT-S5360 using xda app-developers app
nice work on it....cool bro but update links
Related
Hi everyone, i'm new to Android development and i have a incovenient bug. Well, i used the 'Top-Down- method to fix all my requirements, but it misses this one. I'm trying to write data to a file, and to be able to access this data in a remote html in a webview. Although i managed to create the file, here's the code
Code:
File file = new File("data/data/com.template.WebViewTemplate/test.txt");
if (!file.exists()) {
try {
file.createNewFile();
WriteSettings(this,"setting0, setting1, setting2");
} catch (IOException e) {
e.printStackTrace();
}
}
and the test.txt file is empty.
I'd love to fix that issue that really bothers me, though i have to have done it by thursday evening ( here in France ), thanks a million ( please excuse my english i'm french )
First of all, path must start with /. And I'm not sure u can write here. Try /sdcard/text.txt location.
Also, try using FileWriter class. I think it'll be better.
Sent from my HTC Sensation using xda premium
Why not use shared preferences?
It looks like you are setting preferences guessing that's what you are doing but could be very wrong lol.
Pvy
Sent from my Galaxy Nexus using Tapatalk 2
jarj28 said:
Hi everyone, i'm new to Android development and i have a incovenient bug. Well, i used the 'Top-Down- method to fix all my requirements, but it misses this one. I'm trying to write data to a file, and to be able to access this data in a remote html in a webview. Although i managed to create the file, here's the code
Code:
File file = new File("data/data/com.template.WebViewTemplate/test.txt");
if (!file.exists()) {
try {
file.createNewFile();
WriteSettings(this,"setting0, setting1, setting2");
} catch (IOException e) {
e.printStackTrace();
}
}
and the test.txt file is empty.
I'd love to fix that issue that really bothers me, though i have to have done it by thursday evening ( here in France ), thanks a million ( please excuse my english i'm french )
Click to expand...
Click to collapse
Take a look at developer.android.com/guide/topics/data/data-storage.html, this contains some good documentation on how to use the various storage options. I sounds like you want either private internal or public storage.
Thanks to everyone for your replies !
As far i know, the file is created, i can look for it in /data/data/com.packagename/filename.txt. But it is empty :/
How can i use sharedprefs? Thanks a lot !
EDIT : I looked at the docs, but still can't get where to save the preferences
EDIT 2 : YEEEAAHHHH THANKS !!! I used
Code:
String FILENAME = "hello_file";
String string = "hello world!";
FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
Great !!! Now i face another problem, but maybe i'll do another thread. I need to access the file through my WebView, and i need to figure out how to save the data from a list of countries
jarj28 said:
Thanks to everyone for your replies !
As far i know, the file is created, i can look for it in /data/data/com.packagename/filename.txt. But it is empty :/
How can i use sharedprefs? Thanks a lot !
EDIT : I looked at the docs, but still can't get where to save the preferences
EDIT 2 : YEEEAAHHHH THANKS !!! I used
Code:
String FILENAME = "hello_file";
String string = "hello world!";
FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
Great !!! Now i face another problem, but maybe i'll do another thread. I need to access the file through my WebView, and i need to figure out how to save the data from a list of countries
Click to expand...
Click to collapse
EDIT 3 : Is there someone i can PM ?
This would be my second public-released xposed module...
(A duplicate thread is also posted in the Android Themes Section, so user who are only interested in themes can also see this)
I did not expect that my WisdomSky Xploit would be a big hit.
I'm just an Amateur developer who just started delving into android development 3months ago and I didn't expect that much appreciation from my work... XD
But all of these would not be made possible if not because of sir @rovo89 and sir @Tungstwenty and their Xposed Framework, right? That's why I thank them a lot...
REQUIREMENTS
Xposed framework must be pre-installed before installing this.
What does the ResXploit do?
ResXploit has two parts:
the Removable part, terminal
and the main star, engine
The terminal is where you enter the commands(I'll discuss it later). These commands will then be interpreted by the engine and then passed to Xposed framework...
Flow:
TERMINAL >> ENGINE >> XPOSED FRAMEWORK
I have provided a variety of modules:
ResXploit (Terminal + Engine) (RECOMMENDED FOR NEWBIES)
ResXploit Terminal (Terminal Only)(DEPRECATED)
ResXploit Engine (Engine Only)
You might be wondering why I made one which has both terminal and engine... and other two which are separated...
ROM Chefs, Themers and some others would understand directly why...
All the commands are interpreted by the Engine right? so that would mean that once you have entered all the desired commands, the terminal will now end up as useless... so you will just delete so no one can touch the engine...
If you are a ROM Chef or a themer, you can theme all the apps you need to theme using ResXploit and then remove the terminal, so end-user interaction of the engine is prevented after you have released your ROMs to the world.
FOR NEWBIES!
I recommend you to use the ResXploit (Terminal + Engine)...
It is very smart..
I included 99% accurate error-checking system,
line numbering system,
and also Xposed module prioritization(which is first implemented on ResXploit for better module performance).
COMMANDS
We have four basic commands in the ResXploit, the apk, drawable, string, and boolean.
apk - A prerequisite command. This command is very vital whenever you using the ResXploit. This will define the target application by using the package name of the target application. You need to include this before you enter any command or else your command will not know which application is targeted and end up in lost island.
Code:
[B]format[/B]: [I]apk <package name>[/I]
[B]example[/B]: apk com.android.systemui
drawable(also drw) - The most often used command. The command which will change icons/images (png drawables) of an application. You can either overlay the existing image with your favorite color or completely replaced it with a .png image from your sdcard.
Code:
[B]format1[/B]: [I]drawable <target application's drawable name> <image path, no need to include /sdcard> <transparency, 0 to 255>[/I]
[B]example1[/B]: drawable status_bar_background bg.png 255
[B]format2[/B]: [I]drawable <target application's drawable name> <HEX RGB color code> <transparency, 0 to 255>[/I]
[B]example2[/B]: drawable status_bar_background #fff00ff 255
string(also str) - This command will change string(text) values of the application. The predefined string values are usually located in res/values/strings.xml of an application, but I guess they are not visible when you view the contents of an application using Archive managers like RootExplorer. But there is a way to identify them. I will include it later.
Code:
[B]format[/B]: [I]string <target application's string value holder name> <replacement string>[/I]
[B]example[/B]: string app_name My App
boolean(also bln) - This command will change boolean values of the application. The predefined boolean values are usually located in res/values/bools.xml of an application, but I guess they are not visible when you view the contents of an application using Archive managers like RootExplorer as well.
Code:
[B]format[/B]: [I]boolean <target application's boolean value holder name> <replacement boolean value, either [B]true[/B] or [B]false[/B] only>[/I]
[B]example[/B]: boolean allowNumberNotifications true
Some simple examples screenshots:
drawable and string commands in action
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ResXploit UI screenshots:
If you find my ResXploit module interesting,
Please hit THANKS!!! XD:angel:
UPDATES & CHANGELOGS:
ResXploit Engine 1.0.8 - added support to framework-res(android).(latest)
ResXploit 1.0.8 - updated engine(1.0.8).(latest)
NOTICE: ResXploit is now an abandonware.
My flash drive where I stored the sources of my android projects was corrupted unexpectedly.
And also, my phone was broken. I have no device to use to re-write everything from scratch... Sorry...
Tutorial and samples
System Apps Package Names:
SystemUI - com.android.systemui
Settings - com.android.settings
Mms - com.android.mms
Contacts - com.android.contacts
Launcher - com.android.launcher
Gallery - com.android.gallery3d
File Explorer - com.android.qrdfileexplorer
Framework-res - android
Tip: If you want to find the package name of a specific application(not on the list), you can open Root Explorer(download it from googleplay) and then browse the apk you want to check, open it and choose "view". You can find AndroidMaifest.xml file inside. Open it then find the package="xxxxxxxxxxx". The words or group of words inside the quotations separated by a period is the package name of that application.
Note: ResXploit is far safer(in terms of error awareness) to use than the ResXploit terminal. If possible, only use ResXploit. In the simple tutorials below, please expect that I'm referring to ResXploit only.
Changing Statusbar background color
let's say color red...
Code:
#!/
apk com.android.systemui
drawable status_bar_background #ff0000 255
Changing Notifications Panel background color into transparent
Code:
#!/
apk com.android.systemui
drawable notification_panel_bg #000000 0
Changing Notifications Panel background with an image from sdcard
let's say that the png image is located in /sdcard/my_img.png
Code:
#!/
apk com.android.systemui
drawable notification_panel_bg my_img.png 255
You might be wondering where i'd get the target application's drawable filename?
Actually, you can just open the root explorer and view the files inside the apk of the target application. under the /res directory(folder), you can find a variety of subdirectories prefixed with [drawable, like drawable-hdpi,drawable-mdpi and so on... Basically, all images inside those folders are under the scope of drawable command in Resxploit. And if you want to target a certain image in the drawable folders, you just need to get the file name without the .png or .9.png. That's it!
Adding "comments"...
Comments in programming are human-readable additional information. If you want to put notes somewhere in your script, you can put "#" before your statement. When the terminal find a "#" before a statement, the terminal will ignore it and skip it. However if you will enter a non-command information and is not started withcl a "#", the terminal will ofcourse read it as command and then throws an error message.
Code:
#!/
# my comment. my comment. my comment
apk com.android.systemui
drawable status_bar_background #ff0000 255
# the terminal will skip the command below
# because it started with a "#"
#drawable oh_no #ff00ff 255
Defining working directory path of your images
If you want to start theming and you already have the images you want to use stored inside a single folder, then you can tell the terminal where these images are located so you don't need to enter the path redundantly.
You can define it on the very first line of ResXploit, after the "#!/" you can add the folder name or path to the folder.
let's say we have our images put in a folder in sdcard named my_images or /sdcard/my_images, then you can define it like this.
Code:
#!/my_images
#we can start theming now
drawable hello some_image.png 255
drawable world next_image.png 255
great work dude...noypi are very smart of course,,
Very interesting. I've been interested in theming for a while now but haven't gotten my feet wet. I'll be waiting for your tutorials. Great work mate!
Sent from my Galaxy Nexus
Nice! I love to see Pinoys In-Action with the XDA community!
Will wait for the tutorial of yours repa!
@greedisgood99999 Please stop that bad-habit of quoting... It's quite irritating tropa...
Wait for the tutorial
Sent from my Xperia Mini Pro
So ... a scriptable general purpose module. This is a phenomenal idea. OK still requires digging into the apk but a whole lot easier than building a new module from scratch.
Mission: Get rid of Armv7 calls the FC apps on my old clunker (also need help buying a new phone--if I had it, would have reserved the edge already!). Google Now first tries to init the "off line" voice recognition engine. Minimum, want to simply disable this call. I use overlays to prevent other such calls. Maximal, to replace with the old "on line" voice recognition engine.
Capability in this yet?
Among the booleans?
what say you
Dovidhalevi said:
So ... a scriptable general purpose module. This is a phenomenal idea. OK still requires digging into the apk but a whole lot easier than building a new module from scratch.
Mission: Get rid of Armv7 calls the FC apps on my old clunker (also need help buying a new phone--if I had it, would have reserved the edge already!). Google Now first tries to init the "off line" voice recognition engine. Minimum, want to simply disable this call. I use overlays to prevent other such calls. Maximal, to replace with the old "on line" voice recognition engine.
Capability in this yet?
Among the booleans?
what say you
Click to expand...
Click to collapse
i don'think so... because ResXploit's scope is only the res or resource directory of the apk structure...
if a boolean value is defined in the res/values/bools.xml that will actually toggle controls then it would be great... but i think, in your case it is deeply hard-coded to work like that...
Framework.res?
Can you theme the framework.res using this?
package name is only 'android' no com. or anything..
EDIT: Tried and it seems to go through ok, but nothing seems to change. Rebooted several times, changed an image in my keyboard, checked it was ticked in Xposed framework, setup a folder in my internal storage, checked superuser granted access, pressed high priority in settings. Don't know
Here's a debug log (uploading tomorrow, pc occupied)
Will this work for non system apps? The unlock button on the PowerAmp lock screen drives me insane because it's the only thing I can't change and I absolutely hate green.
Metallijim said:
Can you theme the framework.res using this?
package name is only 'android' no com. or anything..
EDIT: Tried and it seems to go through ok, but nothing seems to change. Rebooted several times, changed an image in my keyboard, checked it was ticked in Xposed framework, setup a folder in my internal storage, checked superuser granted access, pressed high priority in settings. Don't know
Here's a debug log (uploading tomorrow, pc occupied)
Click to expand...
Click to collapse
I'm so sorry for that...
in exposed, framework-res(android) uses different method...
so i forgot to implement it fo support the framework-res...
thanks for your feed back. I'll add it up and upload it later...
Rokonacdc said:
Will this work for non system apps? The unlock button on the PowerAmp lock screen drives me insane because it's the only thing I can't change and I absolutely hate green.
Click to expand...
Click to collapse
Ofcourse! it will work with non-system apps too... XD
This looks very promising, thank you for your work!!
here's a Debug
Here's my Debug log
Xperia Z 4.2.2, Images in internal storage, Xposed priority set low, all other xposed modules that I have installed disabled
Metallijim said:
Here's my Debug log
Xperia Z 4.2.2, Images in internal storage, Xposed priority set low, all other xposed modules that I have installed disabled
Click to expand...
Click to collapse
sir l've already added support for framework-res, please check the changelogs for the download link...
Interesting, sounds like a concept similar to Ninjamorph.
A couple of quick questions:
Is this able to apply folders or just single png's?
Also do you need extract png's from apks in order to apply or does it extract and apply automatically?
:good:
dully79 said:
Interesting, sounds like a concept similar to Ninjamorph.
A couple of quick questions:
Is this able to apply folders or just single png's?
Also do you need extract png's from apks in order to apply or does it extract and apply automatically?
:good:
Click to expand...
Click to collapse
Unlike ninja morph, in resxploit, there is no permanent replacing of resources happened... which means you can deactivate, share, edit easily anytime....
Q: Is this able to apply folders or just single png's?
A: only single pngs... 1 drawable command = 1 png... but there is no limitation on how how many commands you can add
Q: Also do you need extract png's from apks in order to apply or does it extract and apply automatically?
A: As what I've added on the title, "No decompiling APKs"... it means, no decompiling or extracting is involved in the process as what Xposed Framework aimed. You just need to put the image to replace inside your sdcard and just add a command to tell the engine "to replace that with this"... there is no permanent replacing of resources happened here... the image is just move into the /data partition and will be just overlapped to the target resource so there will be an impression of replacing of resources
I didnt mean does it decompile/extract full apks. I meant can you pull an resource/image out of the apk to apply.
I know it overlays instead of permanently overwriting the original resource, similar to Icon themer and XTheme engine.
Ninjamorph/ Metamorph unzips apks into folders so you can navigate through them and choose what you want to apply.
Example:
Choose target resource/image to change.
Choose apk to pull resource/image from.
Navigate and choose resource/image (extract if applicable) to apply.
This would be good if it also done the same. Although you could just unzip with an on board app like Zarchiver.
Basically it would make it a new and improved Ninjamorph/ Metamorph (dont tell Stericson i said that)
No offense, but looking at it from newbies point of view, it seems like a bit of a drawn out process if you were wanting to change numerous items.
I know it's early days and I'm sure this would be greatly improved with a GUI, if you decide to add one.
Personally speaking, i think this has massive potential and could be something very special. I applaud you, i wish i had your talent.#
Thanks.
I tried clicking on the changelog link, it gave an error "Invalid Attachment specified. This can happen for a variety of reasons-- most likely because the thread or post you are trying to view has been moved or deleted. Please return to the forum home and browse for another similiar post."
Not sure if its the file attached to the post that is the updated one or if the actual update got deleted. Please help me here
phanitej said:
I tried clicking on the changelog link, it gave an error "Invalid Attachment specified. This can happen for a variety of reasons-- most likely because the thread or post you are trying to view has been moved or deleted. Please return to the forum home and browse for another similiar post."
Not sure if its the file attached to the post that is the updated one or if the actual update got deleted. Please help me here
Click to expand...
Click to collapse
Oh sorry for that.. ill just upload it to a third party site and add the link...
thnx for reminding...
dully79 said:
I didnt mean does it decompile/extract full apks. I meant can you pull an resource/image out of the apk to apply.
I know it overlays instead of permanently overwriting the original resource, similar to Icon themer and XTheme engine.
Ninjamorph/ Metamorph unzips apks into folders so you can navigate through them and choose what you want to apply.
Example:
Choose target resource/image to change.
Choose apk to pull resource/image from.
Navigate and choose resource/image (extract if applicable) to apply.
This would be good if it also done the same. Although you could just unzip with an on board app like Zarchiver.
Basically it would make it a new and improved Ninjamorph/ Metamorph (dont tell Stericson i said that)
No offense, but looking at it from newbies point of view, it seems like a bit of a drawn out process if you were wanting to change numerous items.
I know it's early days and I'm sure this would be greatly improved with a GUI, if you decide to add one.
Personally speaking, i think this has massive potential and could be something very special. I applaud you, i wish i had your talent.#
Thanks.
Click to expand...
Click to collapse
thanks for the appreciation and to your suggestions...someone did suggest to me to add GUI...
I'm still a newbie in terms of androld... there's so much to learn first before I can fully implement whats on my mind...
My phone is also not that good for development... its so slow... XD
but if everything turns out good... then maybe I should reconsider...XD
WisdomSky said:
Oh sorry for that.. ill just upload it to a third party site and add the link...
thnx for reminding...
thanks for the appreciation and to your suggestions...someone did suggest to me to add GUI...
I'm still a newbie in terms of androld... there's so much to learn first before I can fully implement whats on my mind...
My phone is also not that good for development... its so slow... XD
but if everything turns out good... then maybe I should reconsider...XD
Click to expand...
Click to collapse
Which phone do you use?
[APP][ENGINE][2.3.6+][Xposed] Resflux - A powerful and very easy to use per-application theming module.
Resflux
--------------------------------------------------------------------------------------------------
Do you want to THEME your phone easily, without learning how to do it?
Then you are in the right place!!!
Resflux is very straight-forward. It's very easy to use. You don't need to learn anything just to get started. All you need is your common sense. Once you launch the application, you will see very big buttons with one-word description of what that button will do.
And I forgot to tell you that Resflux supports Gingerbread 2.3.6 and up! yeah you heard it right!
Just use the ported version of xposed installer for gingerbread users...
What else can I do with Resflux?
Tons! All you need is the idea!
- Theming an app or all of your apps.
- Replacing icon and name of your apps.
- Translating app from one language to another
- Overriding default settings inside frameworl-res.apk, settingsprovider.apk and systemui.apk
- and many more posibilities!
Laboratory
The laboratory is where most things will happen. It is where you start theming resources of a specific package. You can theme as many as packages if you want.
After you have selected the target package, Resflux will redirect you to the Experiment area where you can see five buttons namely "Drawable", "String", "Color", "Boolean" and "Integer" though you can only see their icons.
When you click a tab, the list will be populated with the corresponding resources and their current values are even shown so you can tell if it is what you are looking for and trying to replace.
Drawable Tab
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In the Drawable tab, previews of every drawables are shown and by clicking the selected drawable, you can replace it with a new one.
This is replacement drawable chooser dialog
String Tab
In the String tab, you can take a look at the list of all string resources in an apk. The current value is shown in each string resource and you can replace the value with a new one if you want by clicking it.
Color Tab
In the color tab, all the color resources are listed and the preview of each color is also shown. You can replace it with a new color using the HoloColorPicker dialog.
Boolean Tab
In the boolean tab, you can see all the boolean resources of an apk. Boolean is type where its value is only true or false. You can also change it anytime just like the other resources.
Integer Tab
The integer tab is new in Resflux, since the old Resxploit only supported Drawable, String, Color and Boolean.
Export
If you plan to distribute your work or do a back-up or share it to your friend, then you can export it anytime. You can select which packages you want to export and which are not to be included.
From there, you can also completely, remove all modifications made to a specific package by long-pressing the target package.
Import
If you have exported a mod or got it somewhere and you want to upload it into your Resflux, then all you need to do is to put the zip file inside /sdcard/Resflux. By putting it inside /sdcard/Resflux, Resflux will quickly find it, but you can still leave it in other directories as Resflux will also search the other directories inside your sdcard.
Download Link:
http://repo.xposed.info/module/com.iwisdomsky.resflux
Please leave FEEDBACKS or SUGGESTIONS
And don't forget to hit Thanks if you find it useful!
Change logs:
Code:
1.6.1
- Replaced AAPT with ResourceFileParser library
(This will fix resflux compatibility issue with Kitkat and Lollipop. Marshmallow is yet to be tested. This change also causes resflux mapping of resources to becoming 2-10x faster than before)
[B]REMOVE:[/B]
[COLOR="Red"]1.7
- support for kitkat and above.
- faster mapping of resources (the mapping of resources will be done in the cloud)
- requires internet connection.
- 3x lesser apk file size.[/COLOR]
1.6
- Disabled xposed installed check on app start.
1.5
- UI updates.
1.4
- fix for colors not working issues.
- fix for double "#" on color resource's values.
- minor ui updates.
1.3
- The scroll position will remain and will not jump to the top when resetting/restoring a resource's value.
- Resflux Compiler link
1.2
- Fixed the resource name bug where an exclammation mark will appear before the modified resource's name.
- Forced the screen orientation of the Experiment area to stay in Portrait mode to avoid crashes when accidentally changed your phone's orientation.
- Added a possible fix for crashes on Import area.
- Increased the minimum width of dialogs to occupy some extra space on phones with bigger screen.
- Added labels to the tab buttons in the Experiment area.
- Updated the modified resource high-lighting feature for better visibility.
- Fast scroll enabled. Useful when you are trying to find a specific resource in the list quickly.
- Hold press a modified resource to restore its original value back.
- Clear cache action. If an installed app has received an update, it is a good practice clear the package's cache in Resflux so all changes to the resources to the updated app will become visible to Resflux.
- Added ability to supply a specific hex value to the color picker dialog as requested by many.
- Drawable picker dialog has been completely removed and replaced with an image chooser intent which will open the Gallery by default.
- When on drawable tab, you can change the drawable image preview's size by pressing the MENU key of your phone. Take note, this will not actually reflect to the final result but only to the previews.
- Other few minor UI changes.
1.1
- resource caching system for faster consecutive access.
- high-lighting of the modified resources to distinguish changes.
- added large heap attribute to the application element inside the android manifest file.
- empty package mods cleaner for the packages directory of Resflux.
1.0
- Initial release
Disclaimer
Though Resflux can modify any application, it is not guaranteed that it is can successfully modify all applications.
XDA:DevDB Information
Resflux, Xposed for all devices (see above for details)
Contributors
WisdomSky
Xposed Package Name: com.iwisdomsky.resflux
Version Information
Status: Stable
Current Stable Version: 1.5
Current Beta Version: 1.0
Beta Release Date: 2014-06-22
Created 2014-06-22
Last Updated 2014-08-03
How to use:
STEP 1: First, open Resflux then click Laboratory.
STEP 2: Next you need to choose the application you want to modify from the list and then click it.
STEP 3: Once you have clicked an application, Resflux will start mapping it's resources, you need to wait until it is finished before you can start.
STEP 4: If the mapping of resources has finished, you can now start changing any resource from the list. They are actually categorized as Drawable(Images), String(Texts), Color, Boolean(Switch) and Integer(Number)
STEP 5: Once you're done, you need to reboot your phone in order for the changes to take effect.
Sample Scripts
Disables Low Battery Warning notification
http://upfile.mobi/575226
System Font color changer (you need to extract the zip first then choose the zip of your fave color)
http://upfile.mobi/575213
NOTE: To install the scripts, you need to put all of them inside /sdcard/Resflux folder in your sdcard and then open Resflux and select Import and choose the file.
Reboot your phone afterwards to apply changes.
Resflux is proven working on these devices:
Motorola Moto G running Stock KitKat 4.4.2
S4 i9505 LTE running C-RoM 7.1 KitKat 4.4.4
Samsung Galaxy Y S3560 running Hyperion 8 GM Final Gingerbread 2.3.6
Cherry Mobile Flare S running Stock JellyBean 4.1.2
Cloudfone Thrill 430x running Stock JellyBean 4.1.2
Samsung Note Pro 12.2 tablet
HTC M8 running GPE KitKat 4.4.3
Samsung Note 2 running Touchwiz KitKat 4.4.2
Samsung S4 Mini
Xolo A500 running IceCreamSandwich 4.0.4
If Resflux is working on your device, please post your phone brand and model. thanks!
Special Thanks
I would like to thank everyone especially @rayjr13 for keeping the Resflux thread alive and answering all questions of other resflux users. Thank you very much! :good::good::good:
I would also like to thank all who donated! Please send me your names.
Source Code
Link.
Paypal Donations
If you have a very nice heart and want to make my wish come true, please don't hesistate to send your donations to my paypal account: [email protected]
Scripting
(For themers and programmers)
Apart from the Laboratory where users are provided with user-friendly interface, there is an another way to make modifications and that is by using the scripting feature of Resflux.
Soon, I will be focusing on adding more features to it. One is providing support for layouts. Not the whole layout, but to the components inside defined with an id.
When you export packages mod in Resflux, you will be given a zip file. And when you look inside it, you will actually find atleast a Resflux.ini file. And when you look inside the Resflux.ini file, you will see how Resflux turn everything into series of keys, sections, comments and how they are arranged.
The structure of the Resflux.ini complies with of an INI file as defined here:
http://en.m.wikipedia.org/wiki/INI_file
From the INI File wiki page, you can learn about which one is a key, section or comment.
From it, you may start studying how to write your own.
If you are a programmer, you may find it very easy to understand on how it works. And you can see that you are like dealing with objects. For now, we only have drawable, string, color, boolean, integer, layout, resflux and ini.
Rules
Resflux have rules in when it comes to syntax, grouping and arrangement.
RULE 1: The Resflux.ini can contain only keys, sections, comments and blank lines(with space or not) and should follow their corresponding syntax and must occupy a line therefore two keys in a single line is not honored.
For comments:
Code:
# [any text here]
; [any text here]
For sections:
Code:
[package.name.here]
For keys:
Code:
object.property_name = value
object.property_name : value
For blank lines:
A an empty line or composed of whitespaces.
If an invalid syntax is found, resflux will return error status 0
RULE 2: All resflux.* must be grouped together and must be placed before sections and any other keys except comments.
When this rule is violated, Resflux will return Error Status 1 during an attempt of importing it.
Rule 3: ]: All ini.* must be grouped together and must be placed after resflux.* and before sections and any other keys except comments.
When violated, it returns error status 2.
Rule 4: Before starting defining a key, you must have atleast defined a section. A section is composed of a opening square bracket "[", followed by the package name of the target app, and then a closing square bracket "]".
For example:
Code:
[com.my.app]
Rule 5: Each key must follow their respective value's format.
For drawable:
it could be a PNG image relative path like:
Code:
drawable.ic_launcher = icon.png
# or it could be also a color hex code:
drawable.ic_launcher = #ffff0000
For color:
color can have a single possible format for its value.
Code:
color.bg_color = #ff0000
For boolean:
boolean can only have two choices, the value could be either true or false.
Code:
boolean.enable_nothing = true
boolean.enable_nothing = false
For string:
string can have any value.
Code:
string.app_name = anything you want!!!
# enclosing value with quotes is also fine and work with all types of keys
string.app_name = "!want you anything"
OMG! the first themeing engine for gingerbread! many thanks sir! much appreciated it! :good:
i'm gonna try it soon & report back.
Two quick questions:
Will you upload this to the Xposed repo?
Do you plan on making the source available?
Thanks
GermainZ said:
Two quick questions:
Will you upload this to the Xposed repo?
Do you plan on making the source available?
Thanks
Click to expand...
Click to collapse
Thnx for the reminder sir...
I've uploaded it to the Xposed Repo.
I'm also planning to make it open sourced, but I still need to fix some things up. XD
Excelent work.
Enviado desde mi LG-D802 mediante Tapatalk
Has anyone been able to use this with Hangouts at all? It seems to never get past the "Mapping Resources" screen...
EDIT: Maybe I'm just not waiting long enough. Is it normal for it to take more than 10 minutes to map resources for some apps?
GermainZ said:
Two quick questions:
Will you upload this to the Xposed repo?
Do you plan on making the source available?
Thanks
Click to expand...
Click to collapse
mattdm said:
Has anyone been able to use this with Hangouts at all? It seems to never get past the "Mapping Resources" screen...
EDIT: Maybe I'm just not waiting long enough. Is it normal for it to take more than 10 minutes to map resources for some apps?
Click to expand...
Click to collapse
It really depends... if the /res dir contents of the apk file is really big for example (more than 1k resources) then it should take some considerable time... and it will also depend on ur phone's processing power...
I tested the framework-res.apk with a quad-core phone(not mine) and it took more than 30secs...
and when I tried it with my Samsung Galaxy Y, it took almost a lifetime...
WisdomSky said:
It really depends... if the /res dir contents of the apk file is really big for example (more than 1k resources) then it should take some considerable time... and it will also depend on ur phone's processing power...
I tested the framework-res.apk with a quad-core phone(not mine) and it took more than 30secs...
and when I tried it with my Samsung Galaxy Y, it took almost a lifetime...
Click to expand...
Click to collapse
Yeah, I let it go even longer, and it finally finished. I'm on an S4 Mini, which only has a dual-core Snapdragon 400.
Now my other problem is that when I look in the drawables of Dialer or Camera, there doesn't seem to be any launcher icon in the list. (I'm running an AOSP-based rom, FYI)
mattdm said:
Yeah, I let it go even longer, and it finally finished. I'm on an S4 Mini, which only has a dual-core Snapdragon 400.
Now my other problem is that when I look in the drawables of Dialer or Camera, there doesn't seem to be any launcher icon in the list. (I'm running an AOSP-based rom, FYI)
Click to expand...
Click to collapse
I believe the Camera is part of Gallery.apk and the Dialer is on Phone.apk
WisdomSky said:
I believe the Camera is part of Gallery.apk and the Dialer is on Phone.apk
Click to expand...
Click to collapse
Ohhhh, right. Now I feel dumb. This is an awesome module, I'm gonna have fun with it!
I'd like to offer a UI suggestion if I may though. Some of the lists are very long, and they scroll very slow on my phone. How about enabling a draggable scroll bar on the lists, so we can jump down to the bottom quickly?
mattdm said:
Ohhhh, right. Now I feel dumb. This is an awesome module, I'm gonna have fun with it!
I'd like to offer a UI suggestion if I may though. Some of the lists are very long, and they scroll very slow on my phone. How about enabling a draggable scroll bar on the lists, so we can jump down to the bottom quickly?
Click to expand...
Click to collapse
someone actually granted your wish already...
http://forum.xda-developers.com/xposed/modules/mod-force-fast-scroll-force-listviews-t2785006
WisdomSky said:
someone actually granted your wish already...
http://forum.xda-developers.com/xposed/modules/mod-force-fast-scroll-force-listviews-t2785006
Click to expand...
Click to collapse
Oh, nice! Thanks for pointing that out.
New problem...I changed the Hangouts launcher icon, but it's not actually changing after I restart. Any idea why this might be?
mattdm said:
Oh, nice! Thanks for pointing that out.
New problem...I changed the Hangouts launcher icon, but it's not actually changing after I restart. Any idea why this might be?
Click to expand...
Click to collapse
have you check the resflux in the xposed installer?
are you using samsung's default launcher?
coz I think it caches the packages' icon that's why u can't see the changes...
WisdomSky said:
have you check the resflux in the xposed installer?
are you using samsung's default launcher?
coz I think it caches the packages' icon that's why u can't see the changes...
Click to expand...
Click to collapse
Yes, I have it checked in the Xposed Installer. No, I'm using the Google Now Launcher (running SlimKat). The xSuite module also has trouble changing the Hangouts icon...there must be something different about it than other apps.
Great
Enviado desde mi unknown mediante Tapatalk
mattdm said:
Yes, I have it checked in the Xposed Installer. No, I'm using the Google Now Launcher (running SlimKat). The xSuite module also has trouble changing the Hangouts icon...there must be something different about it than other apps.
Click to expand...
Click to collapse
does resflux works fine with the other apps?
WisdomSky said:
does resflux works fine with the other apps?
Click to expand...
Click to collapse
Actually, I'm not sure. It's taking me quite a long time to test...I haven't been able to find a launcher icon to try to change in Phone, Dialer, Camera, Gallery, or Chrome. And each time I try a new app, it takes 5 - 10 minutes to map the resources. I'll find a small app to try and let you know...
EDIT: Ok, I just tried changing the icon of Buildprop Editor, and it worked perfectly.
Hi, i bough a chinese tablet a few weeks ago.
I didnt intalled anything bad or risky in it.
And this night i got unexplicable popups, adds and applications that i didnt installed.
The source of this activity was a app called com.android.server and com.android.popupreciver
I unistalled them and then i rebooted my tablet, then i got a message saying DEMO.
I heard that the only way to solve this is a hard reset, but i would like to know if there is something else i can do.
=====
Else, i would like to know if there is any ROM compatible for a 7" chinese tablet.
Removing Demo mode from Chinese tablets
I have one of these and have not been using it for a long time due to all the unwanted ads and being unable to figure it out. The other day I decided to give it another try and this is what I found:
A lot of these cheap tablets comes with a trojan and on my A23 Q8H 7" tablet it was in CloudsService.apk. If you remove it the tablet will show big red "Demo" letters across the screen. This comes from the SystemUI.apk and when I decompiled it I saw the following:
Code:
private void showDemoOverlay() {
TextView textview = new TextView(this);
textview.setText("Demo");
textview.setTextSize(180F);
textview.setGravity(17);
textview.setBackgroundColor(0);
textview.setTextColor(0xffff0000);
android.view.WindowManager.LayoutParams layoutparams = new android.view.WindowManager.LayoutParams();
layoutparams.type = 2006;
layoutparams.width = -1;
layoutparams.height = -2;
layoutparams.gravity = 17;
layoutparams.format = textview.getBackground().getOpacity();
layoutparams.flags = 24;
((WindowManager)getSystemService("window")).addView(textview, layoutparams);
}
The above function in SystemUIService.java is indirectly called by this one
Code:
private boolean hasOTAServer() {
android.content.pm.PackageInfo packageinfo;
try {
packageinfo = getPackageManager().getPackageInfo("com.clouds.server", 0);
}
catch (android.content.pm.PackageManager.NameNotFoundException namenotfoundexception) {
packageinfo = null;
namenotfoundexception.printStackTrace();
}
return packageinfo != null;
}
So in short all it does is look for is a package called com.clouds.server and if it doesn't find it the Demo is displayed.
The solution is to create a blank app in Android studio, make sure the package name is com.clouds.server and then install it on the device.
Now this I call informed investigation! I was trying to get rid of the trojan on a chinese tab and after removing at least 5 apps and rebooting i got the DEMO overlay.
I found a blog post dealing with the same problem and this person provided an APK to install (I checked it via virustotal and it came back clean): cmcm.com/article/share/2015-11-09/840.html
How did you find out it was the SystemUI.apk showing the overlay? Or was it just an educated guess? I tried finding the app via dumpsys but couldn't see anything...
P.S.: THANKS!!
Surrogard said:
Now this I call informed investigation! I was trying to get rid of the trojan on a chinese tab and after removing at least 5 apps and rebooting i got the DEMO overlay.
I found a blog post dealing with the same problem and this person provided an APK to install (I checked it via virustotal and it came back clean): cmcm.com/article/share/2015-11-09/840.html
How did you find out it was the SystemUI.apk showing the overlay? Or was it just an educated guess? I tried finding the app via dumpsys but couldn't see anything...
P.S.: THANKS!!
Click to expand...
Click to collapse
It has been a while but if you extract all the APK files and run grep on them you should be able to find the one you are looking for. You can then decompile the APK to have a look at the source code. Another way would be to remove the apps one by one and reboot each time. When you find the APK which causes the Demo mode to be activated just replace it with a blank APK file with the same package name and it should be good. If that does not work then it could be that the tablet checks for more things which means you'll have to go with option 1. I would also not trust virustotal with this as there are many reasons why it could return a false result and it does not take too much skills to bypass virustotal checks.
The solution!
Just install a clean CloudsService.
Normal_CloudsService.apk
Mirror1: https ://drive .google .com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view?usp=sharing
Mirror2: https ://drive .google .com/file/d/0B65Tvd8zpsRPOFNLY2NTRVMxckU/view?usp=sharing
VirusTotal: https ://www .virustotal .com/en/file/a014b81ce3cbee336a705eb54a0d6081038d67cc34b65688304a3ee41861903a/analysis/1455333414/
cheers
ofernandofilo said:
Just install a clean CloudsService.
Normal_CloudsService.apk
Mirror1: https ://drive .google .com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view?usp=sharing
Mirror2: https ://drive .google .com/file/d/0B65Tvd8zpsRPOFNLY2NTRVMxckU/view?usp=sharing
VirusTotal: https ://www .virustotal .com/en/file/a014b81ce3cbee336a705eb54a0d6081038d67cc34b65688304a3ee41861903a/analysis/1455333414/
cheers
Click to expand...
Click to collapse
Thank you!
Note that you might need to do
adb uninstall com.clouds.server
before you will be able to install this one if you get "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]"
it works
I JUST INSTALLED THE APK POSTED IN THE FIRS LINK ... AND IT WAS MY SOLUTION..... I DO IT TO ZEEPAD 7DRK
---- drive.google.com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view#! -------
GREETENGS FROM MEXICO LEON GTO
....my english is bad .. i know i know.... jajajaj lool
Hi,
how can i Set Chrome User Agent to Desktop or chromebook on Android 7.x ?
Old User Agent Apps won't work on 7.x
I need to Set Chrome to Desktop view always on
Put a file in Data/Local called 'chrome-command-line', put this text in
chrome --user-agent="Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36" -force-device-scale-factor=2
Permissions 644, you can change the scale-factor to suit.
Sorry but this is Not working anymore on 7.x
Nobody ?
Just wanted to bump this as I'm also looking for a solution.
This has been bugging me for for a few days, very frustrating, seems like Chrome doesn't read the command line files in Nougat no matter where they are located, what they are called, or how you invoke the application. So I did the next best thing...
I grabbed the latest Chromium source code and modified user_agent.cc so it spits out a desktop UA instead. Cross compiling was a bit of a lengthy process, around 4 hours, but it works perfectly. The code alteration was quite trivial, I know this doesn't really help anyone here with a quick fix, and I really can't see Google adding a permanent desktop mode any time ever.
To make the change, just edit the following and rebuild:
<path>/src/content/common/user_agent.cc
PHP:
std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
const std::string& product) {
// Derived from Safari's UA string.
// This is done to expose our product name in a manner that is maximally
// compatible with Safari, we hope!!
std::string user_agent;
// base::StringAppendF(
// &user_agent,
// "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d",
// os_info.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR,
// product.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR);
// return user_agent;
return "<Insert desired user agent here>";
}
dtchky said:
This has been bugging me for for a few days, very frustrating, seems like Chrome doesn't read the command line files in Nougat no matter where they are located, what they are called, or how you invoke the application. So I did the next best thing...
I grabbed the latest Chromium source code and modified user_agent.cc so it spits out a desktop UA instead. Cross compiling was a bit of a lengthy process, around 4 hours, but it works perfectly. The code alteration was quite trivial, I know this doesn't really help anyone here with a quick fix, and I really can't see Google adding a permanent desktop mode any time ever.
To make the change, just edit the following and rebuild:
<path>/src/content/common/user_agent.cc
PHP:
std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
const std::string& product) {
// Derived from Safari's UA string.
// This is done to expose our product name in a manner that is maximally
// compatible with Safari, we hope!!
std::string user_agent;
// base::StringAppendF(
// &user_agent,
// "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d",
// os_info.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR,
// product.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR);
// return user_agent;
return "<Insert desired user agent here>";
}
Click to expand...
Click to collapse
Would it be possible for you to share the apk? This is frustrating me beyond belief after I moved to Nougat.
Found a solution for this problem, it was caused by a SELinux context which blocked read access to the command line file.
Download this script and copy it on the SDCard.
Install Android Terminal Emulator, then enter:
Code:
su
sh /sdcard/chrome.sh
- Testing 7.x fix. https://play.google.com/store/apps/details?id=com.linuxjet.apps.ChromeUA
jpeterson said:
- Testing 7.x fix. https://play.google.com/store/apps/details?id=com.linuxjet.apps.ChromeUA
Click to expand...
Click to collapse
Thank you. Is this working for anyone?
cobram3 said:
Thank you. Is this working for anyone?
Click to expand...
Click to collapse
It is available on the play store. I can not guarantee this will work, but I have tested it on my 7.x devices and 8.x devices and it is working on them.
Does not work on my OnePlus 5T on Android 8.0 rooted with Magisk.
Neither does the script posted above.
Any other ideas? I'm sick of manually selecting "view non crippled site" every time I open any webpage.
"Mobile" sites need to die!
EDIT: I figured it out, I needed to set the /data/local directory to be readable by all. (The script above already got the file permissions right for the chrome-command-line file, just not the directory it lived in). After that the user agent string seems to be working as it should and I can actually view useful webpages again!
Well, so much for that.
I wiped my phone and started over, and the same steps I used last time have no effect this time. I'm stuck in mobile website hell.
Anyone with any idea how to fix this?
EDIT: This seems to be related to the file permissions issue still, but I'm not sure how to fix it. When I'm not root, I get permission denied when I do an ls on the /data/local directory, despite that directory, and all the ones above it, being set 755. So whatever is blocking me from being able to ls that directory is also likely blocking the ability for chrome to read that file and behave like a useful web browser instead of a completely crippled one.
ve6rah said:
Does not work on my OnePlus 5T on Android 8.0 rooted with Magisk.
Neither does the script posted above.
Any other ideas? I'm sick of manually selecting "view non crippled site" every time I open any webpage.
"Mobile" sites need to die!
EDIT: I figured it out, I needed to set the /data/local directory to be readable by all. (The script above already got the file permissions right for the chrome-command-line file, just not the directory it lived in). After that the user agent string seems to be working as it should and I can actually view useful webpages again!
Click to expand...
Click to collapse
You can create a "chrome desktop"widget with that app,only by this way,it seems to work.
Unfortunately that only works for opening the browser and does nothing for links clicked in our applications.
Why do developers of websites hate mobile users? This isn't 1998 anymore, people want to access websites from their phones! We shouldn't have to resort to such ridiculous lengths to enable such basic functionality as a working web browser!
https://forum.xda-developers.com/showthread.php?t=1811101&page=13 #128
That helps quite a bit.
Now of course I've run in to another problem. AMP. google assistant and related products love to push AMP pages instead of websites, and chrome won't open them in desktop mode, only in mobile mode. I wonder if there's some way to convince Google assistant to behave and link to real webpages?
*sigh* it's amazing how far companies are willing to go to cripple their websites!
EDIT: Found it! DeAMPify in the play store translates all those external programs (like the google feed) to non amp versions before passing them to the browser.
With enough steps and work-arounds you too can have a functioning web-browser on your smartphone!
I'm here to confirm Wootever's script working on [ROM][8.1.0][STABLE][OFFICIAL][TREBLE] AospExtended ROM V5.4 [Z2 PRO]. I had already created the chrome-command-line file via file explorer and set permissions to 755, but it wasn't working. Customized the UA string to my liking, btw (X11; Linux Arm64).
The way G00gl€ is developing Chrome is fLIck1ng annoying, this is basic functionality being set aside because fLIck you. Latest Android Chrome versions (63 to 66) are a piece of sh1t imho.
Cheers
Wootever said:
Found a solution for this problem, it was caused by a SELinux context which blocked read access to the command line file.
Download this script and copy it on the SDCard.
Install Android Terminal Emulator, then enter:
Code:
su
sh /sdcard/chrome.sh
Click to expand...
Click to collapse
Does anyone still have this file?
Reupload
Reupload ulozto.sk/file/R55e4UbG3ppA/chrome-sh